ProductStore, move API calls to separate file

This commit is contained in:
2024-09-18 15:59:16 +02:00
parent a254f99404
commit fbbfcdf365
8 changed files with 133 additions and 123 deletions

View File

@@ -13,11 +13,11 @@ const basketStore = useBasketStore()
const props = defineProps({
product: ProductModel,
productCategory: CategoryModel
// todo productCategory: CategoryModel
})
function addProductToBasket() {
basketStore.addItemToBasket(productToBasketItem(props.product, props.productCategory, nrOfArticles.value))
// todo basketStore.addItemToBasket(productToBasketItem(props.product, props.productCategory, nrOfArticles.value))
nrOfArticles.value = 1
showDialog.value = false
}
@@ -32,10 +32,10 @@ function addProductToBasket() {
>
<template #content>
<v-row>
<v-col>
<!-- todo <v-col>
<v-icon :icon="productCategory.icon" />
{{ productCategory.name }}
</v-col>
</v-col> -->
</v-row>
<v-row>
<v-col>