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
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}

View File

@@ -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>

View File

@@ -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>
);

View File

@@ -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">

View File

@@ -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} />

View File

@@ -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()}

View File

@@ -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()}

View File

@@ -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)}
>

View File

@@ -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()) || ""}
/>
)}

View File

@@ -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()}
/>