fix: update log_type from final to consultation in final log table and sync command

This commit is contained in:
Iqbal
2026-05-07 13:23:48 +07:00
parent 2ae56ce039
commit 0ee868e071
2 changed files with 14 additions and 30 deletions

View File

@@ -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()
]);
}