checking in before merging from CSR-96, after merging from develop
This commit is contained in:
parent
ef9eaa8817
commit
c4f4b6fbec
2 changed files with 45 additions and 3 deletions
|
|
@ -120,11 +120,45 @@ export default {
|
|||
this.$route
|
||||
);
|
||||
},
|
||||
async forwardButtonAction() {
|
||||
async forwardButtonAction() {
|
||||
store.commit(this.storeMutations.UPDATE_IS_REPAIR, this.isWindshieldRepair);
|
||||
|
||||
},
|
||||
if (this.isWindshieldRepair){
|
||||
store.commit(this.storeMutations.UPDATE_NUMBER_OF_CHIPS, parseInt(this.selectedWindshieldOptions.selectedWindshieldChipCount));
|
||||
} else {
|
||||
store.commit(this.storeMutations.UPDATE_NUMBER_OF_CHIPS, null);
|
||||
}
|
||||
|
||||
store.commit(this.storeMutations.UPDATE_GLASS_TO_REPLACE, this.selectedGlassToReplace());
|
||||
|
||||
const partsData = await baseMixin.methods.dispatchNonBlockingStoreAction(this.storeActions.GET_PARTS_OR_QUESTIONS,
|
||||
{ carId: store.getters.vehicle.carId, glassArray: this.selectedGlassToReplace()}, false);
|
||||
|
||||
this.navigateForward(partsData);
|
||||
},
|
||||
navigateForward(partsData) {
|
||||
// found parts questions
|
||||
if (partsData.data.partsOrQuestions.some(pq => pq.partQuestions != null && pq.partQuestions.length > 0)){
|
||||
this.$router.navigateAfterSave(this.navigationScenarios.SELECTED_DAMAGE_WITH_PART_QUESTIONS, this.$route, {}, {}, partsData.data);
|
||||
return;
|
||||
}
|
||||
|
||||
// found multiple parts for a single glass location (Windshield, Driver, Passenger, Rear)
|
||||
if (partsData.data.partsOrQuestions){
|
||||
for (var i = 0; i < partsData.data.partsOrQuestions.length; i++){
|
||||
if (partsData.data.partsOrQuestions[i].parts != null && partsData.data.partsOrQuestions[i].parts.length > 1){
|
||||
this.$router.navigateAfterSave(this.navigationScenarios.SELECTED_DAMAGE_WITH_MULTIPLE_PARTS, this.$route, {}, {}, partsData.data);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if not a repair then there should only be 1 part and no problem questions at this point so save the part to the store.
|
||||
if (!this.isWindshieldRepair){
|
||||
store.commit(this.storeMutations.UPDATE_PARTS, partsData.data.partsOrQuestions[0].parts);
|
||||
}
|
||||
|
||||
this.$router.navigate(this.navigationScenarios.SELECTED_DAMAGE_WITH_SINGLE_PART, this.$route);
|
||||
},
|
||||
},
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -146,9 +146,17 @@ const routingTable = [
|
|||
destinationFmgPageValue: fmgPageValues.ESTIMATE,
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.VIN_LOOKUP,
|
||||
scenario: navigationScenarios.CONTINUING_WITH_PARTS_QUESTION,
|
||||
destinationFmgPageValue: fmgPageValues.PART_QUESTIONS,
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.CONTINUING_WITH_MULTIPLE_PARTS,
|
||||
destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS,
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.CONTINUING_WITH_SINGLE_PART,
|
||||
destinationFmgPageValue: fmgPageValues.REVEAL,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in a new issue