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

20 lines
405 B
JavaScript
Executable File

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) {
return this.findOneFromDef('zone', [routeId]);
}
},
props: {
routeId: {
required: true
}
}
};