salix/print/templates/email/worker-welcome/worker-welcome.js

24 lines
520 B
JavaScript
Raw Normal View History

2022-11-14 14:19:16 +00:00
const Component = require(`vn-print/core/component`);
const emailBody = new Component('email-body');
module.exports = {
name: 'client-welcome',
async serverPrefetch() {
this.client = await this.fetchClient(this.id);
},
methods: {
fetchClient(id) {
return this.findOneFromDef('client', [id]);
},
},
components: {
'email-body': emailBody.build(),
},
props: {
id: {
type: Number,
required: true
}
}
};