Save service package amounts in page data

This commit is contained in:
Chloe Herd 2025-07-08 15:11:17 -04:00
parent 54a1e36165
commit dc6af2b3ba
2 changed files with 15 additions and 1 deletions

View file

@ -561,8 +561,12 @@ export default {
skipToInsurance: null,
};
},
mounted() {
async mounted() {
this.attachCustomEventsForAnalytics();
await this.$nextTick();
this.$refs.servicePackage.savePackageInfoToPageData();
},
computed: {
lineItemsCloneForWatcher() {

View file

@ -44,6 +44,7 @@ import {
import { containsRecalParts, getItemsWithoutRecalParts } from "@/helpers/recal-helper";
import experimentMixin from "@/mixins/experiment-mixin.js";
import { experimentSettings } from "@/constants/experiments";
import { savePageData } from "@/router/methods/helpers/save-page-data";
export default {
name: "servicePackageQuestion",
@ -434,6 +435,15 @@ export default {
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: {
buttonQuestion,