added new functions ,getProjectStatusName and getProjectStatusColor

This commit is contained in:
Pramod Mahajan 2025-04-23 11:00:10 +05:30
parent 099098d39a
commit d9f4bc47f6

View File

@ -1,25 +1,32 @@
export const ProjectStatus =(statusId)=>{ export const getProjectStatusName = (statusId) => {
switch (statusId) { switch (statusId) {
case 1: case 1:
return "Active" return "Active";
break; case 2:
case 2: return "On Hold";
return "On Hold" // case 3:
break; // return "Suspended";
// case 3: case 3:
// return "Suspended" return "Inactive";
// break; case 4:
case 3: return "Completed";
return "Inactive" }
break; };
case 4:
return "Completed"
break;
default:
break;
}
}
export const getProjectStatusColor = (statusId) => {
switch (statusId) {
case 1:
return "bg-label-success";
case 2:
return "bg-label-warning";
case 3:
return "bg-label-info";
case 4:
return "bg-label-secondary";
case 5:
return "bg-label-dark";
}
};
// for different color for each user // for different color for each user
export function hashString(str) { export function hashString(str) {