Skip to content

Commit

Permalink
Merge pull request #846 from AI4Bharat/etta
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
aparna-aa authored Dec 3, 2024
2 parents d79b085 + 2863820 commit ba3e252
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion src/containers/Organization/OrgLevelTaskList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ const OrgLevelTaskList = () => {
"created_at",
"updated_at",
"Action",
"eta"
];
const defaultDisabledDisplayCols = [
"description",
Expand Down Expand Up @@ -579,7 +580,7 @@ const OrgLevelTaskList = () => {
<Badge
color="primary"
variant="dot"
invisible={!orgSearchValue[col.name].length}
invisible={!orgSearchValue[col.name]?.length}
>
<SearchIcon id={col.name + "_btn"} />
</Badge>
Expand Down Expand Up @@ -759,6 +760,36 @@ const OrgLevelTaskList = () => {
customBodyRender: renderTaskListColumnCell,
},
};
const ETA = {
name: "eta",
label: "ETA",
options: {
filter: false,
sort: false,
canBeSearch: false,
display: orgTaskColDisplayState["eta"],
align: "center",
customHeadLabelRender: CustomTableHeader,
setCellHeaderProps: () => ({
className: tableClasses.cellHeaderProps,
}),
customBodyRender: (value, tableMeta) => {
const { tableData: data, rowIndex } = tableMeta;
const selectedTask = data[rowIndex];

return (
<Box
style={{
color: selectedTask.is_active ? "" : "grey",
}}
>
{value ? moment(value).format("DD/MM/YYYY HH:mm:ss") : "-"}
</Box>
);
},
},
};


const assigneeColumn = {
name: "user",
Expand Down Expand Up @@ -954,6 +985,7 @@ const OrgLevelTaskList = () => {
columns.splice(2, 0, videoName);
columns.splice(3, 0, createdAtColumn);
columns.splice(4, 0, updatedAtColumn);
columns.splice(5, 0, ETA);
columns.splice(7, 0, assigneeColumn);
columns.splice(10, 0, descriptionColumn);

Expand Down

0 comments on commit ba3e252

Please sign in to comment.