fix: [equipment] 담당자 → 관리자 정/부 라벨 변경 및 sub_manager_id 저장 버그 수정
- 설비 등록/수정 폼 라벨: 정 담당자 → 관리자 정, 부 담당자 → 관리자 부 - 상세보기(basic-info) 라벨 동일 변경 - StoreEquipmentRequest, UpdateEquipmentRequest에 sub_manager_id 검증 규칙 추가 - 기존에 sub_manager_id가 validated()에서 누락되어 저장되지 않던 버그 수정
This commit is contained in:
@@ -37,6 +37,7 @@ public function rules(): array
|
||||
'status' => 'nullable|in:active,idle,disposed',
|
||||
'disposed_date' => 'nullable|date',
|
||||
'manager_id' => 'nullable|exists:users,id',
|
||||
'sub_manager_id' => 'nullable|exists:users,id',
|
||||
'photo_path' => 'nullable|string|max:500',
|
||||
'memo' => 'nullable|string',
|
||||
'is_active' => 'nullable|boolean',
|
||||
|
||||
@@ -39,6 +39,7 @@ public function rules(): array
|
||||
'status' => 'nullable|in:active,idle,disposed',
|
||||
'disposed_date' => 'nullable|date',
|
||||
'manager_id' => 'nullable|exists:users,id',
|
||||
'sub_manager_id' => 'nullable|exists:users,id',
|
||||
'photo_path' => 'nullable|string|max:500',
|
||||
'memo' => 'nullable|string',
|
||||
'is_active' => 'nullable|boolean',
|
||||
|
||||
@@ -122,10 +122,10 @@ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none foc
|
||||
|
||||
<!-- 담당자/비고 -->
|
||||
<div class="bg-white rounded-lg shadow-sm p-6">
|
||||
<h2 class="text-lg font-semibold text-gray-800 mb-4 pb-2 border-b">담당자 / 비고</h2>
|
||||
<h2 class="text-lg font-semibold text-gray-800 mb-4 pb-2 border-b">관리자 / 비고</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-700 mb-2">정 담당자</label>
|
||||
<label class="block text-sm font-semibold text-gray-700 mb-2">관리자 정</label>
|
||||
<select name="manager_id"
|
||||
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<option value="">선택</option>
|
||||
@@ -135,7 +135,7 @@ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none foc
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-700 mb-2">부 담당자</label>
|
||||
<label class="block text-sm font-semibold text-gray-700 mb-2">관리자 부</label>
|
||||
<select name="sub_manager_id"
|
||||
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<option value="">선택</option>
|
||||
|
||||
@@ -130,10 +130,10 @@ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none foc
|
||||
|
||||
<!-- 담당자/비고 -->
|
||||
<div class="bg-white rounded-lg shadow-sm p-6">
|
||||
<h2 class="text-lg font-semibold text-gray-800 mb-4 pb-2 border-b">담당자 / 비고</h2>
|
||||
<h2 class="text-lg font-semibold text-gray-800 mb-4 pb-2 border-b">관리자 / 비고</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-700 mb-2">정 담당자</label>
|
||||
<label class="block text-sm font-semibold text-gray-700 mb-2">관리자 정</label>
|
||||
<select name="manager_id" id="manager_id"
|
||||
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<option value="">선택</option>
|
||||
@@ -143,7 +143,7 @@ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none foc
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-700 mb-2">부 담당자</label>
|
||||
<label class="block text-sm font-semibold text-gray-700 mb-2">관리자 부</label>
|
||||
<select name="sub_manager_id" id="sub_manager_id"
|
||||
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<option value="">선택</option>
|
||||
|
||||
@@ -67,11 +67,11 @@
|
||||
<p class="text-gray-900">{{ $equipment->useful_life ? $equipment->useful_life . '년' : '-' }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm text-gray-500 mb-1">정 담당자</label>
|
||||
<label class="block text-sm text-gray-500 mb-1">관리자 정</label>
|
||||
<p class="text-gray-900">{{ $equipment->manager?->name ?? '-' }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm text-gray-500 mb-1">부 담당자</label>
|
||||
<label class="block text-sm text-gray-500 mb-1">관리자 부</label>
|
||||
<p class="text-gray-900">{{ $equipment->subManager?->name ?? '-' }}</p>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user