fix events

This commit is contained in:
Katie Kroell 2026-03-26 12:36:00 -04:00
parent 933449fbdf
commit 590b5a47c9
2 changed files with 8 additions and 7 deletions

View file

@ -95,7 +95,7 @@ export default {
watch: {
acknowledged() {
this.showAcknowledgementError = false;
this.emit('recalAcknowledged', this.acknowledged);
this.$emit('recalAcknowledged', this.acknowledged);
}
},
methods: {

View file

@ -77,7 +77,7 @@
ref="recalAckModal"
cmsWidgetName="RecalAckModalWidget"
:ackError="ackError"
/>
@recalAcknowledged="updateRecalAcknowledged()"/>
</Form>
</template>
<script>
@ -374,7 +374,8 @@ export default {
selectedServiceLocation: this.getServiceLocation(),
selectedServiceLocationCity: this.getServiceLocationCity(),
selectedTimeSlotInfo: this.getSelectedTimeSlotInfo(),
showDatePickerError: false
showDatePickerError: false,
isAcknowledged: false
};
},
computed: {
@ -417,13 +418,13 @@ export default {
supportingItems() {
return useMainStore().lineItems.supportingItems;
},
displayRecalAckModalWidget() {
displayRecalAckModal() {
// if any of the glass parts contain an item with the requiresRecalibration flag set to true
// and the order does not contain a recalibration part, show the recalibration acknowledgement modal
const containsRecalPart = containsRecalParts(useMainStore().order.lineItems);
const hasPartWithRecalRequirement = anyPartWithRequiresRecalFlag(useMainStore().order.lineItems);
if (!containsRecalPart && hasPartWithRecalRequirement) {
if (!containsRecalPart && hasPartWithRecalRequirement && !this.isAcknowledged) {
return true;
}
return false;
@ -784,8 +785,8 @@ export default {
this.$route
);
},
updateRecalAcknowledged(isAcknowledged) {
this.displayRecalAckModal = !isAcknowledged;
updateRecalAcknowledged() {
this.isAcknowledged = true;
}
}
};