Merge pull request #1214 from Safelite/feature/CSR-1146

CSR-1146 | Check for empty arrays (present after refresh)
This commit is contained in:
scottkiener 2023-07-10 10:06:48 -04:00 committed by GitHub
commit e16891ce72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1255,10 +1255,12 @@ export const actions = {
additionalAuthFlag: "",
},
partSelection: {
hasAnsweredPartQuestions: !!order.damage.partQuestionAnswers,
hasAnsweredMoldingQuestions: !!order.damage.moldingQuestionAnswers,
hasAnsweredCapabilityQuestions: !!order.damage.capabilityQuestionAnswers,
hasManuallySelectedParts: !!context.state.applicationUser.pageData["vehicle-parts"],
hasAnsweredPartQuestions: !!order.damage.partQuestionAnswers?.length,
hasAnsweredMoldingQuestions: !!order.damage.moldingQuestionAnswers?.length,
hasAnsweredCapabilityQuestions: !!order.damage.capabilityQuestionAnswers?.length,
hasManuallySelectedParts:
!!context.state.applicationUser.pageData["vehicle-parts"]?.partsOrQuestions
.length,
},
vehicle: {
year: vehicle.year,