salix/print/templates/reports/zone/zone.js

20 lines
405 B
JavaScript
Raw Normal View History

2019-11-04 12:55:20 +00:00
module.exports = {
name: 'zone',
async serverPrefetch() {
this.zone = await this.fetchZone(this.routeId);
if (!this.zone)
throw new Error('Something went wrong');
},
methods: {
fetchZone(routeId) {
2021-04-27 08:29:09 +00:00
return this.findOneFromDef('zone', [routeId]);
2019-11-04 12:55:20 +00:00
}
},
props: {
routeId: {
required: true
}
}
};