From 4f2ca4af05721e81ef26bdae43b083e7d262c180 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 5 Feb 2019 11:11:05 +0100 Subject: [PATCH 1/2] report sample --- .../report/sample-report/assets/css/index.js | 7 ++++ .../report/sample-report/assets/css/style.css | 3 ++ print/report/sample-report/index.html | 35 +++++++++++++++++++ print/report/sample-report/index.js | 32 +++++++++++++++++ print/report/sample-report/locale.js | 11 ++++++ 5 files changed, 88 insertions(+) create mode 100644 print/report/sample-report/assets/css/index.js create mode 100644 print/report/sample-report/assets/css/style.css create mode 100644 print/report/sample-report/index.html create mode 100755 print/report/sample-report/index.js create mode 100644 print/report/sample-report/locale.js diff --git a/print/report/sample-report/assets/css/index.js b/print/report/sample-report/assets/css/index.js new file mode 100644 index 000000000..d40ab4984 --- /dev/null +++ b/print/report/sample-report/assets/css/index.js @@ -0,0 +1,7 @@ +const CssReader = require(`${appPath}/lib/cssReader`); + +module.exports = new CssReader([ + `${appPath}/common/css/layout.css`, + `${appPath}/common/css/misc.css`, + `${__dirname}/style.css`]) + .mergeStyles(); diff --git a/print/report/sample-report/assets/css/style.css b/print/report/sample-report/assets/css/style.css new file mode 100644 index 000000000..e621f3e23 --- /dev/null +++ b/print/report/sample-report/assets/css/style.css @@ -0,0 +1,3 @@ +table.column-oriented { + margin-top: 50px !important +} \ No newline at end of file diff --git a/print/report/sample-report/index.html b/print/report/sample-report/index.html new file mode 100644 index 000000000..f77ef0014 --- /dev/null +++ b/print/report/sample-report/index.html @@ -0,0 +1,35 @@ + + + +
+ +
+ +

{{$t('title')}}

+

{{$t('date')}} {{dated()}}

+ + + + + + + + + + + + + + + +
Id{{$t('concept')}}{{$t('quantity')}}
{{sale.id}}{{sale.concept}}{{sale.quantity}}
+ +
+ + +
+ + \ No newline at end of file diff --git a/print/report/sample-report/index.js b/print/report/sample-report/index.js new file mode 100755 index 000000000..b6894060a --- /dev/null +++ b/print/report/sample-report/index.js @@ -0,0 +1,32 @@ +const strftime = require('strftime'); + +module.exports = { + name: 'sample-report', + 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'), + }, +}; diff --git a/print/report/sample-report/locale.js b/print/report/sample-report/locale.js new file mode 100644 index 000000000..d231e10ff --- /dev/null +++ b/print/report/sample-report/locale.js @@ -0,0 +1,11 @@ +module.exports = { + messages: { + es: { + title: 'Sample report', + date: 'Fecha', + quantity: 'Cantidad', + concept: 'Concepto', + client: 'Cliente {0}', + }, + }, +}; From fa47c15d7add0c8923f6c74d76608d12f170c3d5 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 5 Feb 2019 11:31:30 +0100 Subject: [PATCH 2/2] catalog item type dropdown show limit #1041 --- modules/order/back/methods/order/catalogFilter.js | 2 +- modules/order/front/filter/index.html | 4 +--- modules/order/front/filter/style.scss | 4 ++++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/order/back/methods/order/catalogFilter.js b/modules/order/back/methods/order/catalogFilter.js index 519c96267..7c609ec8d 100644 --- a/modules/order/back/methods/order/catalogFilter.js +++ b/modules/order/back/methods/order/catalogFilter.js @@ -37,7 +37,7 @@ module.exports = Self => { }, }); - Self.catalogFilter = async (orderFk, orderBy, filter, tags) => { + Self.catalogFilter = async(orderFk, orderBy, filter, tags) => { let conn = Self.dataSource.connector; const stmts = []; let stmt; diff --git a/modules/order/front/filter/index.html b/modules/order/front/filter/index.html index f4949c88a..f4c1c6390 100644 --- a/modules/order/front/filter/index.html +++ b/modules/order/front/filter/index.html @@ -19,9 +19,7 @@ -