2022-11-14 07:50:38 +00:00
|
|
|
const Component = require(`vn-print/core/component`);
|
2022-11-10 07:57:42 +00:00
|
|
|
const reportBody = new Component('report-body');
|
2022-09-21 06:11:04 +00:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
name: 'vehicle-event-expired',
|
|
|
|
async serverPrefetch() {
|
|
|
|
this.vehicleEvents = await this.fetchVehicleEvent(this.eventIds);
|
|
|
|
|
|
|
|
if (!this.vehicleEvents)
|
|
|
|
throw new Error('Something went wrong');
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
fetchVehicleEvent(vehicleEventIds) {
|
|
|
|
return this.rawSqlFromDef('vehicleEvents', [vehicleEventIds]);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {
|
2022-11-10 12:34:23 +00:00
|
|
|
'report-body': reportBody.build()
|
2022-09-21 06:11:04 +00:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
eventIds: {
|
|
|
|
type: [Array],
|
2022-09-21 06:12:08 +00:00
|
|
|
required: true
|
2022-09-21 06:11:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|