WIP
This commit is contained in:
parent
ac95ee1344
commit
16f52932d6
1 changed files with 35 additions and 4 deletions
|
|
@ -1,17 +1,48 @@
|
|||
<template>
|
||||
<textareamultiline
|
||||
labelText="Notes for your technician"
|
||||
labelTextOptional="(Optional)"
|
||||
cmsWidgetName="CustomerDetailsTextAreaLabelText"
|
||||
:labelText=textAreaLabelCopy
|
||||
textAreaLabelText
|
||||
textAreaFooterText="250/250 characters remaining"
|
||||
footerText />
|
||||
footerText
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import textareamultiline from "@/ux-components/text-area/text-area-multi-line";
|
||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||
import { storeActions } from "@/constants/store-actions";
|
||||
import { routerParams } from "@/router/router-constants/router-params";
|
||||
import { getDamageString, isGlassAvailableForCarId } from "@/helpers/damage-helper";
|
||||
export default {
|
||||
name: "customer-details",
|
||||
components: {
|
||||
textareamultiline,
|
||||
textareamultiline
|
||||
},
|
||||
async beforeRouteEnter(to, from, next) {
|
||||
// Call APIs
|
||||
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
||||
|
||||
// Settle promises and get results
|
||||
const promiseResultMap = [
|
||||
{
|
||||
resultKey: "cmsContent",
|
||||
promise: cmsContentPromise,
|
||||
},
|
||||
];
|
||||
|
||||
const resultMap = await settleAllPromises(promiseResultMap);
|
||||
|
||||
// Call the "next" function to complete the transition to this page.
|
||||
next((vm) => {
|
||||
vm.setCmsContent(resultMap.cmsContent);
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
textAreaLabelCopy() {
|
||||
return this.getCmsContent("CustomerDetailsTextAreaLabelText");
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue