item summary fix & css report fixes

This commit is contained in:
Joan Sanchez 2019-02-06 10:53:12 +01:00
parent c531d849a1
commit 35bd82c9cb
48 changed files with 215 additions and 323 deletions

View File

@ -5,7 +5,32 @@ vn-client-sample-create {
}
tpl-body {
min-width: 800px
min-width: 800px;
.container, .container h1 {
font-family: "Roboto","Helvetica","Arial",sans-serif;
font-size: 1em !important;
h1 {
font-weight: bold;
margin: auto
}
p {
margin: 1em 0
}
footer p {
font-size: 10px !important;
line-height: 10px
}
}
.title h1 {
font-size: 2em !important;
margin: 0
}
}
}
}

View File

@ -46,7 +46,7 @@
<div class="attributes">
<h5>{{$ctrl.item.id}}</h5>
<vn-label-value label="Name"
value="{{::$ctrl.item.name}}">
value="{{$ctrl.item.name}}">
</vn-label-value>
<vn-label-value label="Buyer"
value="{{$ctrl.item.itemType.worker.user.nickname}}">

View File

@ -36,7 +36,7 @@
value="{{$ctrl.summary.item.origin.name}}">
</vn-label-value>
<vn-label-value label="stems"
value="{{$ctrl.summary.item.origin.stems}}">
value="{{$ctrl.summary.item.stems}}">
</vn-label-value>
<vn-label-value label="Buyer"
value="{{$ctrl.summary.item.itemType.worker.user.nickname}}">

View File

@ -67,6 +67,7 @@ class Controller {
this.$scope.model.save().then(() => {
this.$scope.watcher.notifySaved();
this.$scope.model.refresh();
this.card.reload();
});
}
}
@ -75,5 +76,8 @@ Controller.$inject = ['$stateParams', '$scope'];
ngModule.component('vnItemTags', {
template: require('./index.html'),
controller: Controller
controller: Controller,
require: {
card: '^vnItemCard'
}
});

View File

@ -37,4 +37,4 @@ body {
font-size: 32px;
color: #333;
margin: 0
}
}

View File

@ -1,7 +1,6 @@
.container {
font-family: arial, sans-serif;
font-size: 16px;
zoom: 0.55
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
font-size: 16px
}
.columns {

View File

@ -0,0 +1,10 @@
body {
zoom: 0.55
}
.title {
margin-bottom: 20px;
font-weight: 100;
margin-top: 0;
font-size: 2em
}

View File

@ -11,6 +11,7 @@
{"type": "report", "name": "rpt-claim-pickup-order"},
{"type": "report", "name": "rpt-letter-debtor"},
{"type": "report", "name": "rpt-sepa-core"},
{"type": "report", "name": "rpt-informe"},
{"type": "static", "name": "email-header"},
{"type": "static", "name": "email-footer"},
{"type": "static", "name": "report-header"},

View File

@ -2,5 +2,6 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${__dirname}/style.css`])
`${appPath}/common/css/email.css`,
`${appPath}/common/css/misc.css`])
.mergeStyles();

View File

@ -5,7 +5,9 @@
</head>
<body>
<section class="container">
<!-- Header component -->
<email-header></email-header>
<!-- End header component -->
<section class="main">
<!-- Title block -->
<div class="title">
@ -26,7 +28,9 @@
<p>{{$t('sections.howToBuy.stock')}}</p>
<p>{{$t('sections.howToBuy.delivery')}}</p> -->
</section>
<!-- Footer component -->
<email-footer :locale="locale"></email-footer>
<!-- End footer component -->
</section>
</body>
</html>

View File

@ -2,5 +2,6 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${__dirname}/style.css`])
`${appPath}/common/css/email.css`,
`${appPath}/common/css/misc.css`])
.mergeStyles();

View File

@ -1,40 +0,0 @@
body {
background-color: #EEE
}
.container {
max-width: 600px;
min-width: 320px;
margin: 0 auto;
color: #555
}
.main {
background-color: #FFF;
padding: 20px
}
.main a {
color: #8dba25
}
.main h1 {
color: #999
}
.main h3 {
font-size: 16px
}
.title {
background-color: #95d831;
text-transform: uppercase;
text-align: center;
padding: 35px 0
}
.title h1 {
font-size: 32px;
color: #333;
margin: 0
}

View File

@ -5,7 +5,9 @@
</head>
<body>
<section class="container">
<!-- Header component -->
<email-header></email-header>
<!-- End header component -->
<section class="main">
<!-- Title block -->
<div class="title">
@ -62,7 +64,9 @@
</section>
</p>
</section>
<!-- Footer component -->
<email-footer :locale="locale"></email-footer>
<!-- End footer component -->
</section>
</body>
</html>

View File

@ -2,5 +2,6 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${__dirname}/style.css`])
`${appPath}/common/css/email.css`,
`${appPath}/common/css/misc.css`])
.mergeStyles();

View File

@ -1,42 +0,0 @@
body {
background-color: #EEE
}
.container {
font-family: arial, sans-serif;
max-width: 600px;
min-width: 320px;
font-size: 16px;
margin: 0 auto;
color: #555
}
.main {
background-color: #FFF;
padding: 20px
}
.main a {
color: #8dba25
}
.main h1 {
color: #999
}
.main h3 {
font-size: 16px
}
.title {
background-color: #95d831;
text-transform: uppercase;
text-align: center;
padding: 35px 0
}
.title h1 {
font-size: 32px;
color: #333;
margin: 0
}

View File

@ -8,7 +8,6 @@
<!-- Header component -->
<email-header></email-header>
<!-- End header component -->
<section class="main">
<!-- Title block -->
<div class="title">

View File

@ -2,5 +2,6 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${__dirname}/style.css`])
`${appPath}/common/css/email.css`,
`${appPath}/common/css/misc.css`])
.mergeStyles();

View File

@ -1,42 +0,0 @@
body {
background-color: #EEE
}
.container {
font-family: arial, sans-serif;
max-width: 600px;
min-width: 320px;
font-size: 16px;
margin: 0 auto;
color: #555
}
.main {
background-color: #FFF;
padding: 20px
}
.main a {
color: #8dba25
}
.main h1 {
color: #999
}
.main h3 {
font-size: 16px
}
.title {
background-color: #95d831;
text-transform: uppercase;
text-align: center;
padding: 35px 0
}
.title h1 {
font-size: 32px;
color: #333;
margin: 0
}

View File

@ -8,7 +8,6 @@
<!-- Header component -->
<email-header></email-header>
<!-- End header component -->
<section class="main">
<!-- Title block -->
<div class="title">

View File

@ -2,5 +2,6 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${__dirname}/style.css`])
`${appPath}/common/css/email.css`,
`${appPath}/common/css/misc.css`])
.mergeStyles();

View File

@ -1,39 +0,0 @@
body {
background-color: #EEE
}
.container {
max-width: 600px;
min-width: 320px;
margin: 0 auto;
color: #555
}
.main {
background-color: #FFF;
padding: 20px
}
.main a {
color: #8dba25
}
.main h1 {
color: #999
}
.main h3 {
font-size: 16px
}
.title {
background-color: #95d831;
text-transform: uppercase;
text-align: center;
padding: 35px 0
}
.title h1 {
font-size: 32px;
color: #333;
margin: 0
}

View File

@ -8,7 +8,6 @@
<!-- Header component -->
<email-header></email-header>
<!-- End header component -->
<section class="main">
<!-- Title block -->
<div class="title">

View File

@ -2,5 +2,6 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${__dirname}/style.css`])
`${appPath}/common/css/email.css`,
`${appPath}/common/css/misc.css`])
.mergeStyles();

View File

@ -1,40 +0,0 @@
body {
background-color: #EEE
}
.container {
max-width: 600px;
min-width: 320px;
margin: 0 auto;
color: #555
}
.main {
background-color: #FFF;
padding: 20px
}
.main a {
color: #8dba25
}
.main h1 {
color: #999
}
.main h3 {
font-size: 16px
}
.title {
background-color: #95d831;
text-transform: uppercase;
text-align: center;
padding: 35px 0
}
.title h1 {
font-size: 32px;
color: #333;
margin: 0
}

View File

@ -8,7 +8,6 @@
<!-- Header component -->
<email-header></email-header>
<!-- End header component -->
<section class="main">
<!-- Title block -->
<div class="title">

View File

@ -2,6 +2,7 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${appPath}/common/css/report.css`,
`${appPath}/common/css/misc.css`,
`${__dirname}/style.css`])
.mergeStyles();

View File

@ -1,14 +1,3 @@
.container {
color: #000
}
.title {
font-weight: 100;
margin-top: 0;
margin-bottom: 20px;
font-size: 2em
}
table.column-oriented {
margin-top: 50px !important
}

View File

@ -2,7 +2,9 @@
<html lang="es">
<body>
<section class="container">
<report-header></report-header>
<!-- Header component -->
<report-header :locale="locale"></report-header>
<!-- End header component -->
<section class="main">
<section class="columns">
<section class="size50">
@ -72,12 +74,13 @@
<p v-html="$t('sections.agency.description')"></p>
</section>
<!-- Footer component -->
<report-footer id="pageFooter"
:left-text="$t('claim', [claimId])"
:center-text="clientName"
:locale="locale">
</report-footer>
<!-- End footer component -->
</section>
</body>
</html>

View File

@ -2,6 +2,7 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${appPath}/common/css/report.css`,
`${appPath}/common/css/misc.css`,
`${__dirname}/style.css`])
.mergeStyles();

View File

@ -1,14 +1,3 @@
.container {
color: #000
}
.title {
font-weight: 100;
margin-top: 0;
margin-bottom: 20px;
font-size: 2em
}
table.column-oriented {
margin-top: 50px !important
}

View File

@ -1,8 +1,10 @@
<!DOCTYPE html>
<html lang="es">
<body>
<section class="container">
<report-header></report-header>
<section class="container" id="report">
<!-- Header component -->
<report-header :locale="locale"></report-header>
<!-- End header component -->
<section class="main">
<section class="columns">
<section class="size50">
@ -74,13 +76,21 @@
</tr> -->
</tfoot>
</table>
</section>
<div class="panel" style="text-align:center;background-color:red">
<div class="header">Firma digital</div>
<img width="200" src="http://windows.verdnatura.es/signatures/tickets/1161229.png"/>
<section>{{dmsCreated}}</section>
</div>
</div>
</section>
<!-- Footer component -->
<report-footer id="pageFooter"
:left-text="$t('ticket', [clientId])"
:left-text="$t('ticket', [ticketId])"
:center-text="clientName"
:locale="locale">
</report-footer>
<!-- End footer component -->
</section>
</body>
</html>

View File

@ -33,11 +33,17 @@ module.exports = {
data() {
return {totalBalance: 0.00};
},
computed: {
dmsPath() {
return `http://windows.verdnatura.es/signatures/tickets/1161229.png`;
}
},
methods: {
fetchClient(ticketFk) {
return database.pool.query(
`SELECT
c.id clientId,
t.id ticketId,
u.lang locale,
c.email AS recipient,
c.socialName AS clientName,
@ -46,12 +52,16 @@ module.exports = {
c.city,
c.fi,
p.name AS province,
ct.country
ct.country,
dt.dmsFk,
d.created AS dmsCreated
FROM ticket t
JOIN client c ON c.id = t.clientFk
JOIN account.user u ON u.id = c.id
JOIN country ct ON ct.id = c.countryFk
LEFT JOIN province p ON p.id = c.provinceFk
LEFT JOIN dmsTicket dt ON dt.ticketFk = t.id
LEFT JOIN dms d ON d.id = dt.dmsFk
WHERE t.id = ?`, [ticketFk]);
},
fetchSales(clientFk, companyFk) {

View File

@ -0,0 +1,8 @@
const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${appPath}/common/css/report.css`,
`${appPath}/common/css/misc.css`,
`${__dirname}/style.css`])
.mergeStyles();

View File

@ -0,0 +1,3 @@
table.column-oriented {
margin-top: 50px !important
}

View File

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="es">
<body>
<section class="container" id="report">
<!-- Header component -->
<report-header :locale="locale"></report-header>
<!-- End header component -->
<section class="main">
<!-- Report start -->
<h1 class="title">{{$t('title')}}</h1>
<p>{{$t('date')}} {{dated()}}</p>
<table class="column-oriented">
<thead>
<tr>
<th>Id</th>
<th>{{$t('concept')}}</th>
<th>{{$t('quantity')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="sale in sales" :key="sale.id">
<td class="font gray">{{sale.id}}</td>
<td>{{sale.concept}}</td>
<td>{{sale.quantity}}</td>
</tr>
</tbody>
</table>
<!-- Report end -->
</section>
<!-- Footer component -->
<report-footer id="pageFooter"
:left-text="$t('client', [client.id])"
:center-text="client.name"
:locale="locale">
</report-footer>
<!-- End footer component -->
</section>
</body>
</html>

View File

@ -0,0 +1,32 @@
const strftime = require('strftime');
module.exports = {
name: 'rpt-informe',
created() {
if (this.locale)
this.$i18n.locale = this.locale;
},
data() {
return {
client: {
id: 10252,
name: 'Batman',
},
sales: [
{id: 1, concept: 'My item 1', quantity: 25},
{id: 2, concept: 'My item 2', quantity: 50},
{id: 3, concept: 'My item 3', quantity: 150}
],
locale: 'es'
};
},
methods: {
dated: () => {
return strftime('%d-%m-%Y', new Date());
},
},
components: {
'report-header': require('../report-header'),
'report-footer': require('../report-footer'),
},
};

View File

@ -0,0 +1,11 @@
module.exports = {
messages: {
es: {
title: 'Sample report',
date: 'Fecha',
quantity: 'Cantidad',
concept: 'Concepto',
client: 'Cliente {0}',
},
},
};

View File

@ -2,6 +2,7 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${appPath}/common/css/report.css`,
`${appPath}/common/css/misc.css`,
`${__dirname}/style.css`])
.mergeStyles();

View File

@ -1,14 +1,3 @@
.container {
color: #000
}
.title {
font-weight: 100;
margin-top: 0;
margin-bottom: 20px;
font-size: 2em
}
table.column-oriented {
margin-top: 50px !important
}

View File

@ -2,7 +2,9 @@
<html lang="es">
<body>
<section class="container">
<report-header></report-header>
<!-- Header component -->
<report-header :locale="locale"></report-header>
<!-- End header component -->
<section class="main">
<section class="columns">
<section class="size50">
@ -71,12 +73,13 @@
</tfoot>
</table>
</section>
<!-- Footer component -->
<report-footer id="pageFooter"
:left-text="$t('client', [clientId])"
:left-text="$t('claim', [claimId])"
:center-text="clientName"
:locale="locale">
</report-footer>
<!-- End footer component -->
</section>
</body>
</html>

View File

@ -2,6 +2,7 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${appPath}/common/css/report.css`,
`${appPath}/common/css/misc.css`,
`${__dirname}/style.css`])
.mergeStyles();

View File

@ -1,14 +1,3 @@
.container {
color: #000
}
.title {
margin-bottom: 10px;
font-weight: 100;
font-size: 1.5em;
margin-top: 0
}
.payment-type {
width: auto
}

View File

@ -2,7 +2,9 @@
<html lang="es">
<body>
<section class="container">
<report-header></report-header>
<!-- Header component -->
<report-header :locale="locale"></report-header>
<!-- End header component -->
<section class="main">
<h1 class="title centered">{{$t('title')}}</h1>
<section class="panel supplierPanel">
@ -139,12 +141,13 @@
<p class="font small">{{$t('mandatoryFields')}}</p>
<p class="font small">{{$t('sendOrder')}}</p>
</section>
<!-- Footer component -->
<report-footer id="pageFooter"
:left-text="$t('order', [mandateCode])"
:left-text="$t('claim', [claimId])"
:center-text="clientName"
:locale="locale">
</report-footer>
<!-- End footer component -->
</section>
</body>
</html>

View File

@ -2,6 +2,7 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${appPath}/common/css/report.css`,
`${appPath}/common/css/misc.css`,
`${__dirname}/style.css`])
.mergeStyles();

View File

@ -1,8 +1,10 @@
<!DOCTYPE html>
<html lang="es">
<body>
<section class="container">
<section class="container" id="report">
<!-- Header component -->
<report-header :locale="locale"></report-header>
<!-- End header component -->
<section class="main">
<!-- Report start -->
<h1 class="title">{{$t('title')}}</h1>
@ -25,11 +27,13 @@
</table>
<!-- Report end -->
</section>
<!-- Footer component -->
<report-footer id="pageFooter"
:left-text="$t('client', [client.id])"
:center-text="client.name"
:locale="locale">
</report-footer>
<!-- End footer component -->
</section>
</body>
</html>

View File

@ -2,5 +2,6 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
`${__dirname}/style.css`])
`${appPath}/common/css/email.css`,
`${appPath}/common/css/misc.css`])
.mergeStyles();

View File

@ -1,40 +0,0 @@
body {
background-color: #EEE
}
.container {
max-width: 600px;
min-width: 320px;
margin: 0 auto;
color: #555
}
.main {
background-color: #FFF;
padding: 20px
}
.main a {
color: #8dba25
}
.main h1 {
color: #999
}
.main h3 {
font-size: 16px
}
.title {
background-color: #95d831;
text-transform: uppercase;
text-align: center;
padding: 35px 0
}
.title h1 {
font-size: 32px;
color: #333;
margin: 0
}

View File

@ -8,7 +8,6 @@
<!-- Header component -->
<email-header></email-header>
<!-- End header component -->
<section class="main">
<!-- Title block -->
<div class="title">
@ -19,10 +18,9 @@
<p>{{$t('description.dear')}},</p>
<p>{{$t('description.instructions')}}</p>
<p>{{$t('description.conclusion')}}</p>
</section>
<!-- Footer component -->
<email-footer></email-footer>
<email-footer :locale="locale"></email-footer>
<!-- End footer component -->
</section>
</body>