make displayPiaAlert a computed instead of data field
This commit is contained in:
CarlNation 2023-10-24 11:08:51 -04:00
parent dc4ec8cdd0
commit b243f41fa7

View file

@ -194,7 +194,6 @@ export default {
taxedLineItems: [], // temporary, for use by cart.vue taxedLineItems: [], // temporary, for use by cart.vue
availableLineItems: [], availableLineItems: [],
paymentMethodInternalModel: this.getPaymentMethodFromStore(), paymentMethodInternalModel: this.getPaymentMethodFromStore(),
displayPiaAlert: this.getPiaAlert(),
}; };
}, },
methods: { methods: {
@ -250,9 +249,6 @@ export default {
packageReqs && serviceLocationReqs && isInsuranceSet && scheduleReqs && customerReqs packageReqs && serviceLocationReqs && isInsuranceSet && scheduleReqs && customerReqs
); );
}, },
getPiaAlert() {
return store.getters.order.payment.piaErrorCode ? true : false;
},
getPaymentMethodFromStore() { getPaymentMethodFromStore() {
const isPia = store.getters.order.payment.isPia; const isPia = store.getters.order.payment.isPia;
@ -370,6 +366,9 @@ export default {
return this.paymentMethodInternalModel; return this.paymentMethodInternalModel;
}, },
displayPiaAlert() {
return store.getters.order.payment.piaErrorCode ? true : false;
} ,
}, },
watch: { watch: {
customCtaCopy(newValue) { customCtaCopy(newValue) {