CASH-48
CASH-48 null check
This commit is contained in:
parent
e559d37ac0
commit
8a0d622049
1 changed files with 27 additions and 27 deletions
|
|
@ -120,35 +120,35 @@ export default {
|
||||||
|
|
||||||
const partsOrQuestions = orderFromStore.damage?.partQuestionAnswers;
|
const partsOrQuestions = orderFromStore.damage?.partQuestionAnswers;
|
||||||
|
|
||||||
partsOrQuestions.forEach(pqa => {
|
if (partsOrQuestions) {
|
||||||
const payloadPartQuestions = [];
|
partsOrQuestions.forEach(pqa => {
|
||||||
pqa.answeredQuestions.forEach(answer => {
|
const payloadPartQuestions = [];
|
||||||
payloadPartQuestions.push({
|
pqa.answeredQuestions.forEach(answer => {
|
||||||
questionSeq: answer?.questionNum,
|
payloadPartQuestions.push({
|
||||||
questionText: answer?.questionText,
|
questionSeq: answer?.questionNum,
|
||||||
answerText: answer?.selectedAnswerText,
|
questionText: answer?.questionText,
|
||||||
basePart: pqa?.result,
|
answerText: answer?.selectedAnswerText,
|
||||||
|
basePart: pqa?.result,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const payload = {
|
||||||
|
eon: orderFromStore.eon,
|
||||||
|
ctu: ctu,
|
||||||
|
workOrderId: orderFromStore.workOrderId,
|
||||||
|
workOrderNumber: orderFromStore.workOrderNumber,
|
||||||
|
carId: orderFromStore.vehicle.carId,
|
||||||
|
glassLocation: pqa?.glassLocation,
|
||||||
|
partQuestions: payloadPartQuestions,
|
||||||
|
};
|
||||||
|
|
||||||
|
baseMixin.methods.dispatchStoreAction(
|
||||||
|
storeActions.LOG_PART_QUESTIONS,
|
||||||
|
payload,
|
||||||
|
false
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
const payload = {
|
|
||||||
eon: orderFromStore.eon,
|
|
||||||
ctu: ctu,
|
|
||||||
workOrderId: orderFromStore.workOrderId,
|
|
||||||
workOrderNumber: orderFromStore.workOrderNumber,
|
|
||||||
carId: orderFromStore.vehicle.carId,
|
|
||||||
glassLocation: pqa?.glassLocation,
|
|
||||||
partQuestions: payloadPartQuestions,
|
|
||||||
};
|
|
||||||
|
|
||||||
baseMixin.methods.dispatchStoreAction(
|
|
||||||
storeActions.LOG_PART_QUESTIONS,
|
|
||||||
payload,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// Create order
|
// Create order
|
||||||
await baseMixin.methods.dispatchStoreAction(storeActions.CREATE_SUBMITTED_ORDER); // This nulls the Store order
|
await baseMixin.methods.dispatchStoreAction(storeActions.CREATE_SUBMITTED_ORDER); // This nulls the Store order
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue