Updated logic for displaying PIA options or alert for time of service
This commit is contained in:
parent
d67fb0d1b2
commit
e6b296b3a1
1 changed files with 15 additions and 7 deletions
|
|
@ -22,6 +22,7 @@
|
||||||
<hr class="my-0" />
|
<hr class="my-0" />
|
||||||
|
|
||||||
<cart
|
<cart
|
||||||
|
ref="cart"
|
||||||
:damage="damageInfo"
|
:damage="damageInfo"
|
||||||
:availableVaps="availableVaps"
|
:availableVaps="availableVaps"
|
||||||
:allowItemRemoval="true"
|
:allowItemRemoval="true"
|
||||||
|
|
@ -46,12 +47,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<paymentMethodQuestion
|
<paymentMethodQuestion
|
||||||
v-if="!isPiaDisabled"
|
v-if="isPiaEnabled && totalAmountDue > 0.00"
|
||||||
v-model="paymentMethodInternalModel"
|
v-model="paymentMethodInternalModel"
|
||||||
validationRules="option-required" />
|
validationRules="option-required" />
|
||||||
|
|
||||||
<alert
|
<alert
|
||||||
v-if="!isPiaDisabled"
|
v-if="!isPiaEnabled && totalAmountDue > 0.00"
|
||||||
:isDismissible="false"
|
:isDismissible="false"
|
||||||
alertClass="alert-info"
|
alertClass="alert-info"
|
||||||
cmsWidgetName="NoPiaDisclaimerWidget"
|
cmsWidgetName="NoPiaDisclaimerWidget"
|
||||||
|
|
@ -512,6 +513,7 @@ export default {
|
||||||
hasSubmittedOrder() {
|
hasSubmittedOrder() {
|
||||||
return this.$store.getters.hasSubmittedOrder;
|
return this.$store.getters.hasSubmittedOrder;
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
damageInfo() {
|
damageInfo() {
|
||||||
|
|
@ -571,18 +573,24 @@ export default {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isPiaDisabled() {
|
totalAmountDue() {
|
||||||
|
return baseMixin.methods.getAmountDue(this.lineItems)
|
||||||
|
},
|
||||||
|
isPiaEnabled() {
|
||||||
const piaExperience = this.getSettingValue(experimentSettings.PIA_EXPERIENCE);
|
const piaExperience = this.getSettingValue(experimentSettings.PIA_EXPERIENCE);
|
||||||
const piaInsurance = this.getSettingValue(experimentSettings.PIA_INSURANCE);
|
const piaInsurance = this.getSettingValue(experimentSettings.PIA_INSURANCE);
|
||||||
|
|
||||||
var isEnabled = false;
|
var isEnabled = false;
|
||||||
if (this.isInsurance) {
|
if (this.isInsurance) {
|
||||||
isEnabled = piaInsurance === "true" && this.currentDeductible > 0;
|
return piaInsurance === "true";
|
||||||
} else {
|
} else {
|
||||||
isEnabled = piaExperience === "PIA Optional" || piaExperience === "PIA Required";
|
return piaExperience === "PIA Optional" || piaExperience === "PIA Required";
|
||||||
}
|
}
|
||||||
|
// if (this.totalAmountDue > 0.00) {
|
||||||
|
|
||||||
return !isEnabled;
|
// }
|
||||||
|
|
||||||
|
//return false;
|
||||||
},
|
},
|
||||||
paymentMethod() {
|
paymentMethod() {
|
||||||
if (this.isPiaDisabled) {
|
if (this.isPiaDisabled) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue