working leantime widget 43
This commit is contained in:
parent
5fd5b1edec
commit
6709db5c29
@ -190,21 +190,23 @@ export async function GET(request: NextRequest) {
|
||||
let statusType;
|
||||
let statusClass;
|
||||
|
||||
switch (task.status.toLowerCase()) {
|
||||
case 'new':
|
||||
// Convert numeric status to string and handle accordingly
|
||||
const statusStr = task.status.toString();
|
||||
switch (statusStr) {
|
||||
case '1':
|
||||
statusType = 'NEW';
|
||||
statusClass = 'bg-blue-100 text-blue-800';
|
||||
break;
|
||||
case 'in_progress':
|
||||
case '2':
|
||||
statusType = 'INPROGRESS';
|
||||
statusClass = 'bg-yellow-100 text-yellow-800';
|
||||
break;
|
||||
case 'done':
|
||||
case '3':
|
||||
statusType = 'DONE';
|
||||
statusClass = 'bg-green-100 text-green-800';
|
||||
break;
|
||||
default:
|
||||
statusType = 'NONE';
|
||||
statusType = 'UNKNOWN';
|
||||
statusClass = 'bg-gray-100 text-gray-800';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user