ruta acceso greuge y objetos
This commit is contained in:
parent
d3e7f3eca2
commit
9638f5b529
|
@ -129,6 +129,17 @@
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"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 './web-access/web-access';
|
||||||
import './credit-list/credit-list';
|
import './credit-list/credit-list';
|
||||||
import './credit-create/credit-create';
|
import './credit-create/credit-create';
|
||||||
|
import './greuge/greuge';
|
||||||
|
|
|
@ -10,12 +10,12 @@
|
||||||
|
|
||||||
<vn-grid-header on-order="$ctrl.onOrder(field, order)">
|
<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-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-six></vn-six>
|
||||||
</vn-grid-header>
|
</vn-grid-header>
|
||||||
<vn-one class="list list-content">
|
<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-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-two pad-medium-h>{{::credit.created | date:'dd/MM/yyyy HH:mm' }}</vn-two>
|
||||||
<vn-six></vn-six>
|
<vn-six></vn-six>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
|
|
@ -11,7 +11,7 @@ class ClientCreditList {
|
||||||
this.filter(`${field} ${order}`);
|
this.filter(`${field} ${order}`);
|
||||||
}
|
}
|
||||||
filter(order) {
|
filter(order) {
|
||||||
if (this.$.index) {
|
if (this.$.index && this.client && this.client.id) {
|
||||||
this.waitingMgCrud = 0;
|
this.waitingMgCrud = 0;
|
||||||
this.$.index.filter = {
|
this.$.index.filter = {
|
||||||
page: 1,
|
page: 1,
|
||||||
|
@ -30,7 +30,7 @@ class ClientCreditList {
|
||||||
this.waitingMgCrud++;
|
this.waitingMgCrud++;
|
||||||
this.$timeout(() => {
|
this.$timeout(() => {
|
||||||
this.filter(order);
|
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": {
|
"CreditClassification": {
|
||||||
"dataSource": "salix"
|
"dataSource": "salix"
|
||||||
|
},
|
||||||
|
"greuge": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"greugeType": {
|
||||||
|
"dataSource": "vn"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue