From 86d3133978b30c865e4abcbc1f3613690c72813b Mon Sep 17 00:00:00 2001 From: padreug Date: Thu, 25 Sep 2025 22:53:12 +0200 Subject: [PATCH] Add stall view and product detail dialog in market module - Introduced a new route for viewing individual stalls, allowing users to navigate to a specific stall's page. - Created a ProductDetailDialog component to display detailed information about products, including images, descriptions, and stock status. - Updated MarketPage to handle stall navigation and integrate the new dialog for product details. These enhancements improve the user experience by providing more detailed product information and easier navigation within the market module. --- .../market/components/ProductDetailDialog.vue | 267 +++++++++++++++ src/modules/market/index.ts | 9 + src/modules/market/views/MarketPage.vue | 6 + src/modules/market/views/StallView.vue | 319 ++++++++++++++++++ 4 files changed, 601 insertions(+) create mode 100644 src/modules/market/components/ProductDetailDialog.vue create mode 100644 src/modules/market/views/StallView.vue diff --git a/src/modules/market/components/ProductDetailDialog.vue b/src/modules/market/components/ProductDetailDialog.vue new file mode 100644 index 0000000..e226b37 --- /dev/null +++ b/src/modules/market/components/ProductDetailDialog.vue @@ -0,0 +1,267 @@ + + + + + \ No newline at end of file diff --git a/src/modules/market/index.ts b/src/modules/market/index.ts index 24bf032..93b6bd6 100644 --- a/src/modules/market/index.ts +++ b/src/modules/market/index.ts @@ -145,6 +145,15 @@ export const marketModule: ModulePlugin = { title: 'Checkout', requiresAuth: false } + }, + { + path: '/market/stall/:stallId', + name: 'stall-view', + component: () => import('./views/StallView.vue'), + meta: { + title: 'Stall', + requiresAuth: false + } } ] as RouteRecordRaw[], diff --git a/src/modules/market/views/MarketPage.vue b/src/modules/market/views/MarketPage.vue index 9fa6d47..a52873f 100644 --- a/src/modules/market/views/MarketPage.vue +++ b/src/modules/market/views/MarketPage.vue @@ -81,6 +81,7 @@ :product="product" @add-to-cart="addToCart" @view-details="viewProduct" + @view-stall="viewStall" /> @@ -164,6 +165,11 @@ const viewProduct = (_product: any) => { // TODO: Navigate to product detail page } +const viewStall = (stallId: string) => { + // Navigate to the stall view page + router.push(`/market/stall/${stallId}`) +} + const viewCart = () => { router.push('/cart') } diff --git a/src/modules/market/views/StallView.vue b/src/modules/market/views/StallView.vue new file mode 100644 index 0000000..aca78c8 --- /dev/null +++ b/src/modules/market/views/StallView.vue @@ -0,0 +1,319 @@ + + + + + \ No newline at end of file