ruta acceso greuge y objetos
This commit is contained in:
parent
d3e7f3eca2
commit
9638f5b529
|
@ -129,6 +129,17 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
"url": "/greuge",
|
||||
"state": "clientCard.greuge",
|
||||
"component": "vn-client-greuge",
|
||||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
},
|
||||
"menu": {
|
||||
"description": "Greuge",
|
||||
"icon": "work"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -16,3 +16,4 @@ import './note-create/note-create';
|
|||
import './web-access/web-access';
|
||||
import './credit-list/credit-list';
|
||||
import './credit-create/credit-create';
|
||||
import './greuge/greuge';
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
|
||||
<vn-grid-header on-order="$ctrl.onOrder(field, order)">
|
||||
<vn-column-header vn-one pad-medium-h field="amount" text="Credit"></vn-column-header>
|
||||
<vn-column-header vn-two pad-medium-h field="created" text="Since"></vn-column-header>
|
||||
<vn-column-header vn-two pad-medium-h field="created" text="Since" default-order="ASC"></vn-column-header>
|
||||
<vn-six></vn-six>
|
||||
</vn-grid-header>
|
||||
<vn-one class="list list-content">
|
||||
<vn-horizontal vn-one class="list list-element text-center" ng-repeat="credit in index.model.instances track by credit.id">
|
||||
<vn-one pad-medium-h>{{::credit.amount | number:2}}</vn-one>
|
||||
<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-six></vn-six>
|
||||
</vn-horizontal>
|
||||
|
|
|
@ -11,7 +11,7 @@ class ClientCreditList {
|
|||
this.filter(`${field} ${order}`);
|
||||
}
|
||||
filter(order) {
|
||||
if (this.$.index) {
|
||||
if (this.$.index && this.client && this.client.id) {
|
||||
this.waitingMgCrud = 0;
|
||||
this.$.index.filter = {
|
||||
page: 1,
|
||||
|
@ -30,7 +30,7 @@ class ClientCreditList {
|
|||
this.waitingMgCrud++;
|
||||
this.$timeout(() => {
|
||||
this.filter(order);
|
||||
});
|
||||
}, 250);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
ngModule.component('vnClientGreuge', {
|
||||
template: require('./greuge.html'),
|
||||
bindings: {
|
||||
client: '<'
|
||||
}
|
||||
});
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "greugeType",
|
||||
"base": "VnModel",
|
||||
"properties": {
|
||||
"id": {
|
||||
"id": true,
|
||||
"type": "Number",
|
||||
"description": "Identifier"
|
||||
},
|
||||
"name": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "greuge",
|
||||
"base": "VnModel",
|
||||
"properties": {
|
||||
"id": {
|
||||
"id": true,
|
||||
"type": "Number",
|
||||
"description": "Identifier"
|
||||
},
|
||||
"description": {
|
||||
"type": "String"
|
||||
},
|
||||
"amount": {
|
||||
"type": "Number"
|
||||
},
|
||||
"shipped": {
|
||||
"type": "date"
|
||||
},
|
||||
"created": {
|
||||
"type": "date"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"client": {
|
||||
"type": "belongsTo",
|
||||
"model": "Client",
|
||||
"foreignKey": "clientFk"
|
||||
},
|
||||
"greugeType": {
|
||||
"type": "belongsTo",
|
||||
"model": "greugeType",
|
||||
"foreignKey": "greugeTypeFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -59,5 +59,11 @@
|
|||
},
|
||||
"CreditClassification": {
|
||||
"dataSource": "salix"
|
||||
},
|
||||
"greuge": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"greugeType": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue