From 344840d2c902d69dcad324e0f14b5c3092b82be7 Mon Sep 17 00:00:00 2001 From: Jorge Padawan Date: Fri, 8 Jan 2021 08:43:28 +0100 Subject: [PATCH 01/15] First step add-button-edit-summaries --- modules/client/front/summary/index.html | 66 ++++++++++++++++++++++--- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html index 50bdd226c..13401da91 100644 --- a/modules/client/front/summary/index.html +++ b/modules/client/front/summary/index.html @@ -12,7 +12,16 @@ -

Basic data

+

+ + + + + +

@@ -43,7 +52,16 @@
-

Fiscal address

+

+ + + + + +

@@ -67,7 +85,16 @@
-

Fiscal data

+

+ + + + + +

-

Billing data

+

+ + + + + +

@@ -136,7 +172,16 @@
-

Default address

+

+ + + + + +

@@ -148,7 +193,16 @@
-

Web access

+

+ + + + + +

From f8ba2534cc39f5042e3fafeb6e9e3032693fdd8e Mon Sep 17 00:00:00 2001 From: joan Date: Fri, 8 Jan 2021 14:32:48 +0100 Subject: [PATCH 02/15] 2691 - Scope days changes --- modules/ticket/front/search-panel/index.html | 62 +++++++++++--------- modules/ticket/front/search-panel/index.js | 35 +++++++++++ modules/ticket/front/search-panel/style.scss | 22 +++++++ 3 files changed, 91 insertions(+), 28 deletions(-) create mode 100644 modules/ticket/front/search-panel/style.scss diff --git a/modules/ticket/front/search-panel/index.html b/modules/ticket/front/search-panel/index.html index 8570036c0..6928e10c6 100644 --- a/modules/ticket/front/search-panel/index.html +++ b/modules/ticket/front/search-panel/index.html @@ -1,6 +1,6 @@
-
- + + - + - - - - - - - - - +
+ + + + + + O + + + +
+ - + - + - + - + diff --git a/modules/ticket/front/search-panel/index.js b/modules/ticket/front/search-panel/index.js index 08b0fb244..3efeb576c 100644 --- a/modules/ticket/front/search-panel/index.js +++ b/modules/ticket/front/search-panel/index.js @@ -1,8 +1,12 @@ import ngModule from '../module'; import SearchPanel from 'core/components/searchbar/search-panel'; +import './style.scss'; + class Controller extends SearchPanel { constructor($, $element) { super($, $element); + this.filter = this.$.filter; + this.getGroupedStates(); } @@ -19,6 +23,37 @@ class Controller extends SearchPanel { this.groupedStates = groupedStates; }); } + + get from() { + return this._from; + } + + set from(value) { + this._from = value; + + this.filter.scopeDays = null; + } + + get to() { + return this._to; + } + + set to(value) { + this._to = value; + + this.filter.scopeDays = null; + } + + get scopeDays() { + return this._scopeDays; + } + + set scopeDays(value) { + this._scopeDays = value; + + this.filter.from = null; + this.filter.to = null; + } } ngModule.vnComponent('vnTicketSearchPanel', { diff --git a/modules/ticket/front/search-panel/style.scss b/modules/ticket/front/search-panel/style.scss new file mode 100644 index 000000000..374db22d7 --- /dev/null +++ b/modules/ticket/front/search-panel/style.scss @@ -0,0 +1,22 @@ +@import "./effects"; +@import "./variables"; + + +form#ticket-form { + padding: 0 +} + +.scope-days { + border: $border-thin-light; + text-align: right; + + & > p { + font-size: 1.2rem; + margin: 3px; + } + + .or { + font-weight: bold; + font-size: 26px + } +} \ No newline at end of file From ef4f7d7ca9cf10f719a78a86afcd55aa8b86f962 Mon Sep 17 00:00:00 2001 From: Jorge Padawan Date: Fri, 8 Jan 2021 15:42:43 +0100 Subject: [PATCH 03/15] 2650 new style icon edit button for summaries --- front/salix/components/summary/style.scss | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/front/salix/components/summary/style.scss b/front/salix/components/summary/style.scss index 85da5aa03..99854fa9d 100644 --- a/front/salix/components/summary/style.scss +++ b/front/salix/components/summary/style.scss @@ -73,6 +73,21 @@ ui-view > .vn-summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + position: relative; + span { + display: block; + } + a { + color: $color-font; + } + } + h4 span:after { + font-family: 'Material Icons'; + content: 'open_in_new'; + position: absolute; + right: 5px; + text-transform: none; + color: $color-spacer } & > * { margin: $spacing-sm; From 5a30bf5fa4e4ad7cfb8b3564b6460f47de981af0 Mon Sep 17 00:00:00 2001 From: Jorge Padawan Date: Fri, 8 Jan 2021 15:43:33 +0100 Subject: [PATCH 04/15] 2650 add links to edit on summaries --- modules/account/front/summary/index.html | 6 +- modules/client/front/summary/index.html | 78 +++++++--------------- modules/client/front/summary/locale/es.yml | 1 + modules/item/front/summary/index.html | 42 ++++++++++-- modules/route/front/summary/index.html | 6 +- modules/supplier/front/summary/index.html | 24 +++++-- modules/ticket/front/summary/index.html | 24 +++++-- modules/worker/front/summary/index.html | 6 +- modules/zone/front/summary/index.html | 6 +- 9 files changed, 120 insertions(+), 73 deletions(-) diff --git a/modules/account/front/summary/index.html b/modules/account/front/summary/index.html index 9c96a9703..8fe8ee337 100644 --- a/modules/account/front/summary/index.html +++ b/modules/account/front/summary/index.html @@ -10,7 +10,11 @@ -

Basic data

+

+ + Basic Data + +

diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html index 13401da91..54f30d3e4 100644 --- a/modules/client/front/summary/index.html +++ b/modules/client/front/summary/index.html @@ -12,15 +12,10 @@ -

- - - - - +

+ + Basic data +

@@ -52,15 +47,10 @@
-

- - - - - +

+ + Fiscal address +

@@ -85,15 +75,10 @@
-

- - - - - +

+ + Fiscal data +

-

- - - - - +

+ + Billing data +

@@ -172,15 +152,10 @@
-

- - - - - +

+ + Address +

@@ -193,15 +168,10 @@
-

- - - - - +

+ + Web access +

diff --git a/modules/client/front/summary/locale/es.yml b/modules/client/front/summary/locale/es.yml index 0a101f6ef..6d1c3b4f6 100644 --- a/modules/client/front/summary/locale/es.yml +++ b/modules/client/front/summary/locale/es.yml @@ -7,6 +7,7 @@ Secured credit: Crédito asegurado Average invoiced: Consumo medio Sales person: Comercial Recovery: Recobro +Basic data: Datos básicos Balance due: Saldo vencido Rate: Tarifa Business data: Datos comerciales diff --git a/modules/item/front/summary/index.html b/modules/item/front/summary/index.html index 5fb556bd4..638a6f472 100644 --- a/modules/item/front/summary/index.html +++ b/modules/item/front/summary/index.html @@ -25,7 +25,11 @@
-

Basic data

+

+ + Basic data + +

@@ -53,7 +57,11 @@
-

Other data

+

+ + Other data + +

@@ -77,7 +85,11 @@
-

Tags

+

+ + Tags + +

-

Tax

+

+ + Tax + +

-

Niche

+

+ + Niche + +

-

Botanical

+

+ + Botanical + +

@@ -111,7 +135,11 @@
-

Barcode

+

+ + Barcode + +

{{barcode.code}}

diff --git a/modules/route/front/summary/index.html b/modules/route/front/summary/index.html index 6dd01c8b0..3a87579db 100644 --- a/modules/route/front/summary/index.html +++ b/modules/route/front/summary/index.html @@ -61,7 +61,11 @@
-

Ticket

+

+ + Ticket + +

diff --git a/modules/supplier/front/summary/index.html b/modules/supplier/front/summary/index.html index 14168f253..a3eb08c53 100644 --- a/modules/supplier/front/summary/index.html +++ b/modules/supplier/front/summary/index.html @@ -10,7 +10,11 @@ -

Basic data

+

+ + Basic data + +

-

Billing data

+

+ + Billing data + +

@@ -63,7 +71,11 @@
-

Fiscal data

+

+ + Fiscal data + +

@@ -82,7 +94,11 @@
-

Fiscal address

+

+ + Fiscal address + +

diff --git a/modules/ticket/front/summary/index.html b/modules/ticket/front/summary/index.html index 803734c74..f865683e2 100644 --- a/modules/ticket/front/summary/index.html +++ b/modules/ticket/front/summary/index.html @@ -103,7 +103,11 @@

Total {{$ctrl.summary.total | currency: 'EUR':2}}

-

Sale

+

+ + Sale + +

@@ -158,7 +162,11 @@
-

Packages

+

+ + Packages + +

@@ -177,7 +185,11 @@
-

Service

+

+ + Service + +

@@ -202,7 +214,11 @@
-

Purchase request

+

+ + Purchase request + +

diff --git a/modules/worker/front/summary/index.html b/modules/worker/front/summary/index.html index e816f6cf2..7b0c4a81d 100644 --- a/modules/worker/front/summary/index.html +++ b/modules/worker/front/summary/index.html @@ -10,7 +10,11 @@ -

Basic data

+

+ + Basic data + +

diff --git a/modules/zone/front/summary/index.html b/modules/zone/front/summary/index.html index 9247087e6..ee651688e 100644 --- a/modules/zone/front/summary/index.html +++ b/modules/zone/front/summary/index.html @@ -36,7 +36,11 @@
-

Warehouses

+

+ + Warehouse + +

From ffdc753ad4b6b0fade2ad18a47a9248faf2b14a7 Mon Sep 17 00:00:00 2001 From: joan Date: Mon, 11 Jan 2021 08:48:53 +0100 Subject: [PATCH 05/15] 2691 - Added "or" between date ranges and scope days --- front/core/components/field/index.js | 5 ++++- modules/ticket/front/search-panel/index.html | 8 ++++++-- modules/ticket/front/search-panel/index.js | 20 ------------------- .../ticket/front/search-panel/index.spec.js | 13 ++++++++++++ .../ticket/front/search-panel/locale/es.yml | 3 ++- modules/ticket/front/search-panel/style.scss | 10 +++++++++- modules/ticket/front/weekly/locale/es.yml | 2 +- 7 files changed, 35 insertions(+), 26 deletions(-) diff --git a/front/core/components/field/index.js b/front/core/components/field/index.js index 8d619e4a3..d18973bbe 100644 --- a/front/core/components/field/index.js +++ b/front/core/components/field/index.js @@ -187,7 +187,10 @@ export default class Field extends FormInput { } onChange() { - this.emit('change', {value: this.field}); + // Changes doesn't reflect until appling async + this.$.$applyAsync(() => { + this.emit('change', {value: this.field}); + }); } } Field.$inject = ['$element', '$scope']; diff --git a/modules/ticket/front/search-panel/index.html b/modules/ticket/front/search-panel/index.html index 6928e10c6..934b1fc1f 100644 --- a/modules/ticket/front/search-panel/index.html +++ b/modules/ticket/front/search-panel/index.html @@ -27,13 +27,13 @@ vn-one label="From" ng-model="filter.from" - on-change="$ctrl.from = value"> + on-change="filter.scopeDays = null"> + on-change="filter.scopeDays = null"> O + +
diff --git a/modules/ticket/front/search-panel/index.js b/modules/ticket/front/search-panel/index.js index 3efeb576c..71a339482 100644 --- a/modules/ticket/front/search-panel/index.js +++ b/modules/ticket/front/search-panel/index.js @@ -24,26 +24,6 @@ class Controller extends SearchPanel { }); } - get from() { - return this._from; - } - - set from(value) { - this._from = value; - - this.filter.scopeDays = null; - } - - get to() { - return this._to; - } - - set to(value) { - this._to = value; - - this.filter.scopeDays = null; - } - get scopeDays() { return this._scopeDays; } diff --git a/modules/ticket/front/search-panel/index.spec.js b/modules/ticket/front/search-panel/index.spec.js index 55d341d2a..99c9d8da0 100644 --- a/modules/ticket/front/search-panel/index.spec.js +++ b/modules/ticket/front/search-panel/index.spec.js @@ -10,6 +10,7 @@ describe('Ticket Component vnTicketSearchPanel', () => { $httpBackend = _$httpBackend_; controller = $componentController('vnTicketSearchPanel', {$element: null}); controller.$t = () => {}; + controller.filter = {}; })); describe('getGroupedStates()', () => { @@ -32,4 +33,16 @@ describe('Ticket Component vnTicketSearchPanel', () => { }]); }); }); + + describe('scopeDays() setter', () => { + it('should clear the date range', () => { + controller.filter.from = new Date(); + controller.filter.to = new Date(); + + controller.scopeDays = 1; + + expect(controller.filter.from).toBeNull(); + expect(controller.filter.to).toBeNull(); + }); + }); }); diff --git a/modules/ticket/front/search-panel/locale/es.yml b/modules/ticket/front/search-panel/locale/es.yml index 5fa75ac09..54a01c82f 100644 --- a/modules/ticket/front/search-panel/locale/es.yml +++ b/modules/ticket/front/search-panel/locale/es.yml @@ -16,4 +16,5 @@ Pending: Pendiente FREE: Libre DELIVERED: Servido ON_PREPARATION: En preparacion -PACKED: Encajado \ No newline at end of file +PACKED: Encajado +Cannot choose a range of dates and days onward at the same time: No se puede selecionar un rango de fechas y días en adelante a la vez \ No newline at end of file diff --git a/modules/ticket/front/search-panel/style.scss b/modules/ticket/front/search-panel/style.scss index 374db22d7..56c36fabd 100644 --- a/modules/ticket/front/search-panel/style.scss +++ b/modules/ticket/front/search-panel/style.scss @@ -8,6 +8,7 @@ form#ticket-form { .scope-days { border: $border-thin-light; + position: relative; text-align: right; & > p { @@ -17,6 +18,13 @@ form#ticket-form { .or { font-weight: bold; - font-size: 26px + font-size: 26px; + color: $color-font-secondary + } + + vn-icon[icon="info"] { + position: absolute; + top: 2px; + right: 2px } } \ No newline at end of file diff --git a/modules/ticket/front/weekly/locale/es.yml b/modules/ticket/front/weekly/locale/es.yml index 804467dae..62f0f5b53 100644 --- a/modules/ticket/front/weekly/locale/es.yml +++ b/modules/ticket/front/weekly/locale/es.yml @@ -4,4 +4,4 @@ You are going to delete this weekly ticket: Vas a eliminar este ticket programad This ticket will be removed from weekly tickets! Continue anyway?: Este ticket se eliminará de tickets programados! ¿Continuar de todas formas? Search weekly ticket by id or client id: Busca tickets programados por el identificador o el identificador del cliente Search by weekly ticket: Buscar por tickets programados -weekDay: Dia \ No newline at end of file +Weekday: Llegada \ No newline at end of file From 035bdfb1adf5032b1dd6e98dc28f16968f96cad4 Mon Sep 17 00:00:00 2001 From: joan Date: Mon, 11 Jan 2021 10:08:33 +0100 Subject: [PATCH 06/15] Rounded box --- modules/ticket/front/search-panel/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ticket/front/search-panel/style.scss b/modules/ticket/front/search-panel/style.scss index 56c36fabd..d90c66251 100644 --- a/modules/ticket/front/search-panel/style.scss +++ b/modules/ticket/front/search-panel/style.scss @@ -8,6 +8,7 @@ form#ticket-form { .scope-days { border: $border-thin-light; + border-radius: 5px; position: relative; text-align: right; From af55e2cc3236fe456c0cce4af7e1b4f37345d516 Mon Sep 17 00:00:00 2001 From: Jorge Padawan Date: Mon, 11 Jan 2021 10:36:20 +0100 Subject: [PATCH 07/15] Add tooltip and modified sref for previews --- front/salix/locale/es.yml | 1 + modules/account/front/summary/index.html | 6 ++-- modules/claim/front/summary/index.html | 24 ++++++++++++-- modules/client/front/summary/index.html | 36 ++++++++++++++------- modules/item/front/summary/index.html | 38 +++++++++++++++-------- modules/route/front/summary/index.html | 6 ++-- modules/supplier/front/summary/index.html | 24 +++++++++----- modules/ticket/front/summary/index.html | 23 +++++++++----- modules/travel/front/summary/index.html | 8 ++++- modules/worker/front/summary/index.html | 4 +-- modules/zone/front/summary/index.html | 4 +-- 11 files changed, 121 insertions(+), 53 deletions(-) diff --git a/front/salix/locale/es.yml b/front/salix/locale/es.yml index f2a23a7a7..98384df83 100644 --- a/front/salix/locale/es.yml +++ b/front/salix/locale/es.yml @@ -52,6 +52,7 @@ Suppliers: Proveedores Summary: Vista previa Basic data: Datos básicos List: Listado +Go to: Ir a # Misc diff --git a/modules/account/front/summary/index.html b/modules/account/front/summary/index.html index 8fe8ee337..75534d4e6 100644 --- a/modules/account/front/summary/index.html +++ b/modules/account/front/summary/index.html @@ -11,8 +11,10 @@

- - Basic Data + + Basic Data

-

Detail

+

+ + Detail + +

@@ -105,7 +111,13 @@
-

Development

+

+ + Development + +

@@ -136,7 +148,13 @@
-

Action

+

+ + Action + +

diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html index 54f30d3e4..59afaeeeb 100644 --- a/modules/client/front/summary/index.html +++ b/modules/client/front/summary/index.html @@ -13,8 +13,10 @@

- - Basic data + + Basic data

- - Fiscal address + + Fiscal address

- - Fiscal data + + Fiscal data

@@ -120,8 +126,10 @@

- - Billing data + + Billing data

- - Address + + Address

- - Web access + + Web access

- - Basic data + + Basic data

- - Other data + + Other data

- - Tags + + Tags

- Tax + Tax

- - Niche + + Niche

- - Botanical + + Botanical

- - Barcode + + Barcode

diff --git a/modules/route/front/summary/index.html b/modules/route/front/summary/index.html index 3a87579db..c683ec6ce 100644 --- a/modules/route/front/summary/index.html +++ b/modules/route/front/summary/index.html @@ -62,8 +62,10 @@

- - Ticket + + Ticket

diff --git a/modules/supplier/front/summary/index.html b/modules/supplier/front/summary/index.html index a3eb08c53..fde1b4304 100644 --- a/modules/supplier/front/summary/index.html +++ b/modules/supplier/front/summary/index.html @@ -11,8 +11,10 @@

- - Basic data + + Basic data

@@ -42,8 +44,10 @@

- - Billing data + + Billing data

- - Fiscal data + + Fiscal data

- - Fiscal address + + Fiscal address

- - Sale + + Sale

@@ -163,8 +164,10 @@

- - Packages + + Packages

@@ -186,8 +189,10 @@

- - Service + + Service

@@ -215,8 +220,10 @@

- - Purchase request + + Purchase request

diff --git a/modules/travel/front/summary/index.html b/modules/travel/front/summary/index.html index de6f6e979..29c4e723c 100644 --- a/modules/travel/front/summary/index.html +++ b/modules/travel/front/summary/index.html @@ -132,7 +132,13 @@
-

Thermographs

+

+ + Thermograph + +

diff --git a/modules/worker/front/summary/index.html b/modules/worker/front/summary/index.html index 7b0c4a81d..8c7daeb44 100644 --- a/modules/worker/front/summary/index.html +++ b/modules/worker/front/summary/index.html @@ -11,8 +11,8 @@

- - Basic data + + Basic data

- - Warehouse + + Warehouse

From 7568a1c06663f58e9626f5b70d623db2348304b9 Mon Sep 17 00:00:00 2001 From: joan Date: Mon, 11 Jan 2021 14:54:24 +0100 Subject: [PATCH 08/15] Updated unit tests --- .../core/components/searchbar/search-panel.js | 1 + front/core/components/searchbar/style.scss | 25 ++++++++++++++- modules/ticket/front/search-panel/index.html | 8 ++--- modules/ticket/front/search-panel/index.js | 19 +++++++++++- .../ticket/front/search-panel/index.spec.js | 27 ++++++++++++++-- modules/ticket/front/search-panel/style.scss | 31 ------------------- 6 files changed, 72 insertions(+), 39 deletions(-) delete mode 100644 modules/ticket/front/search-panel/style.scss diff --git a/front/core/components/searchbar/search-panel.js b/front/core/components/searchbar/search-panel.js index f473c2b04..67fd3fae2 100644 --- a/front/core/components/searchbar/search-panel.js +++ b/front/core/components/searchbar/search-panel.js @@ -1,4 +1,5 @@ import Component from '../../lib/component'; +import './style.scss'; export default class SearchPanel extends Component { set filter(value) { diff --git a/front/core/components/searchbar/style.scss b/front/core/components/searchbar/style.scss index c1d4be21c..eab9c126b 100644 --- a/front/core/components/searchbar/style.scss +++ b/front/core/components/searchbar/style.scss @@ -1,4 +1,4 @@ -@import "variables"; +@import "./variables"; vn-searchbar { display: block; @@ -44,4 +44,27 @@ vn-searchbar { & > form { padding: $spacing-lg; } + + & > form#manifold-form { + padding: 0; + + .manifold-panel { + border: $border-thin-light; + border-radius: 5px; + position: relative; + text-align: right; + + .or { + font-weight: bold; + font-size: 26px; + color: $color-font-secondary + } + + vn-icon[icon="info"] { + position: absolute; + top: 2px; + right: 2px + } + } + } } \ No newline at end of file diff --git a/modules/ticket/front/search-panel/index.html b/modules/ticket/front/search-panel/index.html index 934b1fc1f..d9ab2ee91 100644 --- a/modules/ticket/front/search-panel/index.html +++ b/modules/ticket/front/search-panel/index.html @@ -1,5 +1,5 @@
-
+
- + + on-change="$ctrl.from = value"> + on-change="$ctrl.to = value"> O { })); describe('getGroupedStates()', () => { - it('should set an array of groupedStates with the aditionof a name translation', () => { + it('should set an array of groupedStates with the adition of a name translation', () => { jest.spyOn(controller, '$t').mockReturnValue('miCodigo'); const data = [ { @@ -34,8 +34,30 @@ describe('Ticket Component vnTicketSearchPanel', () => { }); }); + describe('from() setter', () => { + it('should clear the scope days when setting the from property', () => { + controller.filter.scopeDays = 1; + + controller.from = new Date(); + + expect(controller.filter.scopeDays).toBeNull(); + expect(controller.from).toBeDefined(); + }); + }); + + describe('to() setter', () => { + it('should clear the scope days when setting the to property', () => { + controller.filter.scopeDays = 1; + + controller.to = new Date(); + + expect(controller.filter.scopeDays).toBeNull(); + expect(controller.to).toBeDefined(); + }); + }); + describe('scopeDays() setter', () => { - it('should clear the date range', () => { + it('should clear the date range when setting the scopeDays property', () => { controller.filter.from = new Date(); controller.filter.to = new Date(); @@ -43,6 +65,7 @@ describe('Ticket Component vnTicketSearchPanel', () => { expect(controller.filter.from).toBeNull(); expect(controller.filter.to).toBeNull(); + expect(controller.scopeDays).toBeDefined(); }); }); }); diff --git a/modules/ticket/front/search-panel/style.scss b/modules/ticket/front/search-panel/style.scss deleted file mode 100644 index d90c66251..000000000 --- a/modules/ticket/front/search-panel/style.scss +++ /dev/null @@ -1,31 +0,0 @@ -@import "./effects"; -@import "./variables"; - - -form#ticket-form { - padding: 0 -} - -.scope-days { - border: $border-thin-light; - border-radius: 5px; - position: relative; - text-align: right; - - & > p { - font-size: 1.2rem; - margin: 3px; - } - - .or { - font-weight: bold; - font-size: 26px; - color: $color-font-secondary - } - - vn-icon[icon="info"] { - position: absolute; - top: 2px; - right: 2px - } -} \ No newline at end of file From f45aa7937dda4511fc7cfc5d938a5b520a6c15d3 Mon Sep 17 00:00:00 2001 From: Jorge Padawan Date: Tue, 12 Jan 2021 07:39:12 +0100 Subject: [PATCH 09/15] Added conditionals with rols to display or not the icons with link --- modules/account/front/summary/index.html | 7 +++- modules/account/front/summary/index.js | 3 ++ modules/claim/front/summary/index.html | 21 ++++++++-- modules/claim/front/summary/index.js | 8 ++++ modules/client/front/summary/index.html | 40 +++++++++++++++--- modules/client/front/summary/index.js | 3 ++ modules/item/front/summary/index.html | 51 +++++++++++++++++++---- modules/item/front/summary/index.js | 16 +++++++ modules/route/front/summary/index.html | 7 +++- modules/route/front/summary/index.js | 4 ++ modules/supplier/front/summary/index.html | 28 +++++++++++-- modules/supplier/front/summary/index.js | 4 ++ modules/travel/front/summary/index.html | 7 +++- modules/travel/front/summary/index.js | 4 ++ modules/worker/front/summary/index.html | 7 +++- modules/worker/front/summary/index.js | 4 ++ 16 files changed, 189 insertions(+), 25 deletions(-) diff --git a/modules/account/front/summary/index.html b/modules/account/front/summary/index.html index 75534d4e6..3f6798db9 100644 --- a/modules/account/front/summary/index.html +++ b/modules/account/front/summary/index.html @@ -10,13 +10,18 @@ -

+

Basic Data

+

+ Basic Data +

diff --git a/modules/account/front/summary/index.js b/modules/account/front/summary/index.js index 21be84660..8ed025b61 100644 --- a/modules/account/front/summary/index.js +++ b/modules/account/front/summary/index.js @@ -18,6 +18,9 @@ class Controller extends Summary { this.$http.get(`Accounts/${value.id}`, {filter}) .then(res => this.$.summary = res.data); } + get isHr() { + return this.aclService.hasAny(['hr']); + } get user() { return this._user; diff --git a/modules/claim/front/summary/index.html b/modules/claim/front/summary/index.html index f8e77b50b..a5afc97ce 100644 --- a/modules/claim/front/summary/index.html +++ b/modules/claim/front/summary/index.html @@ -54,13 +54,18 @@
-

+

Detail

+

+ Detail +

@@ -111,13 +116,18 @@
-

+

Development

+

+ Development +

@@ -148,13 +158,18 @@
-

+

Action

+

+ Action +

diff --git a/modules/claim/front/summary/index.js b/modules/claim/front/summary/index.js index 89848ecc6..bda830d6a 100644 --- a/modules/claim/front/summary/index.js +++ b/modules/claim/front/summary/index.js @@ -13,6 +13,14 @@ class Controller extends Summary { this.getSummary(); } + get isSalesPerson() { + return this.aclService.hasAny(['salesPerson']); + } + + get isClaimManager() { + return this.aclService.hasAny(['claimManager']); + } + get claim() { return this._claim; } diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html index 59afaeeeb..a56c3b680 100644 --- a/modules/client/front/summary/index.html +++ b/modules/client/front/summary/index.html @@ -12,13 +12,18 @@ -

+

Basic data

+

+ Basic data +

@@ -49,13 +54,18 @@
-

+

Fiscal address

+

+ Fiscal address +

@@ -79,13 +89,18 @@
-

+

Fiscal data

+

+ Fiscal data +

-

+

Billing data

+

+ Billing data +

@@ -160,13 +180,18 @@
-

+

Address

+

+ Address +

@@ -178,13 +203,16 @@
-

+

Web access

+

Web access +

diff --git a/modules/client/front/summary/index.js b/modules/client/front/summary/index.js index cf5991247..8ef724061 100644 --- a/modules/client/front/summary/index.js +++ b/modules/client/front/summary/index.js @@ -18,6 +18,9 @@ class Controller extends Summary { } }); } + get isEmployee() { + return this.aclService.hasAny(['employee']); + } sumRisk() { let total = 0; diff --git a/modules/item/front/summary/index.html b/modules/item/front/summary/index.html index 51413860e..79c0d6bfb 100644 --- a/modules/item/front/summary/index.html +++ b/modules/item/front/summary/index.html @@ -25,13 +25,18 @@
-

+

Basic data

+

+ Basic data +

@@ -59,13 +64,18 @@
-

+

Other data

+

+ Other data +

@@ -89,13 +99,18 @@
-

+

Tags

+

+ Tags +

-

- +

+ Tax

+

+ Tax +

-

+

Niche

+

+ Niche +

-

+

Botanical

+

+ Botanical +

@@ -145,13 +175,18 @@
-

+

Barcode

+

+ Barcode +

{{barcode.code}}

diff --git a/modules/item/front/summary/index.js b/modules/item/front/summary/index.js index dc4e638b8..52753ff65 100644 --- a/modules/item/front/summary/index.js +++ b/modules/item/front/summary/index.js @@ -13,6 +13,22 @@ class Controller extends Summary { if (this.item && this.item.id) this.getSummary(); } + + get isBuyer() { + return this.aclService.hasAny(['buyer']); + } + + get isReplenisher() { + return this.aclService.hasAny(['replenisher']); + } + + get isAdministrative() { + return this.aclService.hasAny(['administrative']); + } + + get isEmployee() { + return this.aclService.hasAny(['employee']); + } } ngModule.vnComponent('vnItemSummary', { diff --git a/modules/route/front/summary/index.html b/modules/route/front/summary/index.html index c683ec6ce..9bd83a14d 100644 --- a/modules/route/front/summary/index.html +++ b/modules/route/front/summary/index.html @@ -61,13 +61,18 @@
-

+

Ticket

+

+ Ticket +

diff --git a/modules/route/front/summary/index.js b/modules/route/front/summary/index.js index 762cd8a41..543c54afc 100644 --- a/modules/route/front/summary/index.js +++ b/modules/route/front/summary/index.js @@ -16,6 +16,10 @@ class Controller extends Summary { }); } + get isDelivery() { + return this.aclService.hasAny(['delivery']); + } + get route() { return this._route; } diff --git a/modules/supplier/front/summary/index.html b/modules/supplier/front/summary/index.html index fde1b4304..9ac79fd27 100644 --- a/modules/supplier/front/summary/index.html +++ b/modules/supplier/front/summary/index.html @@ -10,13 +10,18 @@ -

+

Basic data

+

+ Basic data +

-

+

Billing data

+

+ Billing data +

@@ -75,13 +85,18 @@
-

+

Fiscal data

+

+ Fiscal data +

@@ -100,13 +115,18 @@
-

+

Fiscal address

+

+ Fiscal address +

diff --git a/modules/supplier/front/summary/index.js b/modules/supplier/front/summary/index.js index 099257848..a828379bc 100644 --- a/modules/supplier/front/summary/index.js +++ b/modules/supplier/front/summary/index.js @@ -10,6 +10,10 @@ class Controller extends Summary { this.getSummary(); } + get isAdministrative() { + return this.aclService.hasAny(['administrative']); + } + getSummary() { return this.$http.get(`Suppliers/${this.supplier.id}/getSummary`).then(response => { this.summary = response.data; diff --git a/modules/travel/front/summary/index.html b/modules/travel/front/summary/index.html index 29c4e723c..b8db9946c 100644 --- a/modules/travel/front/summary/index.html +++ b/modules/travel/front/summary/index.html @@ -132,13 +132,18 @@
-

+

Thermograph

+

+ Thermograph +

diff --git a/modules/travel/front/summary/index.js b/modules/travel/front/summary/index.js index 876d1ec6c..5144a0bb5 100644 --- a/modules/travel/front/summary/index.js +++ b/modules/travel/front/summary/index.js @@ -56,6 +56,10 @@ class Controller extends Summary { return total; } + + get isBuyer() { + return this.aclService.hasAny(['buyer']); + } } ngModule.vnComponent('vnTravelSummary', { diff --git a/modules/worker/front/summary/index.html b/modules/worker/front/summary/index.html index 8c7daeb44..324837ae8 100644 --- a/modules/worker/front/summary/index.html +++ b/modules/worker/front/summary/index.html @@ -10,11 +10,16 @@ -

+

Basic data

+

+ Basic data +

diff --git a/modules/worker/front/summary/index.js b/modules/worker/front/summary/index.js index 178df81a9..6a4d87007 100644 --- a/modules/worker/front/summary/index.js +++ b/modules/worker/front/summary/index.js @@ -52,6 +52,10 @@ class Controller extends Summary { this.$.worker = res.data; }); } + + get isHr() { + return this.aclService.hasAny(['hr']); + } } ngModule.vnComponent('vnWorkerSummary', { From 4435f5e1b0fc21fe58eeae1b5f3756753779aafd Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 12 Jan 2021 07:45:13 +0100 Subject: [PATCH 10/15] Vn-th sortable icon hotfix --- front/core/components/th/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/front/core/components/th/index.js b/front/core/components/th/index.js index f815056f6..b9ea8fde8 100644 --- a/front/core/components/th/index.js +++ b/front/core/components/th/index.js @@ -1,4 +1,5 @@ import ngModule from '../../module'; +import './style.scss'; export default class Th { constructor($element) { From 509de4fa0aca935f6b302e8b2858e8656fd7fb08 Mon Sep 17 00:00:00 2001 From: Jorge Padawan Date: Tue, 12 Jan 2021 10:11:37 +0100 Subject: [PATCH 11/15] Fix for good practique code --- modules/account/front/summary/index.html | 13 +++-- modules/claim/front/summary/index.html | 33 +++++------ modules/client/front/summary/index.html | 59 +++++++++---------- modules/item/front/summary/index.html | 70 ++++++++++++----------- modules/route/front/summary/index.html | 10 ++-- modules/supplier/front/summary/index.html | 40 ++++++------- modules/travel/front/summary/index.html | 10 ++-- modules/zone/front/summary/index.html | 3 +- 8 files changed, 122 insertions(+), 116 deletions(-) diff --git a/modules/account/front/summary/index.html b/modules/account/front/summary/index.html index 3f6798db9..41632aef6 100644 --- a/modules/account/front/summary/index.html +++ b/modules/account/front/summary/index.html @@ -1,6 +1,7 @@
- @@ -12,15 +13,15 @@

+ ui-sref="account.card.basicData({id:summary.id})" + target="_self"> Basic Data

- Basic Data + translate + ng-show="!$ctrl.isHr"> + Basic Data

- @@ -56,15 +57,15 @@

+ ui-sref="claim.card.detail({id:$ctrl.claim.id})" + target="_self"> Detail

- Detail + ng-show="!$ctrl.isSalesPerson" + translate> + Detail

@@ -118,15 +119,15 @@

+ ui-sref="claim.card.development({id:$ctrl.claim.id})" + target="_self"> Development

- Development + translate + ng-show="!$ctrl.isClaimManager"> + Development

@@ -160,15 +161,15 @@

+ ui-sref="claim.card.action({id:$ctrl.claim.id})" + target="_self"> Action

- Action + translate + ng-show="!$ctrl.isClaimManager"> + Action

diff --git a/modules/client/front/summary/index.html b/modules/client/front/summary/index.html index a56c3b680..3e8f4f705 100644 --- a/modules/client/front/summary/index.html +++ b/modules/client/front/summary/index.html @@ -14,15 +14,15 @@

+ ui-sref="client.card.basicData({id:$ctrl.client.id})" + target="_self"> Basic data

- Basic data + translate + ng-show="!$ctrl.isEmployee"> + Basic data

@@ -56,15 +56,15 @@

+ ui-sref="client.card.fiscalData({id:$ctrl.client.id})" + target="_self"> Fiscal address

- Fiscal address + translate + ng-show="!$ctrl.isEmployee"> + Fiscal address

@@ -91,15 +91,15 @@

+ ui-sref="client.card.fiscalData({id:$ctrl.client.id})" + target="_self"> Fiscal data

- Fiscal data + translate + ng-show="!$ctrl.isEmployee"> + Fiscal data

+ ui-sref="client.card.billingData({id:$ctrl.client.id})" + target="_self"> Billing data

- Billing data + translate + ng-show="!$ctrl.isEmployee"> + Billing data

@@ -182,15 +182,15 @@

+ ui-sref="client.card.address.index({id:$ctrl.client.id})" + target="_self"> Address

- Address + translate + ng-show="!$ctrl.isEmployee"> + Address

@@ -205,13 +205,14 @@

+ ui-sref="client.card.webAccess({id:$ctrl.client.id})" + target="_self"> Web access

-

Web access +

Web access

diff --git a/modules/item/front/summary/index.html b/modules/item/front/summary/index.html index 79c0d6bfb..59ceaebbe 100644 --- a/modules/item/front/summary/index.html +++ b/modules/item/front/summary/index.html @@ -27,15 +27,15 @@

+ ui-sref="item.card.basicData({id:$ctrl.item.id})" + target="_self"> Basic data

- Basic data + translate + ng-show="!$ctrl.isBuyer"> + Basic data

@@ -66,15 +66,15 @@

+ ui-sref="item.card.basicData({id:$ctrl.item.id})" + target="_self"> Other data

- Other data + translate + ng-show="!$ctrl.isBuyer"> + Other data

@@ -101,15 +101,15 @@

+ ui-sref="item.card.tags({id:$ctrl.item.id})" + target="_self"> Tags

- Tags + translate + ng-show="!$ctrl.isBuyer || !$ctrl.isReplenisher"> + Tags

- + Tax

- Tax + translate + ng-show="!$ctrl.isBuyer || !$ctrl.isAdministrative"> + Tax

+ ui-sref="item.card.niche({id:$ctrl.item.id})" + target="_self"> Niche

- Niche + translate + ng-show="!$ctrl.isBuyer || !$ctrl.isReplenisher"> + Niche

+ ui-sref="item.card.botanical({id:$ctrl.item.id})" + target="_self"> Botanical

- Botanical + translate + ng-show="!$ctrl.isBuyer"> + Botanical

@@ -177,15 +179,15 @@

+ ui-sref="item.card.itemBarcode({id:$ctrl.item.id})" + target="_self"> Barcode

- Barcode + translate + ng-show="!$ctrl.isBuyer || !$ctrl.isReplenisher"> + Barcode

{{barcode.code}} diff --git a/modules/route/front/summary/index.html b/modules/route/front/summary/index.html index 9bd83a14d..b284851a0 100644 --- a/modules/route/front/summary/index.html +++ b/modules/route/front/summary/index.html @@ -63,15 +63,15 @@

+ ui-sref="route.card.tickets({id:$ctrl.route.id})" + target="_self"> Ticket

- Ticket + translate + ng-show="!$ctrl.isDelivery"> + Ticket

diff --git a/modules/supplier/front/summary/index.html b/modules/supplier/front/summary/index.html index 9ac79fd27..b089f25e9 100644 --- a/modules/supplier/front/summary/index.html +++ b/modules/supplier/front/summary/index.html @@ -12,15 +12,15 @@

+ ui-sref="supplier.card.basicData({id:$ctrl.supplier.id})" + target="_self"> Basic data

- Basic data + translate + ng-show="!$ctrl.isAdministrative"> + Basic data

+ ui-sref="supplier.card.billingData({id:$ctrl.supplier.id})" + target="_self"> Billing data

- Billing data + translate + ng-show="!$ctrl.isAdministrative"> + Billing data

+ ui-sref="supplier.card.fiscalData({id:$ctrl.supplier.id})" + target="_self"> Fiscal data

- Fiscal data + translate + ng-show="!$ctrl.isAdministrative"> + Fiscal data

+ ui-sref="supplier.card.fiscalData({id:$ctrl.supplier.id})" + target="_self"> Fiscal address

- Fiscal address + translate + ng-show="!$ctrl.isAdministrative"> + Fiscal address

+ ui-sref="travel.card.thermograph.index({id:$ctrl.travelData.id})" + target="_self"> Thermograph

- Thermograph + translate + ng-show="!$ctrl.isBuyer"> + Thermograph

diff --git a/modules/zone/front/summary/index.html b/modules/zone/front/summary/index.html index d891fd9d1..2633ebbd2 100644 --- a/modules/zone/front/summary/index.html +++ b/modules/zone/front/summary/index.html @@ -37,7 +37,8 @@

- + Warehouse

From 9ca2e677bd633f4ae642e49ef264eb9639f2ce9e Mon Sep 17 00:00:00 2001 From: Jorge Padawan Date: Tue, 12 Jan 2021 10:15:33 +0100 Subject: [PATCH 12/15] Fix for good practique code --- modules/ticket/front/summary/index.html | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/ticket/front/summary/index.html b/modules/ticket/front/summary/index.html index 9a389e912..dcd4470e4 100644 --- a/modules/ticket/front/summary/index.html +++ b/modules/ticket/front/summary/index.html @@ -1,6 +1,7 @@
- @@ -104,8 +105,9 @@

- + Sale

@@ -165,8 +167,8 @@

+ ui-sref="ticket.card.package({id:$ctrl.ticket.id})" + target="_self"> Packages

@@ -190,8 +192,8 @@

+ ui-sref="ticket.card.service({id:$ctrl.ticket.id})" + target="_self"> Service

@@ -221,8 +223,8 @@

+ ui-sref="ticket.card.request.index({id:$ctrl.ticket.id})" + target="_self"> Purchase request

From b4899fc0ffbdf311778e2100d354e3ae12c1b8da Mon Sep 17 00:00:00 2001 From: Jorge Padawan Date: Tue, 12 Jan 2021 10:17:12 +0100 Subject: [PATCH 13/15] Fix for good practique code --- modules/worker/front/summary/index.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/worker/front/summary/index.html b/modules/worker/front/summary/index.html index 324837ae8..0a99959e4 100644 --- a/modules/worker/front/summary/index.html +++ b/modules/worker/front/summary/index.html @@ -11,14 +11,15 @@

- + Basic data

- Basic data + translates + ng-show="!$ctrl.isHr"> + Basic data

From 1a4c631c7008890faa1060f4d32a3bc42a86ff2f Mon Sep 17 00:00:00 2001 From: Jorge Padawan Date: Tue, 12 Jan 2021 11:00:42 +0100 Subject: [PATCH 14/15] Fix for good practique code --- modules/travel/front/summary/index.html | 7 ++++--- modules/zone/front/summary/index.html | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/travel/front/summary/index.html b/modules/travel/front/summary/index.html index 7c06f39fd..90a2ea27f 100644 --- a/modules/travel/front/summary/index.html +++ b/modules/travel/front/summary/index.html @@ -1,6 +1,7 @@
- @@ -134,8 +135,8 @@

+ ui-sref="travel.card.thermograph.index({id:$ctrl.travelData.id})" + target="_self"> Thermograph

diff --git a/modules/zone/front/summary/index.html b/modules/zone/front/summary/index.html index 2633ebbd2..2fe94388f 100644 --- a/modules/zone/front/summary/index.html +++ b/modules/zone/front/summary/index.html @@ -1,6 +1,7 @@
- @@ -37,8 +38,7 @@

- + Warehouse

From dd29b351d28ae3ff461a283fda64572f452d5854 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 12 Jan 2021 14:25:01 +0100 Subject: [PATCH 15/15] Disabled loggable --- modules/worker/back/models/calendar.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/worker/back/models/calendar.json b/modules/worker/back/models/calendar.json index 199d81e6c..1da7179c4 100644 --- a/modules/worker/back/models/calendar.json +++ b/modules/worker/back/models/calendar.json @@ -1,6 +1,6 @@ { "name": "Calendar", - "base": "Loggable", + "base": "VnModel", "log": { "model": "WorkerLog", "relation": "labour"