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()
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user