IO-2640 Change Variable Names and adjust CSS
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
@@ -23,8 +23,8 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
const [state, setState] = useState({
|
||||
sortedInfo: {},
|
||||
});
|
||||
const [isTVMode_scheduled_out, setIsTVMode_scheduled_out] = useLocalStorage(
|
||||
"isTVMode_scheduled_out",
|
||||
const [isTvModeScheduledOut, setIsTvModeScheduledOut] = useLocalStorage(
|
||||
"isTvModeScheduledOut",
|
||||
false
|
||||
);
|
||||
|
||||
@@ -48,10 +48,10 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
return new Date(a.scheduled_completion) - new Date(b.scheduled_completion);
|
||||
});
|
||||
|
||||
const TV_fontSize = 18;
|
||||
const TV_fontWeight = "bold";
|
||||
const tvFontSize = 18;
|
||||
const tvFontWeight = "bold";
|
||||
|
||||
const tv_columns = [
|
||||
const tvColumns = [
|
||||
{
|
||||
title: t("jobs.fields.scheduled_completion"),
|
||||
dataIndex: "scheduled_completion",
|
||||
@@ -63,7 +63,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
state.sortedInfo.columnKey === "scheduled_completion" &&
|
||||
state.sortedInfo.order,
|
||||
render: (text, record) => (
|
||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
||||
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||
<TimeFormatter>{record.scheduled_completion}</TimeFormatter>
|
||||
</span>
|
||||
),
|
||||
@@ -81,7 +81,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<Space>
|
||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
||||
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||
{record.ro_number || t("general.labels.na")}
|
||||
{record.production_vars && record.production_vars.alert ? (
|
||||
<ExclamationCircleFilled className="production-alert" />
|
||||
@@ -114,12 +114,12 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
to={"/manage/owners/" + record.ownerid}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
||||
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||
<OwnerNameDisplay ownerObject={record} />
|
||||
</span>
|
||||
</Link>
|
||||
) : (
|
||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
||||
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||
<OwnerNameDisplay ownerObject={record} />
|
||||
</span>
|
||||
);
|
||||
@@ -145,7 +145,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
to={"/manage/vehicles/" + record.vehicleid}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
||||
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||
{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||
record.v_model_desc || ""
|
||||
}`}
|
||||
@@ -153,7 +153,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
</Link>
|
||||
) : (
|
||||
<span
|
||||
style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}
|
||||
style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}
|
||||
>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||
record.v_model_desc || ""
|
||||
}`}</span>
|
||||
@@ -183,7 +183,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
||||
[],
|
||||
render: (text, record) => (
|
||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
||||
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||
{record.alt_transport}
|
||||
</span>
|
||||
),
|
||||
@@ -210,7 +210,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
||||
[],
|
||||
render: (text, record) => (
|
||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
||||
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||
{record.status}
|
||||
</span>
|
||||
),
|
||||
@@ -225,8 +225,8 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
state.sortedInfo.order,
|
||||
align: "right",
|
||||
render: (text, record) => (
|
||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
||||
{record.joblines_body}
|
||||
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||
{record.joblines_body.toFixed(1)}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
@@ -239,8 +239,8 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
state.sortedInfo.columnKey === "joblines_ref" && state.sortedInfo.order,
|
||||
align: "right",
|
||||
render: (text, record) => (
|
||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
||||
{record.joblines_ref}
|
||||
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||
{record.joblines_ref.toFixed(1)}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
@@ -430,8 +430,8 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
<Space>
|
||||
<Typography.Text>{t("general.labels.tvmode")}</Typography.Text>
|
||||
<Switch
|
||||
onClick={() => setIsTVMode_scheduled_out(!isTVMode_scheduled_out)}
|
||||
defaultChecked={isTVMode_scheduled_out}
|
||||
onClick={() => setIsTvModeScheduledOut(!isTvModeScheduledOut)}
|
||||
defaultChecked={isTvModeScheduledOut}
|
||||
/>
|
||||
</Space>
|
||||
}
|
||||
@@ -441,12 +441,12 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
<Table
|
||||
onChange={handleTableChange}
|
||||
pagination={false}
|
||||
columns={isTVMode_scheduled_out ? tv_columns : columns}
|
||||
columns={isTvModeScheduledOut ? tvColumns : columns}
|
||||
scroll={{ x: true, y: "calc(100% - 2em)" }}
|
||||
rowKey="id"
|
||||
style={{ height: "85%" }}
|
||||
dataSource={data.scheduled_out_today}
|
||||
size={isTVMode_scheduled_out ? "small" : "middle"}
|
||||
size={isTvModeScheduledOut ? "small" : "middle"}
|
||||
/>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user