Fixing store reference in remaining prerequisites
This commit is contained in:
parent
412b2bebb6
commit
a511a550bf
3 changed files with 6 additions and 5 deletions
|
|
@ -226,7 +226,7 @@ export default {
|
||||||
getRouterLinkRouteFromCopy,
|
getRouterLinkRouteFromCopy,
|
||||||
getRouterLinkDisplayTextFromCopy,
|
getRouterLinkDisplayTextFromCopy,
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
if (this.mainStore.order.vehicle.carId) {
|
if (useMainStore().order.vehicle.carId) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
return this.mainStore.order.vehicle.carId !== null;
|
return useMainStore().order.vehicle.carId !== null;
|
||||||
},
|
},
|
||||||
loadDefaultsFromStore() {
|
loadDefaultsFromStore() {
|
||||||
this.customerQuestions = this.mainStore.customerData.addressQuestions.state;
|
this.customerQuestions = this.mainStore.customerData.addressQuestions.state;
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ import issPageValues from '@/router/router-constants/issPage-values';
|
||||||
import { Form } from 'vee-validate';
|
import { Form } from 'vee-validate';
|
||||||
import vehicleQuestionsMixin from '@/mixins/vehicle-questions-mixin';
|
import vehicleQuestionsMixin from '@/mixins/vehicle-questions-mixin';
|
||||||
import BaseFormMixin from '@/mixins/base-form-mixin.js';
|
import BaseFormMixin from '@/mixins/base-form-mixin.js';
|
||||||
|
import { useMainStore } from '@/store';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'vehicle-parts',
|
name: 'vehicle-parts',
|
||||||
|
|
@ -178,9 +179,9 @@ export default {
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
// Check if isRepair is populated and if the pageData we need is here (Parts data)
|
// Check if isRepair is populated and if the pageData we need is here (Parts data)
|
||||||
return (
|
return (
|
||||||
this.mainStore.damage.isRepair != null
|
useMainStore().damage.isRepair != null
|
||||||
&& this.mainStore.pageData(issPageValues.VEHICLE_PARTS)
|
&& useMainStore().pageData(issPageValues.VEHICLE_PARTS)
|
||||||
&& Object.keys(this.mainStore.pageData(issPageValues.VEHICLE_PARTS)).length !== 0
|
&& Object.keys(useMainStore().pageData(issPageValues.VEHICLE_PARTS)).length !== 0
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue