develop #10

Merged
pablone merged 64 commits from develop into master 2024-04-22 11:35:55 +00:00
1 changed files with 3 additions and 4 deletions
Showing only changes of commit 30146d6411 - Show all commits

View File

@ -1,5 +1,5 @@
import { defineStore, storeToRefs } from "pinia";
import { ref } from "vue";
import { computed, ref } from "vue";
import { useRouter } from "vue-router";
import { apiBack } from "src/boot/axios";
@ -194,9 +194,8 @@ export const useCartStore = defineStore("cart", () => {
const params = transformOptionsToParams(
availabilityForm.value || availability.value
);
const correctProduct = await apiBack.get(`products/${product.id}`, { params });
console.log(hasCurrentProduct)
await getProducts(params);
const { correctProduct: { data }, } = await apiBack.get(`products/${product.id}`, { params });
//await getProducts(params);
const hasCurrentProduct = computed(() => {
return cart.value.find((p) => p.id === product.id);