27 lines
683 B
JavaScript
Executable File
27 lines
683 B
JavaScript
Executable File
const Component = require(`${appPath}/core/component`);
|
|
const reportBody = new Component('report-body');
|
|
|
|
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: {
|
|
'report-body': reportBody.build()
|
|
},
|
|
props: {
|
|
eventIds: {
|
|
type: [Array],
|
|
required: true
|
|
}
|
|
}
|
|
};
|