diff --git a/.yarn/cache/@eslint-js-npm-9.31.0-6f2159589b-f9d4c73d0f.zip b/.yarn/cache/@eslint-js-npm-9.32.0-dba4bf8487-f71e8f9146.zip similarity index 99% rename from .yarn/cache/@eslint-js-npm-9.31.0-6f2159589b-f9d4c73d0f.zip rename to .yarn/cache/@eslint-js-npm-9.32.0-dba4bf8487-f71e8f9146.zip index db102660..067db92e 100644 Binary files a/.yarn/cache/@eslint-js-npm-9.31.0-6f2159589b-f9d4c73d0f.zip and b/.yarn/cache/@eslint-js-npm-9.32.0-dba4bf8487-f71e8f9146.zip differ diff --git a/.yarn/cache/electron-to-chromium-npm-1.5.190-701a51856e-d6ebf5c3fd.zip b/.yarn/cache/electron-to-chromium-npm-1.5.191-037fcdd360-26b22ec2ae.zip similarity index 99% rename from .yarn/cache/electron-to-chromium-npm-1.5.190-701a51856e-d6ebf5c3fd.zip rename to .yarn/cache/electron-to-chromium-npm-1.5.191-037fcdd360-26b22ec2ae.zip index 218a6d01..55ffb7d6 100644 Binary files a/.yarn/cache/electron-to-chromium-npm-1.5.190-701a51856e-d6ebf5c3fd.zip and b/.yarn/cache/electron-to-chromium-npm-1.5.191-037fcdd360-26b22ec2ae.zip differ diff --git a/.yarn/cache/eslint-npm-9.31.0-2a0f2131da-3fd1cd5b38.zip b/.yarn/cache/eslint-npm-9.32.0-868081e124-e8a23924ec.zip similarity index 98% rename from .yarn/cache/eslint-npm-9.31.0-2a0f2131da-3fd1cd5b38.zip rename to .yarn/cache/eslint-npm-9.32.0-868081e124-e8a23924ec.zip index 032164d2..babafec9 100644 Binary files a/.yarn/cache/eslint-npm-9.31.0-2a0f2131da-3fd1cd5b38.zip and b/.yarn/cache/eslint-npm-9.32.0-868081e124-e8a23924ec.zip differ diff --git a/.yarn/cache/linkifyjs-npm-4.3.1-11eb1531f3-fcd7d36ce1.zip b/.yarn/cache/linkifyjs-npm-4.3.2-cbc76aea4c-1a85e6b368.zip similarity index 89% rename from .yarn/cache/linkifyjs-npm-4.3.1-11eb1531f3-fcd7d36ce1.zip rename to .yarn/cache/linkifyjs-npm-4.3.2-cbc76aea4c-1a85e6b368.zip index 7495ff3d..cff140a8 100644 Binary files a/.yarn/cache/linkifyjs-npm-4.3.1-11eb1531f3-fcd7d36ce1.zip and b/.yarn/cache/linkifyjs-npm-4.3.2-cbc76aea4c-1a85e6b368.zip differ diff --git a/.yarn/cache/swiper-npm-11.2.10-2bf88a66cf-b7e3a7c79d.zip b/.yarn/cache/swiper-npm-11.2.10-2bf88a66cf-b7e3a7c79d.zip new file mode 100644 index 00000000..dd4b8e07 Binary files /dev/null and b/.yarn/cache/swiper-npm-11.2.10-2bf88a66cf-b7e3a7c79d.zip differ diff --git a/apps/nowait-user/package.json b/apps/nowait-user/package.json index a37510f4..3595a587 100644 --- a/apps/nowait-user/package.json +++ b/apps/nowait-user/package.json @@ -25,6 +25,7 @@ "react-router-dom": "^7.6.2", "react-toastify": "^11.0.5", "react-transition-group": "^4.4.5", + "swiper": "^11.2.10", "zustand": "^5.0.6" }, "devDependencies": { diff --git a/apps/nowait-user/src/api/menu.ts b/apps/nowait-user/src/api/menu.ts index 6c505e57..87f050df 100644 --- a/apps/nowait-user/src/api/menu.ts +++ b/apps/nowait-user/src/api/menu.ts @@ -1,6 +1,14 @@ import axios from "axios"; +const API_URI = import.meta.env.VITE_SERVER_URI; + +//주점에 해당하는 모든 메뉴 조회 export const getStoreMenus = async (storeId: string | undefined) => { - const res = await axios.get(`/v1/menus/all-menus/stores/${storeId}`); + try { + const res = await axios.get(`${API_URI}/v1/menus/all-menus/stores/${storeId}`); return res.data; + } catch (error) { + console.log(error) + } + }; diff --git a/apps/nowait-user/src/api/reservation.ts b/apps/nowait-user/src/api/reservation.ts index 8902258f..7406b5b2 100644 --- a/apps/nowait-user/src/api/reservation.ts +++ b/apps/nowait-user/src/api/reservation.ts @@ -4,8 +4,44 @@ interface ReservationType { partySize: number; } +interface StoreResponse { + success: boolean; + response: { + storeId: number; + waitingCount: number; + isWaiting: false; + departmentId: number; + departmentName: string; + name: string; + location: string; + description: string; + notice: string; + openTime: string; + profileImage: { + id: number; + storeId: number; + imageUrl: string; + imageType: string; + }; + bannerImages: + | { + id: number; + storeId: number; + imageUrl: string; + imageType: string; + }[] + | undefined; + isActive: boolean; + deleted: boolean; + createdAt: string; + isBookmarked: boolean; + }; +} + // 주점 정보 가져오기 -export const getStore = async (storeId: string | undefined) => { +export const getStore = async ( + storeId: string | undefined +): Promise => { const res = await UserApi.get(`/v1/stores/${storeId}`); return res.data; }; diff --git a/apps/nowait-user/src/components/BackHeader.tsx b/apps/nowait-user/src/components/BackHeader.tsx index dcde6ffd..29d21f86 100644 --- a/apps/nowait-user/src/components/BackHeader.tsx +++ b/apps/nowait-user/src/components/BackHeader.tsx @@ -8,7 +8,7 @@ interface PropsType { const BackHeader = ({ title }: PropsType) => { const navigate = useNavigate() return ( -
+
-
+ ); }; diff --git a/apps/nowait-user/src/components/CommonSwiper.tsx b/apps/nowait-user/src/components/CommonSwiper.tsx new file mode 100644 index 00000000..acd8eedf --- /dev/null +++ b/apps/nowait-user/src/components/CommonSwiper.tsx @@ -0,0 +1,36 @@ +import { Swiper, SwiperSlide } from "swiper/react"; +import { Pagination, Navigation } from "swiper/modules"; +import "swiper/css"; +import "swiper/css/navigation"; +import "swiper/css/pagination"; +import "./customSwiper.css"; + +interface BannerImageType { + id: number; + storeId: number; + imageUrl: string; + imageType: string; +} + +const CommonSwiper = ({ slideImages }: { slideImages: BannerImageType[] }) => { + return ( +
+ + {slideImages?.map((slideImage) => { + return ( + + 학과 주점 대표 이미지 + + ); + })} + +
+ ); +}; + +export default CommonSwiper; diff --git a/apps/nowait-user/src/components/common/MenuItem.tsx b/apps/nowait-user/src/components/common/MenuItem.tsx index 894f6d05..86deec02 100644 --- a/apps/nowait-user/src/components/common/MenuItem.tsx +++ b/apps/nowait-user/src/components/common/MenuItem.tsx @@ -9,21 +9,19 @@ interface PropsType { const MenuItem = ({ data, mode }: PropsType) => { const navigate = useNavigate(); - const { id, storeId } = useParams(); + const { storeId } = useParams(); const handleMenuClick = () => { - if (mode === "store") { - navigate(`/store/${id}/menu/${data.id}`, { state: data }); - } else { - navigate(`/${storeId}/menu/${data.id}`, { state: data }); + if (mode === "order") { + navigate(`/${storeId}/menu/${data.menuId}`, { state: data }); } }; return ( -
  • +
  • + ); diff --git a/apps/nowait-user/src/pages/waiting/bookmark/BookmarkPage.tsx b/apps/nowait-user/src/pages/waiting/bookmark/BookmarkPage.tsx index b2a1922b..835d5b2e 100644 --- a/apps/nowait-user/src/pages/waiting/bookmark/BookmarkPage.tsx +++ b/apps/nowait-user/src/pages/waiting/bookmark/BookmarkPage.tsx @@ -1,26 +1,28 @@ import HomeHeader from "../../../components/Header"; +import { useBookmarkState } from "../../../hooks/useBookmarkState"; import BookmarkedStoreItem from "./components/BookmarkedStoreItem"; const dummyData = [ { id: 1, image: "/bookmarkStoreImage.png", - wait: "대기 0팀", + waitingCount: "대기 0팀", storeName: "스페이시스", - lesson: "바이오메카트로닉스공학과", + departmentName: "바이오메카트로닉스공학과", storeId: "1", }, { - id: 1, + id: 2, image: "/bookmarkStoreImage.png", - wait: "대기 0팀", + waitingCount: "대기 0팀", storeName: "스페이시스", - lesson: "약과", + departmentName: "약과", storeId: "2", }, ]; const BookmarkPage = () => { + const {bookmarkData} = useBookmarkState() return (
    @@ -29,15 +31,15 @@ const BookmarkPage = () => { 북마크한 부스
      - {dummyData.map((data) => { + {bookmarkData?.map((data:any) => { return ( ); diff --git a/apps/nowait-user/src/pages/waiting/bookmark/components/BookmarkedStoreItem.tsx b/apps/nowait-user/src/pages/waiting/bookmark/components/BookmarkedStoreItem.tsx index 5e5b8180..d5467657 100644 --- a/apps/nowait-user/src/pages/waiting/bookmark/components/BookmarkedStoreItem.tsx +++ b/apps/nowait-user/src/pages/waiting/bookmark/components/BookmarkedStoreItem.tsx @@ -5,18 +5,18 @@ import { useBookmarkState } from "../../../../hooks/useBookmarkState"; interface PropsType { id: number; image: string; - wait: string; + waitingCount: string; storeName: string; - lesson: string; + departmentName: string; storeId: string; } const BookmarkedStoreItem = ({ id, image, - wait, + waitingCount, storeName, - lesson, + departmentName, storeId, }: PropsType) => { const { createBookmarkMutate, deleteBookmarkMutate } = useBookmarkMutation(); @@ -42,7 +42,7 @@ const BookmarkedStoreItem = ({ alt="북마크한 주점 메인 이미지" >

      - {wait} + {waitingCount}

    @@ -54,7 +54,7 @@ const BookmarkedStoreItem = ({ >

    {storeName}

    -

    {lesson}

    +

    {departmentName}

    + )} -
    - + + {/* 주점 메뉴 리스트 */} +
    - + {/* 주점 미오픈 시 버튼 */} + {!store?.isActive ? ( + + ) : ( + // 내 웨이팅 등록 현황에 따른 버튼 + + )} ); diff --git a/apps/nowait-user/src/pages/waiting/storeNotice/StoreNoticePage.tsx b/apps/nowait-user/src/pages/waiting/storeNotice/StoreNoticePage.tsx index bf5f0be5..0b56bcc5 100644 --- a/apps/nowait-user/src/pages/waiting/storeNotice/StoreNoticePage.tsx +++ b/apps/nowait-user/src/pages/waiting/storeNotice/StoreNoticePage.tsx @@ -1,11 +1,16 @@ +import { useLocation } from "react-router-dom"; import BackHeader from "../../../components/BackHeader"; const StoreNoticePage = () => { + const location = useLocation(); + const { notice } = location.state; return (
    -
    - -
    + +
    +

    입장 시 신분증 검사 필수

    +

    {notice}여기가 설명이 들어갈 곳입니다. 여기가 설명이 들어갈 곳입니다.여기가 설명이 들어갈 곳입니다.여기가 설명이 들어갈 곳입니다.여기가 설명이 들어갈 곳입니다.여기가 설명이 들어갈 곳입니다.여기가 설명이 들어갈 곳입니다.

    +
    ); }; diff --git a/apps/nowait-user/src/routes/Router.tsx b/apps/nowait-user/src/routes/Router.tsx index 49b63e48..cc79853c 100644 --- a/apps/nowait-user/src/routes/Router.tsx +++ b/apps/nowait-user/src/routes/Router.tsx @@ -18,6 +18,7 @@ import RemittanceWaitPage from "../pages/order/remittenceWait/RemittanceWaitPage import OrderDetailsPage from "../pages/order/orderDetails/OrderDetailsPage"; import RemittancePage from "../pages/order/remittance/RemittancePage"; import BookmarkPage from "../pages/waiting/bookmark/BookmarkPage"; +import StoreNoticePage from "../pages/waiting/storeNotice/StoreNoticePage"; // AuthGuard로 래핑하는 헬퍼 함수 const withAuth = (Component: React.ComponentType) => ( @@ -48,6 +49,7 @@ const Router = () => { + { path="/store/:id/waiting/summary" element={withAuth(WaitingSummaryPage)} /> - diff --git a/apps/nowait-user/src/types/order/menu.ts b/apps/nowait-user/src/types/order/menu.ts index 13e21ba6..93bfb495 100644 --- a/apps/nowait-user/src/types/order/menu.ts +++ b/apps/nowait-user/src/types/order/menu.ts @@ -1,8 +1,10 @@ //음식 메뉴 타입 export interface MenuType { - id: string; + menuId: string; image: string; name: string; description: string; price: number; + isSoldOut : boolean; + deleted: boolean; } diff --git a/apps/nowait-user/src/types/swiper.d.ts b/apps/nowait-user/src/types/swiper.d.ts new file mode 100644 index 00000000..ef833106 --- /dev/null +++ b/apps/nowait-user/src/types/swiper.d.ts @@ -0,0 +1,3 @@ +declare module 'swiper/css' {} +declare module 'swiper/css/pagination' {} +declare module 'swiper/css/navigation' {} \ No newline at end of file diff --git a/apps/nowait-user/src/utils/formatTimeRange.ts b/apps/nowait-user/src/utils/formatTimeRange.ts new file mode 100644 index 00000000..778b1b40 --- /dev/null +++ b/apps/nowait-user/src/utils/formatTimeRange.ts @@ -0,0 +1,8 @@ +// "00002359" 오픈 시간 데이터 "00:00 - 23:59"로 변경하는 함수 +export const formatTimeRange = (time: string | undefined) => { + const startHour = time?.slice(0, 2); + const startMinute = time?.slice(2, 4); + const endHour = time?.slice(4, 6); + const endMinute = time?.slice(6, 8); + return `${startHour}:${startMinute} - ${endHour}:${endMinute}`; +};