supplier consumption email and fix report
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
e1ac64a8d9
commit
a13b554a26
|
@ -0,0 +1,8 @@
|
|||
const Stylesheet = require(`${appPath}/core/stylesheet`);
|
||||
|
||||
module.exports = new Stylesheet([
|
||||
`${appPath}/common/css/spacing.css`,
|
||||
`${appPath}/common/css/misc.css`,
|
||||
`${appPath}/common/css/layout.css`,
|
||||
`${appPath}/common/css/email.css`])
|
||||
.mergeStyles();
|
|
@ -0,0 +1,6 @@
|
|||
[
|
||||
{
|
||||
"filename": "supplier-campaign-metrics.pdf",
|
||||
"component": "supplier-campaign-metrics"
|
||||
}
|
||||
]
|
|
@ -0,0 +1,8 @@
|
|||
subject: Informe de consumo
|
||||
title: Informe de consumo
|
||||
dear: Estimado cliente
|
||||
description: Tal y como nos ha solicitado nos complace
|
||||
relacionarle a continuación el consumo que nos consta en su cuenta para las
|
||||
fechas comprendidas entre <strong>{0}</strong> y <strong>{1}</strong>.
|
||||
Espero le sea de utilidad para preparar su pedido.<br/><br/>
|
||||
Al mismo tiempo aprovecho la ocasión para saludarle cordialmente.
|
|
@ -0,0 +1,46 @@
|
|||
<!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 -->
|
||||
<div class="grid-row">
|
||||
<div class="grid-block vn-pa-lg">
|
||||
<h1>{{ $t('title') }}</h1>
|
||||
<p>{{$t('dear')}},</p>
|
||||
<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>
|
|
@ -0,0 +1,33 @@
|
|||
const Component = require(`${appPath}/core/component`);
|
||||
const emailHeader = new Component('email-header');
|
||||
const emailFooter = new Component('email-footer');
|
||||
|
||||
module.exports = {
|
||||
name: 'supplier-campaign-metrics',
|
||||
created() {
|
||||
this.filters = this.$options.filters;
|
||||
},
|
||||
computed: {
|
||||
minDate: function() {
|
||||
return this.filters.date(this.from, '%d-%m-%Y');
|
||||
},
|
||||
maxDate: function() {
|
||||
return this.filters.date(this.to, '%d-%m-%Y');
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'email-header': emailHeader.build(),
|
||||
'email-footer': emailFooter.build()
|
||||
},
|
||||
props: {
|
||||
recipientId: {
|
||||
required: true
|
||||
},
|
||||
from: {
|
||||
required: true
|
||||
},
|
||||
to: {
|
||||
required: true
|
||||
}
|
||||
}
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
.column-oriented {
|
||||
margin-top: 50px !important;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.bottom-line > tr {
|
||||
|
@ -9,3 +9,12 @@
|
|||
.bottom-line tr:nth-last-child() {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-weight: 100;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.description strong {
|
||||
text-transform: uppercase;
|
||||
}
|
|
@ -50,61 +50,44 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="no-page-break" v-for="entry in entries" v-if="entry.buys">
|
||||
<div v-for="entry in entries" v-if="entry.buys">
|
||||
<h2>
|
||||
<span>{{$t('entry')}} {{entry.id}}</span>
|
||||
<span>{{$t('dated')}} {{entry.shipped | date('%d-%m-%Y')}}</span>
|
||||
<span class="pull-right">{{$t('reference')}} {{entry.ref}}</span>
|
||||
</h2>
|
||||
<table class="column-oriented repeatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="align-right">{{$t('entry')}}</th>
|
||||
<td>{{entry.id}}</td>
|
||||
<th class="align-right">{{$t('dated')}}</th>
|
||||
<td>{{entry.shipped | date('%d-%m-%Y')}}</td>
|
||||
<th class="align-right">{{$t('reference')}}</th>
|
||||
<td>{{entry.ref}}</td>
|
||||
<th width="50%">{{$t('itemName')}}</th>
|
||||
<th>{{$t('Quantity')}}</th>
|
||||
<th>{{$t('price')}}</th>
|
||||
<th>{{$t('total')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody v-for="buy in entry.buys" class="no-page-break">
|
||||
<tr>
|
||||
<td width="50%">{{buy.itemName}}</td>
|
||||
<td>{{buy.quantity}}</td>
|
||||
<td>{{buy.price | currency('EUR', $i18n.locale)}}</td>
|
||||
<td>{{buy.quantity * buy.price | 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>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="no-page-break">
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="column-oriented">
|
||||
<th width="50%">{{$t('itemName')}}</th>
|
||||
<th>{{$t('Quantity')}}</th>
|
||||
<th>{{$t('price')}}</th>
|
||||
<th>{{$t('total')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody v-for="buy in entry.buys">
|
||||
<tr>
|
||||
<td width="50%">{{buy.itemName}}</td>
|
||||
<td>{{buy.quantity}}</td>
|
||||
<td>{{buy.price | currency('EUR', $i18n.locale)}}</td>
|
||||
<td>{{buy.quantity * buy.price | currency('EUR', $i18n.locale)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2">
|
||||
<div v-if="buy.value5">
|
||||
<strong class="font gray">{{buy.tag5}}</strong>
|
||||
<span>{{buy.value5}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" class="centered">
|
||||
<div v-if="buy.value6">
|
||||
<strong class="font gray">{{buy.tag6}}</strong>
|
||||
<span>{{buy.value6}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" class="align-right">
|
||||
<div v-if="buy.value7">
|
||||
<strong class="font gray">{{buy.tag7}}</strong>
|
||||
<span>{{buy.value7}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue