Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions frontend/react-app/src/pages/MyTasks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,48 @@ const headerAndAccessors = [
{
Header: "Status",
accessor: "status",
Cell: (original) => {
const statusValue = original.value;
let formattedStatus;
switch (statusValue) {
case "InProgress":
formattedStatus = "In Progress";
break;
case "notStarted":
formattedStatus = "Not Started";
break;
case "done":
formattedStatus = "Done";
break;
default:
formattedStatus = statusValue;
}
return <span>{formattedStatus}</span>;
}
},
{
Header: "Priority",
accessor: "priority",
Cell: (original) => {
const prioirtyValue = original.value;
let color;
switch (prioirtyValue) {
case "HIGH":
color = "red";
break;
case "MEDIUM":
color = "orange";
break;
case "LOW":
color = "green";
break;
default:
color = "black";
}

return <span style={{ color }}>{prioirtyValue}</span>;
}

},
{
Header: "Is Locked",
Expand Down
44 changes: 41 additions & 3 deletions frontend/react-app/src/pages/TeamTasks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,49 @@ function TeamTasks(){
{
Header: "Priority",
accessor: "priority",
Cell: (original) => {
const prioirtyValue = original.value;
let color;
switch (prioirtyValue) {
case "HIGH":
color = "red";
break;
case "MEDIUM":
color = "orange";
break;
case "LOW":
color = "green";
break;
default:
color = "black";
}

return <span style={{ color }}>{prioirtyValue}</span>;
}

},
{
Header: "Status",
accessor: "status",
},
Header: "Status",
accessor: "status",
Cell: (original) => {
const statusValue = original.value;
let formattedStatus;
switch (statusValue) {
case "InProgress":
formattedStatus = "In Progress";
break;
case "notStarted":
formattedStatus = "Not Started";
break;
case "done":
formattedStatus = "Done";
break;
default:
formattedStatus = statusValue;
}
return <span>{formattedStatus}</span>;
}
},
{
Header: "Is Locked",
accessor: "isLocked",
Expand Down