24 lines
520 B
JavaScript
24 lines
520 B
JavaScript
|
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
|
||
|
}
|
||
|
}
|
||
|
};
|