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/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 ( -
  • +
  • -
    - + + {/* 주점 메뉴 리스트 */} + - + {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..bebeb286 100644 --- a/apps/nowait-user/src/pages/waiting/storeNotice/StoreNoticePage.tsx +++ b/apps/nowait-user/src/pages/waiting/storeNotice/StoreNoticePage.tsx @@ -1,10 +1,17 @@ +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