Merge pull request #1730 from Safelite/feature/csr-1951
Auto-route only as far as Quote for cash users.
This commit is contained in:
commit
709a0f3197
1 changed files with 9 additions and 5 deletions
|
|
@ -123,17 +123,21 @@ async function getLatestPageForRedirection() {
|
||||||
const scheduleComponent = await getLazyLoadedComponent(fmgPageValues.SCHEDULE);
|
const scheduleComponent = await getLazyLoadedComponent(fmgPageValues.SCHEDULE);
|
||||||
|
|
||||||
const skipVin = await skipVinLookup();
|
const skipVin = await skipVinLookup();
|
||||||
|
const isInsuranceUser = !!store.getters.order.payment.isInsurance;
|
||||||
|
|
||||||
if (!vehicleDamageComponent.methods.arePagePrerequisitesValid()) {
|
if (!vehicleDamageComponent.methods.arePagePrerequisitesValid()) {
|
||||||
return fmgPageValues.VEHICLE;
|
return fmgPageValues.VEHICLE;
|
||||||
} else if (!estimateComponent.methods.arePagePrerequisitesValid()) {
|
} else if (!estimateComponent.methods.arePagePrerequisitesValid()) {
|
||||||
return fmgPageValues.VEHICLE_DAMAGE;
|
return fmgPageValues.VEHICLE_DAMAGE;
|
||||||
} else {
|
} else {
|
||||||
if (scheduleComponent.methods.arePagePrerequisitesValid()) {
|
if (isInsuranceUser) {
|
||||||
return fmgPageValues.SCHEDULE;
|
if (scheduleComponent.methods.arePagePrerequisitesValid()) {
|
||||||
} else if (serviceLocationComponent.methods.arePagePrerequisitesValid()) {
|
return fmgPageValues.SCHEDULE;
|
||||||
return fmgPageValues.SERVICE_LOCATION;
|
} else if (serviceLocationComponent.methods.arePagePrerequisitesValid()) {
|
||||||
} else if (quoteComponent.methods.arePagePrerequisitesValid()) {
|
return fmgPageValues.SERVICE_LOCATION;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (quoteComponent.methods.arePagePrerequisitesValid()) {
|
||||||
return fmgPageValues.QUOTE;
|
return fmgPageValues.QUOTE;
|
||||||
} else if (capabilityQuestionsComponent.methods.arePagePrerequisitesValid()) {
|
} else if (capabilityQuestionsComponent.methods.arePagePrerequisitesValid()) {
|
||||||
return fmgPageValues.CAPABILITY_QUESTIONS;
|
return fmgPageValues.CAPABILITY_QUESTIONS;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue