Tarea #14 Interfaz lista mandatos
This commit is contained in:
parent
7f0dc42500
commit
786d321794
|
@ -152,6 +152,14 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
"url": "/mandate",
|
||||
"state": "clientCard.mandate",
|
||||
"component": "vn-client-mandate",
|
||||
"menu": {
|
||||
"description": "Mandate",
|
||||
"icon": "pan_tool"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -18,3 +18,4 @@ import './credit-list/credit-list';
|
|||
import './credit-create/credit-create';
|
||||
import './greuge-list/greuge-list';
|
||||
import './greuge-create/greuge-create';
|
||||
import './mandate/mandate';
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// Generic object to list models, related to the client, with mgCrud
|
||||
export default class FilterClientList {
|
||||
constructor($scope, $timeout, $state) {
|
||||
this.$ = $scope;
|
||||
|
@ -24,8 +25,10 @@ export default class FilterClientList {
|
|||
}
|
||||
|
||||
this.$.index.accept();
|
||||
} else if (!this.clientFk) {
|
||||
throw new Error('Error: ClientFk not found');
|
||||
} else if (this.waitingMgCrud > 3) {
|
||||
throw new Error('Magic Crud is not loaded');
|
||||
throw new Error('Error: Magic Crud is not loaded');
|
||||
} else {
|
||||
this.waitingMgCrud++;
|
||||
this.$timeout(() => {
|
||||
|
|
|
@ -19,5 +19,6 @@
|
|||
"Address": "Consignatario",
|
||||
"Credit" : "Crédito",
|
||||
"Secured credit": "Crédito asegurado",
|
||||
"Verified data": "Datos comprobados"
|
||||
"Verified data": "Datos comprobados",
|
||||
"Mandate": "Mandato"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Company": "Empresa",
|
||||
"Register date": "Fecha alta",
|
||||
"End date": "Fecha baja"
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
<mg-ajax path="/client/api/mandate/filter" options="vnIndexNonAuto"></mg-ajax>
|
||||
<vn-card pad-medium>
|
||||
<vn-vertical pad-medium>
|
||||
<vn-title vn-one margin-large-bottom>Mandate</vn-title>
|
||||
|
||||
<vn-grid-header on-order="$ctrl.onOrder(field, order)">
|
||||
<vn-column-header vn-one pad-medium-h field="id" text="Id"></vn-column-header>
|
||||
<vn-column-header vn-one pad-medium-h field="company" text="Company"></vn-column-header>
|
||||
<vn-column-header vn-one pad-medium-h field="type" text="Type"></vn-column-header>
|
||||
<vn-column-header vn-one pad-medium-h field="created" text="Register date" default-order="ASC"></vn-column-header>
|
||||
<vn-column-header vn-one pad-medium-h field="finished" text="End date"></vn-column-header>
|
||||
</vn-grid-header>
|
||||
<vn-one class="list list-content">
|
||||
<vn-horizontal
|
||||
vn-one class="list list-element text-center"
|
||||
pad-small-bottom
|
||||
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}}</vn-one>
|
||||
<vn-one pad-medium-h>{{::mandate.type}}</vn-one>
|
||||
<vn-one pad-medium-h>{{::mandate.created | date:'dd/MM/yyyy HH:mm' }}</vn-one>
|
||||
<vn-one pad-medium-h>{{::mandate.finished | date:'dd/MM/yyyy HH:mm' || '-'}}</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-one>
|
||||
<vn-one class="text-center pad-small-v" ng-if="index.model.count === 0" translate>No results</vn-one>
|
||||
<vn-horizontal vn-one class="list list-footer"></vn-horizontal>
|
||||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||
|
||||
</vn-vertical>
|
||||
</vn-card>
|
|
@ -0,0 +1,7 @@
|
|||
import ngModule from '../module';
|
||||
import FilterClientList from '../filterClientList';
|
||||
|
||||
ngModule.component('vnClientMandate', {
|
||||
template: require('./mandate.html'),
|
||||
controller: FilterClientList
|
||||
});
|
Loading…
Reference in New Issue