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

28 lines
599 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
2022-12-12 14:05:49 +00:00
},
url: {
type: String,
required: true
2022-11-14 14:19:16 +00:00
}
}
};