diff --git a/src/stores/mmcm.js b/src/stores/mmcm.js index 763e1bc..746a8ec 100644 --- a/src/stores/mmcm.js +++ b/src/stores/mmcm.js @@ -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 } }, }) diff --git a/src/views/delivery-option-step-3.vue b/src/views/delivery-option-step-3.vue index 7a0bb2f..e095dca 100644 --- a/src/views/delivery-option-step-3.vue +++ b/src/views/delivery-option-step-3.vue @@ -31,7 +31,23 @@ + + + +