WIP MMCM
This commit is contained in:
@@ -82,6 +82,7 @@ export const useMMCMStore = defineStore('counter', {
|
||||
dateCollect: null,
|
||||
methodDelivery: 'Main propre',
|
||||
methodCollect: 'Main propre',
|
||||
timeSlot : '09h30-11h00',
|
||||
}),
|
||||
getters: {
|
||||
fullAddress: (state) => (state.street !== null) ? state.street + ' ' + state.zipCode + ' ' + state.city : null,
|
||||
@@ -89,6 +90,7 @@ export const useMMCMStore = defineStore('counter', {
|
||||
deliveryMethodCode: (state) => state.productList.filter(p => p.id === state.idProduct)[0].ref,
|
||||
dateDeliveryString: (state) => new Date(state.dateDelivery).toLocaleDateString("fr-FR"),
|
||||
dateCollectString: (state) => new Date(state.dateCollect).toLocaleDateString("fr-FR"),
|
||||
displayTimeSlot: (state) => (state.productList.filter(p => p.id === state.idProduct)[0].ref === 'MMCM_EXPRESS') ? 'entre ' +state.timeSlot : 'entre 09h00-17h00',
|
||||
minDateForDelivery: (state) => (state.productList.filter(p => p.id === state.idProduct)[0].ref === 'MMCM_EXPRESS') ? date.deliveryExpress : date.deliveryFacteur,
|
||||
minDateForCollect: (state) => (state.productList.filter(p => p.id === state.idProduct)[0].ref === 'MMCM_EXPRESS') ? date.collectExpress : date.collectFacteur,
|
||||
needPrescriptionDateCollect: (state) => !!(state.productList.filter(p => p.id === state.idProduct)[0].ref === 'MMCM_FACTEUR' && state.withPrescription),
|
||||
@@ -152,6 +154,9 @@ export const useMMCMStore = defineStore('counter', {
|
||||
},
|
||||
setIdProduct(id) {
|
||||
this.idProduct = id
|
||||
},
|
||||
setTimeSlot(timeSlot) {
|
||||
this.timeSlot = timeSlot
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user