Merge branch 'feature/IO-1828-Front-End-Package-Updates' into feature/IO-2477
This commit is contained in:
@@ -22,12 +22,13 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
if (!data.scheduled_out_today)
|
||||
return <DashboardRefreshRequired {...cardProps} />;
|
||||
|
||||
data.scheduled_out_today.forEach((item) => {
|
||||
item.scheduled_completion= dayjs(item.scheduled_completion).format("hh:mm a")
|
||||
});
|
||||
data.scheduled_out_today.sort(function (a, b) {
|
||||
return new Date(a.scheduled_completion) - new Date(b.scheduled_completion);
|
||||
});
|
||||
const filteredScheduledOutToday = data.scheduled_out_today.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
scheduled_completion: dayjs(item.scheduled_completion).format("hh:mm a"),
|
||||
timestamp: dayjs(item.scheduled_completion).valueOf(),
|
||||
}
|
||||
}).sort((a, b) => a.timestamp - b.timestamp);
|
||||
|
||||
const columns = [
|
||||
{
|
||||
@@ -171,7 +172,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||
scroll={{ x: true, y: "calc(100% - 2em)" }}
|
||||
rowKey="id"
|
||||
style={{ height: "85%" }}
|
||||
dataSource={data.scheduled_out_today}
|
||||
dataSource={filteredScheduledOutToday}
|
||||
/>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user