From 73199876fd2ea533720576e4dcbe0859a0f80d07 Mon Sep 17 00:00:00 2001 From: SeongHyun Kim Date: Tue, 7 Apr 2026 16:30:53 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20POP=20=EB=B0=B0=EB=84=88=EB=A5=BC=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=EC=84=A4=EC=A0=95=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EA=B4=80=EB=A6=AC=20=EA=B0=80=EB=8A=A5=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=97=B0=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PopShell에서 하드코딩 배너 → popConfig.bannerEnabled/bannerText 읽기 - 설정에서 배너 OFF → 배너 숨김 - 설정에서 텍스트 입력 → 해당 텍스트 표시 - 설정 없으면 기존 기본 문구 유지 (폴백) --- frontend/components/pop/hardcoded/PopShell.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/components/pop/hardcoded/PopShell.tsx b/frontend/components/pop/hardcoded/PopShell.tsx index 3d4b6ac6..7f538aef 100644 --- a/frontend/components/pop/hardcoded/PopShell.tsx +++ b/frontend/components/pop/hardcoded/PopShell.tsx @@ -3,6 +3,7 @@ import React, { useState, useEffect, useRef, ReactNode } from "react"; import { useRouter } from "next/navigation"; import { useAuth } from "@/hooks/useAuth"; +import { usePopSettings } from "@/hooks/pop/usePopSettings"; interface PopShellProps { children: ReactNode; @@ -98,8 +99,12 @@ export function PopShell({ children, showBanner = true, title, showBack = false, logout(); }; - const marqueeText = - "[공지] 금일 오후 3시 전체 안전교육 실시 예정입니다. 전 직원 필참 바랍니다. \u00a0\u00a0|\u00a0\u00a0 [알림] 내일 설비 정기점검으로 인한 3호기 가동 중지 예정 \u00a0\u00a0|\u00a0\u00a0 [안내] 4월 생산실적 우수팀 발표 - 생산1팀 축하드립니다!"; + // POP 설정에서 배너 텍스트 로드 (POP화면설정에서 관리) + const { settings: popSettings } = usePopSettings("/pop/home"); + const homeConfig = (popSettings as any)?.screens?.home; + const bannerEnabled = homeConfig?.bannerEnabled ?? true; + const bannerText = homeConfig?.bannerText; + const marqueeText = bannerText || "[공지] 금일 오후 3시 전체 안전교육 실시 예정입니다. 전 직원 필참 바랍니다. \u00a0\u00a0|\u00a0\u00a0 [알림] 내일 설비 정기점검으로 인한 3호기 가동 중지 예정 \u00a0\u00a0|\u00a0\u00a0 [안내] 4월 생산실적 우수팀 발표 - 생산1팀 축하드립니다!"; return (
@@ -296,7 +301,7 @@ export function PopShell({ children, showBanner = true, title, showBack = false, {/* ===== NOTICE BANNER (Marquee) ===== */} - {showBanner &&
+ {showBanner && bannerEnabled &&
📢 공지