CSR-111 Remove multiple questions example, tested with heritage

This commit is contained in:
Katie 2022-08-24 15:49:32 -04:00
parent 76077d7793
commit ec7bc77e67
2 changed files with 2 additions and 203 deletions

View file

@ -90,104 +90,8 @@ export default {
} else if (hasCapabilityQuestions && this.currentPageComesBeforePage(currentPage, fmgPageValues.CAPABILITY_QUESTIONS)) {
// if has capability questions
// go to capability-questions page and pass the partsData
partsOrQuestions = [
{
"glassName": "Single",
"glassLocation": "Windshield",
"parts": [
{
"partNumber": "A",
"description": "rain sensor, solar, 3rd visor band, soundproofing, high beam sensor",
"color": "Green Tint, Blue Shade",
"requiresRecalibration": true,
"requiresCapabilityQuestions": true,
"recalibrationType": null,
"childParts": null,
"childPartQuestions": []
}
],
"partQuestions": null,
"capabilityQuestions": [
{
"questionSequence": 1,
"questionText": "Is this the first question?",
"answers": [
{
"answerResult1": "DYNAMIC",
"answerResult2": "1",
"answerText": "Yes",
"nextQuestionSequence": null,
"answerResult": "DYNAMIC"
},
{
"answerResult1": "Unknown",
"answerResult2": "0",
"answerText": "No",
"nextQuestionSequence": null,
"answerResult": "Unknown"
}
]
}
]
},
{
"glassName": "Front",
"glassLocation": "Driver",
"parts": [
{
"partNumber": "B",
"description": "rain sensor, solar, 3rd visor band, soundproofing, high beam sensor",
"color": "Green Tint, Blue Shade",
"requiresRecalibration": true,
"requiresCapabilityQuestions": true,
"recalibrationType": null,
"childParts": null,
"childPartQuestions": []
}
],
"partQuestions": null,
"capabilityQuestions": [
{
"questionSequence": 1,
"questionText": "Is this the second question?",
"answers": [
{
"answerResult1": "Oh yeah",
"answerResult2": "1",
"answerText": "Yes",
"nextQuestionSequence": null,
"answerResult": "Oh yeah"
},
{
"answerResult1": "Maybe",
"answerResult2": "0",
"answerText": "No",
"nextQuestionSequence": null,
"answerResult": "Maybe"
}
]
}
]
},
{
"glassName": "Rear",
"glassLocation": "Driver",
"parts": [
{
"partNumber": "C",
"description": "rain sensor, solar, 3rd visor band, soundproofing, high beam sensor",
"color": "Green Tint, Blue Shade",
"requiresRecalibration": true,
"requiresCapabilityQuestions": false,
"recalibrationType": null,
"childParts": null,
"childPartQuestions": []
}
],
"partQuestions": null
}
]
// mimic part-questions page data for consistency
for (let partOrQuestion of partsOrQuestions) {
if (this.hasCapabilityQuestions([partOrQuestion])) {
let capabilityQuestionsForGlassLocation = (await baseMixin.methods.dispatchStoreAction(storeActions.GET_CAPABILITY_QUESTIONS, {
@ -208,111 +112,6 @@ export default {
}
}
partsOrQuestions = [
{
"glassName": "Single",
"glassLocation": "Windshield",
"parts": [
{
"partNumber": "A",
"description": "rain sensor, solar, 3rd visor band, soundproofing, high beam sensor",
"color": "Green Tint, Blue Shade",
"requiresRecalibration": true,
"requiresCapabilityQuestions": true,
"recalibrationType": null,
"childParts": null,
"childPartQuestions": []
}
],
"partQuestions": null,
"capabilityQuestions": [
{
"questionSequence": 1,
"questionText": "Is this the first question?",
"answers": [
{
"answerResult1": "DYNAMIC",
"answerResult2": "1",
"answerText": "Yes",
"nextQuestionSequence": null,
"answerResult": "DYNAMIC"
},
{
"answerResult1": "Unknown",
"answerResult2": "0",
"answerText": "No",
"nextQuestionSequence": null,
"answerResult": "Unknown"
}
]
}
]
},
{
"glassName": "Front",
"glassLocation": "Driver",
"parts": [
{
"partNumber": "B",
"description": "rain sensor, solar, 3rd visor band, soundproofing, high beam sensor",
"color": "Green Tint, Blue Shade",
"requiresRecalibration": true,
"requiresCapabilityQuestions": true,
"recalibrationType": null,
"childParts": null,
"childPartQuestions": []
}
],
"partQuestions": null,
"capabilityQuestions": [
{
"questionSequence": 1,
"questionText": "Is this the second question?",
"answers": [
{
"answerResult1": "Oh yeah",
"answerResult2": "1",
"answerText": "Yes",
"nextQuestionSequence": null,
"answerResult": "Oh yeah"
},
{
"answerResult1": "Maybe",
"answerResult2": "0",
"answerText": "No",
"nextQuestionSequence": null,
"answerResult": "Maybe"
}
]
}
]
},
{
"glassName": "Rear",
"glassLocation": "Driver",
"parts": [
{
"partNumber": "C",
"description": "rain sensor, solar, 3rd visor band, soundproofing, high beam sensor",
"color": "Green Tint, Blue Shade",
"requiresRecalibration": true,
"requiresCapabilityQuestions": false,
"recalibrationType": null,
"childParts": null,
"childPartQuestions": []
}
],
"partQuestions": null
}
]
store.commit(storeMutations.UPDATE_PAGE_DATA, {
page: "capability-questions",
data: [{
partsOrQuestions: partsOrQuestions
}],
})
self.$router.navigateWithSaving(self.navigationScenarios.HAS_CAPABILITY_QUESTIONS, self.$route, {}, {}, { partsOrQuestions });
} else {
// if single parts only

View file

@ -224,7 +224,7 @@ function navigateToUrl(url, optionalQuery = {}) {
for (const queryKey in optionalQuery) {
externalUrl.searchParams.append(queryKey, optionalQuery[queryKey]);
}
window.location.assign(externalUrl);
}