2019-11-04 12:55:20 +00:00
|
|
|
module.exports = {
|
|
|
|
name: 'zone',
|
|
|
|
async serverPrefetch() {
|
2022-09-26 11:33:27 +00:00
|
|
|
this.zone = await this.fetchZone(this.id);
|
2019-11-04 12:55:20 +00:00
|
|
|
|
|
|
|
if (!this.zone)
|
|
|
|
throw new Error('Something went wrong');
|
|
|
|
},
|
|
|
|
methods: {
|
2022-09-26 11:33:27 +00:00
|
|
|
fetchZone(id) {
|
|
|
|
return this.findOneFromDef('zone', [id]);
|
2019-11-04 12:55:20 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
props: {
|
2022-09-26 11:33:27 +00:00
|
|
|
id: {
|
2022-01-17 11:44:43 +00:00
|
|
|
type: [Number, String],
|
2022-09-26 11:33:27 +00:00
|
|
|
required: true,
|
|
|
|
description: 'The zone id'
|
2019-11-04 12:55:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|