CASH-1524: Prettier
This commit is contained in:
parent
80dca0dc2d
commit
e986fc5a3c
8 changed files with 14 additions and 32 deletions
|
|
@ -41,15 +41,13 @@
|
||||||
:checked="contactMethod === tab.value"
|
:checked="contactMethod === tab.value"
|
||||||
:disabled="isContactMethodTabDisabled(tab.value)"
|
:disabled="isContactMethodTabDisabled(tab.value)"
|
||||||
@change="selectContactMethod(tab.value)" />
|
@change="selectContactMethod(tab.value)" />
|
||||||
<span class="save-progress-modal-question__tab-label">{{
|
<span class="save-progress-modal-question__tab-label">
|
||||||
tab.label
|
{{ tab.label }}
|
||||||
}}</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<div
|
<div v-if="isPhoneTabSelected" class="save-progress-modal-question__phone-fields">
|
||||||
v-if="isPhoneTabSelected"
|
|
||||||
class="save-progress-modal-question__phone-fields">
|
|
||||||
<phoneNumberQuestion
|
<phoneNumberQuestion
|
||||||
v-model="userInput"
|
v-model="userInput"
|
||||||
:cmsWidgetName="phoneQuestionWidgetName"
|
:cmsWidgetName="phoneQuestionWidgetName"
|
||||||
|
|
@ -125,10 +123,7 @@ const EMAIL_SPECIFIC_WIDGET = "SaveProgressModalWidget_EmailSpecific";
|
||||||
const PHONE_QUESTION_WIDGET = "SaveProgressModalPhoneQuestionWidget";
|
const PHONE_QUESTION_WIDGET = "SaveProgressModalPhoneQuestionWidget";
|
||||||
const EMAIL_QUESTION_WIDGET = "SaveProgressQuestionWidget";
|
const EMAIL_QUESTION_WIDGET = "SaveProgressQuestionWidget";
|
||||||
|
|
||||||
defineRule(
|
defineRule("save-progress-modal-phone-number-required", required(errorMessages.PHONE_REQUIRED));
|
||||||
"save-progress-modal-phone-number-required",
|
|
||||||
required(errorMessages.PHONE_REQUIRED)
|
|
||||||
);
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "save-progress-modal-question",
|
name: "save-progress-modal-question",
|
||||||
|
|
|
||||||
|
|
@ -236,9 +236,7 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (!hasSaveProgressSmsConsentSelection(this.smsConsent)) {
|
||||||
!hasSaveProgressSmsConsentSelection(this.smsConsent)
|
|
||||||
) {
|
|
||||||
this.showConsentErrors = true;
|
this.showConsentErrors = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,10 +68,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
showConsentError() {
|
showConsentError() {
|
||||||
return (
|
return this.showConsentErrors && !hasSaveProgressSmsConsentSelection(this.modelValue);
|
||||||
this.showConsentErrors &&
|
|
||||||
!hasSaveProgressSmsConsentSelection(this.modelValue)
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
consentErrorMessage() {
|
consentErrorMessage() {
|
||||||
return this.showConsentManagement
|
return this.showConsentManagement
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@ describe("save-progress-popup-contact-helper", () => {
|
||||||
|
|
||||||
it("should return false when neither email nor phone is saved", () => {
|
it("should return false when neither email nor phone is saved", () => {
|
||||||
expect(hasSaveProgressContactInStore({})).toBe(false);
|
expect(hasSaveProgressContactInStore({})).toBe(false);
|
||||||
expect(
|
expect(hasSaveProgressContactInStore({ emailAddress: "", phoneNumber: null })).toBe(
|
||||||
hasSaveProgressContactInStore({ emailAddress: "", phoneNumber: null })
|
false
|
||||||
).toBe(false);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,9 +63,7 @@ export default {
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
next(async (vm) => {
|
next(async (vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.showSaveProgressModal = !hasSaveProgressContactInStore(
|
vm.showSaveProgressModal = !hasSaveProgressContactInStore(store.getters.order.customer);
|
||||||
store.getters.order.customer
|
|
||||||
);
|
|
||||||
if (store.getters.externalParameterState?.isExternalParameter) {
|
if (store.getters.externalParameterState?.isExternalParameter) {
|
||||||
if (store.getters.externalParameterServiceZip.zipCode) {
|
if (store.getters.externalParameterServiceZip.zipCode) {
|
||||||
await baseMixin.methods.dispatchStoreAction(
|
await baseMixin.methods.dispatchStoreAction(
|
||||||
|
|
|
||||||
|
|
@ -63,9 +63,7 @@ export default {
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
next(async (vm) => {
|
next(async (vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.showSaveProgressModal = !hasSaveProgressContactInStore(
|
vm.showSaveProgressModal = !hasSaveProgressContactInStore(store.getters.order.customer);
|
||||||
store.getters.order.customer
|
|
||||||
);
|
|
||||||
if (store.getters.externalParameterState?.isExternalParameter) {
|
if (store.getters.externalParameterState?.isExternalParameter) {
|
||||||
if (store.getters.externalParameterServiceZip.zipCode) {
|
if (store.getters.externalParameterServiceZip.zipCode) {
|
||||||
await baseMixin.methods.dispatchStoreAction(
|
await baseMixin.methods.dispatchStoreAction(
|
||||||
|
|
|
||||||
|
|
@ -63,9 +63,7 @@ export default {
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
next(async (vm) => {
|
next(async (vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.showSaveProgressModal = !hasSaveProgressContactInStore(
|
vm.showSaveProgressModal = !hasSaveProgressContactInStore(store.getters.order.customer);
|
||||||
store.getters.order.customer
|
|
||||||
);
|
|
||||||
if (store.getters.externalParameterState?.isExternalParameter) {
|
if (store.getters.externalParameterState?.isExternalParameter) {
|
||||||
if (store.getters.externalParameterServiceZip.zipCode) {
|
if (store.getters.externalParameterServiceZip.zipCode) {
|
||||||
const serviceState = store.getters.order.serviceLocation.state;
|
const serviceState = store.getters.order.serviceLocation.state;
|
||||||
|
|
|
||||||
|
|
@ -81,9 +81,7 @@ export default {
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
next((vm) => {
|
next((vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.showSaveProgressModal = !hasSaveProgressContactInStore(
|
vm.showSaveProgressModal = !hasSaveProgressContactInStore(store.getters.order.customer);
|
||||||
store.getters.order.customer
|
|
||||||
);
|
|
||||||
|
|
||||||
// Glass Part Question dynamic component
|
// Glass Part Question dynamic component
|
||||||
Object.keys(vm.$refs)
|
Object.keys(vm.$refs)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue