fix:영업파트너 수정 모달 validation 에러 표시 추가

- 폼을 AJAX 제출로 변경하여 422 에러 시 모달 내 에러 메시지 표시
- innerHTML로 로드된 script 태그 수동 실행 처리
- 컨트롤러에 JSON 응답 지원 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-14 12:47:41 +09:00
parent 29b40ad2bc
commit 8cfc44bf45
3 changed files with 159 additions and 41 deletions

View File

@@ -211,6 +211,10 @@ public function update(Request $request, int $id)
$this->service->updateSalesPartner($partner, $validated, $documents);
if ($request->expectsJson()) {
return response()->json(['success' => true, 'message' => '영업파트너 정보가 수정되었습니다.']);
}
return redirect()->route('sales.managers.index')
->with('success', '영업파트너 정보가 수정되었습니다.');
}