WIP MMCM
This commit is contained in:
10
src/main.js
10
src/main.js
@@ -1,11 +1,11 @@
|
|||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import './style.css'
|
import './style.css'
|
||||||
|
|
||||||
// import './assets/bootstrap-para.css'
|
import './assets/bootstrap-para.css'
|
||||||
// import fontawesome from '@fortawesome/fontawesome-free/css/fontawesome.css'
|
import fontawesome from '@fortawesome/fontawesome-free/css/fontawesome.css'
|
||||||
// import brands from '@fortawesome/fontawesome-free/css/brands.css'
|
import brands from '@fortawesome/fontawesome-free/css/brands.css'
|
||||||
// import solid from '@fortawesome/fontawesome-free/css/solid.css'
|
import solid from '@fortawesome/fontawesome-free/css/solid.css'
|
||||||
// import regular from '@fortawesome/fontawesome-free/css/regular.css'
|
import regular from '@fortawesome/fontawesome-free/css/regular.css'
|
||||||
|
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
|
|||||||
@@ -79,7 +79,9 @@ export const useMMCMStore = defineStore('counter', {
|
|||||||
withPrescription: null,
|
withPrescription: null,
|
||||||
idProduct: null,
|
idProduct: null,
|
||||||
dateDelivery: null, // 13 digit timestamp millisecond
|
dateDelivery: null, // 13 digit timestamp millisecond
|
||||||
dateCollect: null
|
dateCollect: null,
|
||||||
|
methodDelivery: 'Main propre',
|
||||||
|
methodCollect: 'Main propre',
|
||||||
}),
|
}),
|
||||||
getters: {
|
getters: {
|
||||||
fullAddress: (state) => (state.street !== null) ? state.street + ' ' + state.zipCode + ' ' + state.city : null,
|
fullAddress: (state) => (state.street !== null) ? state.street + ' ' + state.zipCode + ' ' + state.city : null,
|
||||||
|
|||||||
@@ -15,14 +15,38 @@
|
|||||||
Merci de renseigner la date
|
Merci de renseigner la date
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-if="store.deliveryMethodCode === 'MMCM_FACTEUR'">
|
||||||
|
<div class="form-check mt-4">
|
||||||
|
<input v-model="picker.method" class="form-check-input" type="radio" value="Main propre" :name="'method'+picker.id" :id="'method'+picker.id">
|
||||||
|
<label class="form-check-label" :for="'method'+picker.id">
|
||||||
|
{{picker.methodLabel}} en main propre
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input v-model="picker.method" class="form-check-input" type="radio" value="Boites aux lettres" :name="'method'+picker.id" :id="'method'+picker.id">
|
||||||
|
<label class="form-check-label" :for="'method'+picker.id">
|
||||||
|
{{picker.methodLabel}} en boîte aux lettres <span class="text-danger">*</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12 text-center mt-4">
|
<div class="col-lg-12 text-center mt-4">
|
||||||
<button class="btn btn-primary" @click="gotToNextStep"><i class="fa-regular fa-circle-check fa-fw"></i> Valider
|
<button class="btn btn-primary" @click="gotToNextStep"><i class="fa-regular fa-circle-check fa-fw"></i> Valider
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="store.deliveryMethodCode === 'MMCM_FACTEUR'">
|
||||||
|
<small>
|
||||||
|
<br/><br/><span class="text-danger">*</span> L'utilisation d'une boîte aux lettres normalisée est idéale pour ce service.<br/>
|
||||||
|
Dimensions d'une boîte aux lettres normalisée : hauteur : 26 cm, largeur : 26 cm, profondeur : 34 cm.<br/>
|
||||||
|
Si vous avez déjà reçu un colis dans votre boîte aux lettres, c'est sûr, le facteur pourra l'utiliser.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -36,7 +60,7 @@ export default {
|
|||||||
setup() {
|
setup() {
|
||||||
const store = useMMCMStore()
|
const store = useMMCMStore()
|
||||||
|
|
||||||
const {dateDelivery, dateCollect} = storeToRefs(store)
|
const {dateDelivery, dateCollect, methodDelivery, methodCollect} = storeToRefs(store)
|
||||||
|
|
||||||
let pickerList = []
|
let pickerList = []
|
||||||
if (store.needPrescriptionDateCollect) {
|
if (store.needPrescriptionDateCollect) {
|
||||||
@@ -44,6 +68,8 @@ export default {
|
|||||||
id: 1,
|
id: 1,
|
||||||
title: 'Date de collecte de l\'ordonnance :',
|
title: 'Date de collecte de l\'ordonnance :',
|
||||||
vModel: dateCollect,
|
vModel: dateCollect,
|
||||||
|
method : methodCollect,
|
||||||
|
methodLabel : 'Collecte des documents de santé',
|
||||||
error: false,
|
error: false,
|
||||||
minDate: store.minDateForCollect,
|
minDate: store.minDateForCollect,
|
||||||
}))
|
}))
|
||||||
@@ -54,6 +80,8 @@ export default {
|
|||||||
title: 'Date de livraison des médicaments :',
|
title: 'Date de livraison des médicaments :',
|
||||||
vModel: dateDelivery,
|
vModel: dateDelivery,
|
||||||
error: false,
|
error: false,
|
||||||
|
method : methodDelivery,
|
||||||
|
methodLabel : 'Livraison',
|
||||||
minDate: (store.needPrescriptionDateCollect) ? store.minDateForDelivery : store.minDateForCollect,
|
minDate: (store.needPrescriptionDateCollect) ? store.minDateForDelivery : store.minDateForCollect,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ export default {
|
|||||||
let urlApi = '/php/api/v3/mmcm.php?EXEC=addToCart&ID_PRODUCT=' + this.store.idProduct
|
let urlApi = '/php/api/v3/mmcm.php?EXEC=addToCart&ID_PRODUCT=' + this.store.idProduct
|
||||||
+ '&with_prescription=' + this.store.withPrescription
|
+ '&with_prescription=' + this.store.withPrescription
|
||||||
+ '&date_delivery=' + this.store.dateDeliveryTimestampInSecond
|
+ '&date_delivery=' + this.store.dateDeliveryTimestampInSecond
|
||||||
|
+ '&method_delivery=' + this.store.methodDelivery
|
||||||
+ '&street=' + encodeURI(this.store.street)
|
+ '&street=' + encodeURI(this.store.street)
|
||||||
+ '&zip_code=' + this.store.zipCode
|
+ '&zip_code=' + this.store.zipCode
|
||||||
+ '&city=' + this.store.city
|
+ '&city=' + this.store.city
|
||||||
@@ -73,10 +74,11 @@ export default {
|
|||||||
|
|
||||||
if (this.store.withPrescription) {
|
if (this.store.withPrescription) {
|
||||||
urlApi += '&date_collect=' + ((this.store.dateCollect !== null) ? this.store.dateCollectTimestampInSecond : this.store.dateDeliveryTimestampInSecond)
|
urlApi += '&date_collect=' + ((this.store.dateCollect !== null) ? this.store.dateCollectTimestampInSecond : this.store.dateDeliveryTimestampInSecond)
|
||||||
|
urlApi += '&method_collect=' + this.store.methodCollect
|
||||||
}
|
}
|
||||||
|
|
||||||
if (import.meta.env.DEV) {
|
if (import.meta.env.DEV) {
|
||||||
urlApi += '&ID_SESSION=rRN4VnKI';
|
urlApi += '&ID_SESSION=6UP8Yeo0';
|
||||||
console.log(urlApi)
|
console.log(urlApi)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export default {
|
|||||||
exitVueApp(url) {
|
exitVueApp(url) {
|
||||||
|
|
||||||
if (import.meta.env.DEV) {
|
if (import.meta.env.DEV) {
|
||||||
url = 'https://para-php7-devparapharmacie-et-medicament.com' + url
|
url = 'https://para-php7-dev.parapharmacie-et-medicament.com' + url
|
||||||
}
|
}
|
||||||
window.location = url + '?ids=' + this.store.idSession
|
window.location = url + '?ids=' + this.store.idSession
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user