[as] feat: 보완 요청 사항 반영 (20260928_1521)

This commit is contained in:
2026-09-28 15:21:19 +09:00
parent 4dee1309eb
commit 3b914fbc2e
6 changed files with 78 additions and 38 deletions
@@ -61,6 +61,13 @@ function buildProgressBadges(prgrsSttsComCd: string): ProgressBadge[] {
]; ];
} }
function getProgressStatusBadge(prgrsSttsComCd?: string | null) {
if (prgrsSttsComCd === "SL") {
return <Badge color="orange">보완요청</Badge>;
}
return null;
}
function getBadgeColor(state: BadgeState) { function getBadgeColor(state: BadgeState) {
switch (state) { switch (state) {
case "completed": case "completed":
@@ -110,7 +117,11 @@ export function createDesignCnstnColumns() {
columnHelper.accessor("bizNm", { columnHelper.accessor("bizNm", {
header: "사업명", header: "사업명",
meta: { align: "left" }, meta: { align: "left" },
cell: ({ getValue }) => formatOptional(getValue()), cell: ({ row, getValue }) => (
<>
{getProgressStatusBadge(row.original.prgrsSttsComCd)} {formatOptional(getValue())}
</>
),
}), }),
columnHelper.accessor("taskSeCdNm", { columnHelper.accessor("taskSeCdNm", {
header: "업무구분", header: "업무구분",
@@ -102,6 +102,13 @@ function buildProgressBadges(prgrsSttsComCd: string, techRplyHstryYn: "Y" | "N")
]; ];
} }
function getProgressStatusBadge(prgrsSttsComCd?: string | null) {
if (prgrsSttsComCd === "SL") {
return <Badge color="orange">보완요청</Badge>;
}
return null;
}
function getBadgeColor(state: BadgeState) { function getBadgeColor(state: BadgeState) {
switch (state) { switch (state) {
case "completed": case "completed":
@@ -152,7 +159,11 @@ export function createFnrsCnsltnColumns() {
columnHelper.accessor("bizNm", { columnHelper.accessor("bizNm", {
header: "사업명", header: "사업명",
meta: { align: "left" }, meta: { align: "left" },
cell: ({ getValue }) => formatOptional(getValue()), cell: ({ row, getValue }) => (
<>
{getProgressStatusBadge(row.original.prgrsSttsComCd)} {formatOptional(getValue())}
</>
),
}), }),
columnHelper.accessor("taskSeCdNm", { columnHelper.accessor("taskSeCdNm", {
header: "업무구분", header: "업무구분",
+12 -1
View File
@@ -103,6 +103,13 @@ function buildProgressBadges(prgrsSttsComCd: string, techRplyHstryYn: "Y" | "N")
]; ];
} }
function getProgressStatusBadge(prgrsSttsComCd?: string | null) {
if (prgrsSttsComCd === "SL") {
return <Badge color="orange">보완요청</Badge>;
}
return null;
}
function getBadgeColor(state: BadgeState) { function getBadgeColor(state: BadgeState) {
switch (state) { switch (state) {
case "completed": case "completed":
@@ -153,7 +160,11 @@ export function createInstlSncnColumns() {
columnHelper.accessor("bizNm", { columnHelper.accessor("bizNm", {
header: "사업명", header: "사업명",
meta: { align: "left" }, meta: { align: "left" },
cell: ({ getValue }) => formatOptional(getValue()), cell: ({ row, getValue }) => (
<>
{getProgressStatusBadge(row.original.prgrsSttsComCd)} {formatOptional(getValue())}
</>
),
}), }),
columnHelper.accessor("taskSeCdNm", { columnHelper.accessor("taskSeCdNm", {
header: "업무구분", header: "업무구분",
@@ -101,6 +101,13 @@ function buildProgressBadges(prgrsSttsComCd: string, techRplyHstryYn: "Y" | "N")
]; ];
} }
function getProgressStatusBadge(prgrsSttsComCd?: string | null) {
if (prgrsSttsComCd === "SL") {
return <Badge color="orange">보완요청</Badge>;
}
return null;
}
function getBadgeColor(state: BadgeState) { function getBadgeColor(state: BadgeState) {
switch (state) { switch (state) {
case "completed": case "completed":
@@ -151,7 +158,11 @@ export function createSewerBscPlanColumns() {
columnHelper.accessor("sewerBscPlanNm", { columnHelper.accessor("sewerBscPlanNm", {
header: "기본계획명", header: "기본계획명",
meta: { align: "left" }, meta: { align: "left" },
cell: ({ getValue }) => formatOptional(getValue()), cell: ({ row, getValue }) => (
<>
{getProgressStatusBadge(row.original.prgrsSttsComCd)} {formatOptional(getValue())}
</>
),
}), }),
columnHelper.accessor("sewerBscPlanSeCdNm", { columnHelper.accessor("sewerBscPlanSeCdNm", {
header: "계획구분", header: "계획구분",
@@ -240,7 +240,7 @@ function SewerBscPlanFormPage({
return ( return (
<FormProvider {...form}> <FormProvider {...form}>
<form onSubmit={form.handleSubmit(onSave)} className="mt-6 space-y-4"> <form onSubmit={form.handleSubmit(onSave)} className="mt-4">
<SectionCollapsibleGroup> <SectionCollapsibleGroup>
<div className="sticky top-[6rem] z-30 bg-container px-4 py-2"> <div className="sticky top-[6rem] z-30 bg-container px-4 py-2">
<SectionCollapsibleToggle /> <SectionCollapsibleToggle />
@@ -15,7 +15,11 @@ import {
SectionCollapsible, SectionCollapsible,
UploadedFileChip, UploadedFileChip,
} from "@/shared/ui"; } from "@/shared/ui";
import { attachService, useDownloadAttachmentByAtflCd, useDownloadAttachmentByAtflId } from "@/entities/attach"; import {
attachService,
useDownloadAttachmentByAtflCd,
useDownloadAttachmentByAtflId,
} from "@/entities/attach";
import { useEsntlAtchFileMngTree } from "@/entities/esntl"; import { useEsntlAtchFileMngTree } from "@/entities/esntl";
import { import {
Button, Button,
@@ -373,32 +377,26 @@ function AttachmentsFormSection({
return ( return (
<SectionCollapsible title="첨부파일"> <SectionCollapsible title="첨부파일">
<div className="space-y-6"> <div className="space-y-6">
<div className="px-2"> {essentialFiles.length === 0 && (
<h3 className="mb-4 text-xl font-semibold">필수 첨부파일</h3> <div className="px-2">
<Table variant="secondary" className="table-fixed"> <h3 className="mb-4 text-xl font-semibold">필수 첨부파일</h3>
<colgroup> <Table variant="secondary" className="table-fixed">
<col width="44%" /> <colgroup>
<col width="12%" /> <col width="44%" />
<col width="44%" /> <col width="12%" />
</colgroup> <col width="44%" />
<TableHeader> </colgroup>
<TableRow> <TableHeader>
<TableHead className="w-[30rem]" align="left">
파일명
</TableHead>
<TableHead>파일 확장자</TableHead>
<TableHead>파일첨부</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{essentialFiles.length === 0 ? (
<TableRow> <TableRow>
<TableCell colSpan={4} className="py-12 text-center text-muted-foreground"> <TableHead className="w-[30rem]" align="left">
조회된 필수 첨부파일 항목이 없습니다. 파일명
</TableCell> </TableHead>
<TableHead>파일 확장자</TableHead>
<TableHead>파일첨부</TableHead>
</TableRow> </TableRow>
) : ( </TableHeader>
essentialFiles.map((file) => { <TableBody>
{essentialFiles.map((file) => {
const atflCd = file.atchFileGroupId ?? ""; const atflCd = file.atchFileGroupId ?? "";
return ( return (
@@ -445,11 +443,11 @@ function AttachmentsFormSection({
</TableCell> </TableCell>
</TableRow> </TableRow>
); );
}) })}
)} </TableBody>
</TableBody> </Table>
</Table> </div>
</div> )}
<div className="px-2"> <div className="px-2">
<div className="mb-4 flex items-center justify-between"> <div className="mb-4 flex items-center justify-between">
@@ -468,9 +466,7 @@ function AttachmentsFormSection({
fileName={item.file?.name ?? item.fileName} fileName={item.file?.name ?? item.fileName}
isUploading={isUploading[item.fileKey] ?? false} isUploading={isUploading[item.fileKey] ?? false}
onRemove={() => void removeEtcFile(idx)} onRemove={() => void removeEtcFile(idx)}
onDownload={ onDownload={item.atflId ? () => downloadByAtflId(item.atflId!) : undefined}
item.atflId ? () => downloadByAtflId(item.atflId!) : undefined
}
/> />
))} ))}
</div> </div>