26 lines
665 B
JavaScript
Executable File
26 lines
665 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: {
|
|
type: [Number, String],
|
|
required: true
|
|
}
|
|
}
|
|
};
|