mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
refactor(FE): Use approval step_name or action for status
This commit is contained in:
@@ -1013,21 +1013,6 @@ const RecordingTable = () => {
|
|||||||
approvalHistoryModal.openModal();
|
approvalHistoryModal.openModal();
|
||||||
};
|
};
|
||||||
|
|
||||||
const getStatusText = (action: string) => {
|
|
||||||
switch (action) {
|
|
||||||
case 'APPROVED':
|
|
||||||
return 'Disetujui';
|
|
||||||
case 'REJECTED':
|
|
||||||
return 'Ditolak';
|
|
||||||
case 'CREATED':
|
|
||||||
return 'Dibuat';
|
|
||||||
case 'UPDATED':
|
|
||||||
return 'Diperbarui';
|
|
||||||
default:
|
|
||||||
return action;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Badge
|
<Badge
|
||||||
variant='soft'
|
variant='soft'
|
||||||
@@ -1038,7 +1023,7 @@ const RecordingTable = () => {
|
|||||||
}}
|
}}
|
||||||
onClick={openApprovalHistory}
|
onClick={openApprovalHistory}
|
||||||
>
|
>
|
||||||
{getStatusText(approval.action)}
|
{approval.step_name || approval.action}
|
||||||
</Badge>
|
</Badge>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user