Vin-Lookup pages defect fix
Replace/Remove usages of SaveServiceLocation with SaveZipCodeInfo
This commit is contained in:
parent
5f2bce2415
commit
98fdb82ccb
3 changed files with 13 additions and 33 deletions
|
|
@ -338,12 +338,10 @@ export default {
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
await this.dispatchStoreAction(
|
await this.dispatchStoreAction(
|
||||||
storeActions.SAVE_SERVICE_LOCATION,
|
storeActions.SAVE_SERVICE_ZIP_CODE_INFO,
|
||||||
{
|
{
|
||||||
address: this.customerQuestions.addressQuestions.streetAddress,
|
|
||||||
city: this.customerQuestions.addressQuestions.city,
|
|
||||||
zipCode: this.serviceZipCode,
|
|
||||||
state: resultMap.serviceZipValidationResponse.state,
|
state: resultMap.serviceZipValidationResponse.state,
|
||||||
|
zipCode: this.serviceZipCode,
|
||||||
zipCodeCtu: resultMap.serviceZipValidationResponse.zipCodeCtu,
|
zipCodeCtu: resultMap.serviceZipValidationResponse.zipCodeCtu,
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
|
|
|
||||||
|
|
@ -350,37 +350,22 @@ export default {
|
||||||
// If a VIN has already been found. Validate the Service Zip (in case of changes)
|
// If a VIN has already been found. Validate the Service Zip (in case of changes)
|
||||||
const zipCodeData = await this.getZipCodeData(this.serviceZipCode);
|
const zipCodeData = await this.getZipCodeData(this.serviceZipCode);
|
||||||
|
|
||||||
// Check if Service Zip entered is serviceable then save the ZIP info and email address
|
// Check if Service Zip entered is serviceable then save the ZIP info
|
||||||
if (zipCodeData.isServiceable) {
|
if (zipCodeData.isServiceable) {
|
||||||
//Only save the service location if the zip changed or we lack zipCodeCtu
|
//Only save the zipCode, state, and zipCodeCtu if the zip changed or we lack zipCodeCtu
|
||||||
if (
|
if (
|
||||||
this.$store.getters.order.serviceLocation.zipCode != this.serviceZipCode ||
|
this.$store.getters.order.serviceLocation.zipCode != this.serviceZipCode ||
|
||||||
!this.$store.getters.order.serviceLocation.zipCodeCtu
|
!this.$store.getters.order.serviceLocation.zipCodeCtu
|
||||||
) {
|
) {
|
||||||
const vehicleRegistrationInfo = this.$store.getters.vehicle.registration;
|
await this.dispatchStoreAction(
|
||||||
if (vehicleRegistrationInfo.zipCode == this.serviceZipCode) {
|
storeActions.SAVE_SERVICE_ZIP_CODE_INFO,
|
||||||
await this.dispatchStoreAction(
|
{
|
||||||
storeActions.SAVE_SERVICE_LOCATION,
|
state: zipCodeData.state,
|
||||||
{
|
zipCode: this.serviceZipCode,
|
||||||
address: vehicleRegistrationInfo.address,
|
zipCodeCtu: zipCodeData.zipCodeCtu,
|
||||||
city: vehicleRegistrationInfo.city,
|
},
|
||||||
state: vehicleRegistrationInfo.state,
|
false
|
||||||
zipCode: vehicleRegistrationInfo.zipCode,
|
);
|
||||||
zipCodeCtu: zipCodeData.zipCodeCtu,
|
|
||||||
},
|
|
||||||
false
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
await this.dispatchStoreAction(
|
|
||||||
storeActions.SAVE_SERVICE_ZIP_CODE_INFO,
|
|
||||||
{
|
|
||||||
state: zipCodeData.state,
|
|
||||||
zipCode: this.serviceZipCode,
|
|
||||||
zipCodeCtu: zipCodeData.zipCodeCtu,
|
|
||||||
},
|
|
||||||
false
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.emailAddress, false);
|
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.emailAddress, false);
|
||||||
|
|
|
||||||
|
|
@ -2172,9 +2172,6 @@ function convertGlassPieceToBackEndCompatibleFormat(glassPieces) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function providersEqual(providerA, providerB) {
|
function providersEqual(providerA, providerB) {
|
||||||
if (!providerA) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return (
|
return (
|
||||||
providerA.providerNumber === providerB.providerNumber &&
|
providerA.providerNumber === providerB.providerNumber &&
|
||||||
providerA.address?.city === providerB.address?.city &&
|
providerA.address?.city === providerB.address?.city &&
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue