fix: update log_type from final to consultation in final log table and sync command
This commit is contained in:
@@ -81,8 +81,10 @@ class SyncLogTypeFromTelemedicine extends Command
|
||||
continue;
|
||||
}
|
||||
|
||||
$mappedType = $primeLog->type === 'final' ? 'consultation' : $primeLog->type;
|
||||
|
||||
// Skip if log_type already set correctly
|
||||
if ($requestLog->log_type === $primeLog->type) {
|
||||
if ($requestLog->log_type === $mappedType) {
|
||||
$skipped++;
|
||||
$bar->advance();
|
||||
continue;
|
||||
@@ -93,7 +95,7 @@ class SyncLogTypeFromTelemedicine extends Command
|
||||
DB::table('request_logs')
|
||||
->where('id', $requestLog->id)
|
||||
->update([
|
||||
'log_type' => $primeLog->type,
|
||||
'log_type' => $mappedType,
|
||||
'updated_at' => now()
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -320,36 +320,18 @@ export default function TableListFinalLog() {
|
||||
label: localeData.txtRequestCode,
|
||||
isSort: true,
|
||||
},
|
||||
{
|
||||
id: 'log_type',
|
||||
align: 'center',
|
||||
label: 'Tipe LOG',
|
||||
isSort: true,
|
||||
},
|
||||
{
|
||||
id: 'provider',
|
||||
align: 'left',
|
||||
label: localeData.txtProvider,
|
||||
isSort: true,
|
||||
},
|
||||
{
|
||||
id: 'full_name',
|
||||
align: 'left',
|
||||
label: localeData.txtName,
|
||||
isSort: true,
|
||||
},
|
||||
{
|
||||
id: 'submission_date',
|
||||
align: 'center',
|
||||
label: localeData.txtSubmissionDate,
|
||||
isSort: true,
|
||||
},
|
||||
{
|
||||
id: 'service_type',
|
||||
align: 'center',
|
||||
label: localeData.txtServiceType,
|
||||
isSort: true,
|
||||
},
|
||||
{
|
||||
id: 'log_type',
|
||||
align: 'center',
|
||||
label: 'LOG Type',
|
||||
isSort: true,
|
||||
},
|
||||
{
|
||||
id: 'discharge_date',
|
||||
align: 'center',
|
||||
@@ -454,17 +436,17 @@ export default function TableListFinalLog() {
|
||||
</Label>
|
||||
),
|
||||
log_type:
|
||||
obj.log_type === 'final' ? (
|
||||
obj.log_type === 'consultation' ? (
|
||||
<Label color='info'>
|
||||
Final
|
||||
Konsultasi
|
||||
</Label>
|
||||
) : obj.log_type === 'prescription' ? (
|
||||
<Label color='warning'>
|
||||
Prescription
|
||||
Resep
|
||||
</Label>
|
||||
) : obj.log_type === 'reference' ? (
|
||||
<Label color='secondary'>
|
||||
Reference
|
||||
Rujukan
|
||||
</Label>
|
||||
) : (
|
||||
<Label color='default'>
|
||||
|
||||
Reference in New Issue
Block a user