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

24 lines
520 B
JavaScript
Executable File

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
}
}
};