From 378a0985e2a56fe210bd6b4c79ae98f2c7a88888 Mon Sep 17 00:00:00 2001 From: seonmiki Date: Sun, 17 Nov 2024 16:13:14 +0900 Subject: [PATCH 1/9] =?UTF-8?q?[FE]=20FIX:=20LeftNav=204=EC=B8=B5=20?= =?UTF-8?q?=EC=A0=9C=EC=99=B8=20#1703?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LeftNav/LeftMainNav/LeftMainNav.tsx | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/frontend/src/Cabinet/components/LeftNav/LeftMainNav/LeftMainNav.tsx b/frontend/src/Cabinet/components/LeftNav/LeftMainNav/LeftMainNav.tsx index c4119c0d4..0fe716c4e 100644 --- a/frontend/src/Cabinet/components/LeftNav/LeftMainNav/LeftMainNav.tsx +++ b/frontend/src/Cabinet/components/LeftNav/LeftMainNav/LeftMainNav.tsx @@ -58,17 +58,19 @@ const LeftMainNav = ({ {floors && floors.map((floor, index) => ( - onClickFloorButton(floor)} - key={index} - > - {floor + "층"} - + floor !== 4 && ( + onClickFloorButton(floor)} + key={index} + > + {floor + "층"} + + ) ))} Date: Sun, 17 Nov 2024 16:21:00 +0900 Subject: [PATCH 2/9] =?UTF-8?q?[FE]=20FIX:=20localStorage=EC=9D=84=20?= =?UTF-8?q?=ED=86=B5=ED=95=9C=204=EC=B8=B5=20=EC=A0=91=EA=B7=BC=20?= =?UTF-8?q?=EC=A0=9C=ED=95=9C=20#1703?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CabinetList/CabinetList.container.tsx | 25 ++++++++++++------- frontend/src/Cabinet/pages/MainPage.tsx | 5 ++-- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx b/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx index 1e9dd4fc2..9a1304252 100644 --- a/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx +++ b/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx @@ -19,10 +19,11 @@ import useMultiSelect from "@/Cabinet/hooks/useMultiSelect"; interface ICabinetListContainer { isAdmin: boolean; + currentFloor: number; } const CabinetListContainer = ({ - isAdmin, + isAdmin, currentFloor }: ICabinetListContainer): JSX.Element => { const colNum = useRecoilValue(currentSectionColNumState); const currentSectionCabinets = useRecoilValue( @@ -53,14 +54,20 @@ const CabinetListContainer = ({ {currentFloorSectionNames.includes(currentSectionName) && ( )} - - {(currentSectionName === SectionType.elevator || - currentSectionName === SectionType.stairs) && ( - + {currentFloor === 4 ? ( + + ) : ( + <> + + {(currentSectionName === SectionType.elevator || + currentSectionName === SectionType.stairs) && ( + + )} + )} ); diff --git a/frontend/src/Cabinet/pages/MainPage.tsx b/frontend/src/Cabinet/pages/MainPage.tsx index 3550822bd..ce6e230c9 100644 --- a/frontend/src/Cabinet/pages/MainPage.tsx +++ b/frontend/src/Cabinet/pages/MainPage.tsx @@ -152,9 +152,10 @@ const MainPage = () => { - + {currentSectionName !== SectionType.elevator && - currentSectionName !== SectionType.stairs && ( + currentSectionName !== SectionType.stairs && + currentFloor !== 4 && ( Date: Sun, 17 Nov 2024 16:44:23 +0900 Subject: [PATCH 3/9] =?UTF-8?q?[FE]=20FIX:=20Admin=EC=97=90=EC=84=9C?= =?UTF-8?q?=EB=8A=94=204=EC=B8=B5=20=EB=B3=B4=EC=9D=B4=EB=8F=84=EB=A1=9D?= =?UTF-8?q?=20=EC=88=98=EC=A0=95=20=20#1703?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CabinetList/CabinetList.container.tsx | 2 +- .../components/LeftNav/LeftMainNav/LeftMainNav.tsx | 8 ++++---- frontend/src/Cabinet/pages/admin/AdminMainPage.tsx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx b/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx index 9a1304252..caecd0822 100644 --- a/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx +++ b/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx @@ -54,7 +54,7 @@ const CabinetListContainer = ({ {currentFloorSectionNames.includes(currentSectionName) && ( )} - {currentFloor === 4 ? ( + {(!isAdmin && currentFloor === 4) ? ( ) : ( <> diff --git a/frontend/src/Cabinet/components/LeftNav/LeftMainNav/LeftMainNav.tsx b/frontend/src/Cabinet/components/LeftNav/LeftMainNav/LeftMainNav.tsx index 0fe716c4e..ec3933afd 100644 --- a/frontend/src/Cabinet/components/LeftNav/LeftMainNav/LeftMainNav.tsx +++ b/frontend/src/Cabinet/components/LeftNav/LeftMainNav/LeftMainNav.tsx @@ -57,8 +57,8 @@ const LeftMainNav = ({ Home {floors && - floors.map((floor, index) => ( - floor !== 4 && ( + floors.map((floor, index) => + !(!isAdmin && floor === 4) ? ( {floor + "층"} - ) - ))} + ) : null + )} { /> - + Date: Sun, 17 Nov 2024 17:09:07 +0900 Subject: [PATCH 4/9] =?UTF-8?q?[FE]=20FIX:=204=EC=B8=B5=20=EC=A0=91?= =?UTF-8?q?=EA=B7=BC=20=EC=8B=9C=20HeartIcon=20&=20RealViewNoti=20?= =?UTF-8?q?=EC=95=88=EB=B3=B4=EC=9D=B4=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20#1703?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Cabinet/components/CabinetList/CabinetList.container.tsx | 2 +- .../components/LeftNav/LeftSectionNav/LeftSectionNav.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx b/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx index caecd0822..bf5b4ede3 100644 --- a/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx +++ b/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx @@ -51,7 +51,7 @@ const CabinetListContainer = ({ /> )} - {currentFloorSectionNames.includes(currentSectionName) && ( + {currentFloorSectionNames.includes(currentSectionName) && (currentFloor !== 4) && ( )} {(!isAdmin && currentFloor === 4) ? ( diff --git a/frontend/src/Cabinet/components/LeftNav/LeftSectionNav/LeftSectionNav.tsx b/frontend/src/Cabinet/components/LeftNav/LeftSectionNav/LeftSectionNav.tsx index 5939a9405..c5fd2ca12 100644 --- a/frontend/src/Cabinet/components/LeftNav/LeftSectionNav/LeftSectionNav.tsx +++ b/frontend/src/Cabinet/components/LeftNav/LeftSectionNav/LeftSectionNav.tsx @@ -2,7 +2,7 @@ import { useLocation } from "react-router-dom"; import { useRecoilValue } from "recoil"; import { useRecoilState } from "recoil"; import styled from "styled-components"; -import { currentSectionNameState } from "@/Cabinet/recoil/atoms"; +import { currentSectionNameState, currentFloorNumberState } from "@/Cabinet/recoil/atoms"; import { currentFloorSectionState } from "@/Cabinet/recoil/selectors"; import CabinetColorTable from "@/Cabinet/components/LeftNav/CabinetColorTable/CabinetColorTable"; import { clubSectionsData } from "@/Cabinet/assets/data/mapPositionData"; @@ -17,6 +17,7 @@ const LeftSectionNav = ({ closeLeftNav }: { closeLeftNav: () => void }) => { const [currentFloorSection, setCurrentFloorSection] = useRecoilState( currentSectionNameState ); + const currentFloorNumber = useRecoilValue(currentFloorNumberState); const { pathname } = useLocation(); const isAdmin = pathname.includes("admin"); @@ -45,6 +46,7 @@ const LeftSectionNav = ({ closeLeftNav }: { closeLeftNav: () => void }) => { {!isAdmin && !isClubSection && + currentFloorNumber !== 4 && (section.alarmRegistered ? ( ) : ( From ebacec3d67c42d6c65a1d75896e203d5af60b8a7 Mon Sep 17 00:00:00 2001 From: seonmiki Date: Sun, 17 Nov 2024 17:14:04 +0900 Subject: [PATCH 5/9] =?UTF-8?q?[FE]=20FIX:=20=EC=9A=B0=EC=B8=A1=20map?= =?UTF-8?q?=EC=97=90=EC=84=9C=204=EC=B8=B5=20=EC=A0=9C=EC=99=B8=20=20#1703?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MapInfo/MapFloorSelectOption/MapFloorSelectOption.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/Cabinet/components/MapInfo/MapFloorSelectOption/MapFloorSelectOption.tsx b/frontend/src/Cabinet/components/MapInfo/MapFloorSelectOption/MapFloorSelectOption.tsx index 241ed3484..9245bfc5b 100644 --- a/frontend/src/Cabinet/components/MapInfo/MapFloorSelectOption/MapFloorSelectOption.tsx +++ b/frontend/src/Cabinet/components/MapInfo/MapFloorSelectOption/MapFloorSelectOption.tsx @@ -7,6 +7,7 @@ const MapFloorSelectOption: React.FC<{ return ( {floorInfo.map((info, idx) => ( + (info !== 4) && selectFloor(info)} From 4da08e427d935df0914b356822435d6f998497aa Mon Sep 17 00:00:00 2001 From: seonmiki Date: Sun, 17 Nov 2024 17:27:47 +0900 Subject: [PATCH 6/9] =?UTF-8?q?[FE]=20FIX:=204=EC=B8=B5=20=EC=A0=91?= =?UTF-8?q?=EA=B7=BC=20=EC=8B=9C=20map=20=EC=9D=80=202=EC=B8=B5=EC=9D=84?= =?UTF-8?q?=20default=EB=A1=9C=20#1703?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/components/MapInfo/MapInfo.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/Cabinet/components/MapInfo/MapInfo.tsx b/frontend/src/Cabinet/components/MapInfo/MapInfo.tsx index fd82be807..1259ed0c6 100644 --- a/frontend/src/Cabinet/components/MapInfo/MapInfo.tsx +++ b/frontend/src/Cabinet/components/MapInfo/MapInfo.tsx @@ -33,8 +33,8 @@ const MapInfo = ({ style={{ width: "24px", cursor: "pointer" }} /> - - + + ); }; From 7103156d7f9a22d5db8963c24a1dfecf72f2e047 Mon Sep 17 00:00:00 2001 From: seonmiki Date: Thu, 21 Nov 2024 15:14:47 +0900 Subject: [PATCH 7/9] =?UTF-8?q?[FE]=20REFACTOR:=204=EC=B8=B5=20DISABLED=5F?= =?UTF-8?q?FLOOR=20=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=EB=A1=9C=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20#1703?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CabinetList/CabinetList.container.tsx | 7 ++++--- .../components/LeftNav/LeftMainNav/LeftMainNav.tsx | 3 ++- .../LeftNav/LeftSectionNav/LeftSectionNav.tsx | 3 ++- .../MapFloorSelectOption/MapFloorSelectOption.tsx | 3 ++- frontend/src/Cabinet/components/MapInfo/MapInfo.tsx | 13 ++++++++++--- frontend/src/Cabinet/pages/AvailablePage.tsx | 1 - 6 files changed, 20 insertions(+), 10 deletions(-) diff --git a/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx b/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx index bf5b4ede3..89ebca973 100644 --- a/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx +++ b/frontend/src/Cabinet/components/CabinetList/CabinetList.container.tsx @@ -9,6 +9,7 @@ import { currentSectionCabinetState, currentSectionColNumState, } from "@/Cabinet/recoil/selectors"; +import { DISABLED_FLOOR } from "@/Cabinet/pages/AvailablePage"; import CabinetList from "@/Cabinet/components/CabinetList/CabinetList"; import EmptySection from "@/Cabinet/components/CabinetList/EmptySection/EmptySection"; import RealViewNotification from "@/Cabinet/components/CabinetList/RealViewNotification/RealViewNotification"; @@ -51,11 +52,11 @@ const CabinetListContainer = ({ /> )} - {currentFloorSectionNames.includes(currentSectionName) && (currentFloor !== 4) && ( + {currentFloorSectionNames.includes(currentSectionName) && !(DISABLED_FLOOR.includes(currentFloor.toString())) && ( )} - {(!isAdmin && currentFloor === 4) ? ( - + {(!isAdmin && DISABLED_FLOOR.includes(currentFloor.toString())) ? ( + ) : ( <> {floors && floors.map((floor, index) => - !(!isAdmin && floor === 4) ? ( + !(!isAdmin && DISABLED_FLOOR.includes(floor.toString())) ? ( void }) => { {!isAdmin && !isClubSection && - currentFloorNumber !== 4 && + !DISABLED_FLOOR.includes(currentFloorNumber.toString()) && (section.alarmRegistered ? ( ) : ( diff --git a/frontend/src/Cabinet/components/MapInfo/MapFloorSelectOption/MapFloorSelectOption.tsx b/frontend/src/Cabinet/components/MapInfo/MapFloorSelectOption/MapFloorSelectOption.tsx index 9245bfc5b..9e7040198 100644 --- a/frontend/src/Cabinet/components/MapInfo/MapFloorSelectOption/MapFloorSelectOption.tsx +++ b/frontend/src/Cabinet/components/MapInfo/MapFloorSelectOption/MapFloorSelectOption.tsx @@ -1,4 +1,5 @@ import styled from "styled-components"; +import { DISABLED_FLOOR } from "@/Cabinet/pages/AvailablePage"; const MapFloorSelectOption: React.FC<{ selectFloor: Function; @@ -7,7 +8,7 @@ const MapFloorSelectOption: React.FC<{ return ( {floorInfo.map((info, idx) => ( - (info !== 4) && + !(DISABLED_FLOOR.includes(info.toString())) && selectFloor(info)} diff --git a/frontend/src/Cabinet/components/MapInfo/MapInfo.tsx b/frontend/src/Cabinet/components/MapInfo/MapInfo.tsx index 1259ed0c6..0ffc4c014 100644 --- a/frontend/src/Cabinet/components/MapInfo/MapInfo.tsx +++ b/frontend/src/Cabinet/components/MapInfo/MapInfo.tsx @@ -1,7 +1,9 @@ import styled from "styled-components"; import MapFloorSelect from "@/Cabinet/components/MapInfo/MapFloorSelect/MapFloorSelect"; import MapGrid from "@/Cabinet/components/MapInfo/MapGrid/MapGrid"; +import { DISABLED_FLOOR } from "@/Cabinet/pages/AvailablePage"; +const DEFAULT_FLOOR = 2; const MapInfo = ({ touchStart, touchEnd, @@ -12,11 +14,16 @@ const MapInfo = ({ }: { touchStart: React.TouchEventHandler; touchEnd: React.TouchEventHandler; - floor: number; + floor: number | undefined; setFloor: React.Dispatch>; floorInfo: number[]; closeMap: React.MouseEventHandler; }) => { + const currentFloor = floor ?? DEFAULT_FLOOR; + const validFloor = DISABLED_FLOOR.includes(currentFloor.toString()) + ? DEFAULT_FLOOR + : currentFloor; + return ( - - + + ); }; diff --git a/frontend/src/Cabinet/pages/AvailablePage.tsx b/frontend/src/Cabinet/pages/AvailablePage.tsx index 9ec0be173..005484fbe 100644 --- a/frontend/src/Cabinet/pages/AvailablePage.tsx +++ b/frontend/src/Cabinet/pages/AvailablePage.tsx @@ -29,7 +29,6 @@ const toggleList: toggleItem[] = [ { name: "공유", key: AvailableCabinetsType.SHARE }, ]; -/* TODO: DISABLED_FLOOR 을 환경변수로 넣기 */ export const DISABLED_FLOOR = ["4"]; const AvailablePage = () => { From 2e6347dfcec03c17f17fa4f2dc2c948f8db35695 Mon Sep 17 00:00:00 2001 From: seonmiki Date: Fri, 22 Nov 2024 19:25:35 +0900 Subject: [PATCH 8/9] =?UTF-8?q?[FE]=20REFACTOR:=204=EC=B8=B5=20DISABLED=5F?= =?UTF-8?q?FLOOR=20=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=20=EB=B9=A0?= =?UTF-8?q?=EC=A7=84=20=EB=B6=80=EB=B6=84=20=EC=B6=94=EA=B0=80=EC=88=98?= =?UTF-8?q?=EC=A0=95=20#1703?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/Cabinet/pages/AvailablePage.tsx | 1 + frontend/src/Cabinet/pages/MainPage.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/Cabinet/pages/AvailablePage.tsx b/frontend/src/Cabinet/pages/AvailablePage.tsx index 005484fbe..9ec0be173 100644 --- a/frontend/src/Cabinet/pages/AvailablePage.tsx +++ b/frontend/src/Cabinet/pages/AvailablePage.tsx @@ -29,6 +29,7 @@ const toggleList: toggleItem[] = [ { name: "공유", key: AvailableCabinetsType.SHARE }, ]; +/* TODO: DISABLED_FLOOR 을 환경변수로 넣기 */ export const DISABLED_FLOOR = ["4"]; const AvailablePage = () => { diff --git a/frontend/src/Cabinet/pages/MainPage.tsx b/frontend/src/Cabinet/pages/MainPage.tsx index ce6e230c9..0901deb30 100644 --- a/frontend/src/Cabinet/pages/MainPage.tsx +++ b/frontend/src/Cabinet/pages/MainPage.tsx @@ -155,7 +155,7 @@ const MainPage = () => { {currentSectionName !== SectionType.elevator && currentSectionName !== SectionType.stairs && - currentFloor !== 4 && ( + !DISABLED_FLOOR.includes(currentFloor.toString()) && ( Date: Fri, 22 Nov 2024 22:21:58 +0900 Subject: [PATCH 9/9] =?UTF-8?q?[FE]=20FIX:=20=EA=B9=A8=EC=A7=80=EB=8A=94?= =?UTF-8?q?=20=EA=B8=80=EC=9E=90=20text=20=EC=86=8D=EC=84=B1=EA=B0=92?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/index.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/index.css b/frontend/src/index.css index 1c5a648fc..7d06409b8 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -1,4 +1,4 @@ -@import url("https://fonts.googleapis.com/css2?family=Do+Hyeon&display=swap&text=새롬관로그인중수요지식회여기엔사물함이없어"); +@import url("https://fonts.googleapis.com/css2?family=Do+Hyeon&display=swap&text=새롬관로그인중수요지식회여기엔사물함이없어4층은현재용불가입니다!"); @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;700&display=swap"); :root { @@ -224,6 +224,7 @@ input { -ms-overflow-style: none; scrollbar-width: none; } + .noScrollbar::-webkit-scrollbar { display: none; } @@ -254,4 +255,4 @@ input { .domainButtonActive { color: var(--sys-main-color) !important; -} +} \ No newline at end of file