feature/IO-3497-Ant-Design-v5-to-v6 - Checkpoint
This commit is contained in:
@@ -413,8 +413,10 @@ export function BillFormComponent({
|
||||
/>
|
||||
<Statistic
|
||||
title={t("bills.labels.discrepancy")}
|
||||
valueStyle={{
|
||||
color: totals.discrepancy.getAmount() === 0 ? "green" : "red"
|
||||
styles={{
|
||||
value: {
|
||||
color: totals.discrepancy.getAmount() === 0 ? "green" : "red"
|
||||
}
|
||||
}}
|
||||
value={totals.discrepancy.toFormat()}
|
||||
precision={2}
|
||||
|
||||
@@ -36,7 +36,7 @@ export function DashboardTotalProductionHours({ bodyshop, data, ...cardProps })
|
||||
<Statistic
|
||||
title={t("dashboard.labels.prodhrs")}
|
||||
value={hours.total.toFixed(1)}
|
||||
valueStyle={{ color: aboveTargetHours ? "green" : "red" }}
|
||||
styles={{ value: { color: aboveTargetHours ? "green" : "red" } }}
|
||||
/>
|
||||
</Space>
|
||||
</Card>
|
||||
|
||||
@@ -5,7 +5,7 @@ export default function DataLabel({
|
||||
hideIfNull,
|
||||
children,
|
||||
open = true,
|
||||
valueStyle = {},
|
||||
styles,
|
||||
valueClassName,
|
||||
onValueClick,
|
||||
...props
|
||||
@@ -33,7 +33,11 @@ export default function DataLabel({
|
||||
className={valueClassName}
|
||||
onClick={onValueClick}
|
||||
>
|
||||
{typeof children === "string" ? <Typography.Text style={valueStyle}>{children}</Typography.Text> : children}
|
||||
{typeof children === "string" ? (
|
||||
<Typography.Text style={styles?.value}>{children}</Typography.Text>
|
||||
) : (
|
||||
children
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -404,7 +404,7 @@ export default function CdkLikePostForm({ bodyshop, socket, job, logsRef, mode,
|
||||
<Typography.Title>=</Typography.Title>
|
||||
<Statistic
|
||||
title={t("jobs.labels.dms.notallocated")}
|
||||
valueStyle={{ color: discrep.getAmount() === 0 ? "green" : "red" }}
|
||||
styles={{ value: { color: discrep.getAmount() === 0 ? "green" : "red" } }}
|
||||
value={discrep.toFormat()}
|
||||
/>
|
||||
<Button disabled={disablePost} htmlType="submit">
|
||||
|
||||
@@ -232,7 +232,10 @@ export function ScheduleEventComponent({
|
||||
{(event.job && event.job.alt_transport) || ""}
|
||||
<ScheduleAtChange job={event && event.job} />
|
||||
</DataLabel>
|
||||
<DataLabel label={t("jobs.fields.comment")} valueStyle={{ overflow: "hidden", textOverflow: "ellipsis" }}>
|
||||
<DataLabel
|
||||
label={t("jobs.fields.comment")}
|
||||
styles={{ value: { overflow: "hidden", textOverflow: "ellipsis" } }}
|
||||
>
|
||||
<ProductionListColumnComment record={event && event.job} />
|
||||
</DataLabel>
|
||||
<ScheduleEventNote event={event} />
|
||||
|
||||
@@ -43,7 +43,7 @@ export function JobCloseRoGuardProfit({ job, warningCallback }) {
|
||||
<Card title={t("jobs.labels.accountsreceivable")} style={{ height: "100%" }}>
|
||||
<DataLabel label={t("payments.labels.totalpayments")}>{total.toFormat()}</DataLabel>
|
||||
<DataLabel
|
||||
valueStyle={{ color: balance.getAmount() !== 0 ? "red" : "green" }}
|
||||
styles={{ value: { color: balance.getAmount() !== 0 ? "red" : "green" } }}
|
||||
label={t("payments.labels.balance")}
|
||||
>
|
||||
{balance.toFormat()}
|
||||
|
||||
@@ -179,7 +179,7 @@ export function JobPayments({ job, bodyshop, setPaymentContext, setCardPaymentCo
|
||||
</Button>
|
||||
|
||||
<DataLabel
|
||||
valueStyle={{ color: balance.getAmount() !== 0 ? "red" : "green" }}
|
||||
styles={{ value: { color: balance.getAmount() !== 0 ? "red" : "green" } }}
|
||||
label={t("payments.labels.balance")}
|
||||
>
|
||||
{balance.toFormat()}
|
||||
|
||||
@@ -139,7 +139,7 @@ export function JobsDetailHeader({ job, bodyshop, disabled, insertAuditTrail, is
|
||||
) : null}
|
||||
</Space>
|
||||
</DataLabel>
|
||||
<DataLabel label={t("jobs.fields.comment")} valueStyle={{ overflow: "hidden", textOverflow: "ellipsis" }}>
|
||||
<DataLabel label={t("jobs.fields.comment")} styles={{ value: { overflow: "hidden", textOverflow: "ellipsis" } }}>
|
||||
<ProductionListColumnComment record={job} />
|
||||
</DataLabel>
|
||||
{!isPartsEntry && <DataLabel label={t("jobs.fields.ins_co_nm_short")}>{job.ins_co_nm}</DataLabel>}
|
||||
@@ -281,7 +281,7 @@ export function JobsDetailHeader({ job, bodyshop, disabled, insertAuditTrail, is
|
||||
{job.owner?.tax_number || ""}
|
||||
</DataLabel>
|
||||
)}
|
||||
<DataLabel label={t("owners.fields.note")} valueStyle={{ overflow: "hidden", textOverflow: "ellipsis" }}>
|
||||
<DataLabel label={t("owners.fields.note")} styles={{ value: { overflow: "hidden", textOverflow: "ellipsis" } }}>
|
||||
{job.owner?.note || ""}
|
||||
</DataLabel>
|
||||
</div>
|
||||
@@ -323,7 +323,7 @@ export function JobsDetailHeader({ job, bodyshop, disabled, insertAuditTrail, is
|
||||
{job.vehicle?.notes && (
|
||||
<DataLabel
|
||||
label={t("vehicles.fields.notes")}
|
||||
valueStyle={{ whiteSpace: "pre-wrap" }}
|
||||
styles={{ value: { whiteSpace: "pre-wrap" } }}
|
||||
valueClassName={notesClamped ? "clamp" : ""}
|
||||
onValueClick={() => setNotesClamped(!notesClamped)}
|
||||
>
|
||||
|
||||
@@ -33,7 +33,7 @@ export default function PaymentFormTotalPayments({ jobid }) {
|
||||
{balance && (
|
||||
<Statistic
|
||||
title={t("payments.labels.balance")}
|
||||
valueStyle={{ color: balance.getAmount() !== 0 ? "red" : "green" }}
|
||||
styles={{ value: { color: balance.getAmount() !== 0 ? "red" : "green" } }}
|
||||
value={(balance && balance.toFormat()) || ""}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -496,8 +496,10 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, set
|
||||
<Typography.Title>=</Typography.Title>
|
||||
<Statistic
|
||||
title={t("jobs.labels.pimraryamountpayable")}
|
||||
valueStyle={{
|
||||
color: discrep.getAmount() >= 0 ? "green" : "red"
|
||||
styles={{
|
||||
value: {
|
||||
color: discrep.getAmount() >= 0 ? "green" : "red"
|
||||
}
|
||||
}}
|
||||
value={discrep.toFormat()}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user