25 lines
629 B
JavaScript
Executable File
25 lines
629 B
JavaScript
Executable File
const Component = require(`${appPath}/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.recipientId);
|
|
},
|
|
methods: {
|
|
fetchClient(clientId) {
|
|
return this.findOneFromDef('client', [clientId]);
|
|
},
|
|
},
|
|
components: {
|
|
'email-header': emailHeader.build(),
|
|
'email-footer': emailFooter.build()
|
|
},
|
|
props: {
|
|
recipientId: {
|
|
required: true
|
|
}
|
|
}
|
|
};
|