From 74843fe598702a9a55f914f2d2d291368a5abb13 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Wed, 1 Oct 2025 10:31:23 +0000
Subject: (대표님) dolce 수정, spreadjs 수정 등
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../ship/send-to-shi-button.tsx                    | 108 ++++++++++++++++++++-
 1 file changed, 105 insertions(+), 3 deletions(-)

(limited to 'lib/vendor-document-list/ship/send-to-shi-button.tsx')

diff --git a/lib/vendor-document-list/ship/send-to-shi-button.tsx b/lib/vendor-document-list/ship/send-to-shi-button.tsx
index 52874702..7bb85710 100644
--- a/lib/vendor-document-list/ship/send-to-shi-button.tsx
+++ b/lib/vendor-document-list/ship/send-to-shi-button.tsx
@@ -325,21 +325,123 @@ export function SendToSHIButton({
               <div className="space-y-3">
                 <Separator />
 
+                {/* 전체 통계 */}
                 <div className="grid grid-cols-3 gap-4 text-sm">
                   <div className="text-center">
                     <div className="text-muted-foreground">{t('shiSync.labels.pending')}</div>
-                    <div className="font-medium text-orange-600">{t('shiSync.labels.itemCount', { count: totalStats.totalPending })}</div>
+                    <div className="font-medium text-orange-600">
+                      {t('shiSync.labels.itemCount', { count: totalStats.totalPending })}
+                    </div>
                   </div>
                   <div className="text-center">
                     <div className="text-muted-foreground">{t('shiSync.labels.synced')}</div>
-                    <div className="font-medium text-emerald-600 dark:text-emerald-400">{t('shiSync.labels.itemCount', { count: totalStats.totalSynced })}</div>
+                    <div className="font-medium text-emerald-600 dark:text-emerald-400">
+                      {t('shiSync.labels.itemCount', { count: totalStats.totalSynced })}
+                    </div>
                   </div>
                   <div className="text-center">
                     <div className="text-muted-foreground">{t('shiSync.labels.failed')}</div>
-                    <div className="font-medium text-destructive">{t('shiSync.labels.itemCount', { count: totalStats.totalFailed })}</div>
+                    <div className="font-medium text-destructive">
+                      {t('shiSync.labels.itemCount', { count: totalStats.totalFailed })}
+                    </div>
                   </div>
                 </div>
 
+                {/* EntityType별 상세 통계 추가 */}
+                {totalStats.entityTypeDetailsTotals && (
+                  <>
+                    <Separator className="my-2" />
+                    <div className="space-y-2">
+                      <div className="text-sm font-medium flex items-center gap-2">
+                        {t('shiSync.labels.detailsByType')}
+                        <Badge variant="outline" className="text-xs">
+                          {t('shiSync.labels.experimental')}
+                        </Badge>
+                      </div>
+
+                      <div className="space-y-1 text-xs">
+                        {/* Document 통계 */}
+                        {totalStats.entityTypeDetailsTotals.document && (
+                          <div className="flex items-center justify-between p-2 rounded bg-muted/50">
+                            <span className="font-medium">
+                              {t('shiSync.labels.documents')}
+                            </span>
+                            <div className="flex gap-3 text-xs">
+                              {totalStats.entityTypeDetailsTotals.document.pending > 0 && (
+                                <span className="text-orange-600">
+                                  {totalStats.entityTypeDetailsTotals.document.pending} {t('shiSync.labels.pendingShort')}
+                                </span>
+                              )}
+                              {totalStats.entityTypeDetailsTotals.document.synced > 0 && (
+                                <span className="text-emerald-600">
+                                  {totalStats.entityTypeDetailsTotals.document.synced} {t('shiSync.labels.syncedShort')}
+                                </span>
+                              )}
+                              {totalStats.entityTypeDetailsTotals.document.failed > 0 && (
+                                <span className="text-destructive">
+                                  {totalStats.entityTypeDetailsTotals.document.failed} {t('shiSync.labels.failedShort')}
+                                </span>
+                              )}
+                            </div>
+                          </div>
+                        )}
+
+                        {/* Revision 통계 */}
+                        {totalStats.entityTypeDetailsTotals.revision && (
+                          <div className="flex items-center justify-between p-2 rounded bg-muted/50">
+                            <span className="font-medium">
+                              {t('shiSync.labels.revisions')}
+                            </span>
+                            <div className="flex gap-3 text-xs">
+                              {totalStats.entityTypeDetailsTotals.revision.pending > 0 && (
+                                <span className="text-orange-600">
+                                  {totalStats.entityTypeDetailsTotals.revision.pending} {t('shiSync.labels.pendingShort')}
+                                </span>
+                              )}
+                              {totalStats.entityTypeDetailsTotals.revision.synced > 0 && (
+                                <span className="text-emerald-600">
+                                  {totalStats.entityTypeDetailsTotals.revision.synced} {t('shiSync.labels.syncedShort')}
+                                </span>
+                              )}
+                              {totalStats.entityTypeDetailsTotals.revision.failed > 0 && (
+                                <span className="text-destructive">
+                                  {totalStats.entityTypeDetailsTotals.revision.failed} {t('shiSync.labels.failedShort')}
+                                </span>
+                              )}
+                            </div>
+                          </div>
+                        )}
+
+                        {/* Attachment 통계 */}
+                        {totalStats.entityTypeDetailsTotals.attachment && (
+                          <div className="flex items-center justify-between p-2 rounded bg-muted/50">
+                            <span className="font-medium">
+                              {t('shiSync.labels.attachments')}
+                            </span>
+                            <div className="flex gap-3 text-xs">
+                              {totalStats.entityTypeDetailsTotals.attachment.pending > 0 && (
+                                <span className="text-orange-600">
+                                  {totalStats.entityTypeDetailsTotals.attachment.pending} {t('shiSync.labels.pendingShort')}
+                                </span>
+                              )}
+                              {totalStats.entityTypeDetailsTotals.attachment.synced > 0 && (
+                                <span className="text-emerald-600">
+                                  {totalStats.entityTypeDetailsTotals.attachment.synced} {t('shiSync.labels.syncedShort')}
+                                </span>
+                              )}
+                              {totalStats.entityTypeDetailsTotals.attachment.failed > 0 && (
+                                <span className="text-destructive">
+                                  {totalStats.entityTypeDetailsTotals.attachment.failed} {t('shiSync.labels.failedShort')}
+                                </span>
+                              )}
+                            </div>
+                          </div>
+                        )}
+                      </div>
+                    </div>
+                  </>
+                )}
+
                 {/* 계약별 상세 상태 */}
                 {contractStatuses.length > 1 && (
                   <div className="space-y-2">
-- 
cgit v1.2.3

