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

24 lines
520 B
JavaScript
Raw Normal View History

2022-11-14 14:19:16 +00:00
const Component = require(`vn-print/core/component`);
const emailBody = new Component('email-body');
module.exports = {
2022-11-21 14:15:25 +00:00
name: 'worker-welcome',
2022-11-14 14:19:16 +00:00
async serverPrefetch() {
2022-11-21 14:15:25 +00:00
this.worker = await this.fetchWorker(this.id);
2022-11-14 14:19:16 +00:00
},
methods: {
2022-11-21 14:15:25 +00:00
fetchWorker(id) {
return this.findOneFromDef('worker', [id]);
2022-11-14 14:19:16 +00:00
},
},
components: {
'email-body': emailBody.build(),
},
props: {
id: {
type: Number,
required: true
}
}
};