Rolling back to old pagination

This commit is contained in:
Joan Sanchez 2018-05-11 08:35:28 +02:00
parent 3a62f25c70
commit bd069a1f39
19 changed files with 54 additions and 35 deletions

View File

@ -12,7 +12,7 @@
<vn-horizontal
vn-one class="list list-element text-center"
pad-small-bottom
ng-repeat="insurance in $ctrl.instances track by insurance.id">
ng-repeat="insurance in index.model.instances track by insurance.id">
<vn-one pad-medium-h>{{::insurance.credit}}</vn-one>
<vn-one pad-medium-h>{{::insurance.grade}}</vn-one>
<vn-two pad-medium-h>{{::insurance.created | date: 'dd/MM/yyyy'}}</vn-two>
@ -22,7 +22,8 @@
<vn-horizontal vn-one class="list list-footer"></vn-horizontal>
</vn-vertical>
</vn-card>
<vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
</vn-vertical>
<a ui-sref="clientCard.creditInsurance.create({classificationId: {{index.params.classificationId}}})"
fixed-bottom-right vn-tooltip="New classification" vn-bind="+" tooltip-position="left" ng-if="!$ctrl.isClosed">

View File

@ -12,7 +12,7 @@
<vn-horizontal
vn-one class="list list-element text-center"
pad-small-bottom
ng-repeat="credit in $ctrl.instances track by credit.id">
ng-repeat="credit in index.model.instances track by credit.id">
<vn-one pad-medium-h>{{::credit.amount | number:2}} €</vn-one>
<vn-two pad-medium-h>{{::credit.created | date:'dd/MM/yyyy HH:mm'}}</vn-two>
<vn-two pad-medium-h>{{::credit.worker.firstName}} {{::credit.worker.name}}</vn-two>
@ -22,7 +22,8 @@
<vn-horizontal vn-one class="list list-footer"></vn-horizontal>
</vn-vertical>
</vn-card>
<vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
</vn-vertical>
<a ui-sref="clientCard.credit.create" vn-bind="+" fixed-bottom-right>
<vn-float-button icon="add"></vn-float-button>

View File

@ -14,7 +14,7 @@
<vn-horizontal
class="list list-element text-center"
pad-small-bottom
ng-repeat="greuge in $ctrl.instances track by $index">
ng-repeat="greuge in index.model.instances track by $index">
<vn-one pad-medium-h>{{::greuge.shipped | date:'dd/MM/yyyy HH:mm' }}</vn-one>
<vn-two pad-medium-h>{{::greuge.description}}</vn-two>
<vn-one pad-medium-h>{{::greuge.amount | number:2}} €</vn-one>
@ -30,7 +30,8 @@
</vn-horizontal>
</vn-vertical>
</vn-card>
<vn-auto-paging margin-large-top vn-one index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
<vn-paging margin-large-top vn-one index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging margin-large-top vn-one index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
</vn-vertical>
<a ui-sref="clientCard.greuge.create" vn-bind="+" fixed-bottom-right>
<vn-float-button icon="add"></vn-float-button>

View File

@ -14,11 +14,12 @@
</vn-card>
<vn-card margin-medium-top>
<vn-item-client
ng-repeat="client in $ctrl.clients"
ng-repeat="client in index.model.instances track by client.id"
client="client">
</vn-item-client>
</vn-card>
<vn-auto-paging index="index" total="index.model.count" items="$ctrl.clients"></vn-auto-paging>
<vn-paging index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging index="index" total="index.model.count" items="$ctrl.clients"></vn-auto-paging> -->
</div>
</div>
<a ui-sref="create" vn-bind="+" fixed-bottom-right>

View File

@ -9,10 +9,11 @@ export default class Controller {
}
search(index) {
this.clients = [];
index.accept();
/* this.clients = [];
index.accept().then(res => {
this.clients = res.instances;
});
}); */
}
openSummary(client) {

View File

@ -17,7 +17,7 @@
<vn-horizontal
class="list list-element"
pad-small-bottom
ng-repeat="invoice in $ctrl.instances track by greuge.id">
ng-repeat="invoice in index.model.instances track by greuge.id">
<vn-one>{{::invoice.ref}}</vn-one>
<vn-one>{{::invoice.issued | date:'dd/MM/yyyy' }}</vn-one>
<vn-one>{{::invoice.dued | date:'dd/MM/yyyy' }}</vn-one>
@ -30,5 +30,6 @@
</vn-vertical>
</vn-vertical>
</vn-card>
<vn-auto-paging margin-large-top vn-one index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
<vn-paging margin-large-top vn-one index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging margin-large-top vn-one index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
</vn-vertical>

View File

@ -14,7 +14,7 @@
<vn-horizontal
vn-one class="list list-element text-center"
pad-small-bottom
ng-repeat="mandate in $ctrl.instances track by mandate.id">
ng-repeat="mandate in index.model.instances track by mandate.id">
<vn-one pad-medium-h>{{::mandate.id}}</vn-one>
<vn-one pad-medium-h>{{::mandate.company.code}}</vn-one>
<vn-one pad-medium-h>{{::mandate.mandateType.name}}</vn-one>
@ -26,5 +26,6 @@
<vn-horizontal vn-one class="list list-footer"></vn-horizontal>
</vn-vertical>
</vn-card>
<vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
</vn-vertical>

View File

@ -13,7 +13,7 @@
<vn-horizontal
vn-one class="list list-element text-center"
pad-small-bottom
ng-repeat="recovery in $ctrl.instances track by $index">
ng-repeat="recovery in index.model.instances track by $index">
<vn-none pad-medium-h style="color:#FFA410;">
<i class="material-icons pointer"
vn-tooltip="Finish that recovery period"
@ -30,7 +30,8 @@
<vn-horizontal vn-one class="list list-footer"></vn-horizontal>
</vn-vertical>
</vn-card>
<vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
</vn-vertical>
<a ui-sref="clientCard.recovery.create" vn-bind="+" fixed-bottom-right>
<vn-float-button icon="add"></vn-float-button>

View File

@ -24,5 +24,6 @@
<vn-horizontal vn-one class="list list-footer text-center"></vn-horizontal>
</vn-vertical>
</vn-card>
<vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
</vn-vertical>

View File

@ -15,11 +15,12 @@
</vn-card>
<vn-card margin-medium-top>
<vn-item-product
ng-repeat="item in $ctrl.items track by $index"
ng-repeat="item in index.model.instances track by item.id"
item="item">
</vn-item-product>
</vn-card>
<vn-auto-paging index="index" total="index.model.count" items="$ctrl.items"></vn-auto-paging>
<vn-paging index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging index="index" total="index.model.count" items="$ctrl.items"></vn-auto-paging> -->
</div>
</div>
<a ui-sref="item.create" vn-bind="+" fixed-bottom-right>

View File

@ -14,10 +14,11 @@ class ItemList {
}
search(index) {
this.items = [];
index.accept();
/* this.items = [];
index.accept().then(res => {
this.items = res.instances;
});
}); */
}
cloneItem(item) {

View File

@ -65,6 +65,7 @@
</tbody>
</table>
</vn-vertical>
<vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
</vn-card>
</vn-vertical>

View File

@ -17,7 +17,7 @@
<vn-horizontal
vn-one class="list list-element text-center"
pad-small-bottom
ng-repeat="expedition in $ctrl.instances track by expedition.id">
ng-repeat="expedition in index.model.instances track by expedition.id">
<vn-one pad-medium-h style="color:#FFA410;">
<i
pointer
@ -38,5 +38,6 @@
<vn-horizontal vn-one class="list list-footer"></vn-horizontal>
</vn-vertical>
</vn-card>
<vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
</vn-vertical>

View File

@ -30,7 +30,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="ticket in $ctrl.tickets track by ticket.id"
<tr ng-repeat="ticket in index.model.instances track by ticket.id"
class="{{::$ctrl.compareDate(ticket.shipped)}} clickable"
ui-sref="ticket.card.summary({id: {{::ticket.id}}})">
<td>
@ -62,7 +62,8 @@
</table>
</vn-horizontal>
</vn-card>
<vn-auto-paging vn-one index="index" total="index.model.count" items="$ctrl.tickets"></vn-auto-paging>
<vn-paging vn-one index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging vn-one index="index" total="index.model.count" items="$ctrl.tickets"></vn-auto-paging> -->
</div>
</div>
<a ui-sref="ticket.create" vn-bind="+" fixed-bottom-right>

View File

@ -31,10 +31,11 @@ export default class Controller {
}
search(index) {
this.tickets = [];
index.accept();
/* this.tickets = [];
index.accept().then(res => {
this.tickets = res.instances;
});
}); */
}
}

View File

@ -13,7 +13,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="sale in $ctrl.instances track by sale.id">
<tr ng-repeat="sale in index.model.instances track by sale.id">
<td style="text-align:center!important">
<vn-check style="text-align:center!important"
vn-one field="sale.isChecked.isChecked"
@ -31,5 +31,6 @@
</table>
</vn-vertical>
</vn-card>
<vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
</vn-vertical>

View File

@ -61,7 +61,8 @@
</table>
</vn-vertical>
</vn-card>
<vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="index.model.instances"></vn-auto-paging>
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="index.model.instances"></vn-auto-paging> -->
<vn-item-descriptor-popover vn-id="descriptor">
</vn-item-descriptor-popover>
</vn-popover>

View File

@ -12,7 +12,7 @@
<vn-horizontal
vn-one class="list list-element text-center"
pad-small-bottom
ng-repeat="ticket in $ctrl.instances track by ticket.id">
ng-repeat="ticket in index.model.instances track by ticket.id">
<vn-one pad-medium-h>{{::ticket.state.name}}</vn-one>
<vn-two pad-medium-h>{{::ticket.worker.firstName}} {{ticket.worker.name}}</vn-two>
<vn-two pad-medium-h>{{::ticket.created | date:'dd/MM/yyyy HH:mm'}}</vn-two>
@ -22,7 +22,8 @@
<vn-horizontal vn-one class="list list-footer"></vn-horizontal>
</vn-vertical>
</vn-card>
<vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
</vn-vertical>
<a ui-sref="ticket.card.tracking.edit" vn-bind="+" fixed-bottom-right>
<vn-float-button icon="add"></vn-float-button>

View File

@ -15,7 +15,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="sale in $ctrl.instances track by sale.id" class="list list-element">
<tr ng-repeat="sale in index.model.instances track by sale.id" class="list list-element">
<td number>{{::sale.itemFk}}</td>
<td><vn-fetched-tags sale="sale"/></td>
<td number>{{::sale.quantity}}</td>
@ -30,5 +30,6 @@
</table>
</vn-vertical>
</vn-card>
<vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging>
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
</vn-vertical>