This commit is contained in:
Jonathan Chevalier
2022-09-27 15:29:02 +02:00
parent 079cb602c7
commit 3f9ddcac6d
10 changed files with 790 additions and 18 deletions

View File

@@ -1,9 +1,9 @@
import {defineStore} from 'pinia'
export const useMMCMStore = defineStore('counter', {
state: () => ({count: 0, name: 'Eduardo', street: '', zipCode: '', city: '', productList : []}),
state: () => ({street: '', zipCode: '', city: '', productList: [], withPrescription: null, idProduct: null, dateDelivery:null}),
getters: {
fullAddress: (state) => state.street + ' ' + state.zipCode + '' + state.city
fullAddress: (state) => state.street + ' ' + state.zipCode + '' + state.city,
},
actions: {
setStreet(street) {
@@ -15,8 +15,14 @@ export const useMMCMStore = defineStore('counter', {
setCity(city) {
this.city = city
},
setProductList(array){
setProductList(array) {
this.productList = array
},
setPrescription(bool) {
this.withPrescription = bool
},
setIdProduct(id) {
this.idProduct = id
}
},
})