28 lines
599 B
JavaScript
Executable File
28 lines
599 B
JavaScript
Executable File
const Component = require(`vn-print/core/component`);
|
|
const emailBody = new Component('email-body');
|
|
|
|
module.exports = {
|
|
name: 'worker-welcome',
|
|
async serverPrefetch() {
|
|
this.worker = await this.fetchWorker(this.id);
|
|
},
|
|
methods: {
|
|
fetchWorker(id) {
|
|
return this.findOneFromDef('worker', [id]);
|
|
},
|
|
},
|
|
components: {
|
|
'email-body': emailBody.build(),
|
|
},
|
|
props: {
|
|
id: {
|
|
type: Number,
|
|
required: true
|
|
},
|
|
url: {
|
|
type: String,
|
|
required: true
|
|
}
|
|
}
|
|
};
|