- fixed scheduled-out-today.component.jsx
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -18,12 +18,13 @@ export default function DashboardScheduledOutToday({data, ...cardProps}) {
|
|||||||
if (!data.scheduled_out_today)
|
if (!data.scheduled_out_today)
|
||||||
return <DashboardRefreshRequired {...cardProps} />;
|
return <DashboardRefreshRequired {...cardProps} />;
|
||||||
|
|
||||||
data.scheduled_out_today.forEach((item) => {
|
const filteredScheduledOutToday = data.scheduled_out_today.map((item) => {
|
||||||
item.scheduled_completion = dayjs(item.scheduled_completion).format("hh:mm a")
|
return {
|
||||||
});
|
...item,
|
||||||
data.scheduled_out_today.sort(function (a, b) {
|
scheduled_completion: dayjs(item.scheduled_completion).format("hh:mm a"),
|
||||||
return new Date(a.scheduled_completion) - new Date(b.scheduled_completion);
|
timestamp: dayjs(item.scheduled_completion).valueOf(),
|
||||||
});
|
}
|
||||||
|
}).sort((a, b) => a.timestamp - b.timestamp);
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@@ -167,7 +168,7 @@ export default function DashboardScheduledOutToday({data, ...cardProps}) {
|
|||||||
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={filteredScheduledOutToday}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
Reference in New Issue
Block a user