261020_02_FIX: 짧은 비동기 작업 종료 시 리스트 및 배정 목록이 갱신되지 않는 오류 수정

This commit is contained in:
2026-10-20 11:57:46 +09:00
parent 8f0de91e93
commit d2e214696d
6 changed files with 173 additions and 22 deletions

View File

@@ -17,6 +17,7 @@ import { useProjectInfoQuery, useResultCodesQuery } from '@/query/project'
import { useListHeaderQuery } from '@/query/list'
import { ListJobPageQueryContext, useSubmitListJob } from '@/query/list-job'
import { ListJobGatePanel } from '@/components/list/ListJobGate'
import { ListJobRefreshNotice } from '@/components/list/ListJobRefreshNotice'
import { useListJobPageMonitor } from '@/hooks/useListJobPageMonitor'
import { ListHeaderAssignConst, LIST_HEADER_TYPE_LABEL } from '@/const/listConst'
import { createEmptyListFilter, type ListFilter, type ListHeaderAssignType, type listHeader } from '@/types/list'
@@ -60,7 +61,11 @@ const ListAssignPage = () => {
const projectInfoQuery = useProjectInfoQuery(prjctIdx, enabled)
const listHeaderQuery = useListHeaderQuery(prjctIdx, enabled)
const assignMutation = useSubmitListJob(prjctIdx)
const { gate: assignGate, dataRevision } = useListJobPageMonitor(prjctIdx, 'LIST_ASSIGN', enabled)
const pageMonitor = useListJobPageMonitor(prjctIdx, 'LIST_ASSIGN', enabled, {
hasSelection: !!selectedAssignId,
isSubmitting: assignMutation.isPending,
})
const { gate: assignGate, dataRevision } = pageMonitor
const [openRequest, setOpenRequest] = useAtom(listJobOpenRequestAtom)
const assignTargetRows = useAssignTargetRows({ prjctIdx, enabled, assignType: effectiveAssignType })
@@ -200,6 +205,7 @@ const ListAssignPage = () => {
<div className="min-w-0 flex-1 space-y-2">
<ListJobGatePanel gate={assignGate} />
<ListJobRefreshNotice monitor={pageMonitor} />
<ListSearchTable
dataRevision={dataRevision}
prjctIdx={prjctIdx}

View File

@@ -25,6 +25,7 @@ import {
} from '@/query/list'
import { ListJobPageQueryContext, useMyActiveListJobs, useSubmitListJob } from '@/query/list-job'
import { ListJobGatePanel } from '@/components/list/ListJobGate'
import { ListJobRefreshNotice } from '@/components/list/ListJobRefreshNotice'
import { useListJobPageMonitor } from '@/hooks/useListJobPageMonitor'
import { useTrackedListJobs } from '@/store/list-job-tracker'
import { isListPageActionBlocked } from '@/utils/listJobAvailability'
@@ -115,7 +116,8 @@ const ListManagePage = () => {
const canManageList = isManager(userRole);
// 리스트 초기화/헤더 관리/업로드는 내부 관리자 전용 — 외주사 계정에는 노출되면 안 됨.
const isInternal = isInternalManager(userRole);
const { gate: pageGate, dataRevision } = useListJobPageMonitor(prjctIdx, 'LIST_RESET', enabled)
const pageMonitor = useListJobPageMonitor(prjctIdx, 'LIST_RESET', enabled, { hasSelection: selectedRows.length > 0 })
const { gate: pageGate, dataRevision } = pageMonitor
const trackedJobs = useTrackedListJobs()
useEffect(() => {
@@ -321,6 +323,7 @@ const ListManagePage = () => {
<ListJobPageQueryContext.Provider value="LIST_RESET">
<div className="space-y-6 text-sm">
<ListJobGatePanel gate={pageGate} showCurrentJob={false} />
<ListJobRefreshNotice monitor={pageMonitor} clearsSelection={selectedRows.length > 0} />
{canManageList && (
<ListManageActions
showAdminActions={isInternal}