feat(repeat-screen-modal): 테이블 영역 독립 저장 기능 구현

- TableCrudConfig에 allowSave, saveButtonLabel 속성 추가
- CRUD 설정 패널에 저장 스위치 추가
- saveTableAreaData 함수: editable 컬럼 + 조인키만 필터링하여 저장
- 날짜 필드 ISO 8601 -> YYYY-MM-DD 형식 변환
- 백엔드: company_code 자동 주입 로직 추가
- tableManagementService에 hasColumn 메서드 추가
This commit is contained in:
SeongHyun Kim
2025-12-02 14:02:47 +09:00
parent 2f78c83ef6
commit 4787a8b177
5 changed files with 250 additions and 32 deletions

View File

@@ -2568,13 +2568,13 @@ function ContentRowConfigSection({
{/* CRUD 설정 */}
<div className="space-y-2 p-2 bg-green-100/50 dark:bg-green-900/20 rounded border border-green-200 dark:border-green-800">
<Label className="text-[9px] font-semibold">CRUD </Label>
<div className="flex gap-3">
<div className="flex flex-wrap gap-3">
<div className="flex items-center gap-1">
<Switch
checked={row.tableCrud?.allowCreate || false}
onCheckedChange={(checked) =>
onUpdateRow({
tableCrud: { ...row.tableCrud, allowCreate: checked, allowUpdate: row.tableCrud?.allowUpdate || false, allowDelete: row.tableCrud?.allowDelete || false },
tableCrud: { ...row.tableCrud, allowCreate: checked, allowUpdate: row.tableCrud?.allowUpdate || false, allowDelete: row.tableCrud?.allowDelete || false, allowSave: row.tableCrud?.allowSave || false },
})
}
className="scale-[0.5]"
@@ -2586,7 +2586,7 @@ function ContentRowConfigSection({
checked={row.tableCrud?.allowUpdate || false}
onCheckedChange={(checked) =>
onUpdateRow({
tableCrud: { ...row.tableCrud, allowCreate: row.tableCrud?.allowCreate || false, allowUpdate: checked, allowDelete: row.tableCrud?.allowDelete || false },
tableCrud: { ...row.tableCrud, allowCreate: row.tableCrud?.allowCreate || false, allowUpdate: checked, allowDelete: row.tableCrud?.allowDelete || false, allowSave: row.tableCrud?.allowSave || false },
})
}
className="scale-[0.5]"
@@ -2598,13 +2598,25 @@ function ContentRowConfigSection({
checked={row.tableCrud?.allowDelete || false}
onCheckedChange={(checked) =>
onUpdateRow({
tableCrud: { ...row.tableCrud, allowCreate: row.tableCrud?.allowCreate || false, allowUpdate: row.tableCrud?.allowUpdate || false, allowDelete: checked },
tableCrud: { ...row.tableCrud, allowCreate: row.tableCrud?.allowCreate || false, allowUpdate: row.tableCrud?.allowUpdate || false, allowDelete: checked, allowSave: row.tableCrud?.allowSave || false },
})
}
className="scale-[0.5]"
/>
<Label className="text-[9px]"></Label>
</div>
<div className="flex items-center gap-1">
<Switch
checked={row.tableCrud?.allowSave || false}
onCheckedChange={(checked) =>
onUpdateRow({
tableCrud: { ...row.tableCrud, allowCreate: row.tableCrud?.allowCreate || false, allowUpdate: row.tableCrud?.allowUpdate || false, allowDelete: row.tableCrud?.allowDelete || false, allowSave: checked },
})
}
className="scale-[0.5]"
/>
<Label className="text-[9px]"></Label>
</div>
</div>
{row.tableCrud?.allowDelete && (
<div className="flex items-center gap-1 pl-2">