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 DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
});
|
});
|
||||||
const [isTVMode_scheduled_in, setIsTVMode_scheduled_in] = useLocalStorage(
|
const [isTvModeScheduledIn, setIsTvModeScheduledIn] = useLocalStorage(
|
||||||
"isTVMode_scheduled_in",
|
"isTvModeScheduledIn",
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -75,10 +75,10 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
return new moment(a.start) - new moment(b.start);
|
return new moment(a.start) - new moment(b.start);
|
||||||
});
|
});
|
||||||
|
|
||||||
const TV_fontSize = 18;
|
const tvFontSize = 16;
|
||||||
const TV_fontWeight = "bold";
|
const tvFontWeight = "bold";
|
||||||
|
|
||||||
const tv_columns = [
|
const tvColumns = [
|
||||||
{
|
{
|
||||||
title: t("appointments.fields.time"),
|
title: t("appointments.fields.time"),
|
||||||
dataIndex: "start",
|
dataIndex: "start",
|
||||||
@@ -88,7 +88,7 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "start" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "start" && state.sortedInfo.order,
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
<TimeFormatter>{record.start}</TimeFormatter>
|
<TimeFormatter>{record.start}</TimeFormatter>
|
||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
@@ -106,7 +106,7 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
<Space>
|
<Space>
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
{record.ro_number || t("general.labels.na")}
|
{record.ro_number || t("general.labels.na")}
|
||||||
{record.production_vars && record.production_vars.alert ? (
|
{record.production_vars && record.production_vars.alert ? (
|
||||||
<ExclamationCircleFilled className="production-alert" />
|
<ExclamationCircleFilled className="production-alert" />
|
||||||
@@ -139,12 +139,12 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
to={"/manage/owners/" + record.ownerid}
|
to={"/manage/owners/" + record.ownerid}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
<OwnerNameDisplay ownerObject={record} />
|
<OwnerNameDisplay ownerObject={record} />
|
||||||
</span>
|
</span>
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
<OwnerNameDisplay ownerObject={record} />
|
<OwnerNameDisplay ownerObject={record} />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
@@ -170,18 +170,16 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
to={"/manage/vehicles/" + record.vehicleid}
|
to={"/manage/vehicles/" + record.vehicleid}
|
||||||
onClick={(e) => e.stopPropagation()}
|
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_yr || ""} ${record.v_make_desc || ""} ${
|
||||||
record.v_model_desc || ""
|
record.v_model_desc || ""
|
||||||
}`}
|
}`}
|
||||||
</span>
|
</span>
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>{`${
|
||||||
style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}
|
record.v_model_yr || ""
|
||||||
>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
} ${record.v_make_desc || ""} ${record.v_model_desc || ""}`}</span>
|
||||||
record.v_model_desc || ""
|
|
||||||
}`}</span>
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -208,7 +206,7 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
||||||
[],
|
[],
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
{record.alt_transport}
|
{record.alt_transport}
|
||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
@@ -223,8 +221,8 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
state.sortedInfo.order,
|
state.sortedInfo.order,
|
||||||
align: "right",
|
align: "right",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
{record.joblines_body}
|
{record.joblines_body.toFixed(1)}
|
||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -237,8 +235,8 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
state.sortedInfo.columnKey === "joblines_ref" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "joblines_ref" && state.sortedInfo.order,
|
||||||
align: "right",
|
align: "right",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
{record.joblines_ref}
|
{record.joblines_ref.toFixed(1)}
|
||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -414,7 +412,6 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
const handleTableChange = (sorter) => {
|
const handleTableChange = (sorter) => {
|
||||||
setState({ ...state, sortedInfo: sorter });
|
setState({ ...state, sortedInfo: sorter });
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
title={t("dashboard.titles.scheduledindate", {
|
title={t("dashboard.titles.scheduledindate", {
|
||||||
@@ -424,8 +421,8 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
<Space>
|
<Space>
|
||||||
<Typography.Text>{t("general.labels.tvmode")}</Typography.Text>
|
<Typography.Text>{t("general.labels.tvmode")}</Typography.Text>
|
||||||
<Switch
|
<Switch
|
||||||
onClick={() => setIsTVMode_scheduled_in(!isTVMode_scheduled_in)}
|
onClick={() => setIsTvModeScheduledIn(!isTvModeScheduledIn)}
|
||||||
defaultChecked={isTVMode_scheduled_in}
|
defaultChecked={isTvModeScheduledIn}
|
||||||
/>
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
@@ -435,12 +432,12 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
<Table
|
<Table
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
columns={isTVMode_scheduled_in ? tv_columns : columns}
|
columns={isTvModeScheduledIn ? tvColumns : columns}
|
||||||
scroll={{ x: true, y: "calc(100% - 2em)" }}
|
scroll={{ x: true, y: "calc(100% - 2em)" }}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
style={{ height: "85%" }}
|
style={{ height: "85%" }}
|
||||||
dataSource={appt}
|
dataSource={appt}
|
||||||
size={isTVMode_scheduled_in ? "small" : "middle"}
|
size={isTvModeScheduledIn ? "small" : "middle"}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
});
|
});
|
||||||
const [isTVMode_scheduled_out, setIsTVMode_scheduled_out] = useLocalStorage(
|
const [isTvModeScheduledOut, setIsTvModeScheduledOut] = useLocalStorage(
|
||||||
"isTVMode_scheduled_out",
|
"isTvModeScheduledOut",
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -48,10 +48,10 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
return new Date(a.scheduled_completion) - new Date(b.scheduled_completion);
|
return new Date(a.scheduled_completion) - new Date(b.scheduled_completion);
|
||||||
});
|
});
|
||||||
|
|
||||||
const TV_fontSize = 18;
|
const tvFontSize = 18;
|
||||||
const TV_fontWeight = "bold";
|
const tvFontWeight = "bold";
|
||||||
|
|
||||||
const tv_columns = [
|
const tvColumns = [
|
||||||
{
|
{
|
||||||
title: t("jobs.fields.scheduled_completion"),
|
title: t("jobs.fields.scheduled_completion"),
|
||||||
dataIndex: "scheduled_completion",
|
dataIndex: "scheduled_completion",
|
||||||
@@ -63,7 +63,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
state.sortedInfo.columnKey === "scheduled_completion" &&
|
state.sortedInfo.columnKey === "scheduled_completion" &&
|
||||||
state.sortedInfo.order,
|
state.sortedInfo.order,
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
<TimeFormatter>{record.scheduled_completion}</TimeFormatter>
|
<TimeFormatter>{record.scheduled_completion}</TimeFormatter>
|
||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
@@ -81,7 +81,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
<Space>
|
<Space>
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
{record.ro_number || t("general.labels.na")}
|
{record.ro_number || t("general.labels.na")}
|
||||||
{record.production_vars && record.production_vars.alert ? (
|
{record.production_vars && record.production_vars.alert ? (
|
||||||
<ExclamationCircleFilled className="production-alert" />
|
<ExclamationCircleFilled className="production-alert" />
|
||||||
@@ -114,12 +114,12 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
to={"/manage/owners/" + record.ownerid}
|
to={"/manage/owners/" + record.ownerid}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
<OwnerNameDisplay ownerObject={record} />
|
<OwnerNameDisplay ownerObject={record} />
|
||||||
</span>
|
</span>
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
<OwnerNameDisplay ownerObject={record} />
|
<OwnerNameDisplay ownerObject={record} />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
@@ -145,7 +145,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
to={"/manage/vehicles/" + record.vehicleid}
|
to={"/manage/vehicles/" + record.vehicleid}
|
||||||
onClick={(e) => e.stopPropagation()}
|
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_yr || ""} ${record.v_make_desc || ""} ${
|
||||||
record.v_model_desc || ""
|
record.v_model_desc || ""
|
||||||
}`}
|
}`}
|
||||||
@@ -153,7 +153,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}
|
style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}
|
||||||
>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||||
record.v_model_desc || ""
|
record.v_model_desc || ""
|
||||||
}`}</span>
|
}`}</span>
|
||||||
@@ -183,7 +183,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
||||||
[],
|
[],
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
{record.alt_transport}
|
{record.alt_transport}
|
||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
@@ -210,7 +210,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
||||||
[],
|
[],
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
{record.status}
|
{record.status}
|
||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
@@ -225,8 +225,8 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
state.sortedInfo.order,
|
state.sortedInfo.order,
|
||||||
align: "right",
|
align: "right",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
{record.joblines_body}
|
{record.joblines_body.toFixed(1)}
|
||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -239,8 +239,8 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
state.sortedInfo.columnKey === "joblines_ref" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "joblines_ref" && state.sortedInfo.order,
|
||||||
align: "right",
|
align: "right",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span style={{ fontSize: TV_fontSize, fontWeight: TV_fontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
{record.joblines_ref}
|
{record.joblines_ref.toFixed(1)}
|
||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@@ -430,8 +430,8 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
<Space>
|
<Space>
|
||||||
<Typography.Text>{t("general.labels.tvmode")}</Typography.Text>
|
<Typography.Text>{t("general.labels.tvmode")}</Typography.Text>
|
||||||
<Switch
|
<Switch
|
||||||
onClick={() => setIsTVMode_scheduled_out(!isTVMode_scheduled_out)}
|
onClick={() => setIsTvModeScheduledOut(!isTvModeScheduledOut)}
|
||||||
defaultChecked={isTVMode_scheduled_out}
|
defaultChecked={isTvModeScheduledOut}
|
||||||
/>
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
@@ -441,12 +441,12 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
<Table
|
<Table
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
columns={isTVMode_scheduled_out ? tv_columns : columns}
|
columns={isTvModeScheduledOut ? tvColumns : columns}
|
||||||
scroll={{ x: true, y: "calc(100% - 2em)" }}
|
scroll={{ x: true, y: "calc(100% - 2em)" }}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
style={{ height: "85%" }}
|
style={{ height: "85%" }}
|
||||||
dataSource={data.scheduled_out_today}
|
dataSource={data.scheduled_out_today}
|
||||||
size={isTVMode_scheduled_out ? "small" : "middle"}
|
size={isTvModeScheduledOut ? "small" : "middle"}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -128,7 +128,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.ant-card-body {
|
.ant-card-body {
|
||||||
height: 80%;
|
height: calc(100% - 2rem);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// // background-color: red;
|
// // background-color: red;
|
||||||
// height: 90%;
|
// height: 90%;
|
||||||
|
|||||||
@@ -891,9 +891,9 @@
|
|||||||
"productionhours": "Total Hours in Production",
|
"productionhours": "Total Hours in Production",
|
||||||
"projectedmonthlysales": "Projected Monthly Sales",
|
"projectedmonthlysales": "Projected Monthly Sales",
|
||||||
"scheduledindate": "Sheduled In Today: {{date}}",
|
"scheduledindate": "Sheduled In Today: {{date}}",
|
||||||
"scheduledintoday": "Sheduled In Today:",
|
"scheduledintoday": "Sheduled In Today",
|
||||||
"scheduledoutdate": "Sheduled Out Today: {{date}}",
|
"scheduledoutdate": "Sheduled Out Today: {{date}}",
|
||||||
"scheduledouttoday": "Sheduled Out Today:"
|
"scheduledouttoday": "Sheduled Out Today"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dms": {
|
"dms": {
|
||||||
|
|||||||
Reference in New Issue
Block a user