261019_01_ENH: 리스트 비동기 작업 동시 실행 제한 및 진행 상태 UI 개선, 미사용 참조 정리

This commit is contained in:
2026-10-19 14:22:07 +09:00
parent 4e51530922
commit d2e826702e
46 changed files with 1398 additions and 406 deletions

View File

@@ -38,6 +38,7 @@ export type ListHeaderManageDialogProps = {
prjctIdx: number
rows: listHeader[]
onConfirm: (rows: listHeader[]) => void | Promise<void>
saveDisabled?: boolean
}
type ListHeaderRowProps = {
@@ -179,6 +180,7 @@ const ListHeaderManageDialog = ({
prjctIdx,
rows,
onConfirm,
saveDisabled = false,
}: ListHeaderManageDialogProps) => {
const { isDialogOpen, showDialog, hideDialog } = useDialog()
const [localRows, setLocalRows] = useState<listHeader[]>([])
@@ -299,6 +301,7 @@ const ListHeaderManageDialog = ({
}
const handleConfirm = async () => {
if (saveDisabled || submitting) return
const names = localRows.map((row) => row.listHderNm.trim())
const duplicateNames = [...new Set(names.filter((name, index) => names.indexOf(name) !== index))]
if (duplicateNames.length > 0) {
@@ -354,12 +357,13 @@ const ListHeaderManageDialog = ({
<Button type="button" variant="outline" onClick={() => handleOpenChange(false)} disabled={submitting}>
취소
</Button>
<Button type="button" onClick={handleConfirm} disabled={submitting}>
<Button type="button" onClick={handleConfirm} disabled={submitting || saveDisabled}>
저장
</Button>
</>
}
>
{saveDisabled && <p role="alert" className="mb-2 text-sm text-amber-800">리스트 작업이 진행 중이거나 작업 상태를 확인할 수 없어 헤더를 저장할 수 없습니다.</p>}
<div className="flex justify-between mb-2">
<span className="text-base text-red-600 font-semibold">⚠️ 헤더명이 수정 되거나 헤더가 삭제되면 KON또는 KON-KIWI의 리스트 관련 하드코딩에 영향이 있을 수 있습니다.</span>