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,
|
||||
getRouterLinkDisplayTextFromCopy,
|
||||
arePagePrerequisitesValid() {
|
||||
if (this.mainStore.order.vehicle.carId) {
|
||||
if (useMainStore().order.vehicle.carId) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
arePagePrerequisitesValid() {
|
||||
return this.mainStore.order.vehicle.carId !== null;
|
||||
return useMainStore().order.vehicle.carId !== null;
|
||||
},
|
||||
loadDefaultsFromStore() {
|
||||
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 vehicleQuestionsMixin from '@/mixins/vehicle-questions-mixin';
|
||||
import BaseFormMixin from '@/mixins/base-form-mixin.js';
|
||||
import { useMainStore } from '@/store';
|
||||
|
||||
export default {
|
||||
name: 'vehicle-parts',
|
||||
|
|
@ -178,9 +179,9 @@ export default {
|
|||
arePagePrerequisitesValid() {
|
||||
// Check if isRepair is populated and if the pageData we need is here (Parts data)
|
||||
return (
|
||||
this.mainStore.damage.isRepair != null
|
||||
&& this.mainStore.pageData(issPageValues.VEHICLE_PARTS)
|
||||
&& Object.keys(this.mainStore.pageData(issPageValues.VEHICLE_PARTS)).length !== 0
|
||||
useMainStore().damage.isRepair != null
|
||||
&& useMainStore().pageData(issPageValues.VEHICLE_PARTS)
|
||||
&& Object.keys(useMainStore().pageData(issPageValues.VEHICLE_PARTS)).length !== 0
|
||||
);
|
||||
},
|
||||
async forwardButtonAction() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue