feat: worker-welcome
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
7a7da9508f
commit
7c75eaadce
|
@ -1,11 +0,0 @@
|
|||
SELECT
|
||||
c.id,
|
||||
u.name AS userName,
|
||||
CONCAT(w.lastName, ' ', w.firstName) salesPersonName,
|
||||
w.phone AS salesPersonPhone,
|
||||
CONCAT(wu.name, '@verdnatura.es') AS salesPersonEmail
|
||||
FROM client c
|
||||
JOIN account.user u ON u.id = c.id
|
||||
LEFT JOIN worker w ON w.id = c.salesPersonFk
|
||||
LEFT JOIN account.user wu ON wu.id = w.userFk
|
||||
WHERE c.id = ?
|
|
@ -0,0 +1,7 @@
|
|||
SELECT
|
||||
u.id,
|
||||
u.name AS userName,
|
||||
e.email
|
||||
FROM account.user u
|
||||
LEFT JOIN account.emailUser e ON e.userFk = u.id
|
||||
WHERE u.id = ?;
|
|
@ -3,7 +3,7 @@
|
|||
<div class="grid-block vn-pa-ml">
|
||||
<h1>{{ $t('title', [id]) }}</h1>
|
||||
<p>{{ $t('description.dearWorker') }},</p>
|
||||
<p>{{ $t('workerData', this.user.name, this.url) }}</p>
|
||||
<p>{{ $t('workerData', this.worker.name, this.url) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</email-body>
|
||||
|
|
|
@ -2,13 +2,13 @@ const Component = require(`vn-print/core/component`);
|
|||
const emailBody = new Component('email-body');
|
||||
|
||||
module.exports = {
|
||||
name: 'client-welcome',
|
||||
name: 'worker-welcome',
|
||||
async serverPrefetch() {
|
||||
this.client = await this.fetchClient(this.id);
|
||||
this.worker = await this.fetchWorker(this.id);
|
||||
},
|
||||
methods: {
|
||||
fetchClient(id) {
|
||||
return this.findOneFromDef('client', [id]);
|
||||
fetchWorker(id) {
|
||||
return this.findOneFromDef('worker', [id]);
|
||||
},
|
||||
},
|
||||
components: {
|
||||
|
|
Loading…
Reference in New Issue