WIP MMCM
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
import {defineStore} from 'pinia'
|
||||
|
||||
export const useMMCMStore = defineStore('counter', {
|
||||
state: () => ({street: '', zipCode: '', city: '', productList: [], withPrescription: null, idProduct: null, dateDelivery:null}),
|
||||
state: () => ({
|
||||
street: '',
|
||||
zipCode: '',
|
||||
city: '',
|
||||
productList: [],
|
||||
withPrescription: null,
|
||||
idProduct: null,
|
||||
dateDelivery: null
|
||||
}),
|
||||
getters: {
|
||||
fullAddress: (state) => state.street + ' ' + state.zipCode + '' + state.city,
|
||||
deliveryMethod: (state) => state.productList.filter(p => p.id === state.idProduct)[0].name,
|
||||
dateDeliveryString: (state) => new Date(state.dateDelivery).toLocaleDateString("fr-FR")
|
||||
},
|
||||
actions: {
|
||||
setStreet(street) {
|
||||
|
||||
Reference in New Issue
Block a user