|
|
@ -46,13 +46,11 @@ const TaskTable = ({
|
|
|
|
const value = {
|
|
|
|
const value = {
|
|
|
|
status: "Checking",
|
|
|
|
status: "Checking",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
taskController
|
|
|
|
taskController.taskPatch(value, record?.id).then((response: any) => {
|
|
|
|
.taskPatch(value, record?.id)
|
|
|
|
if (response?.status == 403) {
|
|
|
|
.then((response: { data: TTask; status: number }) => {
|
|
|
|
showErrorModal(response);
|
|
|
|
if (response?.status == 403) {
|
|
|
|
}
|
|
|
|
showErrorModal(response);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -228,6 +226,7 @@ const TaskTable = ({
|
|
|
|
title: "Service",
|
|
|
|
title: "Service",
|
|
|
|
dataIndex: "service",
|
|
|
|
dataIndex: "service",
|
|
|
|
width: isMobile ? "5%" : "7%",
|
|
|
|
width: isMobile ? "5%" : "7%",
|
|
|
|
|
|
|
|
align: "center",
|
|
|
|
key: "5",
|
|
|
|
key: "5",
|
|
|
|
ellipsis: {
|
|
|
|
ellipsis: {
|
|
|
|
showTitle: false,
|
|
|
|
showTitle: false,
|
|
|
@ -246,6 +245,7 @@ const TaskTable = ({
|
|
|
|
title: "Status",
|
|
|
|
title: "Status",
|
|
|
|
dataIndex: "status",
|
|
|
|
dataIndex: "status",
|
|
|
|
width: isMobile ? "5%" : "8%",
|
|
|
|
width: isMobile ? "5%" : "8%",
|
|
|
|
|
|
|
|
align: "center",
|
|
|
|
key: "6",
|
|
|
|
key: "6",
|
|
|
|
ellipsis: {
|
|
|
|
ellipsis: {
|
|
|
|
showTitle: false,
|
|
|
|
showTitle: false,
|
|
|
@ -400,22 +400,29 @@ const TaskTable = ({
|
|
|
|
return columns;
|
|
|
|
return columns;
|
|
|
|
}, [role]);
|
|
|
|
}, [role]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const dataSource = data?.characters?.map((u, i) => {
|
|
|
|
|
|
|
|
const createdMoment = moment(u?.created_at, "YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
|
|
|
const isToday = createdMoment.isSame(moment(), "day");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
...u,
|
|
|
|
|
|
|
|
no: i + 1,
|
|
|
|
|
|
|
|
created: isToday
|
|
|
|
|
|
|
|
? `Today at ${createdMoment.format("HH:mm")}`
|
|
|
|
|
|
|
|
: createdMoment.format("DD.MM.YYYY HH:mm"),
|
|
|
|
|
|
|
|
key: u?.id,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Table
|
|
|
|
<Table
|
|
|
|
onRow={(record: any) => ({
|
|
|
|
onRow={(record: any) => ({
|
|
|
|
onClick: (event) => handleRowClick(record, event),
|
|
|
|
onClick: (event) => handleRowClick(record, event),
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
dataSource={data?.characters?.map((u, i) => ({
|
|
|
|
dataSource={dataSource}
|
|
|
|
...u,
|
|
|
|
|
|
|
|
no: i + 1,
|
|
|
|
|
|
|
|
created: moment(u?.created_at, "YYYY-MM-DD HH:mm:ss").format(
|
|
|
|
|
|
|
|
"DD.MM.YYYY HH:mm"
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
key: u?.id,
|
|
|
|
|
|
|
|
}))}
|
|
|
|
|
|
|
|
columns={columns as any}
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
columns={columns as any}
|
|
|
|
loading={isLoading}
|
|
|
|
loading={isLoading}
|
|
|
|
rowClassName={rowClassName}
|
|
|
|
rowClassName={rowClassName}
|
|
|
|
scroll={{ x: "768px" }}
|
|
|
|
scroll={{ x: "768px" }}
|
|
|
|