fix: [approvals] 결재선 저장 시 직책(job_title) fallback 추가
- enrichLineSteps: position_label → job_title_label fallback - saveApprovalSteps: 동일 fallback 적용 - position_key가 NULL이고 job_title_key만 있는 사용자 대응
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user