From ee57cc221ff2edafd3c0f12a181214c602ed257e Mon Sep 17 00:00:00 2001 From: dujinkim Date: Tue, 22 Jul 2025 02:57:00 +0000 Subject: (대표님, 최겸) 이메일 템플릿, 벤더데이터 변경사항 대응, 기술영업 변경요구사항 구현 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/0107.sql | 213 --------------------------------------- public/SHi_logo.svg | 224 +++++++++++++++++++++++++++++++++++++++++ public/globals.css | 168 ------------------------------- public/images/SHI_logo.svg | 224 +++++++++++++++++++++++++++++++++++++++++ public/images/headerImg.png | Bin 0 -> 77256 bytes public/images/samsung_logo.png | Bin 0 -> 30904 bytes 6 files changed, 448 insertions(+), 381 deletions(-) delete mode 100644 public/0107.sql create mode 100644 public/SHi_logo.svg delete mode 100644 public/globals.css create mode 100644 public/images/SHI_logo.svg create mode 100644 public/images/headerImg.png create mode 100644 public/images/samsung_logo.png (limited to 'public') diff --git a/public/0107.sql b/public/0107.sql deleted file mode 100644 index 46daf36b..00000000 --- a/public/0107.sql +++ /dev/null @@ -1,213 +0,0 @@ -DROP VIEW "public"."enhanced_documents_view";--> statement-breakpoint -CREATE VIEW "public"."enhanced_documents_view" AS ( - WITH document_stats AS ( - SELECT - d.id as document_id, - COUNT(ist.id) as total_stages, - COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) as completed_stages, - CASE - WHEN COUNT(ist.id) > 0 - THEN ROUND((COUNT(CASE WHEN ist.stage_status IN ('COMPLETED', 'APPROVED') THEN 1 END) * 100.0) / COUNT(ist.id)) - ELSE 0 - END as progress_percentage - FROM documents d - LEFT JOIN issue_stages ist ON d.id = ist.document_id - GROUP BY d.id - ), - current_stage_info AS ( - SELECT DISTINCT ON (document_id) - document_id, - id as current_stage_id, - stage_name as current_stage_name, - stage_status as current_stage_status, - stage_order as current_stage_order, - plan_date as current_stage_plan_date, - actual_date as current_stage_actual_date, - assignee_name as current_stage_assignee_name, - priority as current_stage_priority, - CASE - WHEN actual_date IS NULL AND plan_date IS NOT NULL - THEN plan_date - CURRENT_DATE - ELSE NULL - END as days_until_due, - CASE - WHEN actual_date IS NULL AND plan_date < CURRENT_DATE - THEN true - WHEN actual_date IS NOT NULL AND actual_date > plan_date - THEN true - ELSE false - END as is_overdue, - CASE - WHEN actual_date IS NOT NULL AND plan_date IS NOT NULL - THEN actual_date - plan_date - ELSE NULL - END as days_difference - FROM issue_stages - WHERE stage_status NOT IN ('COMPLETED', 'APPROVED') - ORDER BY document_id, stage_order ASC, priority DESC - ), - latest_revision_info AS ( - SELECT DISTINCT ON (ist.document_id) - ist.document_id, - r.id as latest_revision_id, - r.revision as latest_revision, - r.revision_status as latest_revision_status, - r.uploader_name as latest_revision_uploader_name, - r.submitted_date as latest_submitted_date - FROM revisions r - JOIN issue_stages ist ON r.issue_stage_id = ist.id - ORDER BY ist.document_id, r.created_at DESC - ), - -- 리비전별 첨부파일 집계 - revision_attachments AS ( - SELECT - r.id as revision_id, - COALESCE( - json_agg( - json_build_object( - 'id', da.id, - 'revisionId', da.revision_id, - 'fileName', da.file_name, - 'filePath', da.file_path, - 'fileSize', da.file_size, - 'fileType', da.file_type, - 'createdAt', da.created_at, - 'updatedAt', da.updated_at - ) ORDER BY da.created_at - ) FILTER (WHERE da.id IS NOT NULL), - '[]'::json - ) as attachments - FROM revisions r - LEFT JOIN document_attachments da ON r.id = da.revision_id - GROUP BY r.id - ), - -- 스테이지별 리비전 집계 (첨부파일 포함) - stage_revisions AS ( - SELECT - ist.id as stage_id, - COALESCE( - json_agg( - json_build_object( - 'id', r.id, - 'issueStageId', r.issue_stage_id, - 'revision', r.revision, - 'uploaderType', r.uploader_type, - 'uploaderId', r.uploader_id, - 'uploaderName', r.uploader_name, - 'comment', r.comment, - 'revisionStatus', r.revision_status, - 'submittedDate', r.submitted_date, - 'uploadedAt', r.uploaded_at, - 'approvedDate', r.approved_date, - 'reviewStartDate', r.review_start_date, - 'rejectedDate', r.rejected_date, - 'reviewerId', r.reviewer_id, - 'reviewerName', r.reviewer_name, - 'reviewComments', r.review_comments, - 'createdAt', r.created_at, - 'updatedAt', r.updated_at, - 'attachments', ra.attachments - ) ORDER BY r.created_at - ) FILTER (WHERE r.id IS NOT NULL), - '[]'::json - ) as revisions - FROM issue_stages ist - LEFT JOIN revisions r ON ist.id = r.issue_stage_id - LEFT JOIN revision_attachments ra ON r.id = ra.revision_id - GROUP BY ist.id - ), - -- 문서별 스테이지 집계 (리비전 포함) - stage_aggregation AS ( - SELECT - ist.document_id, - json_agg( - json_build_object( - 'id', ist.id, - 'stageName', ist.stage_name, - 'stageStatus', ist.stage_status, - 'stageOrder', ist.stage_order, - 'planDate', ist.plan_date, - 'actualDate', ist.actual_date, - 'assigneeName', ist.assignee_name, - 'priority', ist.priority, - 'revisions', sr.revisions - ) ORDER BY ist.stage_order - ) as all_stages - FROM issue_stages ist - LEFT JOIN stage_revisions sr ON ist.id = sr.stage_id - GROUP BY ist.document_id - ), - attachment_counts AS ( - SELECT - ist.document_id, - COUNT(da.id) as attachment_count - FROM issue_stages ist - LEFT JOIN revisions r ON ist.id = r.issue_stage_id - LEFT JOIN document_attachments da ON r.id = da.revision_id - GROUP BY ist.document_id - ) - - SELECT - d.id as document_id, - d.doc_number, - d.vendor_doc_number, -- ✅ 벤더 문서 번호 추가 - d.title, - d.pic, - d.status, - d.issued_date, - d.contract_id, - - -- ✅ 프로젝트 및 벤더 정보 추가 - p.code as project_code, - v.vendor_name as vendor_name, - v.vendor_code as vendor_code, - - -- 현재 스테이지 정보 - csi.current_stage_id, - csi.current_stage_name, - csi.current_stage_status, - csi.current_stage_order, - csi.current_stage_plan_date, - csi.current_stage_actual_date, - csi.current_stage_assignee_name, - csi.current_stage_priority, - - -- 계산 필드 - csi.days_until_due, - csi.is_overdue, - csi.days_difference, - - -- 진행률 정보 - ds.total_stages, - ds.completed_stages, - ds.progress_percentage, - - -- 최신 리비전 정보 - lri.latest_revision_id, - lri.latest_revision, - lri.latest_revision_status, - lri.latest_revision_uploader_name, - lri.latest_submitted_date, - - -- 전체 스테이지 (리비전 및 첨부파일 포함) - COALESCE(sa.all_stages, '[]'::json) as all_stages, - - -- 기타 - COALESCE(ac.attachment_count, 0) as attachment_count, - d.created_at, - d.updated_at - - FROM documents d - -- ✅ contracts, projects, vendors 테이블 JOIN 추가 - LEFT JOIN contracts c ON d.contract_id = c.id - LEFT JOIN projects p ON c.project_id = p.id - LEFT JOIN vendors v ON c.vendor_id = v.id - - LEFT JOIN document_stats ds ON d.id = ds.document_id - LEFT JOIN current_stage_info csi ON d.id = csi.document_id - LEFT JOIN latest_revision_info lri ON d.id = lri.document_id - LEFT JOIN stage_aggregation sa ON d.id = sa.document_id - LEFT JOIN attachment_counts ac ON d.id = ac.document_id - - ORDER BY d.created_at DESC -); \ No newline at end of file diff --git a/public/SHi_logo.svg b/public/SHi_logo.svg new file mode 100644 index 00000000..c29f9668 --- /dev/null +++ b/public/SHi_logo.svg @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/globals.css b/public/globals.css deleted file mode 100644 index c427b92f..00000000 --- a/public/globals.css +++ /dev/null @@ -1,168 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -body { - font-family: Arial, Helvetica, sans-serif; -} - -@layer base { - :root { - --background: 0 0% 100%; - --foreground: 222.2 84% 4.9%; - --card: 0 0% 100%; - --card-foreground: 222.2 84% 4.9%; - --popover: 0 0% 100%; - --popover-foreground: 222.2 84% 4.9%; - --primary: 222.2 47.4% 11.2%; - --samsung: 222.2 47.4% 11.2%; - --primary-foreground: 210 40% 98%; - --secondary: 210 40% 96.1%; - --secondary-foreground: 222.2 47.4% 11.2%; - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; - --accent: 210 40% 96.1%; - --accent-foreground: 222.2 47.4% 11.2%; - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 210 40% 98%; - --border: 214.3 31.8% 91.4%; - --input: 214.3 31.8% 91.4%; - --ring: 222.2 84% 4.9%; - --chart-1: 12 76% 61%; - --chart-2: 173 58% 39%; - --chart-3: 197 37% 24%; - --chart-4: 43 74% 66%; - --chart-5: 27 87% 67%; - --radius: 0.5rem; - --sidebar-background: 0 0% 98%; - --sidebar-foreground: 240 5.3% 26.1%; - --sidebar-primary: 240 5.9% 10%; - --sidebar-primary-foreground: 0 0% 98%; - --sidebar-accent: 240 4.8% 95.9%; - --sidebar-accent-foreground: 240 5.9% 10%; - --sidebar-border: 220 13% 91%; - --sidebar-ring: 217.2 91.2% 59.8%; - } - .dark { - --background: 222.2 84% 4.9%; - --foreground: 210 40% 98%; - --card: 222.2 84% 4.9%; - --card-foreground: 210 40% 98%; - --popover: 222.2 84% 4.9%; - --popover-foreground: 210 40% 98%; - --primary: 210 40% 98%; - --primary-foreground: 222.2 47.4% 11.2%; - --secondary: 217.2 32.6% 17.5%; - --secondary-foreground: 210 40% 98%; - --muted: 217.2 32.6% 17.5%; - --muted-foreground: 215 20.2% 65.1%; - --accent: 217.2 32.6% 17.5%; - --accent-foreground: 210 40% 98%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 210 40% 98%; - --border: 217.2 32.6% 17.5%; - --input: 217.2 32.6% 17.5%; - --ring: 212.7 26.8% 83.9%; - --chart-1: 220 70% 50%; - --chart-2: 160 60% 45%; - --chart-3: 30 80% 55%; - --chart-4: 280 65% 60%; - --chart-5: 340 75% 55%; - --sidebar-background: 240 5.9% 10%; - --sidebar-foreground: 240 4.8% 95.9%; - --sidebar-primary: 224.3 76.3% 48%; - --sidebar-primary-foreground: 0 0% 100%; - --sidebar-accent: 240 3.7% 15.9%; - --sidebar-accent-foreground: 240 4.8% 95.9%; - --sidebar-border: 240 3.7% 15.9%; - --sidebar-ring: 217.2 91.2% 59.8%; - } -} - -@layer base { - * { - @apply border-border; - } - html { - @apply scroll-smooth; - } - body { - @apply bg-background text-foreground overscroll-none; - /* font-feature-settings: "rlig" 1, "calt" 1; */ - font-synthesis-weight: none; - text-rendering: optimizeLegibility; - } - - @supports (font: -apple-system-body) and (-webkit-appearance: none) { - [data-wrapper] { - @apply min-[1800px]:border-t; - } - } - /* Custom scrollbar styling. Thanks @pranathiperii. */ - ::-webkit-scrollbar { - width: 5px; - } - ::-webkit-scrollbar-track { - background: transparent; - } - ::-webkit-scrollbar-thumb { - background: hsl(var(--border)); - border-radius: 5px; - } - * { - scrollbar-width: thin; - scrollbar-color: hsl(var(--border)) transparent; - } -} - -@layer utilities { - .step { - counter-increment: step; - } - - .step:before { - @apply absolute w-9 h-9 bg-muted rounded-full font-mono font-medium text-center text-base inline-flex items-center justify-center -indent-px border-4 border-background; - @apply ml-[-50px] mt-[-4px]; - content: counter(step); - } - - .chunk-container { - @apply shadow-none; - } - - .chunk-container::after { - content: ""; - @apply absolute -inset-4 shadow-xl rounded-xl border; - } - - /* Hide scrollbar for Chrome, Safari and Opera */ - .no-scrollbar::-webkit-scrollbar { - display: none; - } - /* Hide scrollbar for IE, Edge and Firefox */ - .no-scrollbar { - -ms-overflow-style: none; /* IE and Edge */ - scrollbar-width: none; /* Firefox */ - } - - .border-grid { - @apply border-border/30 dark:border-border; - } - - .container-wrapper { - @apply min-[1800px]:max-w-[1536px] min-[1800px]:border-x border-border/30 dark:border-border mx-auto w-full; - } - - .container { - @apply px-4 xl:px-6 2xl:px-4 mx-auto max-w-[1536px]; - } -} - - -.MuiTreeItem-label{ - font-size: 0.875rem!important; -} - -.pdftron-container { - all: unset !important; -} \ No newline at end of file diff --git a/public/images/SHI_logo.svg b/public/images/SHI_logo.svg new file mode 100644 index 00000000..c29f9668 --- /dev/null +++ b/public/images/SHI_logo.svg @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/headerImg.png b/public/images/headerImg.png new file mode 100644 index 00000000..bc89cf03 Binary files /dev/null and b/public/images/headerImg.png differ diff --git a/public/images/samsung_logo.png b/public/images/samsung_logo.png new file mode 100644 index 00000000..d54d1233 Binary files /dev/null and b/public/images/samsung_logo.png differ -- cgit v1.2.3