use store value and not child component.
This commit is contained in:
parent
159698c438
commit
ee66831ab9
2 changed files with 5 additions and 8 deletions
|
|
@ -193,7 +193,6 @@ export default {
|
|||
isInitiallyExpanded: Boolean,
|
||||
submittedOrder: Object
|
||||
},
|
||||
emits: ['deductibleTotalUpdated'],
|
||||
data() {
|
||||
return {
|
||||
isExpanded: this.isInitiallyExpanded,
|
||||
|
|
@ -216,9 +215,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
deductible() {
|
||||
const newDeductibleTotal = getDeductible(this.cartOrder);
|
||||
this.$emit('deductibleTotalUpdated', newDeductibleTotal);
|
||||
return newDeductibleTotal;
|
||||
return getDeductible(this.cartOrder);
|
||||
},
|
||||
showDeductibleCartItem() {
|
||||
return this.isUnverified || (!this.isNoComp && !this.isITAC);
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@
|
|||
:showDropdownHeader="true"
|
||||
:isInitiallyExpanded="false"
|
||||
recyclingModalCmsWidgetName="RecycleModal"
|
||||
servicePackageTitleWidgetName="ServicePackageTitle"
|
||||
@deductibleTotalUpdated="updateDeductibleTotal" />
|
||||
servicePackageTitleWidgetName="ServicePackageTitle" />
|
||||
<hr class="mt-0 mb-5" />
|
||||
<alert
|
||||
v-if="displayPayInAdvanceAlert"
|
||||
|
|
@ -163,7 +162,6 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
deductibleTotal: 0,
|
||||
paymentMethodInternalModel: this.getPaymentMethodFromStore(),
|
||||
rules: {
|
||||
optionRequired: globalRules.OPTION_REQUIRED
|
||||
|
|
@ -189,7 +187,9 @@ export default {
|
|||
isPayInAdvanceDisabled() {
|
||||
const piaExperience = this.getSettingValue(experimentSettings.ISS_DISPLAY_PAY_IN_ADVANCE);
|
||||
const isEnabled = piaExperience === 'true';
|
||||
const isDeductibleTotalEqualToZero = this.deductibleTotal === 0;
|
||||
const isDeductibleTotalEqualToZero = useMainStore().order.currentDeductible === 0;
|
||||
|
||||
console.log(useMainStore().order.currentDeductible);
|
||||
|
||||
return !isEnabled || useMainStore().isUnverified || (useMainStore().isDeductible && isDeductibleTotalEqualToZero);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue