Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 3569-refactor_isEditable-canEdit

This commit is contained in:
Alex Moreno 2022-11-10 13:58:18 +01:00
commit 8d731946f6
97 changed files with 47840 additions and 3858 deletions

View File

@ -1,4 +1,4 @@
extends: [eslint:recommended, google, plugin:jasmine/recommended]
extends: [eslint:recommended, google, plugin:jasmine/recommended, 'prettier',]
parserOptions:
ecmaVersion: 2018
sourceType: "module"

7
.prettierrc.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = {
singleQuote: true,
printWidth: 120,
tabWidth: 4,
semi: true,
endOfLine: 'auto',
};

13
.vscode/settings.json vendored
View File

@ -2,7 +2,16 @@
{
// Carácter predeterminado de final de línea.
"files.eol": "\n",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
"eslint.validate": [
"javascript",
"json"
],
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}

45130
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -63,7 +63,9 @@
"del": "^2.2.2",
"eslint": "^7.11.0",
"eslint-config-google": "^0.11.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jasmine": "^2.10.1",
"eslint-plugin-prettier": "^4.2.1",
"fancy-log": "^1.3.2",
"file-loader": "^1.1.11",
"gulp": "^4.0.2",
@ -92,6 +94,7 @@
"node-sass": "^4.14.1",
"nodemon": "^2.0.16",
"plugin-error": "^1.0.1",
"prettier": "^2.7.1",
"raw-loader": "^1.0.0",
"regenerator-runtime": "^0.13.7",
"sass-loader": "^7.3.1",

View File

@ -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();

View File

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width" />
<meta name="format-detection" content="telephone=no" />
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<slot name="header">
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
</slot>
<slot></slot>
<slot name="footer">
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
</slot>
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -0,0 +1,12 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
module.exports = {
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
},
name: 'email-body',
};

View File

@ -0,0 +1,10 @@
const Stylesheet = require(`vn-print/core/stylesheet`);
const path = require('path');
const vnPrintPath = path.resolve('print');
module.exports = new Stylesheet([
`${vnPrintPath}/common/css/layout.css`,
`${vnPrintPath}/common/css/report.css`,
`${vnPrintPath}/common/css/misc.css`])
.mergeStyles();

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<slot name="header">
<report-header v-bind="$props"></report-header>
</slot>
<slot></slot>
<slot name="footer">
<report-footer id="pageFooter" v-bind="$props"></report-footer>
</slot>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -0,0 +1,12 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
module.exports = {
name: 'report-body',
components: {
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
},
};

View File

@ -32,7 +32,7 @@ class Email extends Component {
const rendered = await this.render();
const attachments = [];
const getAttachments = async(componentPath, files) => {
for (file of files) {
for (const file of files) {
const fileCopy = Object.assign({}, file);
const fileName = fileCopy.filename;
@ -54,14 +54,21 @@ class Email extends Component {
}
};
async function getSubcomponentAttachments(instance) {
if (instance.components) {
const components = instance.components;
for (let componentName in components) {
const component = components[componentName];
const componentPath = `./components/${componentName}`;
await getAttachments(componentPath, component.attachments);
if (component.components)
await getSubcomponentAttachments(component)
}
}
}
await getSubcomponentAttachments(instance)
if (this.attachments)
await getAttachments(this.path, this.attachments);

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title v-html="$t('subject')"></title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<p>{{$t('description.instructions')}} {{client.name}}</p>
@ -29,29 +7,11 @@
<p>{{$t('description.regards')}}</p>
</div>
</div>
<!-- Preview block -->
<div class="grid-row" v-if="isPreview">
<div class="grid-block vn-pa-ml">
<attachment v-for="attachment in attachments"
v-bind:key="attachment.filename"
v-bind:attachment="attachment"
v-bind:args="$props">
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
v-bind:attachment="attachment" v-bind:args="$props">
</attachment>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,9 +1,7 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
module.exports = {
name: 'balance-compensation',
async serverPrefetch() {
@ -15,8 +13,7 @@ module.exports = {
},
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
data() {

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -28,7 +6,6 @@
<p v-html="$t('description', [dated])"></p>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<table class="column-oriented">
@ -57,20 +34,4 @@
</div>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'buyer-week-waste',
@ -23,8 +22,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build()
},
props: {}
};

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -28,19 +6,4 @@
<p v-html="$t('description', [minDate, maxDate])"></p>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'campaign-metrics',
@ -16,8 +15,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
id: {

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title', [id]) }}</h1>
@ -29,19 +7,4 @@
<p>{{ $t('description.conclusion') }}</p>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,12 +1,10 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'claim-pickup-order',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
async serverPrefetch() {
this.ticket = await this.fetchTicket(this.id);

View File

@ -0,0 +1,6 @@
[
{
"filename": "client-debt-statement.pdf",
"component": "client-debt-statement"
}
]

View File

@ -1,55 +1,15 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.instructions')}}</p>
</div>
</div>
<!-- Preview block -->
<div class="grid-row" v-if="isPreview">
<div class="grid-block vn-pa-ml">
<attachment v-for="attachment in attachments"
v-bind:key="attachment.filename"
v-bind:attachment="attachment"
v-bind:args="$props">
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
v-bind:attachment="attachment" v-bind:args="$props">
</attachment>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,13 +1,11 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
module.exports = {
name: 'client-debt-statement',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
data() {

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -69,24 +47,10 @@
</section>
<section v-if="client.salesPersonEmail">
{{$t('salesPersonEmail')}}:
<strong><a v-bind:href="`mailto: ${client.salesPersonEmail}`" target="_blank">{{client.salesPersonEmail}}</strong>
<strong><a v-bind:href="`mailto: ${client.salesPersonEmail}`"
target="_blank">{{client.salesPersonEmail}}</strong>
</section>
</p>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'client-welcome',
@ -13,8 +12,7 @@ module.exports = {
},
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
id: {

View File

@ -1,55 +1,15 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.instructions')}}</p>
</div>
</div>
<!-- Preview block -->
<div class="grid-row" v-if="isPreview">
<div class="grid-block vn-pa-ml">
<attachment v-for="attachment in attachments"
v-bind:key="attachment.filename"
v-bind:attachment="attachment"
v-bind:args="$props">
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
v-bind:attachment="attachment" v-bind:args="$props">
</attachment>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,13 +1,11 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
module.exports = {
name: 'credit-request',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
data() {

View File

@ -3,3 +3,7 @@
border-radius: 3px;
text-align: center
}
a {
color: #8dba25
}

View File

@ -1,31 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
<style type="text/css">
a {
color: #8dba25
}
</style>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -33,7 +6,6 @@
<p v-html="$t('description', [id])"></p>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block vn-px-ml">
<p>{{$t('copyLink')}}</p>
@ -42,7 +14,6 @@
</div>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<p v-html="$t('poll')"></p>
@ -50,20 +21,4 @@
<p v-html="$t('conclusion')"></p>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,12 +1,10 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'delivery-note-link',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
id: {

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -31,19 +9,4 @@
<p v-html="$t('conclusion')"></p>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,12 +1,10 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'delivery-note',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
id: {

View File

@ -1,45 +1,8 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.instructions')}}</p>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,12 +1,10 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'driver-route',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
id: {

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -29,29 +7,11 @@
<p>{{$t('description.conclusion')}}</p>
</div>
</div>
<!-- Attachments block -->
<div class="grid-row" v-if="isPreview">
<div class="grid-block vn-pa-ml">
<attachment v-for="attachment in attachments"
v-bind:key="attachment.filename"
v-bind:attachment="attachment"
v-bind:args="$props">
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
v-bind:attachment="attachment" v-bind:args="$props">
</attachment>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
module.exports = {
@ -17,8 +16,7 @@ module.exports = {
};
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
props: {

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -31,19 +9,4 @@
<p v-html="$t('conclusion')"></p>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,7 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'invoice',
async serverPrefetch() {
@ -13,8 +11,7 @@ module.exports = {
},
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
reference: {

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -29,19 +7,4 @@
<p v-html="$t('conclusion')"></p>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,11 +1,8 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'invoiceIn',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
}
};

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -60,29 +38,11 @@
</p>
</div>
</div>
<!-- Block -->
<div class="grid-row" v-if="isPreview">
<div class="grid-block vn-pa-ml">
<attachment v-for="attachment in attachments"
v-bind:key="attachment.filename"
v-bind:attachment="attachment"
v-bind:args="$props">
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
v-bind:attachment="attachment" v-bind:args="$props">
</attachment>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
module.exports = {
@ -28,8 +27,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
props: {

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -43,29 +21,11 @@
</p>
</div>
</div>
<!-- Block -->
<div class="grid-row" v-if="isPreview">
<div class="grid-block vn-pa-ml">
<attachment v-for="attachment in attachments"
v-bind:key="attachment.filename"
v-bind:attachment="attachment"
v-bind:args="$props">
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
v-bind:attachment="attachment" v-bind:args="$props">
</attachment>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
module.exports = {
@ -28,8 +27,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
props: {

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -29,7 +7,10 @@
<p v-html="$t('totalResolved', [resolvedTickets])"></p>
<p v-html="$t('grafanaLink')"></p>
<div class="external-link vn-pa-sm vn-m-md">
<a v-bind:href="'https://grafana.verdnatura.es/d/2kaHDi9Mk/osticket?orgId=1&from=' + startedTime + '&to=' + endedTime" target="_blank">
<a
v-bind:href="'https://grafana.verdnatura.es/d/2kaHDi9Mk/osticket?orgId=1&from=' + startedTime + '&to=' + endedTime"
target="_blank"
>
https://grafana.verdnatura.es/d/2kaHDi9Mk/osticket?orgId=1&from={{startedTime}}&to={{endedTime}}
</a>
</div>
@ -41,7 +22,6 @@
</div>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block vn-pa-ml" v-for="technician in technicians">
<div class="table-title clearfix">
@ -61,12 +41,8 @@
<tr>
<td>{{ticket.author}}</td>
<td class="font light-gray">
<div v-bind:title="$t('opened')">
&#128275; {{ticket.created | date('%d-%m-%Y %H:%M')}}
</div>
<div v-bind:title="$t('closed')">
&#128274; {{ticket.closed | date('%d-%m-%Y %H:%M')}}
</div>
<div v-bind:title="$t('opened')">&#128275; {{ticket.created | date('%d-%m-%Y %H:%M')}}</div>
<div v-bind:title="$t('closed')">&#128274; {{ticket.closed | date('%d-%m-%Y %H:%M')}}</div>
</td>
<td>
<a v-bind:href="'https://cau.verdnatura.es/scp/tickets.php?id=' + ticket.ticket_id">
@ -80,20 +56,4 @@
</table>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'osticket-report',
@ -61,8 +60,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {}
};

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -38,8 +16,7 @@
</section>
</p>
<p v-if="payMethod.code == 'bankDraft'"
v-html="$t('sections.pay.accountImplicates', [accountAddress])">
<p v-if="payMethod.code == 'bankDraft'" v-html="$t('sections.pay.accountImplicates', [accountAddress])">
</p>
<p v-else-if="payMethod.code == 'card'">
{{ $t('sections.pay.cardImplicates') }}
@ -48,19 +25,4 @@
<p>{{ $t('notifyAnError') }}</p>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'payment-update',
@ -21,8 +20,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
id: {

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -39,7 +17,6 @@
</ol>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{$t('sections.help.title')}}</h1>
@ -47,7 +24,6 @@
<p v-html="$t('sections.help.remoteSupport')"></p>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<div v-if="client.salesPersonName">
@ -58,33 +34,16 @@
</div>
<div v-if="client.salesPersonEmail">
{{$t('salesPersonEmail')}}:
<strong><a v-bind:href="`mailto:${client.salesPersonEmail}`" target="_blank">{{client.salesPersonEmail}}</strong>
<strong><a v-bind:href="`mailto:${client.salesPersonEmail}`"
target="_blank">{{client.salesPersonEmail}}</strong>
</div>
</div>
</div>
<!-- Block -->
<div class="grid-row" v-if="isPreview">
<div class="grid-block vn-pa-ml">
<attachment v-for="attachment in attachments"
v-bind:key="attachment.filename"
v-bind:attachment="attachment"
v-bind:args="$props">
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
v-bind:attachment="attachment" v-bind:args="$props">
</attachment>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
const attachments = require('./attachments.json');
@ -18,8 +17,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
props: {

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -29,29 +7,15 @@
<p>{{$t('description.conclusion')}}</p>
</div>
</div>
<!-- Attachments block -->
<div class="grid-row" v-if="isPreview">
<div class="grid-block vn-pa-ml">
<attachment v-for="attachment in attachments"
<attachment
v-for="attachment in attachments"
v-bind:key="attachment.filename"
v-bind:attachment="attachment"
v-bind:args="$props">
v-bind:args="$props"
>
</attachment>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,7 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const attachment = new Component('attachment');
const emailBody = new Component('email-body');
const attachments = require('./attachments.json');
module.exports = {
@ -10,9 +8,7 @@ module.exports = {
return {attachments};
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'attachment': attachment.build()
'email-body': emailBody.build()
},
props: {
id: {

View File

@ -1,26 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
<!-- Header block -->
<div class="grid-row">
<div class="grid-block">
<email-header v-bind="$props"></email-header>
</div>
</div>
<!-- Block -->
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
@ -28,19 +6,4 @@
<p v-html="$t('description', [minDate, maxDate])"></p>
</div>
</div>
<!-- Footer block -->
<div class="grid-row">
<div class="grid-block">
<email-footer v-bind="$props"></email-footer>
</div>
</div>
<!-- Empty block -->
<div class="grid-row">
<div class="grid-block empty"></div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'supplier-campaign-metrics',
@ -16,8 +15,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build()
},
props: {
id: {

View File

@ -1,41 +1,31 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props">
</report-header>
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<div class="columns">
<div class="size50">
<p style="text-align: right;">{{$t('Place')}} {{currentDate()}}</p>
<h3 style="text-align: center; margin-top: 8%;">{{$t('Compensation') | uppercase}}</h3>
<p style="margin-top: 8%;">{{$t('In one hand')}}:</p>
<p style="text-align: justify;">{{company.name}} {{$t('CIF')}} {{company.nif}} {{$t('Home')}} {{company.street}}, {{company.city}}.</p>
<p style="margin-top: 5%;">{{$t('In other hand')}}:</p>
<p style="text-align: justify;">{{$t('Sr')}} {{client.name}} {{$t('NIF')}} {{client.fi}} {{$t('Home')}} {{client.street}}, {{client.city}}.</p>
<h4 style="text-align: center;margin-top: 10%;">{{$t('Agree') | uppercase}}</h4>
<p style="margin-top: 8%;text-align: justify;">{{$t('Date')}} {{client.payed | date('%d-%m-%Y')}} {{$t('Compensate')}} {{client.amountPaid}} € {{$t('From client')}} {{client.name}} {{$t('To client')}} {{company.name}}.</p>
<p style="margin-top: 8%;">{{$t('Reception')}} <span style="color:blue">administracion@verdnatura.es</span></p>
<div style="margin-top: 8%;"><small >{{$t('Greetings')}}</small></div>
<p style="text-align: right">{{$t('Place')}} {{currentDate()}}</p>
<h3 style="text-align: center; margin-top: 8%">{{$t('Compensation') | uppercase}}</h3>
<p style="margin-top: 8%">{{$t('In one hand')}}:</p>
<p style="text-align: justify">
{{company.name}} {{$t('CIF')}} {{company.nif}} {{$t('Home')}} {{company.street}},
{{company.city}}.
</p>
<p style="margin-top: 5%">{{$t('In other hand')}}:</p>
<p style="text-align: justify">
{{$t('Sr')}} {{client.name}} {{$t('NIF')}} {{client.fi}} {{$t('Home')}} {{client.street}},
{{client.city}}.
</p>
<h4 style="text-align: center; margin-top: 10%">{{$t('Agree') | uppercase}}</h4>
<p style="margin-top: 8%; text-align: justify">
{{$t('Date')}} {{client.payed | date('%d-%m-%Y')}} {{$t('Compensate')}} {{client.amountPaid}} €
{{$t('From client')}} {{client.name}} {{$t('Toclient')}} {{company.name}}.
</p>
<p style="margin-top: 8%">
{{$t('Reception')}} <span style="color: blue">administracion@verdnatura.es</span>
</p>
<div style="margin-top: 8%"><small>{{$t('Greetings')}}</small></div>
</div>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</report-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
const reportBody = new Component('report-body');
module.exports = {
name: 'balance-compensation',
@ -23,8 +22,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
'report-body': reportBody.build()
},
props: {
id: {

View File

@ -1,13 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<div class="columns">
@ -37,15 +28,9 @@
<div class="header">{{$t('clientData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>
{{client.street}}
</div>
<div>
{{client.postcode}}, {{client.city}} ({{client.province}})
</div>
<div>
{{client.country}}
</div>
<div>{{client.street}}</div>
<div>{{client.postcode}}, {{client.city}} ({{client.province}})</div>
<div>{{client.country}}</div>
</div>
</div>
</div>
@ -66,30 +51,22 @@
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="sale.value5">
<strong>{{sale.tag5}}</strong> {{sale.value5}}
</span>
<span v-if="sale.value6">
<strong>{{sale.tag6}}</strong> {{sale.value6}}
</span>
<span v-if="sale.value7">
<strong>{{sale.tag7}}</strong> {{sale.value7}}
</span>
<span v-if="sale.value5"> <strong>{{sale.tag5}}</strong> {{sale.value5}} </span>
<span v-if="sale.value6"> <strong>{{sale.tag6}}</strong> {{sale.value6}} </span>
<span v-if="sale.value7"> <strong>{{sale.tag7}}</strong> {{sale.value7}} </span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind:center-text="client.socialName"
v-bind="$props">
v-bind="$props"
>
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportBody = new Component('report-body');
const reportFooter = new Component('report-footer');
module.exports = {
@ -20,7 +20,7 @@ module.exports = {
},
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,13 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<div class="columns">
@ -39,15 +30,9 @@
<div class="header">{{$t('clientData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.nickname}}</h3>
<div>
{{client.street}}
</div>
<div>
{{client.postalCode}}, {{client.city}} ({{client.province}})
</div>
<div>
{{client.country}}
</div>
<div>{{client.street}}</div>
<div>{{client.postalCode}}, {{client.city}} ({{client.province}})</div>
<div>{{client.country}}</div>
</div>
</div>
</div>
@ -80,15 +65,13 @@
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:left-text="$t('claim', [id])"
v-bind:center-text="client.name"
v-bind="$props">
v-bind="$props"
>
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportBody = new Component('report-body');
const reportFooter = new Component('report-footer');
module.exports = {
@ -27,7 +27,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,13 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<div class="columns">
@ -33,15 +24,9 @@
<div class="header">{{$t('clientData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>
{{client.street}}
</div>
<div>
{{client.postcode}}, {{client.city}} ({{client.province}})
</div>
<div>
{{client.country}}
</div>
<div>{{client.street}}</div>
<div>{{client.postcode}}, {{client.city}} ({{client.province}})</div>
<div>{{client.country}}</div>
</div>
</div>
</div>
@ -81,15 +66,13 @@
</table>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind:center-text="client.socialName"
v-bind="$props">
v-bind="$props"
>
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportBody = new Component('report-body');
const reportFooter = new Component('report-footer');
module.exports = {
@ -64,7 +64,7 @@ module.exports = {
},
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,21 +1,9 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<report-body v-bind="$props">
<div class="grid-row info-panel">
<div class="grid-block">
<h1 class="title centered uppercase">{{$t('fields.title')}}</h1>
</div>
</div>
<!-- Block -->
<table>
<tbody>
<tr>
@ -28,8 +16,6 @@
</tr>
</tbody>
</table>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="info-panel">
@ -109,8 +95,6 @@
</div>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="info-panel" style="width: 98%">
@ -150,12 +134,10 @@
</div>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div>
<table style="border-top: 1px solid #DDD" class="info-panel">
<table style="border-top: 1px solid #ddd" class="info-panel">
<tbody>
<tr class="row-oriented" style="width: 100%">
<td>{{$t('fields.personFilling')}}:</td>
@ -176,15 +158,7 @@
</div>
</div>
</div>
<!-- Footer block -->
<report-footer
id="pageFooter"
v-bind:left-text="dated"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
<template v-slot:footer>
<report-footer id="pageFooter" v-bind:left-text="dated" v-bind="$props"> </report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportBody = new Component('report-body')
const reportFooter = new Component('report-footer');
const rptCreditRequest = {
@ -12,7 +12,7 @@ const rptCreditRequest = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
}
};

View File

@ -1,15 +1,7 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props" v-bind:company-code="ticket.companyCode">
</report-header>
<!-- Block -->
<report-body v-bind="$props">
<template v-slot:header>
<report-header v-bind="$props" v-bind:company-code="ticket.companyCode"> </report-header>
</template>
<div class="grid-row">
<div class="grid-block">
<div class="columns">
@ -43,33 +35,22 @@
<div class="header">{{$t('deliveryAddress')}}</div>
<div class="body">
<h3 class="uppercase">{{address.nickname}}</h3>
<div>
{{address.street}}
</div>
<div>
{{address.postalCode}}, {{address.city}} ({{address.province}})
</div>
<div>{{address.street}}</div>
<div>{{address.postalCode}}, {{address.city}} ({{address.province}})</div>
</div>
</div>
<div class="panel">
<div class="header">{{$t('fiscalData')}}</div>
<div class="body">
<div>
{{client.socialName}}
</div>
<div>
{{client.street}}
</div>
<div>
{{client.fi}}
</div>
<div>{{client.socialName}}</div>
<div>{{client.street}}</div>
<div>{{client.fi}}</div>
</div>
</div>
</div>
</div>
<!-- Sales block -->
<h2>{{$t('saleLines')}}</h2>
<table class="column-oriented">
<thead>
@ -88,25 +69,18 @@
<td width="5%">{{sale.itemFk | zerofill('000000')}}</td>
<td class="number">{{sale.quantity}}</td>
<td width="50%">{{sale.concept}}</td>
<td class="number" v-if="showPrices">{{sale.price | currency('EUR',
$i18n.locale)}}</td>
<td class="centered" width="5%" v-if="showPrices">{{(sale.discount / 100) |
percentage}}</td>
<td class="number" v-if="showPrices">{{sale.price | currency('EUR', $i18n.locale)}}</td>
<td class="centered" width="5%" v-if="showPrices">{{(sale.discount / 100) | percentage}}</td>
<td class="centered" v-if="showPrices">{{sale.vatType}}</td>
<td class="number" v-if="showPrices">{{sale.price * sale.quantity * (1 -
sale.discount / 100) | currency('EUR', $i18n.locale)}}</td>
<td class="number" v-if="showPrices">
{{sale.price * sale.quantity * (1 - sale.discount / 100) | currency('EUR', $i18n.locale)}}
</td>
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="sale.value5">
<strong>{{sale.tag5}}</strong> {{sale.value5}}
</span>
<span v-if="sale.value6">
<strong>{{sale.tag6}}</strong> {{sale.value6}}
</span>
<span v-if="sale.value7">
<strong>{{sale.tag7}}</strong> {{sale.value7}}
</span>
<span v-if="sale.value5"> <strong>{{sale.tag5}}</strong> {{sale.value5}} </span>
<span v-if="sale.value6"> <strong>{{sale.tag6}}</strong> {{sale.value6}} </span>
<span v-if="sale.value7"> <strong>{{sale.tag7}}</strong> {{sale.value7}} </span>
</td>
</tr>
</tbody>
@ -119,10 +93,8 @@
</tr>
</tfoot>
</table>
<!-- End of sales block -->
<div class="columns vn-mb-ml">
<!-- Services block-->
<div class="size100 no-page-break" v-if="services.length > 0">
<h2>{{$t('services.title')}}</h2>
<table class="column-oriented">
@ -142,12 +114,10 @@
<td width="5%"></td>
<td class="number">{{service.quantity}}</td>
<td width="50%">{{service.description}}</td>
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}
</td>
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}</td>
<td class="centered" width="5%"></td>
<td class="centered">{{service.taxDescription}}</td>
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}
</td>
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
@ -161,10 +131,8 @@
</table>
<span class="font gray">* {{ $t('services.warning') }}</span>
</div>
<!-- End of services block -->
</div>
<div class="columns">
<!-- Packages block -->
<div id="packagings" class="size100 no-page-break" v-if="packagings.length > 0">
<h2>{{$t('packagings.title')}}</h2>
<table class="column-oriented">
@ -184,10 +152,8 @@
</tbody>
</table>
</div>
<!-- End of packages block -->
</div>
<div class="columns vn-mt-xl" v-if="showPrices">
<!-- Taxes block -->
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<table class="column-oriented">
<thead>
@ -206,9 +172,7 @@
<tbody>
<tr v-for="tax in taxes">
<td width="45%">{{tax.name}}</td>
<td width="25%" class="number">
{{tax.Base | currency('EUR', $i18n.locale)}}
</td>
<td width="25%" class="number">{{tax.Base | currency('EUR', $i18n.locale)}}</td>
<td>{{tax.vatPercent | percentage}}</td>
<td class="number">{{tax.tax | currency('EUR', $i18n.locale)}}</td>
</tr>
@ -216,23 +180,18 @@
<tfoot>
<tr class="font bold">
<td width="45%">{{$t('subtotal')}}</td>
<td width="20%" class="number">
{{getTotalBase() | currency('EUR', $i18n.locale)}}
</td>
<td width="20%" class="number">{{getTotalBase() | currency('EUR', $i18n.locale)}}</td>
<td></td>
<td class="number">{{getTotalTax()| currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="font bold">
<td colspan="2">{{$t('total')}}</td>
<td colspan="2" class="number">{{getTotal() | currency('EUR',
$i18n.locale)}}</td>
<td colspan="2" class="number">{{getTotal() | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
</div>
<!-- End of taxes block -->
<!-- Phytosanitary block -->
<div id="phytosanitary" class="size50 pull-left no-page-break">
<div class="panel">
<div class="body">
@ -241,9 +200,7 @@
<div class="size25">
<img v-bind:src="getReportSrc('europe.png')" />
</div>
<div class="size75 flag-text">
<strong>{{$t('plantPassport')}}</strong><br />
</div>
<div class="size75 flag-text"><strong>{{$t('plantPassport')}}</strong><br /></div>
</div>
</div>
<div class="phytosanitary-info">
@ -267,10 +224,8 @@
</div>
</div>
</div>
<!-- End of phytosanitary block -->
</div>
<div class="columns">
<!-- Signature block -->
<div class="size50 pull-left no-page-break">
<div id="signature" class="panel" v-if="signature && signature.id">
<div class="header">{{$t('digitalSignature')}}</div>
@ -280,10 +235,8 @@
</div>
</div>
</div>
<!-- End of signature block -->
</div>
<div class="columns vn-mb-ml" v-if="hasObservations">
<!-- Observations block-->
<div class="size100 no-page-break">
<h2>{{$t('observations')}}</h2>
<p class="observations">{{ticket.description}}</p>
@ -291,14 +244,14 @@
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter" v-bind:company-code="ticket.companyCode"
v-bind:left-text="footerType" v-bind:center-text="client.socialName" v-bind="$props">
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:company-code="ticket.companyCode"
v-bind:left-text="footerType"
v-bind:center-text="client.socialName"
v-bind="$props"
>
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</template>
</report-body>

View File

@ -1,5 +1,6 @@
const config = require(`vn-print/core/config`);
const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
const md5 = require('md5');
@ -58,7 +59,6 @@ module.exports = {
hasObservations() {
return this.ticket.description !== null;
}
},
methods: {
fetchClient(id) {
@ -126,6 +126,7 @@ module.exports = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
},

View File

@ -1,13 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<report-body v-bind="$props">
<div class="grid-row route-block" v-for="route in routes">
<div class="grid-block">
<h1 class="title uppercase">{{$t('route')}} {{route.id}}</h1>
@ -80,7 +71,6 @@
</div>
</div>
</div>
<!-- Route ticket list -->
<div v-if="route.tickets" v-for="ticket in route.tickets" class="no-page-break">
<div>
<table class="column-oriented repeatable">
@ -100,11 +90,8 @@
<td class="number">{{ticket.id}}</td>
<td width="50%">{{ticket.clientFk}} {{ticket.addressName}}</td>
<td v-if="ticket.addressFk" class="number">
{{ticket.addressFk.toString().substr(0,
ticket.addressFk.toString().length - 3)}}
<span class="black-container">
{{ticket.addressFk.toString().substr(-3, 3)}}
</span>
{{ticket.addressFk.toString().substr(0, ticket.addressFk.toString().length - 3)}}
<span class="black-container"> {{ticket.addressFk.toString().substr(-3, 3)}} </span>
</td>
<td class="number">{{ticket.packages}}</td>
<td>{{ticket.itemPackingTypes}}</td>
@ -148,14 +135,7 @@
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('routeId', [id])"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
<template v-slot:footer>
<report-footer id="pageFooter" v-bind:left-text="$t('routeId', [id])" v-bind="$props"> </report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportBody = new Component('report-body');
const reportFooter = new Component('report-footer');
module.exports = {
@ -39,7 +39,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,15 +1,7 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"
v-bind:company-code="entry.companyCode">
</report-header>
<!-- Block -->
<report-body v-bind="$props">
<template v-slot:header>
<report-header v-bind="$props" v-bind:company-code="entry.companyCode"></report-header>
</template>
<div class="grid-row">
<div class="grid-block">
<div class="columns">
@ -39,21 +31,13 @@
<div class="header">{{$t('supplierData')}}</div>
<div class="body">
<h3 class="uppercase">{{supplier.name}}</h3>
<div>
{{supplier.street}}
</div>
<div>
{{supplier.postCode}}, {{supplier.city}}, ({{supplier.province}})
</div>
<div>
{{supplier.nif}}
<div>{{supplier.street}}</div>
<div>{{supplier.postCode}}, {{supplier.city}}, ({{supplier.province}})</div>
<div>{{supplier.nif}}</div>
</div>
</div>
</div>
</div>
</div>
<!-- Buy block -->
<table class="column-oriented vn-mt-ml">
<thead>
<tr>
@ -72,19 +56,15 @@
<td width="50%">{{buy.itemName}}</td>
<td width="10%" class="number">{{buy.quantity | number($i18n.locale)}}</td>
<td width="15%" class="number">{{buy.buyingValue | currency('EUR', $i18n.locale)}}</td>
<td width="15%" class="number">{{buy.buyingValue * buy.quantity | currency('EUR', $i18n.locale)}}</td>
<td width="15%" class="number">
{{buy.buyingValue * buy.quantity | currency('EUR', $i18n.locale)}}
</td>
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="buy.value5">
<strong>{{buy.tag5}}</strong> {{buy.value5}}
</span>
<span v-if="buy.value6">
<strong>{{buy.tag6}}</strong> {{buy.value6}}
</span>
<span v-if="buy.value7">
<strong>{{buy.tag7}}</strong> {{buy.value7}}
</span>
<span v-if="buy.value5"> <strong>{{buy.tag5}}</strong> {{buy.value5}} </span>
<span v-if="buy.value6"> <strong>{{buy.tag6}}</strong> {{buy.value6}} </span>
<span v-if="buy.value7"> <strong>{{buy.tag7}}</strong> {{buy.value7}} </span>
</td>
</tr>
</tbody>
@ -97,31 +77,26 @@
</tr>
</tfoot>
</table>
<!-- End of buy block -->
<div class="columns">
<div class="size50">
<div id="notes" class="panel no-page-break" v-if="entry.notes">
<div class="body">
<h3>{{$t('notes')}}</h3>
<div>
{{entry.notes}}
<div>{{entry.notes}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:left-text="$t('entry', [entry.id])"
v-bind:company-code="entry.companyCode"
v-bind:center-text="supplier.name"
v-bind:="$props">
v-bind:="$props"
>
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</template>
</report-body>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
@ -35,6 +36,7 @@ module.exports = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
},

View File

@ -1,13 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<h1 class="title centered uppercase">{{$t('title')}}</h1>
@ -38,14 +29,7 @@
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('invoice', [invoice.ref])"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
<template v-slot:footer>
<report-footer id="pageFooter" v-bind:left-text="$t('invoice', [invoice.ref])" v-bind="$props"></report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportBody = new Component('report-body');
const reportFooter = new Component('report-footer');
module.exports = {
@ -25,7 +25,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,19 +1,9 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<h1 class="title uppercase">{{$t('title')}}</h1>
</div>
</div>
<!-- Block -->
<div class="grid-row vn-mb-lg" v-for="travel in travels">
<div class="grid-block">
<div class="panel">
@ -71,14 +61,7 @@
</table>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="dated"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
<template v-slot:footer>
<report-footer id="pageFooter" v-bind:left-text="dated" v-bind="$props"></report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportBody = new Component('report-body');
const reportFooter = new Component('report-footer');
const db = require(`vn-print/core/database`);
@ -100,7 +100,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: [

View File

@ -1,25 +1,20 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<p v-html="$t('description', {
<p
v-html="$t('description', {
socialName: client.socialName,
name: client.name,
address: client.street,
country: client.country,
fiscalID: client.fi
})"></p>
<p v-html="$t('declaration', {
})"
></p>
<p
v-html="$t('declaration', {
socialName: client.socialName
})"></p>
})"
></p>
<p
v-for="(declaration, $index) in $t('declarations')"
v-html="$t('declarations[' + $index + ']', {
@ -27,14 +22,13 @@
companyCity: company.city,
socialName: client.socialName,
destinationCountry: client.country
})">
</p>
})"
></p>
<div class="columns">
<div class="size50 signature">
<p class="centered">{{client.name}}</p>
<div class="dummy-signature centered"></div>
<p>
<table>
<tbody>
<tr>
@ -51,34 +45,17 @@
</tr>
</tbody>
</table>
</p>
</div>
<div class="size50 signature centered">
<p>{{ company.name }}</p>
<img v-bind:src="getReportSrc('signature.png')">
<p>
<img v-bind:src="getReportSrc('signature.png')" />
<div>{{company.manager}}</div>
<div>{{$t('manager')}}</div>
<p>{{$t('issued', [
company.city,
issued.getDate(),
$t('months')[issued.getMonth()],
issued.getFullYear()])
}}
</p>
</p>
</div>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
<template v-slot:footer>
<report-footer id="pageFooter" v-bind:left-text="$t('client', [client.id])" v-bind="$props"></report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportBody = new Component('report-body');
const reportFooter = new Component('report-footer');
module.exports = {
@ -16,7 +16,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,15 +1,7 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid no-page-break page-break-after">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"
v-bind:company-code="invoice.companyCode">
</report-header>
<!-- Block -->
<report-body v-bind="$props">
<template v-slot:header>
<report-header v-bind="$props" v-bind:company-code="invoice.companyCode"></report-header>
</template>
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
@ -39,15 +31,9 @@
<div class="header">{{$t('invoiceData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>
{{client.postalAddress}}
</div>
<div>
{{client.postcodeCity}}
</div>
<div>
{{$t('fiscalId')}}: {{client.fi}}
</div>
<div>{{client.postalAddress}}</div>
<div>{{client.postcodeCity}}</div>
<div>{{$t('fiscalId')}}: {{client.fi}}</div>
</div>
</div>
</div>
@ -56,19 +42,14 @@
<div id="incoterms" class="panel">
<div class="header">{{$t('incotermsTitle')}}</div>
<div class="body">
<table class="row-oriented">
<tbody>
<tr>
<th>
{{$t('incoterms')}}
</th>
<th>{{$t('incoterms')}}</th>
<td>{{incoterms.incotermsFk}} - {{incoterms.incotermsName}}</td>
</tr>
<tr>
<th>
{{$t('productDescription')}}
</th>
<th>{{$t('productDescription')}}</th>
<td>{{incoterms.intrastat}}</td>
</tr>
<tr>
@ -90,7 +71,6 @@
</tbody>
</table>
<p>
<div class="font bold">
<span>{{$t('customsInfo')}}</span>
<span>{{incoterms.customsAgentName}}</span>
@ -99,15 +79,10 @@
<span>(</span>
<span>{{incoterms.customsAgentNif}}</span>
<span>{{incoterms.customsAgentStreet}}</span>
<span v-if="incoterms.customsAgentPhone">
&#9742; {{incoterms.customsAgentPhone}}
</span>
<span v-if="incoterms.customsAgentEmail">
&#9993; {{incoterms.customsAgentEmail}}
</span>
<span v-if="incoterms.customsAgentPhone"> &#9742; {{incoterms.customsAgentPhone}} </span>
<span v-if="incoterms.customsAgentEmail"> &#9993; {{incoterms.customsAgentEmail}} </span>
<span>)</span>
</div>
</p>
<p>
<strong>{{$t('productDisclaimer')}}</strong>
</p>
@ -115,9 +90,5 @@
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
<template v-slot:footer>&nbsp;</template>
</report-body>

View File

@ -1,6 +1,6 @@
const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
module.exports = {
name: 'invoice-incoterms',
@ -27,8 +27,8 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
'report-body': reportBody.build(),
'report-header': reportHeader.build()
},
props: {
reference: {

View File

@ -1,22 +1,8 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Incoterms block -->
<invoice-incoterms
v-if="hasIncoterms"
v-bind="$props">
</invoice-incoterms>
<!-- Header block -->
<report-header v-bind="$props"
v-bind:company-code="invoice.companyCode">
</report-header>
<!-- Block -->
<report-body v-bind="$props">
<invoice-incoterms v-if="hasIncoterms" v-bind="$props"> </invoice-incoterms>
<template v-slot:header>
<report-header v-bind="$props" v-bind:company-code="invoice.companyCode"></report-header>
</template>
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
@ -46,21 +32,13 @@
<div class="header">{{$t('invoiceData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>
{{client.postalAddress}}
</div>
<div>
{{client.postcodeCity}}
</div>
<div>
{{$t('fiscalId')}}: {{client.fi}}
<div>{{client.postalAddress}}</div>
<div>{{client.postcodeCity}}</div>
<div>{{$t('fiscalId')}}: {{client.fi}}</div>
</div>
</div>
</div>
</div>
</div>
<!-- Rectified invoices block -->
<div class="size100 no-page-break" v-if="rectified.length > 0">
<h2>{{$t('rectifiedInvoices')}}</h2>
<table class="column-oriented">
@ -82,13 +60,10 @@
</tbody>
</table>
</div>
<!-- End of rectified invoices block -->
<!-- Sales block -->
<div class="vn-mt-lg" v-for="ticket in tickets">
<div class="table-title clearfix">
<div class="pull-left">
<h2>{{$t('deliveryNote')}}</strong>
<h2>{{$t('deliveryNote')}}</h2>
</div>
<div class="pull-left vn-mr-md">
<div class="field rectangle">
@ -131,15 +106,9 @@
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="sale.value5">
<strong>{{sale.tag5}}</strong> {{sale.value5}}
</span>
<span v-if="sale.value6">
<strong>{{sale.tag6}}</strong> {{sale.value6}}
</span>
<span v-if="sale.value7">
<strong>{{sale.tag7}}</strong> {{sale.value7}}
</span>
<span v-if="sale.value5"> <strong>{{sale.tag5}}</strong> {{sale.value5}} </span>
<span v-if="sale.value6"> <strong>{{sale.tag6}}</strong> {{sale.value6}} </span>
<span v-if="sale.value7"> <strong>{{sale.tag7}}</strong> {{sale.value7}} </span>
</td>
</tr>
</tbody>
@ -153,10 +122,8 @@
</tfoot>
</table>
</div>
<!-- End of sales block -->
<div class="columns vn-mt-xl">
<!-- Taxes block -->
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<table class="column-oriented">
<thead>
@ -167,9 +134,7 @@
<thead class="light">
<tr>
<th width="45%">{{$t('type')}}</th>
<th width="25%" class="number">
{{$t('taxBase')}}
</th>
<th width="25%" class="number">{{$t('taxBase')}}</th>
<th>{{$t('tax')}}</th>
<th class="number">{{$t('fee')}}</th>
</tr>
@ -177,9 +142,7 @@
<tbody>
<tr v-for="tax in taxes">
<td width="45%">{{tax.name}}</td>
<td width="25%" class="number">
{{tax.base | currency('EUR', $i18n.locale)}}
</td>
<td width="25%" class="number">{{tax.base | currency('EUR', $i18n.locale)}}</td>
<td>{{tax.vatPercent | percentage}}</td>
<td class="number">{{tax.vat | currency('EUR', $i18n.locale)}}</td>
</tr>
@ -207,9 +170,6 @@
</div>
</div>
</div>
<!-- End of taxes block -->
<!-- Phytosanitary block -->
<div id="phytosanitary" class="size50 pull-left no-page-break">
<div class="panel">
<div class="body">
@ -218,9 +178,7 @@
<div class="size25">
<img v-bind:src="getReportSrc('europe.png')" />
</div>
<div class="size75 flag-text">
<strong>{{$t('plantPassport')}}</strong><br/>
</div>
<div class="size75 flag-text"><strong>{{$t('plantPassport')}}</strong><br /></div>
</div>
</div>
<div class="phytosanitary-info">
@ -244,11 +202,7 @@
</div>
</div>
</div>
<!-- End of phytosanitary block -->
</div>
<!-- Intrastat block -->
<div class="size100 no-page-break" v-if="intrastat.length > 0">
<h2>{{$t('intrastat')}}</h2>
<table class="column-oriented">
@ -286,9 +240,6 @@
</tfoot>
</table>
</div>
<!-- End of intrastat block -->
<!-- Observations block -->
<div class="columns vn-mt-xl" v-if="invoice.payMethodCode == 'wireTransfer'">
<div class="size50 pull-left no-page-break">
<div class="panel">
@ -300,20 +251,16 @@
</div>
</div>
</div>
<!-- End of observations block -->
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:company-code="invoice.companyCode"
v-bind:left-text="$t('invoiceRef', [invoice.ref])"
v-bind:center-text="client.socialName"
v-bind="$props">
v-bind="$props"
>
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</template>
</report-body>

View File

@ -1,5 +1,6 @@
const Component = require(`vn-print/core/component`);
const Report = require(`vn-print/core/report`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
const invoiceIncoterms = new Report('invoice-incoterms');
@ -110,6 +111,7 @@ module.exports = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build(),
'invoice-incoterms': invoiceIncoterms.build()

View File

@ -1,16 +1,7 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"
v-bind:company-code="invoice.companyCode">
</report-header>
<!-- Block -->
<report-body v-bind="$props">
<template v-slot:header>
<report-header v-bind="$props" v-bind:company-code="invoice.companyCode"></report-header>
</template>
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
@ -40,18 +31,10 @@
<div class="header">{{$t('invoiceData')}}</div>
<div class="body">
<h3 class="uppercase">{{invoice.name}}</h3>
<div>
{{invoice.postalAddress}}
</div>
<div>
{{invoice.postcodeCity}}
</div>
<div v-if="invoice.nif">
{{$t('fiscalId')}}: {{invoice.nif}}
</div>
<div v-if="invoice.phone">
{{$t('phone')}}: {{invoice.phone}}
</div>
<div>{{invoice.postalAddress}}</div>
<div>{{invoice.postcodeCity}}</div>
<div v-if="invoice.nif">{{$t('fiscalId')}}: {{invoice.nif}}</div>
<div v-if="invoice.phone">{{$t('phone')}}: {{invoice.phone}}</div>
</div>
</div>
</div>
@ -60,7 +43,7 @@
<div class="vn-mt-lg" v-for="entry in entries">
<div class="table-title clearfix">
<div class="pull-left">
<h2>{{$t('invoiceId')}}</strong>
<h2>{{$t('invoiceId')}}</h2>
</div>
<div class="pull-left vn-mr-md">
<div class="field rectangle">
@ -104,15 +87,9 @@
</tr>
<tr class="description font light-gray">
<td colspan="4">
<span v-if="buy.value5">
<strong>{{buy.tag5}}</strong> {{buy.value5}}
</span>
<span v-if="buy.value6">
<strong>{{buy.tag6}}</strong> {{buy.value6}}
</span>
<span v-if="buy.value7">
<strong>{{buy.tag7}}</strong> {{buy.value7}}
</span>
<span v-if="buy.value5"> <strong>{{buy.tag5}}</strong> {{buy.value5}} </span>
<span v-if="buy.value6"> <strong>{{buy.tag6}}</strong> {{buy.value6}} </span>
<span v-if="buy.value7"> <strong>{{buy.tag7}}</strong> {{buy.value7}} </span>
</td>
</tr>
</tbody>
@ -126,10 +103,7 @@
</tfoot>
</table>
</div>
<!-- End of sales block -->
<div class="columns vn-mt-xl">
<!-- Taxes block -->
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<table class="column-oriented">
<thead>
@ -140,9 +114,7 @@
<thead class="light">
<tr>
<th width="45%">{{$t('type')}}</th>
<th width="25%" class="number">
{{$t('taxBase')}}
</th>
<th width="25%" class="number">{{$t('taxBase')}}</th>
<th>{{$t('tax')}}</th>
<th class="number">{{$t('fee')}}</th>
</tr>
@ -150,9 +122,7 @@
<tbody>
<tr v-for="tax in taxes">
<td width="45%">{{tax.name}}</td>
<td width="25%" class="number">
{{tax.taxableBase | currency('EUR', $i18n.locale)}}
</td>
<td width="25%" class="number">{{tax.taxableBase | currency('EUR', $i18n.locale)}}</td>
<td>{{tax.rate | percentage}}</td>
<td class="number">{{tax.vat | currency('EUR', $i18n.locale)}}</td>
</tr>
@ -180,9 +150,6 @@
</div>
</div>
</div>
<!-- End of taxes block -->
<!-- Observations block -->
<div class="columns vn-mt-xl">
<div class="size50 pull-left no-page-break">
<div class="panel">
@ -194,21 +161,17 @@
</div>
</div>
</div>
<!-- End of observations block -->
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:company-code="invoice.companyCode"
v-bind:left-text="$t('invoiceId')"
v-bind:center-text="invoice.name"
v-bind="$props">
v-bind="$props"
>
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</template>
</report-body>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
@ -82,6 +83,7 @@ module.exports = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build(),
},

View File

@ -1,10 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<report-body v-bind="$props">
<div class="label">
<div class="barcode">
<h1>{{item.id}}</h1>
@ -26,10 +20,4 @@
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</report-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
const reportBody = new Component('report-body');
const qrcode = require('qrcode');
module.exports = {
@ -50,8 +49,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
'report-body': reportBody.build()
},
props: {
id: {

View File

@ -1,13 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<div class="columns">
@ -33,15 +24,9 @@
<div class="header">{{$t('clientData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>
{{client.street}}
</div>
<div>
{{client.postcode}}, {{client.city}} ({{client.province}})
</div>
<div>
{{client.country}}
</div>
<div>{{client.street}}</div>
<div>{{client.postcode}}, {{client.city}} ({{client.province}})</div>
<div>{{client.country}}</div>
</div>
</div>
</div>
@ -81,15 +66,13 @@
</table>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind:center-text="client.socialName"
v-bind="$props">
v-bind="$props"
>
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportBody = new Component('report-body');
const reportFooter = new Component('report-footer');
module.exports = {
@ -58,7 +58,7 @@ module.exports = {
},
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,45 +1,30 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<div class="content">
<h1 class="title centered uppercase">{{$t('title')}}</h1>
<p class="centered">
Recibo de <strong class="uppercase">{{client.socialName}}</strong>,
la cantidad de <strong>{{receipt.amountPaid}} €</strong> en concepto de 'entrega a cuenta',
quedando pendiente en la cuenta del cliente
un saldo de <strong>{{receipt.amountUnpaid}} €</strong>.
Recibo de <strong class="uppercase">{{client.socialName}}</strong>, la cantidad de
<strong>{{receipt.amountPaid}} €</strong> en concepto de 'entrega a cuenta', quedando pendiente en
la cuenta del cliente un saldo de <strong>{{receipt.amountUnpaid}} €</strong>.
</p>
<div class="signature">
<img v-bind:src="getReportSrc('signature.png')">
<p class="centered">{{$t('payed', [
'Algemesí',
receipt.payed.getDate(),
$t('months')[receipt.payed.getMonth()],
receipt.payed.getFullYear()])
}}
<img v-bind:src="getReportSrc('signature.png')" />
<p class="centered">
{{$t('payed', [ 'Algemesí', receipt.payed.getDate(), $t('months')[receipt.payed.getMonth()],
receipt.payed.getFullYear()]) }}
</p>
</div>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind:center-text="client.socialName"
v-bind="$props">
v-bind="$props"
>
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportBody = new Component('report-body');
const reportFooter = new Component('report-footer');
module.exports = {
@ -20,7 +20,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,41 +1,22 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<report-body v-bind="$props">
<div class="grid-row no-page-break page-break-after">
<div class="grid-block">
<div class="content">
<h1 class="title centered uppercase">{{$t('instructions.title')}}</h1>
<p class="centered">
1. {{$t('instructions.accountFields')}}
</p>
<p class="centered">
2. {{$t('instructions.signDocument')}}
</p>
<p class="centered">
{{$t('instructions.thanks')}}
</p>
<p class="centered">1. {{$t('instructions.accountFields')}}</p>
<p class="centered">2. {{$t('instructions.signDocument')}}</p>
<p class="centered">{{$t('instructions.thanks')}}</p>
</div>
</div>
</div>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<h1 class="title centered">{{$t('title')}}</h1>
<div class="panel supplierPanel" style="width: 98%">
<div class="body">
<div class="vertical-text">
{{$t('supplier.toCompleteBySupplier')}}
</div>
<div class="vertical-text">{{$t('supplier.toCompleteBySupplier')}}</div>
<table class="row-oriented">
<tbody>
@ -78,9 +59,7 @@
<div class="panel" style="width: 98%">
<div class="body">
<div class="vertical-text">
{{$t('client.toCompleteByClient')}}
</div>
<div class="vertical-text">{{$t('client.toCompleteByClient')}}</div>
<table class="row-oriented">
<tbody>
@ -92,9 +71,7 @@
<th>{{client.socialName}}</th>
</tr>
<tr>
<td>
{{$t('client.fiscalId')}}
</td>
<td>{{$t('client.fiscalId')}}</td>
<th>{{client.fi}}</th>
</tr>
<tr>
@ -139,11 +116,9 @@
<tr>
<td class="description" colspan="2">
<div class="line">
<span>{{$t('client.accountNumberFormat', [
$t(`${client.country}`),
client.ibanLength,
client.countryCode
])}}
<span
>{{$t('client.accountNumberFormat', [ $t(`${client.country}`),
client.ibanLength, client.countryCode ])}}
</span>
</div>
</td>
@ -187,15 +162,13 @@
<p class="font small">{{$t('sendOrder')}}</p>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:left-text="$t('order', [supplier.mandateCode])"
v-bind:center-text="client.socialName"
v-bind="$props">
v-bind="$props"
>
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</template>
</report-body>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
@ -35,6 +36,7 @@ const rptSepaCore = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
},

View File

@ -1,13 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<div class="columns">
@ -37,15 +28,9 @@
<div class="header">{{$t('supplierData')}}</div>
<div class="body">
<h3 class="uppercase">{{supplier.supplierName}}</h3>
<div>
{{supplier.street}}
</div>
<div>
{{supplier.postcode}}, {{supplier.city}} ({{supplier.province}})
</div>
<div>
{{supplier.country}}
</div>
<div>{{supplier.street}}</div>
<div>{{supplier.postcode}}, {{supplier.city}} ({{supplier.province}})</div>
<div>{{supplier.country}}</div>
</div>
</div>
</div>
@ -74,32 +59,23 @@
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="buy.value5">
<strong>{{buy.tag5}}</strong> {{buy.value5}}
</span>
<span v-if="buy.value6">
<strong>{{buy.tag6}}</strong> {{buy.value6}}
</span>
<span v-if="buy.value7">
<strong>{{buy.tag7}}</strong> {{buy.value7}}
</span>
<span v-if="buy.value5"> <strong>{{buy.tag5}}</strong> {{buy.value5}} </span>
<span v-if="buy.value6"> <strong>{{buy.tag6}}</strong> {{buy.value6}} </span>
<span v-if="buy.value7"> <strong>{{buy.tag7}}</strong> {{buy.value7}} </span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:left-text="$t('supplier', [supplier.id])"
v-bind:center-text="supplier.supplierName"
v-bind="$props">
v-bind="$props"
>
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportBody = new Component('report-body');
const reportFooter = new Component('report-footer');
module.exports = {
@ -44,7 +44,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,13 +1,4 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<div class="content">
@ -31,9 +22,4 @@
</table>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</report-body>

View File

@ -1,6 +1,5 @@
const Component = require(`${appPath}/core/component`);
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
const reportBody = new Component('report-body');
module.exports = {
name: 'vehicle-event-expired',
@ -16,8 +15,7 @@ module.exports = {
},
},
components: {
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
'report-body': reportBody.build()
},
props: {
eventIds: {

View File

@ -1,16 +1,5 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<report-body v-bind="$props">
<div class="text">{{zone.agencyName}}</div>
<div class="text">{{zone.id}}</div>
<div class="text">{{zone.plateNumber}} {{zone.time | date('%H:%M')}}</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</report-body>

View File

@ -1,3 +1,6 @@
const Component = require(`${appPath}/core/component`);
const reportBody = new Component('report-body');
module.exports = {
name: 'zone',
async serverPrefetch() {
@ -11,6 +14,9 @@ module.exports = {
return this.findOneFromDef('zone', [id]);
}
},
components: {
'report-body': reportBody.build()
},
props: {
id: {
type: Number,