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) {
case 1:
return "Active"
break;
return "Active";
case 2:
return "On Hold"
break;
return "On Hold";
// case 3:
// return "Suspended"
// break;
// return "Suspended";
case 3:
return "Inactive"
break;
return "Inactive";
case 4:
return "Completed"
break;
default:
break;
}
return "Completed";
}
};
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
export function hashString(str) {