WIP donation component.
This commit is contained in:
parent
fec478340d
commit
7c07b95a79
7 changed files with 171 additions and 120 deletions
File diff suppressed because one or more lines are too long
|
|
@ -205,7 +205,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert {
|
.alert {
|
||||||
border-radius: $border-radius-lg;
|
border-radius: $border-radius-lg;
|
||||||
border: 1px solid $green;
|
border: 1px solid $green;
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ export default {
|
||||||
.textbox-question {
|
.textbox-question {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0 0 1.5rem 0;
|
margin: 0 0 1.5rem 0;
|
||||||
|
|
||||||
label {
|
label {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
|
|
@ -258,7 +258,7 @@ export default {
|
||||||
|
|
||||||
&.progress-saved {
|
&.progress-saved {
|
||||||
.modal-footer-button,
|
.modal-footer-button,
|
||||||
.modal-disclaimer {
|
.modal-disclaimer {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.skip-button {
|
.skip-button {
|
||||||
|
|
|
||||||
|
|
@ -64,10 +64,9 @@
|
||||||
:isItac="isItac"
|
:isItac="isItac"
|
||||||
:isNoComp="isNoComp" />
|
:isNoComp="isNoComp" />
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<donationBlock
|
<donationBlock cmsWidgetName="DonationWidget" />
|
||||||
cmsWidgetName="DonationWidget" />
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr class="mb-5" />
|
<hr class="mb-5" />
|
||||||
|
|
||||||
|
|
@ -113,7 +112,7 @@ import experimentMixin from "@/mixins/experiment-mixin.js";
|
||||||
import { partTypeStrings } from "@/constants/part-type-strings";
|
import { partTypeStrings } from "@/constants/part-type-strings";
|
||||||
import { containsLineItemWithPartType } from "@/helpers/service-package-helper";
|
import { containsLineItemWithPartType } from "@/helpers/service-package-helper";
|
||||||
import { containsRecalParts } from "@/helpers/recal-helper.js";
|
import { containsRecalParts } from "@/helpers/recal-helper.js";
|
||||||
import donationBlock from "../../fmg-components/donation-block/donation-block.vue";
|
import donationBlock from "@/fmg-components/donation-block/donation-block.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "confirmation",
|
name: "confirmation",
|
||||||
|
|
@ -122,13 +121,13 @@ export default {
|
||||||
|
|
||||||
// send part question data to SPS API for logging
|
// send part question data to SPS API for logging
|
||||||
const orderFromStore = await deepClone(store.getters.order);
|
const orderFromStore = await deepClone(store.getters.order);
|
||||||
const ctu = orderFromStore.serviceLocation?.zipCodeCtu
|
const ctu = orderFromStore.serviceLocation?.zipCodeCtu;
|
||||||
|
|
||||||
const partsOrQuestions = orderFromStore.damage?.partQuestionAnswers;
|
const partsOrQuestions = orderFromStore.damage?.partQuestionAnswers;
|
||||||
|
|
||||||
partsOrQuestions.forEach(pqa => {
|
partsOrQuestions.forEach((pqa) => {
|
||||||
const payloadPartQuestions = [];
|
const payloadPartQuestions = [];
|
||||||
pqa.answeredQuestions.forEach(answer => {
|
pqa.answeredQuestions.forEach((answer) => {
|
||||||
payloadPartQuestions.push({
|
payloadPartQuestions.push({
|
||||||
questionSeq: answer?.questionNum,
|
questionSeq: answer?.questionNum,
|
||||||
questionText: answer?.questionText,
|
questionText: answer?.questionText,
|
||||||
|
|
@ -138,24 +137,18 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
eon: orderFromStore.eon,
|
eon: orderFromStore.eon,
|
||||||
ctu: ctu,
|
ctu: ctu,
|
||||||
workOrderId: orderFromStore.workOrderId,
|
workOrderId: orderFromStore.workOrderId,
|
||||||
workOrderNumber: orderFromStore.workOrderNumber,
|
workOrderNumber: orderFromStore.workOrderNumber,
|
||||||
carId: orderFromStore.vehicle.carId,
|
carId: orderFromStore.vehicle.carId,
|
||||||
glassLocation: pqa?.glassLocation,
|
glassLocation: pqa?.glassLocation,
|
||||||
partQuestions: payloadPartQuestions,
|
partQuestions: payloadPartQuestions,
|
||||||
};
|
};
|
||||||
|
|
||||||
baseMixin.methods.dispatchStoreAction(
|
|
||||||
storeActions.LOG_PART_QUESTIONS,
|
|
||||||
payload,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
@ -503,7 +496,7 @@ export default {
|
||||||
addToCalendar,
|
addToCalendar,
|
||||||
cart,
|
cart,
|
||||||
textBlock,
|
textBlock,
|
||||||
donationBlock
|
donationBlock,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
:isItac="isItac"
|
:isItac="isItac"
|
||||||
:isNoComp="isNoComp"
|
:isNoComp="isNoComp"
|
||||||
:isExpandedOnLoad="false" />
|
:isExpandedOnLoad="false" />
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -1448,16 +1448,7 @@ export const actions = {
|
||||||
|
|
||||||
logPartQuestions(
|
logPartQuestions(
|
||||||
context,
|
context,
|
||||||
{
|
{ eon, ctu, workOrderId, workOrderNumber, carId, glassLocation, partQuestions, userAgent }
|
||||||
eon,
|
|
||||||
ctu,
|
|
||||||
workOrderId,
|
|
||||||
workOrderNumber,
|
|
||||||
carId,
|
|
||||||
glassLocation,
|
|
||||||
partQuestions,
|
|
||||||
userAgent,
|
|
||||||
}
|
|
||||||
) {
|
) {
|
||||||
var payload = {
|
var payload = {
|
||||||
applicationName: applicationConfig.APPLICATION_NAME,
|
applicationName: applicationConfig.APPLICATION_NAME,
|
||||||
|
|
@ -1468,15 +1459,14 @@ export const actions = {
|
||||||
carId: carId,
|
carId: carId,
|
||||||
glassLocation: glassLocation,
|
glassLocation: glassLocation,
|
||||||
partQuestions: partQuestions,
|
partQuestions: partQuestions,
|
||||||
userAgent: navigator.userAgent
|
userAgent: navigator.userAgent,
|
||||||
};
|
};
|
||||||
|
|
||||||
return globalMethods
|
return globalMethods.callHttpClient({
|
||||||
.callHttpClient({
|
method: endpoints.LogPartQuestions.method,
|
||||||
method: endpoints.LogPartQuestions.method,
|
endpoint: endpoints.LogPartQuestions.url,
|
||||||
endpoint: endpoints.LogPartQuestions.url,
|
payload: payload,
|
||||||
payload: payload,
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Misc Actions
|
// Misc Actions
|
||||||
|
|
|
||||||
|
|
@ -156,5 +156,48 @@ export default {
|
||||||
transition: background 0s 0s ease-in-out;
|
transition: background 0s 0s ease-in-out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.btn-success {
|
||||||
|
position: relative;
|
||||||
|
background: $green-100;
|
||||||
|
border: 1px solid $green-400;
|
||||||
|
border-radius: $border-radius-lg;
|
||||||
|
color: $black;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: all 150ms linear;
|
||||||
|
height: 3rem;
|
||||||
|
&:hover {
|
||||||
|
color: $black;
|
||||||
|
background: $green-200;
|
||||||
|
}
|
||||||
|
&:focus, // Mouse, touch, stylus focus
|
||||||
|
&:focus-visible {
|
||||||
|
// Keyboard focus for accessibility
|
||||||
|
outline: none;
|
||||||
|
box-shadow:
|
||||||
|
0 0 0 3px $white,
|
||||||
|
0 0 0 5.5px $green-400;
|
||||||
|
color: $black;
|
||||||
|
background: $green-100;
|
||||||
|
}
|
||||||
|
&:disabled {
|
||||||
|
background: transparent;
|
||||||
|
color: $gray-550 !important;
|
||||||
|
font-weight: 400;
|
||||||
|
height: 48px;
|
||||||
|
border: 1px solid $gray-550;
|
||||||
|
border-radius: $border-radius-lg;
|
||||||
|
cursor: pointer;
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
&.has-loader {
|
||||||
|
color: $white;
|
||||||
|
@include blue-gradient;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
&.delay {
|
||||||
|
// fixes flicker while transitioning between states
|
||||||
|
transition: background 0s 0s ease-in-out;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue