diff --git a/app/Services/ApprovalService.php b/app/Services/ApprovalService.php index 5d396f9b..4706be69 100644 --- a/app/Services/ApprovalService.php +++ b/app/Services/ApprovalService.php @@ -634,7 +634,7 @@ public function saveApprovalSteps(Approval $approval, array $steps): void if ($employee) { $departmentName = $employee->department?->name; - $positionName = $employee->position_label; + $positionName = $employee->position_label ?? $employee->job_title_label; } } @@ -707,7 +707,7 @@ private function enrichLineSteps(array $steps): array 'user_id' => $step['user_id'], 'user_name' => $user?->name ?? '', 'department' => $profile?->department?->name ?? $step['department'] ?? '', - 'position' => $profile?->position_label ?? $step['position'] ?? '', + 'position' => $profile?->position_label ?? $profile?->job_title_label ?? $step['position'] ?? '', 'step_type' => $step['step_type'] ?? 'approval', ]; })->toArray();