ref #5858 feat: notification template
This commit is contained in:
parent
50cb7964d9
commit
1b60cd33d5
|
@ -0,0 +1,11 @@
|
|||
const Stylesheet = require(`vn-print/core/stylesheet`);
|
||||
|
||||
const path = require('path');
|
||||
const vnPrintPath = path.resolve('print');
|
||||
|
||||
module.exports = new Stylesheet([
|
||||
`${vnPrintPath}/common/css/spacing.css`,
|
||||
`${vnPrintPath}/common/css/misc.css`,
|
||||
`${vnPrintPath}/common/css/layout.css`,
|
||||
`${vnPrintPath}/common/css/email.css`])
|
||||
.mergeStyles();
|
|
@ -0,0 +1,2 @@
|
|||
subject: Colisión de zona detectada
|
||||
title: "La zona {0} ha sido registrada en más de un sitio"
|
|
@ -0,0 +1,5 @@
|
|||
SELECT
|
||||
z.name
|
||||
FROM vn.zoneIncluded zI
|
||||
LEFT JOIN vn.zone z ON z.Id = zI.zoneFk
|
||||
WHERE zI.id = ?;
|
|
@ -0,0 +1,8 @@
|
|||
<email-body v-bind="$props">
|
||||
<div class="grid-row">
|
||||
<div class="grid-block vn-pa-ml">
|
||||
<h1>{{ $t('subject') }}</h1>
|
||||
<p>{{ $t('title', [this.zoneIncluded.name]) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</email-body>
|
|
@ -0,0 +1,27 @@
|
|||
const Component = require(`vn-print/core/component`);
|
||||
const emailBody = new Component('email-body');
|
||||
|
||||
module.exports = {
|
||||
name: 'zone-included',
|
||||
async serverPrefetch() {
|
||||
this.zoneIncluded = await this.fetchZoneIncluded(this.id);
|
||||
},
|
||||
methods: {
|
||||
fetchZoneIncluded(id) {
|
||||
return this.findOneFromDef('zoneIncluded', [id]);
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'email-body': emailBody.build(),
|
||||
},
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
url: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue