diff --git a/src/modules/market/components/ProductCard.vue b/src/modules/market/components/ProductCard.vue
index 532c074..21ef2a0 100644
--- a/src/modules/market/components/ProductCard.vue
+++ b/src/modules/market/components/ProductCard.vue
@@ -101,7 +101,6 @@
\ No newline at end of file
diff --git a/src/modules/market/views/MarketPage.vue b/src/modules/market/views/MarketPage.vue
index fa86a8f..82de5cb 100644
--- a/src/modules/market/views/MarketPage.vue
+++ b/src/modules/market/views/MarketPage.vue
@@ -78,7 +78,6 @@
empty-title="No products found"
empty-message="Try adjusting your search or filters"
@add-to-cart="addToCart"
- @view-details="viewProduct"
@view-stall="viewStall"
/>
@@ -91,14 +90,6 @@
-
-
@@ -116,7 +107,6 @@ import { ShoppingCart } from 'lucide-vue-next'
import MarketFuzzySearch from '../components/MarketFuzzySearch.vue'
import ProductGrid from '../components/ProductGrid.vue'
import CategoryFilterBar from '../components/CategoryFilterBar.vue'
-import ProductDetailDialog from '../components/ProductDetailDialog.vue'
import type { Product } from '../types/market'
import type { FuzzySearchOptions } from '@/composables/useFuzzySearch'
@@ -149,9 +139,6 @@ let unsubscribe: (() => void) | null = null
// Fuzzy search state
const searchResults = ref([])
-// Product detail dialog state
-const showProductDetail = ref(false)
-const selectedProduct = ref(null)
// Fuzzy search configuration for products and stalls
const searchOptions: FuzzySearchOptions = {
@@ -252,24 +239,10 @@ const retryLoadMarket = () => {
loadMarket()
}
-const addToCart = (product: any) => {
- marketStore.addToCart(product)
+const addToCart = (product: Product, quantity?: number) => {
+ marketStore.addToStallCart(product, quantity || 1)
}
-const viewProduct = (product: Product) => {
- selectedProduct.value = product
- showProductDetail.value = true
-}
-
-const closeProductDetail = () => {
- showProductDetail.value = false
- selectedProduct.value = null
-}
-
-const handleAddToCart = (product: Product, quantity: number) => {
- marketStore.addToCart({ ...product, quantity })
- closeProductDetail()
-}
const viewStall = (stallId: string) => {
// Navigate to the stall view page
diff --git a/src/modules/market/views/StallView.vue b/src/modules/market/views/StallView.vue
index 5b18df3..e557d14 100644
--- a/src/modules/market/views/StallView.vue
+++ b/src/modules/market/views/StallView.vue
@@ -126,18 +126,10 @@
:empty-message="searchQuery || selectedCategories.length > 0
? 'Try adjusting your filters or search terms'
: 'This stall doesn\'t have any products yet'"
- @view-details="viewProductDetails"
@view-stall="viewStall"
- />
-
-
-
+
@@ -158,7 +150,6 @@ import {
import { ArrowLeft, Store, X } from 'lucide-vue-next'
import FuzzySearch from '@/components/ui/fuzzy-search/FuzzySearch.vue'
import ProductGrid from '../components/ProductGrid.vue'
-import ProductDetailDialog from '../components/ProductDetailDialog.vue'
import type { Product, Stall } from '../types/market'
import type { FuzzySearchOptions } from '@/composables/useFuzzySearch'
@@ -172,8 +163,6 @@ const searchResults = ref([])
const searchQuery = ref('')
const sortBy = ref('name')
const selectedCategories = ref([])
-const showProductDetail = ref(false)
-const selectedProduct = ref(null)
const logoError = ref(false)
// Fuzzy search configuration for stall products
@@ -280,20 +269,10 @@ const handleSearchResults = (results: Product[]) => {
// For now, we'll track it separately
}
-const viewProductDetails = (product: Product) => {
- selectedProduct.value = product
- showProductDetail.value = true
+const handleAddToCart = (product: Product, quantity?: number) => {
+ marketStore.addToStallCart(product, quantity || 1)
}
-const closeProductDetail = () => {
- showProductDetail.value = false
- selectedProduct.value = null
-}
-
-const handleAddToCart = (product: Product, quantity: number) => {
- marketStore.addToStallCart(product, quantity)
- closeProductDetail()
-}
const viewStall = (otherStallId: string) => {
if (otherStallId !== stallId.value) {
@@ -322,7 +301,6 @@ watch(() => route.params.stallId, (newStallId) => {
if (newStallId && newStallId !== stallId.value) {
// Reset filters when navigating to a different stall
clearFilters()
- closeProductDetail()
}
})