From 48999f5699b7f5d110f07fe9dc01d1c28f96cbcf Mon Sep 17 00:00:00 2001 From: jcchoi Date: Sun, 11 Oct 2026 15:32:56 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9B=B9=20=EC=A0=91=EA=B7=BC=EC=84=B1=20?= =?UTF-8?q?=EC=A1=B0=EC=B9=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/as/src/entities/code/ui/code-select.tsx | 15 +- .../ui/cklst-artcl-form-dialog.tsx | 4 +- .../ui/cklst-mng-form-dialog.tsx | 10 +- .../ui/cklst-preview-dialog.tsx | 115 +++++++------- .../ui/cklst-rvw-grid.tsx | 14 +- .../checklist-management/ui/cklst-rvw-row.tsx | 10 +- .../src/pages/design-cnstn/model/columns.tsx | 15 +- .../src/pages/fnrs-cnsltn/model/columns.tsx | 15 +- .../as/src/pages/instl-sncn/model/columns.tsx | 15 +- .../pages/rvw-mnpw-mng/ui/rvw-mnpw-block.tsx | 15 +- .../pages/sewer-bsc-plan/model/columns.tsx | 15 +- .../ui/sections/tmplnt-form-section.tsx | 18 ++- .../ui/sections/tmplnt-section.tsx | 23 ++- .../ui/sewer-bsc-plan-apply-dialog.tsx | 35 ++++- .../ognz-user-tree/ui/ognz-user-tree-node.tsx | 64 +++++--- .../ui/pbadms-task-apply-dialog.tsx | 24 ++- .../common/components/src/ui/footer/index.tsx | 52 ++++++- .../common/components/src/ui/header/index.tsx | 6 +- .../components/src/ui/page-title/index.tsx | 142 ++++++++++-------- 19 files changed, 425 insertions(+), 182 deletions(-) diff --git a/apps/as/src/entities/code/ui/code-select.tsx b/apps/as/src/entities/code/ui/code-select.tsx index 74d011bcd..7b89cc697 100644 --- a/apps/as/src/entities/code/ui/code-select.tsx +++ b/apps/as/src/entities/code/ui/code-select.tsx @@ -16,9 +16,20 @@ interface CodeSelectProps extends React.ComponentPropsWithoutRef useYn?: string; placeholder?: string; className?: string; + /** 레이블(label htmlFor) 연결용 트리거 id */ + id?: string; + title?: string; } -function CodeSelect({ upCd, useYn, placeholder = "선택", className, ...props }: CodeSelectProps) { +function CodeSelect({ + upCd, + useYn, + placeholder = "선택", + className, + id, + title, + ...props +}: CodeSelectProps) { const listQuery = useCodeList(useYn ? undefined : upCd); const listByUseYnQuery = useCodeListByUseYn(useYn ? upCd : undefined, useYn ?? ""); @@ -27,7 +38,7 @@ function CodeSelect({ upCd, useYn, placeholder = "선택", className, ...props } return ( setValue("useYn", v as "Y" | "N")}> - + diff --git a/apps/as/src/pages/checklist-management/ui/cklst-mng-form-dialog.tsx b/apps/as/src/pages/checklist-management/ui/cklst-mng-form-dialog.tsx index 3efa22ba9..1a7bf2612 100644 --- a/apps/as/src/pages/checklist-management/ui/cklst-mng-form-dialog.tsx +++ b/apps/as/src/pages/checklist-management/ui/cklst-mng-form-dialog.tsx @@ -100,8 +100,9 @@ function CklstMngFormDialog({ />
- + setValue("docSeComCd", v)} @@ -110,8 +111,9 @@ function CklstMngFormDialog({ />
- + setValue("taskSeComCd", v)} @@ -121,9 +123,9 @@ function CklstMngFormDialog({ />
- + onChange({ diff --git a/apps/as/src/pages/design-cnstn/model/columns.tsx b/apps/as/src/pages/design-cnstn/model/columns.tsx index 0a050f515..1e5deab7c 100644 --- a/apps/as/src/pages/design-cnstn/model/columns.tsx +++ b/apps/as/src/pages/design-cnstn/model/columns.tsx @@ -79,6 +79,17 @@ function getBadgeColor(state: BadgeState) { } } +function getBadgeStateText(state: BadgeState) { + switch (state) { + case "completed": + return "완료"; + case "current": + return "진행중"; + case "pending": + return "대기"; + } +} + function formatOptional(value: string | null | undefined) { return value?.trim() ? value : "-"; } @@ -95,7 +106,9 @@ function ProgressStepBadge({ prgrsSttsComCd }: ProgressStepBadgeProps) { {badges.map((badge, index) => ( {index > 0 && >} - {badge.label} + + {badge.label}({getBadgeStateText(badge.state)}) + ))}
diff --git a/apps/as/src/pages/fnrs-cnsltn/model/columns.tsx b/apps/as/src/pages/fnrs-cnsltn/model/columns.tsx index b6c4b24be..67c8a2fe7 100644 --- a/apps/as/src/pages/fnrs-cnsltn/model/columns.tsx +++ b/apps/as/src/pages/fnrs-cnsltn/model/columns.tsx @@ -120,6 +120,17 @@ function getBadgeColor(state: BadgeState) { } } +function getBadgeStateText(state: BadgeState) { + switch (state) { + case "completed": + return "완료"; + case "current": + return "진행중"; + case "pending": + return "대기"; + } +} + function formatOptional(value: string | null | undefined) { return value?.trim() ? value : "-"; } @@ -137,7 +148,9 @@ function ProgressStepBadge({ prgrsSttsComCd, techRplyHstryYn }: ProgressStepBadg {badges.map((badge, index) => ( {index > 0 && >} - {badge.label} + + {badge.label}({getBadgeStateText(badge.state)}) + ))} diff --git a/apps/as/src/pages/instl-sncn/model/columns.tsx b/apps/as/src/pages/instl-sncn/model/columns.tsx index 8dc617efa..0daf1a610 100644 --- a/apps/as/src/pages/instl-sncn/model/columns.tsx +++ b/apps/as/src/pages/instl-sncn/model/columns.tsx @@ -121,6 +121,17 @@ function getBadgeColor(state: BadgeState) { } } +function getBadgeStateText(state: BadgeState) { + switch (state) { + case "completed": + return "완료"; + case "current": + return "진행중"; + case "pending": + return "대기"; + } +} + function formatOptional(value: string | null | undefined) { return value?.trim() ? value : "-"; } @@ -138,7 +149,9 @@ function ProgressStepBadge({ prgrsSttsComCd, techRplyHstryYn }: ProgressStepBadg {badges.map((badge, index) => ( {index > 0 && >} - {badge.label} + + {badge.label}({getBadgeStateText(badge.state)}) + ))} diff --git a/apps/as/src/pages/rvw-mnpw-mng/ui/rvw-mnpw-block.tsx b/apps/as/src/pages/rvw-mnpw-mng/ui/rvw-mnpw-block.tsx index b3140e67a..d1e801f44 100644 --- a/apps/as/src/pages/rvw-mnpw-mng/ui/rvw-mnpw-block.tsx +++ b/apps/as/src/pages/rvw-mnpw-mng/ui/rvw-mnpw-block.tsx @@ -1,6 +1,7 @@ "use client"; import { useConfirm } from "@frontend-opensource/use-react-hooks"; +import { AxiosError } from "axios"; import { useAlertStore } from "@/shared/lib"; import type { RvwMnpwMngResponseDto } from "@/entities/rvw-mnpw"; @@ -10,6 +11,14 @@ import { Badge, Button } from "@common/components"; import type { RvwMnpwBlockConfig } from "../model/rvw-mnpw-block-config"; +/** 서버 오류 응답의 message 를 우선 표시하고, 없으면 기본 문구를 사용한다 */ +function getErrorMessage(error: unknown, fallback: string) { + if (error instanceof AxiosError) { + return error.response?.data?.message || fallback; + } + return fallback; +} + interface RvwMnpwBlockProps { block: RvwMnpwBlockConfig; items: RvwMnpwMngResponseDto[]; @@ -33,8 +42,7 @@ function RvwMnpwBlock({ block, items, selectedPerson }: RvwMnpwBlockProps) { }); alert("배치되었습니다."); } catch (error) { - const message = error instanceof Error ? error.message : "배치에 실패했습니다."; - alert(message); + alert(getErrorMessage(error, "배치에 실패했습니다.")); } }; @@ -48,8 +56,7 @@ function RvwMnpwBlock({ block, items, selectedPerson }: RvwMnpwBlockProps) { userUuid: item.userUuid, }); } catch (error) { - const message = error instanceof Error ? error.message : "제거에 실패했습니다."; - alert(message); + alert(getErrorMessage(error, "제거에 실패했습니다.")); } }; diff --git a/apps/as/src/pages/sewer-bsc-plan/model/columns.tsx b/apps/as/src/pages/sewer-bsc-plan/model/columns.tsx index d0bc4e32c..fb311e127 100644 --- a/apps/as/src/pages/sewer-bsc-plan/model/columns.tsx +++ b/apps/as/src/pages/sewer-bsc-plan/model/columns.tsx @@ -119,6 +119,17 @@ function getBadgeColor(state: BadgeState) { } } +function getBadgeStateText(state: BadgeState) { + switch (state) { + case "completed": + return "완료"; + case "current": + return "진행중"; + case "pending": + return "대기"; + } +} + function formatOptional(value: string | undefined) { return value?.trim() ? value : "-"; } @@ -136,7 +147,9 @@ function ProgressStepBadge({ prgrsSttsComCd, techRplyHstryYn }: ProgressStepBadg {badges.map((badge, index) => ( {index > 0 && >} - {badge.label} + + {badge.label}({getBadgeStateText(badge.state)}) + ))} diff --git a/apps/as/src/pages/sewer-bsc-plan/ui/sections/tmplnt-form-section.tsx b/apps/as/src/pages/sewer-bsc-plan/ui/sections/tmplnt-form-section.tsx index 90fe33267..eff807d3d 100644 --- a/apps/as/src/pages/sewer-bsc-plan/ui/sections/tmplnt-form-section.tsx +++ b/apps/as/src/pages/sewer-bsc-plan/ui/sections/tmplnt-form-section.tsx @@ -120,6 +120,7 @@ function TmplntDtlInput({ facilityIndex, planStpNo, fieldKey, decimals }: Tmplnt interface TmplntFacilityMatrixProps { swtrmtFcltCd: string; + facilityName?: string; sido: string; gugun: string; facilityIndex: number; @@ -129,6 +130,7 @@ interface TmplntFacilityMatrixProps { function TmplntFacilityMatrix({ swtrmtFcltCd, + facilityName, sido, gugun, facilityIndex, @@ -147,7 +149,10 @@ function TmplntFacilityMatrix({ const originalData = Array.isArray(data) ? (data[0] ?? null) : null; return ( - +
@@ -317,7 +322,10 @@ function TmplntFacilityAttachments({ return (

처리구역 필수 첨부파일

-
+
@@ -481,6 +489,8 @@ function TmplntFormSection() { {facilityName} @@ -497,10 +507,14 @@ function TmplntFormSection() { +

{facilityName} 하수도정비기본계획

+
@@ -217,6 +222,8 @@ function TmplntSection({ tmplntList, det, dtl }: TmplntSectionProps) { {facilityName} @@ -228,10 +235,17 @@ function TmplntSection({ tmplntList, det, dtl }: TmplntSectionProps) { {tmplntList.map((item) => { const facilityName = resolveFacilityName(item, facilityOptions); return ( - + +

{facilityName} 하수도정비기본계획

처리구역 필수 첨부파일

-
+
diff --git a/apps/as/src/pages/sewer-bsc-plan/ui/sewer-bsc-plan-apply-dialog.tsx b/apps/as/src/pages/sewer-bsc-plan/ui/sewer-bsc-plan-apply-dialog.tsx index fc39a376f..09271ea8d 100644 --- a/apps/as/src/pages/sewer-bsc-plan/ui/sewer-bsc-plan-apply-dialog.tsx +++ b/apps/as/src/pages/sewer-bsc-plan/ui/sewer-bsc-plan-apply-dialog.tsx @@ -127,7 +127,9 @@ function SewerBscPlanApplyDialog({ open, onOpenChange, onConfirm }: SewerBscPlan {canSidoGugunSelectable && ( - 시도 + + + - 시군구 + + + - + @@ -136,14 +143,16 @@ function PbadmsTaskApplyDialog({ - 시군구 + + +