Merge pull request #1011 from Safelite/feature/CSR-1088

Just a few more tech review tweaks
This commit is contained in:
Leah Schumann 2023-03-15 13:31:32 -04:00 committed by GitHub
commit 195dc954ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 18 deletions

View file

@ -64,7 +64,7 @@ import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/servi
export default { export default {
name: "mobile-location-modal-questions", name: "mobile-location-modal-questions",
emits: ["update:modelValue", "set-mobile-fee-part"], emits: ["update:modelValue", "updated-mobile-fee-part"],
data() { data() {
return { return {
internalModel: deepClone(this.modelValue), internalModel: deepClone(this.modelValue),
@ -89,8 +89,6 @@ export default {
type: Object, type: Object,
default: () => ({}), default: () => ({}),
}, },
isZipServiceableMobile: Boolean,
isZipServiceableInShop: Boolean,
linkWidgetName: String, linkWidgetName: String,
modalWidgetName: String, modalWidgetName: String,
alertNonServiceableZipWidgetName: String, alertNonServiceableZipWidgetName: String,
@ -109,7 +107,8 @@ export default {
this.addressModel.state && this.addressModel.state &&
this.addressModel.state !== "" && this.addressModel.state !== "" &&
this.addressModel.zipCode && this.addressModel.zipCode &&
this.addressModel.zipCode !== "" this.addressModel.zipCode !== "" &&
this.internalModel.isVehicleProtected !== null
) { ) {
return `${this.addressModel.streetAddress}\n${this.addressModel.city}, ${this.addressModel.state} ${this.addressModel.zipCode}`; return `${this.addressModel.streetAddress}\n${this.addressModel.city}, ${this.addressModel.state} ${this.addressModel.zipCode}`;
} }
@ -184,7 +183,7 @@ export default {
const mobileFeePart = await getPricedMobileFeePart(serviceZipCode); const mobileFeePart = await getPricedMobileFeePart(serviceZipCode);
// emit it to parent // emit it to parent
this.$emit("set-mobile-fee-part", mobileFeePart); this.$emit("updated-mobile-fee-part", mobileFeePart);
// Update the page level model // Update the page level model
this.$emit("update:modelValue", this.internalModel); this.$emit("update:modelValue", this.internalModel);

View file

@ -8,7 +8,7 @@
v-model="serviceZipCodeQuestion" v-model="serviceZipCodeQuestion"
ref="serviceZipCodeQuestion" ref="serviceZipCodeQuestion"
:mobileFeePart="mobileFeePart" :mobileFeePart="mobileFeePart"
@set-mobile-fee-part="setMobileFeePart" @updated-mobile-fee-part="setMobileFeePart"
linkWidgetName="ServiceZipLinkWidget" linkWidgetName="ServiceZipLinkWidget"
modalWidgetName="ServiceZipModalWidget" /> modalWidgetName="ServiceZipModalWidget" />
<alert <alert
@ -19,7 +19,7 @@
<mobileLocationModalQuestions <mobileLocationModalQuestions
v-model="mobileLocationQuestions" v-model="mobileLocationQuestions"
:mobileFeePart="mobileFeePart" :mobileFeePart="mobileFeePart"
@set-mobile-fee-part="setMobileFeePart" @updated-mobile-fee-part="setMobileFeePart"
ref="mobileLocationModalQuestions" ref="mobileLocationModalQuestions"
linkWidgetName="MobileLocationLinkWidget" linkWidgetName="MobileLocationLinkWidget"
modalWidgetName="MobileLocationModalWidget" /> modalWidgetName="MobileLocationModalWidget" />
@ -72,16 +72,8 @@ export default {
// Call APIs // Call APIs
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage); const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
const serviceZipCode = store.getters.order.serviceLocation.zipCode; const serviceZipCode = store.getters.order.serviceLocation.zipCode;
const serviceType = store.getters.damage.isRepair ? "Repair" : "Replace";
const parentAccountNumber = store.getters.payment.parentAccountNumber;
const billToAccountNumber = 1;
const mobileFeePartPromise = getPricedMobileFeePart( const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode);
serviceZipCode,
serviceType,
parentAccountNumber,
billToAccountNumber
);
// Settle promises and get results // Settle promises and get results
const promiseResultMap = [ const promiseResultMap = [

View file

@ -43,7 +43,7 @@ import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/servi
export default { export default {
name: "service-zip-modal-question", name: "service-zip-modal-question",
emits: ["update:modelValue", "set-mobile-fee-part"], emits: ["update:modelValue", "updated-mobile-fee-part"],
data() { data() {
return { return {
internalModel: this.copyModel(this.modelValue), internalModel: this.copyModel(this.modelValue),
@ -156,7 +156,7 @@ export default {
const mobileFeePart = await getPricedMobileFeePart(serviceZipCode); const mobileFeePart = await getPricedMobileFeePart(serviceZipCode);
// emit it to parent // emit it to parent
this.$emit("set-mobile-fee-part", mobileFeePart); this.$emit("updated-mobile-fee-part", mobileFeePart);
// Update the page level model // Update the page level model
this.$emit("update:modelValue", this.internalModel); this.$emit("update:modelValue", this.internalModel);