From d1dce73a3374d6401392736aee8f30402e1fe7ee Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 14 Nov 2022 08:50:38 +0100 Subject: [PATCH] feat: creat email/vehicle-event-expired --- .../vehicle-event-expired/assets/css/import.js | 11 +++++++++++ .../email/vehicle-event-expired/attachments.json | 6 ++++++ .../email/vehicle-event-expired/locale/es.yml | 3 +++ .../vehicle-event-expired.html | 8 ++++++++ .../vehicle-event-expired/vehicle-event-expired.js | 9 +++++++++ .../vehicle-event-expired/assets/css/import.js | 13 ++++++++----- .../vehicle-event-expired/vehicle-event-expired.js | 2 +- print/templates/reports/zone/zone.js | 2 +- 8 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 print/templates/email/vehicle-event-expired/assets/css/import.js create mode 100644 print/templates/email/vehicle-event-expired/attachments.json create mode 100644 print/templates/email/vehicle-event-expired/locale/es.yml create mode 100644 print/templates/email/vehicle-event-expired/vehicle-event-expired.html create mode 100755 print/templates/email/vehicle-event-expired/vehicle-event-expired.js diff --git a/print/templates/email/vehicle-event-expired/assets/css/import.js b/print/templates/email/vehicle-event-expired/assets/css/import.js new file mode 100644 index 000000000..4b4bb7086 --- /dev/null +++ b/print/templates/email/vehicle-event-expired/assets/css/import.js @@ -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(); diff --git a/print/templates/email/vehicle-event-expired/attachments.json b/print/templates/email/vehicle-event-expired/attachments.json new file mode 100644 index 000000000..6b56392a0 --- /dev/null +++ b/print/templates/email/vehicle-event-expired/attachments.json @@ -0,0 +1,6 @@ +[ + { + "filename": "vehicle-event-expired.pdf", + "component": "vehicle-event-expired" + } +] diff --git a/print/templates/email/vehicle-event-expired/locale/es.yml b/print/templates/email/vehicle-event-expired/locale/es.yml new file mode 100644 index 000000000..f6fff468c --- /dev/null +++ b/print/templates/email/vehicle-event-expired/locale/es.yml @@ -0,0 +1,3 @@ +subject: Expiración Tarjetas Vehículos +title: Expiración Tarjetas Vehículos +description: A continuación se adjunta el informe de expiración de tarjetas vehículos diff --git a/print/templates/email/vehicle-event-expired/vehicle-event-expired.html b/print/templates/email/vehicle-event-expired/vehicle-event-expired.html new file mode 100644 index 000000000..f4c1ebc1b --- /dev/null +++ b/print/templates/email/vehicle-event-expired/vehicle-event-expired.html @@ -0,0 +1,8 @@ + +
+
+

{{ $t('title') }}

+

+
+
+
diff --git a/print/templates/email/vehicle-event-expired/vehicle-event-expired.js b/print/templates/email/vehicle-event-expired/vehicle-event-expired.js new file mode 100755 index 000000000..1c228d2b5 --- /dev/null +++ b/print/templates/email/vehicle-event-expired/vehicle-event-expired.js @@ -0,0 +1,9 @@ +const Component = require(`vn-print/core/component`); +const emailBody = new Component('email-body'); + +module.exports = { + name: 'vehicle-event-expired', + components: { + 'email-body': emailBody.build() + } +}; diff --git a/print/templates/reports/vehicle-event-expired/assets/css/import.js b/print/templates/reports/vehicle-event-expired/assets/css/import.js index fd8796c2b..37a98dfdd 100644 --- a/print/templates/reports/vehicle-event-expired/assets/css/import.js +++ b/print/templates/reports/vehicle-event-expired/assets/css/import.js @@ -1,9 +1,12 @@ -const Stylesheet = require(`${appPath}/core/stylesheet`); +const Stylesheet = require(`vn-print/core/stylesheet`); + +const path = require('path'); +const vnPrintPath = path.resolve('print'); module.exports = new Stylesheet([ - `${appPath}/common/css/spacing.css`, - `${appPath}/common/css/misc.css`, - `${appPath}/common/css/layout.css`, - `${appPath}/common/css/report.css`, + `${vnPrintPath}/common/css/spacing.css`, + `${vnPrintPath}/common/css/misc.css`, + `${vnPrintPath}/common/css/layout.css`, + `${vnPrintPath}/common/css/report.css`, `${__dirname}/style.css`]) .mergeStyles(); diff --git a/print/templates/reports/vehicle-event-expired/vehicle-event-expired.js b/print/templates/reports/vehicle-event-expired/vehicle-event-expired.js index 278caeabf..ab6cffc00 100755 --- a/print/templates/reports/vehicle-event-expired/vehicle-event-expired.js +++ b/print/templates/reports/vehicle-event-expired/vehicle-event-expired.js @@ -1,4 +1,4 @@ -const Component = require(`${appPath}/core/component`); +const Component = require(`vn-print/core/component`); const reportBody = new Component('report-body'); module.exports = { diff --git a/print/templates/reports/zone/zone.js b/print/templates/reports/zone/zone.js index 463c28acf..720542cd6 100755 --- a/print/templates/reports/zone/zone.js +++ b/print/templates/reports/zone/zone.js @@ -1,4 +1,4 @@ -const Component = require(`${appPath}/core/component`); +const Component = require(`vn-print/core/component`); const reportBody = new Component('report-body'); module.exports = {