26 lines
633 B
JavaScript
Executable File
26 lines
633 B
JavaScript
Executable File
const Component = require(`vn-print/core/component`);
|
|
const emailHeader = new Component('email-header');
|
|
const emailFooter = new Component('email-footer');
|
|
|
|
module.exports = {
|
|
name: 'client-welcome',
|
|
async serverPrefetch() {
|
|
this.client = await this.fetchClient(this.id);
|
|
},
|
|
methods: {
|
|
fetchClient(id) {
|
|
return this.findOneFromDef('client', [id]);
|
|
},
|
|
},
|
|
components: {
|
|
'email-header': emailHeader.build(),
|
|
'email-footer': emailFooter.build()
|
|
},
|
|
props: {
|
|
id: {
|
|
type: [Number, String],
|
|
required: true
|
|
}
|
|
}
|
|
};
|