salix/print/templates/email/cmr/cmr.js

23 lines
520 B
JavaScript
Raw Normal View History

2024-01-23 13:13:40 +00:00
const Component = require(`vn-print/core/component`);
const emailBody = new Component('email-body');
module.exports = {
name: 'cmr',
async serverPrefetch() {
this.cmr = await this.fetchCmr(this.ticketId);
},
methods: {
fetchCmr(ticketId) {
return this.findOneFromDef('cmr', [ticketId]);
},
},
components: {
'email-body': emailBody.build(),
},
props: {
ticketId: {
type: Number,
required: true
}
}
};