feature/IO-3497-Ant-Design-v5-to-v6 - Checkpoint

This commit is contained in:
Dave
2026-01-12 14:22:29 -05:00
parent 0b2a7f07a7
commit f99f8ab7f8
10 changed files with 26 additions and 15 deletions

View File

@@ -413,8 +413,10 @@ export function BillFormComponent({
/> />
<Statistic <Statistic
title={t("bills.labels.discrepancy")} title={t("bills.labels.discrepancy")}
valueStyle={{ styles={{
color: totals.discrepancy.getAmount() === 0 ? "green" : "red" value: {
color: totals.discrepancy.getAmount() === 0 ? "green" : "red"
}
}} }}
value={totals.discrepancy.toFormat()} value={totals.discrepancy.toFormat()}
precision={2} precision={2}

View File

@@ -36,7 +36,7 @@ export function DashboardTotalProductionHours({ bodyshop, data, ...cardProps })
<Statistic <Statistic
title={t("dashboard.labels.prodhrs")} title={t("dashboard.labels.prodhrs")}
value={hours.total.toFixed(1)} value={hours.total.toFixed(1)}
valueStyle={{ color: aboveTargetHours ? "green" : "red" }} styles={{ value: { color: aboveTargetHours ? "green" : "red" } }}
/> />
</Space> </Space>
</Card> </Card>

View File

@@ -5,7 +5,7 @@ export default function DataLabel({
hideIfNull, hideIfNull,
children, children,
open = true, open = true,
valueStyle = {}, styles,
valueClassName, valueClassName,
onValueClick, onValueClick,
...props ...props
@@ -33,7 +33,11 @@ export default function DataLabel({
className={valueClassName} className={valueClassName}
onClick={onValueClick} 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>
</div> </div>
); );

View File

@@ -404,7 +404,7 @@ export default function CdkLikePostForm({ bodyshop, socket, job, logsRef, mode,
<Typography.Title>=</Typography.Title> <Typography.Title>=</Typography.Title>
<Statistic <Statistic
title={t("jobs.labels.dms.notallocated")} title={t("jobs.labels.dms.notallocated")}
valueStyle={{ color: discrep.getAmount() === 0 ? "green" : "red" }} styles={{ value: { color: discrep.getAmount() === 0 ? "green" : "red" } }}
value={discrep.toFormat()} value={discrep.toFormat()}
/> />
<Button disabled={disablePost} htmlType="submit"> <Button disabled={disablePost} htmlType="submit">

View File

@@ -232,7 +232,10 @@ export function ScheduleEventComponent({
{(event.job && event.job.alt_transport) || ""} {(event.job && event.job.alt_transport) || ""}
<ScheduleAtChange job={event && event.job} /> <ScheduleAtChange job={event && event.job} />
</DataLabel> </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} /> <ProductionListColumnComment record={event && event.job} />
</DataLabel> </DataLabel>
<ScheduleEventNote event={event} /> <ScheduleEventNote event={event} />

View File

@@ -43,7 +43,7 @@ export function JobCloseRoGuardProfit({ job, warningCallback }) {
<Card title={t("jobs.labels.accountsreceivable")} style={{ height: "100%" }}> <Card title={t("jobs.labels.accountsreceivable")} style={{ height: "100%" }}>
<DataLabel label={t("payments.labels.totalpayments")}>{total.toFormat()}</DataLabel> <DataLabel label={t("payments.labels.totalpayments")}>{total.toFormat()}</DataLabel>
<DataLabel <DataLabel
valueStyle={{ color: balance.getAmount() !== 0 ? "red" : "green" }} styles={{ value: { color: balance.getAmount() !== 0 ? "red" : "green" } }}
label={t("payments.labels.balance")} label={t("payments.labels.balance")}
> >
{balance.toFormat()} {balance.toFormat()}

View File

@@ -179,7 +179,7 @@ export function JobPayments({ job, bodyshop, setPaymentContext, setCardPaymentCo
</Button> </Button>
<DataLabel <DataLabel
valueStyle={{ color: balance.getAmount() !== 0 ? "red" : "green" }} styles={{ value: { color: balance.getAmount() !== 0 ? "red" : "green" } }}
label={t("payments.labels.balance")} label={t("payments.labels.balance")}
> >
{balance.toFormat()} {balance.toFormat()}

View File

@@ -139,7 +139,7 @@ export function JobsDetailHeader({ job, bodyshop, disabled, insertAuditTrail, is
) : null} ) : null}
</Space> </Space>
</DataLabel> </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} /> <ProductionListColumnComment record={job} />
</DataLabel> </DataLabel>
{!isPartsEntry && <DataLabel label={t("jobs.fields.ins_co_nm_short")}>{job.ins_co_nm}</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 || ""} {job.owner?.tax_number || ""}
</DataLabel> </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 || ""} {job.owner?.note || ""}
</DataLabel> </DataLabel>
</div> </div>
@@ -323,7 +323,7 @@ export function JobsDetailHeader({ job, bodyshop, disabled, insertAuditTrail, is
{job.vehicle?.notes && ( {job.vehicle?.notes && (
<DataLabel <DataLabel
label={t("vehicles.fields.notes")} label={t("vehicles.fields.notes")}
valueStyle={{ whiteSpace: "pre-wrap" }} styles={{ value: { whiteSpace: "pre-wrap" } }}
valueClassName={notesClamped ? "clamp" : ""} valueClassName={notesClamped ? "clamp" : ""}
onValueClick={() => setNotesClamped(!notesClamped)} onValueClick={() => setNotesClamped(!notesClamped)}
> >

View File

@@ -33,7 +33,7 @@ export default function PaymentFormTotalPayments({ jobid }) {
{balance && ( {balance && (
<Statistic <Statistic
title={t("payments.labels.balance")} title={t("payments.labels.balance")}
valueStyle={{ color: balance.getAmount() !== 0 ? "red" : "green" }} styles={{ value: { color: balance.getAmount() !== 0 ? "red" : "green" } }}
value={(balance && balance.toFormat()) || ""} value={(balance && balance.toFormat()) || ""}
/> />
)} )}

View File

@@ -496,8 +496,10 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, set
<Typography.Title>=</Typography.Title> <Typography.Title>=</Typography.Title>
<Statistic <Statistic
title={t("jobs.labels.pimraryamountpayable")} title={t("jobs.labels.pimraryamountpayable")}
valueStyle={{ styles={{
color: discrep.getAmount() >= 0 ? "green" : "red" value: {
color: discrep.getAmount() >= 0 ? "green" : "red"
}
}} }}
value={discrep.toFormat()} value={discrep.toFormat()}
/> />