feat: 담당자에 소속·상호 필드 추가(#23)

- manager 테이블에 mg_affiliation(소속)·mg_company_name(상호) 컬럼 추가
  (공유 DB 반영 완료 + writable/database에 마이그레이션 SQL 기록)
- ManagerModel allowedFields, 등록/수정 폼(담당자명 아래), store/update 저장,
  목록에 소속·상호 열 추가
This commit is contained in:
taekyoungc
2026-07-03 18:35:12 +09:00
parent 4835b2daaf
commit f0d59b1694
6 changed files with 40 additions and 2 deletions

View File

@@ -10,6 +10,16 @@
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="mg_name" type="text" value="<?= esc(old('mg_name')) ?>" required/>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">소속</label>
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="mg_affiliation" type="text" value="<?= esc(old('mg_affiliation')) ?>"/>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">상호</label>
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="mg_company_name" type="text" value="<?= esc(old('mg_company_name')) ?>"/>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">담당자 구분 <span class="text-red-500">*</span></label>
<select class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="mg_category" required>

View File

@@ -10,6 +10,16 @@
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="mg_name" type="text" value="<?= esc(old('mg_name', $item->mg_name)) ?>" required/>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">소속</label>
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="mg_affiliation" type="text" value="<?= esc(old('mg_affiliation', $item->mg_affiliation ?? '')) ?>"/>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">상호</label>
<input class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="mg_company_name" type="text" value="<?= esc(old('mg_company_name', $item->mg_company_name ?? '')) ?>"/>
</div>
<div class="flex flex-wrap items-center gap-2">
<label class="block text-sm font-bold text-gray-700 w-28">담당자 구분 <span class="text-red-500">*</span></label>
<select class="border border-gray-300 rounded px-3 py-1.5 text-sm w-60" name="mg_category" required>

View File

@@ -27,6 +27,8 @@
<tr class="text-left text-[11px] font-semibold text-gray-500 border-b border-gray-200">
<th class="py-2.5 px-2 w-16 text-left">번호</th>
<th class="py-2.5 px-2">담당자명</th>
<th class="py-2.5 px-2">소속</th>
<th class="py-2.5 px-2">상호</th>
<th class="py-2.5 px-2">카테고리</th>
<th class="py-2.5 px-2">전화</th>
<th class="py-2.5 px-2">휴대전화</th>
@@ -40,6 +42,8 @@
<tr class="border-b border-gray-200 last:border-0 hover:bg-gray-50">
<td class="py-2.5 px-2 text-left font-mono text-gray-700"><?= esc($row->mg_idx) ?></td>
<td class="py-2.5 px-2 font-medium text-gray-900"><?= esc($row->mg_name) ?></td>
<td class="py-2.5 px-2 text-gray-600"><?= esc($row->mg_affiliation ?? '') ?></td>
<td class="py-2.5 px-2 text-gray-600"><?= esc($row->mg_company_name ?? '') ?></td>
<td class="py-2.5 px-2">
<?php
$cat = (string) ($row->mg_dept_code ?? '');
@@ -67,7 +71,7 @@
</tr>
<?php endforeach; ?>
<?php if (empty($list)): ?>
<tr><td colspan="8" class="text-center text-gray-400 py-6">등록된 데이터가 없습니다.</td></tr>
<tr><td colspan="10" class="text-center text-gray-400 py-6">등록된 데이터가 없습니다.</td></tr>
<?php endif; ?>
</tbody>
</table>