From 3c0fe7a4bc1e777234f79838b874b7a6542f211d Mon Sep 17 00:00:00 2001 From: Joan Date: Mon, 7 May 2018 08:33:45 +0200 Subject: [PATCH] Added new pagination & module index search fixed #268 --- .../credit-classification-list.html | 16 ++-- .../credit-insurance-list.html | 41 +++++----- .../client/src/credit-list/credit-list.html | 42 +++++------ .../client/src/greuge-list/greuge-list.html | 55 +++++++------- client/client/src/index/index.html | 4 +- client/client/src/index/index.js | 8 +- client/client/src/invoices/invoices.html | 58 +++++++-------- client/client/src/mandate/mandate.html | 50 ++++++------- .../src/recovery-list/recovery-list.html | 58 +++++++-------- .../components/step-control/step-control.html | 2 +- .../components/step-control/step-control.js | 27 ++++--- client/item/src/history/history.html | 49 ++++++------ client/item/src/list/list.html | 1 - client/item/src/locale/es.yml | 3 +- client/ticket/src/component/component.html | 7 +- client/ticket/src/data/step-one/step-one.html | 2 +- .../src/data/step-three/step-three.html | 11 ++- .../src/expedition/ticket-expedition.html | 74 +++++++++---------- client/ticket/src/list/ticket-list.html | 4 +- client/ticket/src/list/ticket-list.js | 5 +- .../ticket/src/sale-checked/sale-checked.html | 52 +++++++------ client/ticket/src/sale/sale.html | 6 +- client/ticket/src/tracking/index.html | 42 +++++------ client/ticket/src/volume/ticket-volume.html | 6 +- 24 files changed, 330 insertions(+), 293 deletions(-) diff --git a/client/client/src/credit-classification-list/credit-classification-list.html b/client/client/src/credit-classification-list/credit-classification-list.html index ae410350d..378bb051d 100644 --- a/client/client/src/credit-classification-list/credit-classification-list.html +++ b/client/client/src/credit-classification-list/credit-classification-list.html @@ -18,17 +18,19 @@ - Credit - {{::insurance.credit}} + + - Grade - - - {{::insurance.grade}} + + - Date - {{::insurance.created | date:'dd/MM/yyyy' }} + + diff --git a/client/client/src/credit-insurance-list/credit-insurance-list.html b/client/client/src/credit-insurance-list/credit-insurance-list.html index a06283000..c2004d7cb 100644 --- a/client/client/src/credit-insurance-list/credit-insurance-list.html +++ b/client/client/src/credit-insurance-list/credit-insurance-list.html @@ -1,27 +1,28 @@ - - Requested credits - - - - - - - - {{::insurance.credit}} - {{::insurance.grade}} - {{::insurance.created | date: 'dd/MM/yyyy'}} - - - No results - - + + Requested credits + + + + + + + + {{::insurance.credit}} + {{::insurance.grade}} + {{::insurance.created | date: 'dd/MM/yyyy'}} + + + No results + + + diff --git a/client/client/src/credit-list/credit-list.html b/client/client/src/credit-list/credit-list.html index a3d51aa0e..a67b47a4c 100644 --- a/client/client/src/credit-list/credit-list.html +++ b/client/client/src/credit-list/credit-list.html @@ -1,28 +1,28 @@ - - Credit - - - - - - - - {{::credit.amount | number:2}} € - {{::credit.created | date:'dd/MM/yyyy HH:mm'}} - {{::credit.worker.firstName}} {{::credit.worker.name}} - - - No results - - - + + Credit + + + + + + + + {{::credit.amount | number:2}} € + {{::credit.created | date:'dd/MM/yyyy HH:mm'}} + {{::credit.worker.firstName}} {{::credit.worker.name}} + + + No results + + + diff --git a/client/client/src/greuge-list/greuge-list.html b/client/client/src/greuge-list/greuge-list.html index ea91180a3..0029f61fe 100644 --- a/client/client/src/greuge-list/greuge-list.html +++ b/client/client/src/greuge-list/greuge-list.html @@ -2,36 +2,35 @@ - - Greuge - - - - - - - - - {{greuge.shipped | date:'dd/MM/yyyy HH:mm' }} - {{greuge.description}} - {{greuge.amount | number:2}} € - {{greuge.greugeType.name}} + + Greuge + + + + + + + + + {{::greuge.shipped | date:'dd/MM/yyyy HH:mm' }} + {{::greuge.description}} + {{::greuge.amount | number:2}} € + {{::greuge.greugeType.name}} + + + No results + + + + {{edit.model.sumAmount | number:2}} € + - - No results - - - - {{edit.model.sumAmount | number:2}} € - - - - - + + diff --git a/client/client/src/index/index.html b/client/client/src/index/index.html index e0235052a..eab3b0bb9 100644 --- a/client/client/src/index/index.html +++ b/client/client/src/index/index.html @@ -14,11 +14,11 @@ - + diff --git a/client/client/src/index/index.js b/client/client/src/index/index.js index 6f49f2626..6a3ce70b9 100644 --- a/client/client/src/index/index.js +++ b/client/client/src/index/index.js @@ -2,13 +2,19 @@ import ngModule from '../module'; import './item-client'; export default class Controller { + constructor($scope) { this.$scope = $scope; this.clientSelected = null; } + search(index) { - index.accept(); + this.clients = []; + index.accept().then(res => { + this.clients = res.instances; + }); } + openSummary(client) { this.clientSelected = client; this.$scope.dialogSummaryClient.show(); diff --git a/client/client/src/invoices/invoices.html b/client/client/src/invoices/invoices.html index 2e1bf148c..e6f26abbd 100644 --- a/client/client/src/invoices/invoices.html +++ b/client/client/src/invoices/invoices.html @@ -1,38 +1,34 @@ - - Invoices - - - - - - - - - - - {{::invoice.ref}} - {{::invoice.issued | date:'dd/MM/yyyy' }} - {{::invoice.dued | date:'dd/MM/yyyy' }} - {{::invoice.amount | currency:'€':2}} - - - - No results - + + Invoices + + + + + + + + + + + {{::invoice.ref}} + {{::invoice.issued | date:'dd/MM/yyyy' }} + {{::invoice.dued | date:'dd/MM/yyyy' }} + {{::invoice.amount | currency:'€':2}} + + + No results + + - - - + \ No newline at end of file diff --git a/client/client/src/mandate/mandate.html b/client/client/src/mandate/mandate.html index 61dde6655..4a9dd7d68 100644 --- a/client/client/src/mandate/mandate.html +++ b/client/client/src/mandate/mandate.html @@ -1,30 +1,30 @@ - - Mandate - - - - - - - - - - {{::mandate.id}} - {{::mandate.company.code}} - {{::mandate.mandateType.name}} - {{::mandate.created | date:'dd/MM/yyyy HH:mm' }} - {{::mandate.finished | date:'dd/MM/yyyy HH:mm' || '-'}} - - - No results - - - + + Mandate + + + + + + + + + + {{::mandate.id}} + {{::mandate.company.code}} + {{::mandate.mandateType.name}} + {{::mandate.created | date:'dd/MM/yyyy HH:mm' }} + {{::mandate.finished | date:'dd/MM/yyyy HH:mm' || '-'}} + + + No results + + + \ No newline at end of file diff --git a/client/client/src/recovery-list/recovery-list.html b/client/client/src/recovery-list/recovery-list.html index 24f9ec2a3..b226fef25 100644 --- a/client/client/src/recovery-list/recovery-list.html +++ b/client/client/src/recovery-list/recovery-list.html @@ -1,36 +1,36 @@ - - Recovery - - - - - - - - - - lock - - {{::recovery.started | date:'dd/MM/yyyy' }} - {{recovery.finished | date:'dd/MM/yyyy' }} - {{::recovery.amount | currency:'€':0}} - {{::recovery.period}} - - - No results - - - + + Recovery + + + + + + + + + + lock + + {{::recovery.started | date:'dd/MM/yyyy' }} + {{recovery.finished | date:'dd/MM/yyyy' }} + {{::recovery.amount | currency:'€':0}} + {{::recovery.period}} + + + No results + + + diff --git a/client/core/src/components/step-control/step-control.html b/client/core/src/components/step-control/step-control.html index fffdfe04d..356584bc3 100644 --- a/client/core/src/components/step-control/step-control.html +++ b/client/core/src/components/step-control/step-control.html @@ -1,6 +1,6 @@
-
+
0) + this.$state.go(this._steps[0].state); + } + set currentState(state) { let isAllowed = true; @@ -17,7 +26,7 @@ export default class StepControl { } get totalSteps() { - return this.steps.length; + return this._steps.length; } get currentState() { @@ -25,36 +34,34 @@ export default class StepControl { } get currentStepIndex() { - for (let i = 0; i < this.steps.length; i++) { - if (this.steps[i].state == this.$state.current.name) + for (let i = 0; i < this._steps.length; i++) { + if (this._steps[i].state == this.$state.current.name) return i; } } onPreviousClick() { - let state = this.steps[this.currentStepIndex - 1].state; + let state = this._steps[this.currentStepIndex - 1].state; this.currentState = state; } onNextClick() { - let state = this.steps[this.currentStepIndex + 1].state; + let state = this._steps[this.currentStepIndex + 1].state; this.currentState = state; } canMovePrevious() { - return this.steps[0].state != this.currentState; + return this.currentStepIndex > 0; } canFinalize() { - let lastStep = this.steps[this.totalSteps - 1]; - return lastStep.state == this.currentState; + return this.currentStepIndex === this.totalSteps - 1; } canMoveNext() { - let lastStep = this.steps[this.totalSteps - 1]; - return lastStep.state != this.currentState; + return this.currentStepIndex < this.totalSteps - 1; } } diff --git a/client/item/src/history/history.html b/client/item/src/history/history.html index 9854894ce..e6795c2ba 100644 --- a/client/item/src/history/history.html +++ b/client/item/src/history/history.html @@ -1,31 +1,28 @@ - - Item history - - - - - - - - - {{::itemLog.description}} - {{::itemLog.action}} - {{::itemLog.user.name}} - {{::itemLog.creationDate | date:'dd/MM/yyyy HH:mm'}} - - - - - - - - - + + Item history + + + + + + + + + {{::itemLog.description}} + {{::itemLog.action}} + {{::itemLog.user.name}} + {{::itemLog.creationDate | date:'dd/MM/yyyy HH:mm'}} + + + No results + + + diff --git a/client/item/src/list/list.html b/client/item/src/list/list.html index a981f3716..492a08ef6 100644 --- a/client/item/src/list/list.html +++ b/client/item/src/list/list.html @@ -19,7 +19,6 @@ item="item"> - diff --git a/client/item/src/locale/es.yml b/client/item/src/locale/es.yml index 8843f0fbf..b6a3eca94 100644 --- a/client/item/src/locale/es.yml +++ b/client/item/src/locale/es.yml @@ -41,4 +41,5 @@ Add niche: Añadir nicho Remove niche: Quitar nicho Add barcode: Añadir código de barras Remove barcode: Quitar código de barras -Buyer: Comprador \ No newline at end of file +Buyer: Comprador +No results: Sin resultados \ No newline at end of file diff --git a/client/ticket/src/component/component.html b/client/ticket/src/component/component.html index 188825ad5..679d42332 100644 --- a/client/ticket/src/component/component.html +++ b/client/ticket/src/component/component.html @@ -58,10 +58,13 @@ {{::sale.quantity * component.value | currency:'€':3}} - + + + No results + - + diff --git a/client/ticket/src/data/step-one/step-one.html b/client/ticket/src/data/step-one/step-one.html index 9b07d94a5..e5b8b2ce3 100644 --- a/client/ticket/src/data/step-one/step-one.html +++ b/client/ticket/src/data/step-one/step-one.html @@ -1,6 +1,6 @@
- Basic data + Ticket configuration - Basic data - Step tree + Ticket configuration - Charge - Ticket id {{$ctrl.ticket.id}} + + diff --git a/client/ticket/src/expedition/ticket-expedition.html b/client/ticket/src/expedition/ticket-expedition.html index f85c4ca6f..e925535a5 100644 --- a/client/ticket/src/expedition/ticket-expedition.html +++ b/client/ticket/src/expedition/ticket-expedition.html @@ -1,42 +1,42 @@ - - Expedition - - - - - - - - - - - - - - delete - - {{expedition.itemFk}} - {{expedition.item.name}} - {{expedition.package.name}} - {{expedition.counter}} - {{expedition.checked}} - {{expedition.worker.firstName}} {{expedition.worker.name}} - {{expedition.created | date:'dd/MM/yyyy'}} - - - No results - - - + + Expedition + + + + + + + + + + + + + + delete + + {{::expedition.itemFk}} + {{::expedition.item.name}} + {{::expedition.package.name}} + {{::expedition.counter}} + {{::expedition.checked}} + {{::expedition.worker.firstName}} {{::expedition.worker.name}} + {{::expedition.created | date:'dd/MM/yyyy'}} + + + No results + + + diff --git a/client/ticket/src/list/ticket-list.html b/client/ticket/src/list/ticket-list.html index aee90bb23..87304ee15 100644 --- a/client/ticket/src/list/ticket-list.html +++ b/client/ticket/src/list/ticket-list.html @@ -30,7 +30,7 @@ - @@ -62,7 +62,7 @@
- +
diff --git a/client/ticket/src/list/ticket-list.js b/client/ticket/src/list/ticket-list.js index ee48e2c73..5f6297a09 100644 --- a/client/ticket/src/list/ticket-list.js +++ b/client/ticket/src/list/ticket-list.js @@ -31,7 +31,10 @@ export default class Controller { } search(index) { - index.accept(); + this.tickets = []; + index.accept().then(res => { + this.tickets = res.instances; + }); } } diff --git a/client/ticket/src/sale-checked/sale-checked.html b/client/ticket/src/sale-checked/sale-checked.html index 8eb4aecb3..66d3416f8 100644 --- a/client/ticket/src/sale-checked/sale-checked.html +++ b/client/ticket/src/sale-checked/sale-checked.html @@ -1,27 +1,35 @@ - - Sale checked - - - - - - - - - - - - - - - - - - -
Is checkedItemDescriptionQuantity
{{::sale.itemFk}}{{::sale.quantity}}
-
+ + Sale checked + + + + + + + + + + + + + + + + + + + + +
Is checkedItemDescriptionQuantity
+ + + {{::sale.itemFk}}{{::sale.quantity}}
No results
+
+
diff --git a/client/ticket/src/sale/sale.html b/client/ticket/src/sale/sale.html index 7b57f603a..ec66bbf75 100644 --- a/client/ticket/src/sale/sale.html +++ b/client/ticket/src/sale/sale.html @@ -15,7 +15,7 @@ - + {{::sale.discount}} % {{::sale.quantity * sale.price | currency:'€':2}} + + No results + + diff --git a/client/ticket/src/tracking/index.html b/client/ticket/src/tracking/index.html index 9a23345fa..4d12238ef 100644 --- a/client/ticket/src/tracking/index.html +++ b/client/ticket/src/tracking/index.html @@ -1,28 +1,28 @@ - - Tracking - - - - - - - - {{::ticket.state.name}} - {{::ticket.worker.firstName}} {{ticket.worker.name}} - {{::ticket.created | date:'dd/MM/yyyy HH:mm'}} - - - No results - - - + + Tracking + + + + + + + + {{::ticket.state.name}} + {{::ticket.worker.firstName}} {{ticket.worker.name}} + {{::ticket.created | date:'dd/MM/yyyy HH:mm'}} + + + No results + + +
diff --git a/client/ticket/src/volume/ticket-volume.html b/client/ticket/src/volume/ticket-volume.html index 935da8f99..2c47ca7cd 100644 --- a/client/ticket/src/volume/ticket-volume.html +++ b/client/ticket/src/volume/ticket-volume.html @@ -15,7 +15,7 @@ - + {{::sale.itemFk}} {{::sale.quantity}} @@ -23,8 +23,12 @@ {{::sale.volume.volumeTimesQuantity | number:3}} {{::sale.volume.m3_total | number:3}} + + No results + +