tambah status cancel

This commit is contained in:
2024-01-17 10:16:50 +07:00
parent 726058067e
commit 3e383dffcf
2 changed files with 11 additions and 2 deletions

View File

@@ -183,7 +183,13 @@ class RequestLogService
]; ];
$code = $this->makeCode($row['code'], $data); $code = $this->makeCode($row['code'], $data);
$status = $row['status_final_log'] == 'Y' ? 'approved' : 'requested'; if ($row['status_final_log'] == 'Y'){
$status = 'approved';
} else if ($row['status_final_log'] == 'C'){
$status = 'canceled';
} else {
$status = 'requested';
}
$service = Service::where('name', $row['service'])->first(); $service = Service::where('name', $row['service'])->first();
if ($service){ if ($service){

View File

@@ -377,6 +377,9 @@ export default function List() {
row.status == "declined" ? row.status == "declined" ?
(<Label color='error'> {capitalizeFirstLetter(row.status)}</Label>) (<Label color='error'> {capitalizeFirstLetter(row.status)}</Label>)
: :
row.status == "canceled" ?
(<Label color='warning'> {capitalizeFirstLetter(row.status)}</Label>)
:
(<Label color='success'> {capitalizeFirstLetter(row.status)}</Label>) (<Label color='success'> {capitalizeFirstLetter(row.status)}</Label>)
} }
</TableCell> </TableCell>