diff --git a/src/app/admin-panel/page.tsx b/src/app/admin-panel/page.tsx index d4e3111..e772cf8 100644 --- a/src/app/admin-panel/page.tsx +++ b/src/app/admin-panel/page.tsx @@ -1408,18 +1408,16 @@ function DeptManagement() { }; const columns: GridColumn[] = [ - { title: "부서코드", field: "DEPT_CODE", width: 140, cellClick: (row) => openEdit(row) }, - { title: "회사명", field: "COMPANY_NAME", width: 180 }, - { title: "부서명", field: "DEPT_NAME", width: 240 }, - { title: "활성화 여부", field: "STATUS_NAME", width: 100 }, - { title: "등록일", field: "REGDATE", width: 110, hozAlign: "center" }, + { title: "부서명", field: "DEPT_NAME", width: 320, cellClick: (row) => openEdit(row) }, + { title: "활성화 여부", field: "STATUS_NAME", width: 120, hozAlign: "center" }, + { title: "등록일", field: "REGDATE", width: 130, hozAlign: "center" }, ]; const set = (k: string, v: string) => setEditForm((p) => ({ ...p, [k]: v })); const handleSave = async () => { - if (!editForm.dept_code || !editForm.dept_name) { - Swal.fire("알림", "부서코드와 부서명은 필수입니다.", "warning"); + if (!editForm.dept_name) { + Swal.fire("알림", "부서명은 필수입니다.", "warning"); return; } setSaving(true); @@ -1457,29 +1455,12 @@ function DeptManagement() {
| 부서코드 * | -- set("dept_code", e.target.value)} - readOnly={editForm.actionType !== "regist"} - className={editForm.actionType !== "regist" ? "bg-gray-50" : ""} - /> - | -|
|---|---|---|
| 회사명 | -- set("company_name", e.target.value)} /> - | -|
| 부서명 * | +부서명 * | set("dept_name", e.target.value)} /> | diff --git a/src/app/api/admin/dept/save/route.ts b/src/app/api/admin/dept/save/route.ts index 2bf4f1c..bcb050d 100644 --- a/src/app/api/admin/dept/save/route.ts +++ b/src/app/api/admin/dept/save/route.ts @@ -22,14 +22,25 @@ export async function POST(request: NextRequest) { company_name, } = body as Record