Merged in feature/IO-2640-TV-Mode-for-Scheduled-In-Out (pull request #1308)
IO-2640 Adjust Filters and Sorters for Table Approved-by: Dave Richer
This commit is contained in:
@@ -22,6 +22,7 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
|
filteredInfo: {},
|
||||||
});
|
});
|
||||||
const [isTvModeScheduledIn, setIsTvModeScheduledIn] = useLocalStorage(
|
const [isTvModeScheduledIn, setIsTvModeScheduledIn] = useLocalStorage(
|
||||||
"isTvModeScheduledIn",
|
"isTvModeScheduledIn",
|
||||||
@@ -205,6 +206,7 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
})
|
})
|
||||||
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
||||||
[],
|
[],
|
||||||
|
onFilter: (value, record) => value.includes(record.alt_transport),
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
{record.alt_transport}
|
{record.alt_transport}
|
||||||
@@ -406,12 +408,14 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
})
|
})
|
||||||
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
||||||
[],
|
[],
|
||||||
|
onFilter: (value, record) => value.includes(record.alt_transport),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const handleTableChange = (sorter) => {
|
const handleTableChange = (pagination, filters, sorter) => {
|
||||||
setState({ ...state, sortedInfo: sorter });
|
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
title={t("dashboard.titles.scheduledindate", {
|
title={t("dashboard.titles.scheduledindate", {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
|
filteredInfo: {},
|
||||||
});
|
});
|
||||||
const [isTvModeScheduledOut, setIsTvModeScheduledOut] = useLocalStorage(
|
const [isTvModeScheduledOut, setIsTvModeScheduledOut] = useLocalStorage(
|
||||||
"isTvModeScheduledOut",
|
"isTvModeScheduledOut",
|
||||||
@@ -152,11 +153,9 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
</span>
|
</span>
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>{`${
|
||||||
style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}
|
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>
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -182,6 +181,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
})
|
})
|
||||||
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
||||||
[],
|
[],
|
||||||
|
onFilter: (value, record) => value.includes(record.alt_transport),
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
{record.alt_transport}
|
{record.alt_transport}
|
||||||
@@ -209,6 +209,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
})
|
})
|
||||||
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
||||||
[],
|
[],
|
||||||
|
onFilter: (value, record) => value.includes(record.status),
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
<span style={{ fontSize: tvFontSize, fontWeight: tvFontWeight }}>
|
||||||
{record.status}
|
{record.status}
|
||||||
@@ -414,11 +415,12 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
})
|
})
|
||||||
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
.sort((a, b) => alphaSort(a.text, b.text))) ||
|
||||||
[],
|
[],
|
||||||
|
onFilter: (value, record) => value.includes(record.alt_transport),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const handleTableChange = (sorter) => {
|
const handleTableChange = (pagination, filters, sorter) => {
|
||||||
setState({ ...state, sortedInfo: sorter });
|
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user