From f63de2afd28820c634c4246b3429b6b8c561f8f5 Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Thu, 17 Sep 2026 16:16:18 +0900 Subject: [PATCH] =?UTF-8?q?260917=5F02=5FENH:=20=ED=8C=9D=EC=97=85=20?= =?UTF-8?q?=EC=98=A4=EB=8A=98=ED=95=98=EB=A3=A8=EB=A7=8C=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=EB=B0=95=EC=8A=A4=20=ED=86=A0=EA=B8=80=20=EA=B0=80?= =?UTF-8?q?=EB=8A=A5=ED=95=98=EA=B2=8C=20=EC=88=98=EC=A0=95,=20=ED=95=99?= =?UTF-8?q?=EB=8B=B9=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=8B=9C=20=EC=A7=84?= =?UTF-8?q?=ED=96=89=ED=98=84=ED=99=A9=EC=97=90=EC=84=9C=20=EC=84=B8?= =?UTF-8?q?=EB=B6=80=EC=A0=81=EC=9D=B8=20=EB=82=B4=EC=9A=A9=EC=9D=80=20?= =?UTF-8?q?=EB=B3=B4=EC=9D=B4=EC=A7=80=20=EC=95=8A=EA=B2=8C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(pages)/(main)/progress/page.tsx | 20 +++++++++++--------- src/components/app-shell/ActivePopupGate.tsx | 20 +++++++++++++++----- src/components/report/ReportTable.tsx | 8 ++++++-- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/src/app/(pages)/(main)/progress/page.tsx b/src/app/(pages)/(main)/progress/page.tsx index 6236631..21ecdaa 100644 --- a/src/app/(pages)/(main)/progress/page.tsx +++ b/src/app/(pages)/(main)/progress/page.tsx @@ -33,6 +33,9 @@ export default function ProgressPage() { const reportQuery = useProgressReportQuery(); + // 비관리자(Center)에게는 설문 항목(리포트 헤더) 컬럼을 숨기고 id/학당명/목표 표본/완료 수만 노출한다. + const visibleHeaders = admin ? (reportQuery.data?.headers ?? []) : []; + const content = useMemo(() => { const rows = reportQuery.data?.content ?? []; if (!admin || selectedCenterCds.length === 0) return rows; @@ -55,7 +58,7 @@ export default function ProgressPage() { exportReportToExcel({ fileName: `진행현황_${new Date().toISOString().slice(0, 10)}.xlsx`, sheetName: "진행현황", - headers: reportQuery.data.headers, + headers: visibleHeaders, content, scale: "current", leadingColumns, @@ -66,20 +69,19 @@ export default function ProgressPage() {
-
- {admin ? ( + {/* 필터(학당 선택)와 Excel 다운로드는 관리자 전용. 비관리자는 툴바 자체를 노출하지 않는다. */} + {admin ? ( +
- ) : ( - - )} - -
+ +
+ ) : null} {reportQuery.isLoading ? (

불러오는 중...

) : ( setDismissedIds((ids) => [...ids, current.popupId]); - const hideToday = () => { - const nextHiddenIds = [...new Set([...readHiddenPopupIds(), current.popupId])]; - cookieStore.set(CookieKeys.PopupHideToday, JSON.stringify(nextHiddenIds), { expires: getEndOfToday() }); - setHideTodayChecked(true); + // 닫기 전까지는 체크를 다시 해제할 수 있어야 하므로, 체크/해제 모두 쿠키에 반영한다. + const setHideToday = (next: boolean) => { + if (next) { + const nextHiddenIds = [...new Set([...readHiddenPopupIds(), current.popupId])]; + cookieStore.set(CookieKeys.PopupHideToday, JSON.stringify(nextHiddenIds), { expires: getEndOfToday() }); + } else { + const nextHiddenIds = readHiddenPopupIds().filter((id) => id !== current.popupId); + if (nextHiddenIds.length === 0) { + cookieStore.remove(CookieKeys.PopupHideToday); + } else { + cookieStore.set(CookieKeys.PopupHideToday, JSON.stringify(nextHiddenIds), { expires: getEndOfToday() }); + } + } + setHideTodayChecked(next); }; return ( @@ -65,7 +75,7 @@ export function ActivePopupGate() { footer={ <> diff --git a/src/components/report/ReportTable.tsx b/src/components/report/ReportTable.tsx index f0d436b..5823a78 100644 --- a/src/components/report/ReportTable.tsx +++ b/src/components/report/ReportTable.tsx @@ -162,12 +162,16 @@ export function ReportTable({ }; return ( -
+ // leaf 컬럼이 없으면 테이블이 내용 폭만 차지하므로, 외곽 border 박스도 w-fit으로 함께 줄여 + // 빈 영역이 넓게 남지 않도록 한다(가로가 넘칠 땐 max-w-full로 컨테이너를 넘지 않게 제한). +
{/* DataTable.tsx와 동일하게 x/y 스크롤을 하나의 컨테이너에서 처리해야 sticky의 기준 컨테이너가 어긋나지 않는다. overflow-x-auto만 있는 별도 wrapper를 추가로 두면 CSS 스펙상 overflow-y도 auto로 강제되어 중첩 스크롤 컨테이너가 생기고 sticky top이 깨진다. */}
- + {/* leaf 컬럼이 없으면(예: 비관리자 진행현황) w-full로 늘리면 leading 컬럼이 과하게 벌어지므로 + 내용 폭(=지정한 컬럼 폭 합)만큼만 차지하도록 w-auto로 둔다. */} +
0 ? "w-full" : "w-auto")}> {leadingColumns.map((column) => (