From 4bad21ef79fdda5f016e2012ba673d6ee6abb5fc Mon Sep 17 00:00:00 2001 From: dujinkim Date: Wed, 28 May 2025 17:23:13 +0000 Subject: (대표님) lib 파트 개발 0528 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/vendor-document-list/table/send-to-shi-button.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'lib/vendor-document-list/table/send-to-shi-button.tsx') diff --git a/lib/vendor-document-list/table/send-to-shi-button.tsx b/lib/vendor-document-list/table/send-to-shi-button.tsx index e0360144..1a27a794 100644 --- a/lib/vendor-document-list/table/send-to-shi-button.tsx +++ b/lib/vendor-document-list/table/send-to-shi-button.tsx @@ -28,22 +28,26 @@ interface SendToSHIButtonProps { contractId: number documents?: EnhancedDocument[] onSyncComplete?: () => void + projectType: "ship" | "plant" } export function SendToSHIButton({ contractId, documents = [], - onSyncComplete + onSyncComplete, + projectType }: SendToSHIButtonProps) { const [isDialogOpen, setIsDialogOpen] = React.useState(false) const [syncProgress, setSyncProgress] = React.useState(0) + + const targetSystem = projectType === 'ship'?"DOLCE":"SWP" const { syncStatus, isLoading: statusLoading, error: statusError, refetch: refetchStatus - } = useSyncStatus(contractId, 'SHI') + } = useSyncStatus(contractId, targetSystem) const { triggerSync, @@ -71,7 +75,7 @@ export function SendToSHIButton({ const result = await triggerSync({ contractId, - targetSystem: 'SHI' + targetSystem }) clearInterval(progressInterval) @@ -152,10 +156,11 @@ export function SendToSHIButton({ <> +
+
-- cgit v1.2.3