feat:영업파트너 등록/수정에 사업자 정보(상호, 사업자등록번호, 주소) 필드 추가
- 컨트롤러 store/update 유효성 검사에 3개 필드 추가 - 서비스 create/update에서 SalesPartner 레코드 생성/업데이트 - 등록 폼(create.blade.php)에 사업자 정보 섹션 추가 - 수정 모달(edit-modal.blade.php)에 사업자 정보 섹션 추가 - 테스트 데이터 자동입력에 사업자 정보 포함 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -68,6 +68,9 @@ public function store(Request $request)
|
||||
'password' => 'required|string|min:4|confirmed',
|
||||
'role_ids' => 'required|array|min:1',
|
||||
'role_ids.*' => 'exists:roles,id',
|
||||
'company_name' => 'nullable|string|max:100',
|
||||
'biz_no' => 'nullable|string|max:20',
|
||||
'address' => 'nullable|string|max:255',
|
||||
'documents' => 'nullable|array',
|
||||
'documents.*.file' => 'nullable|file|max:10240',
|
||||
'documents.*.document_type' => 'nullable|string',
|
||||
@@ -140,7 +143,7 @@ public function modalShow(int $id): View
|
||||
*/
|
||||
public function modalEdit(int $id): View
|
||||
{
|
||||
$partner = User::with(['userRoles.role', 'salesDocuments', 'parent'])->findOrFail($id);
|
||||
$partner = User::with(['userRoles.role', 'salesDocuments', 'parent', 'salesPartner'])->findOrFail($id);
|
||||
$roles = $this->service->getSalesRoles();
|
||||
$currentRoleIds = $partner->userRoles->pluck('role_id')->toArray();
|
||||
$documentTypes = SalesManagerDocument::DOCUMENT_TYPES;
|
||||
@@ -185,6 +188,9 @@ public function update(Request $request, int $id)
|
||||
'password' => 'nullable|string|min:4|confirmed',
|
||||
'role_ids' => 'required|array|min:1',
|
||||
'role_ids.*' => 'exists:roles,id',
|
||||
'company_name' => 'nullable|string|max:100',
|
||||
'biz_no' => 'nullable|string|max:20',
|
||||
'address' => 'nullable|string|max:255',
|
||||
'documents' => 'nullable|array',
|
||||
'documents.*.file' => 'nullable|file|max:10240',
|
||||
'documents.*.document_type' => 'nullable|string',
|
||||
|
||||
Reference in New Issue
Block a user