Save service package amounts in page data
This commit is contained in:
parent
54a1e36165
commit
dc6af2b3ba
2 changed files with 15 additions and 1 deletions
|
|
@ -561,8 +561,12 @@ export default {
|
||||||
skipToInsurance: null,
|
skipToInsurance: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
async mounted() {
|
||||||
this.attachCustomEventsForAnalytics();
|
this.attachCustomEventsForAnalytics();
|
||||||
|
|
||||||
|
await this.$nextTick();
|
||||||
|
|
||||||
|
this.$refs.servicePackage.savePackageInfoToPageData();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
lineItemsCloneForWatcher() {
|
lineItemsCloneForWatcher() {
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ import {
|
||||||
import { containsRecalParts, getItemsWithoutRecalParts } from "@/helpers/recal-helper";
|
import { containsRecalParts, getItemsWithoutRecalParts } from "@/helpers/recal-helper";
|
||||||
import experimentMixin from "@/mixins/experiment-mixin.js";
|
import experimentMixin from "@/mixins/experiment-mixin.js";
|
||||||
import { experimentSettings } from "@/constants/experiments";
|
import { experimentSettings } from "@/constants/experiments";
|
||||||
|
import { savePageData } from "@/router/methods/helpers/save-page-data";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "servicePackageQuestion",
|
name: "servicePackageQuestion",
|
||||||
|
|
@ -434,6 +435,15 @@ export default {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async savePackageInfoToPageData() {
|
||||||
|
const answers = this.servicePackageAnswers;
|
||||||
|
const toLog = answers.map((ans) => ({
|
||||||
|
packageName: ans.buttonLabel,
|
||||||
|
price: ans.buttonAuxillaryCopy,
|
||||||
|
}));
|
||||||
|
|
||||||
|
await savePageData(this.pageName, toLog);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
buttonQuestion,
|
buttonQuestion,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue