#769 crear sección log en item y ticket
This commit is contained in:
parent
36f048e4ef
commit
5ef3820912
|
@ -363,10 +363,10 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"url" : "/history",
|
||||
"state": "client.card.history",
|
||||
"component": "vn-client-history",
|
||||
"description": "History",
|
||||
"url" : "/log",
|
||||
"state": "client.card.log",
|
||||
"component": "vn-client-log",
|
||||
"description": "Log",
|
||||
"menu": {
|
||||
"icon": "history"
|
||||
}
|
||||
|
|
|
@ -33,4 +33,4 @@ import './contact';
|
|||
import './sample/index';
|
||||
import './sample/create';
|
||||
import './web-payment';
|
||||
import './history';
|
||||
import './log';
|
||||
|
|
|
@ -7,11 +7,11 @@ class Controller {
|
|||
this.$stateParams = $stateParams;
|
||||
this.filter = {
|
||||
include: [{
|
||||
relation: "user",
|
||||
relation: 'user',
|
||||
scope: {
|
||||
fields: ["name"]
|
||||
}
|
||||
}]
|
||||
fields: ['name'],
|
||||
},
|
||||
}],
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -22,17 +22,18 @@ class Controller {
|
|||
set logs(value) {
|
||||
this._logs = value;
|
||||
|
||||
if (this.logs)
|
||||
this.logs.forEach(log => {
|
||||
if (this.logs) {
|
||||
this.logs.forEach((log) => {
|
||||
log.oldProperties = this.getInstance(log.oldInstance);
|
||||
log.newProperties = this.getInstance(log.newInstance);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getInstance(instance) {
|
||||
let properties = [];
|
||||
const properties = [];
|
||||
|
||||
Object.keys(instance).forEach(property => {
|
||||
Object.keys(instance).forEach((property) => {
|
||||
properties.push({key: property, value: instance[property]});
|
||||
});
|
||||
|
||||
|
@ -42,7 +43,7 @@ class Controller {
|
|||
|
||||
Controller.$inject = ['$scope', '$stateParams'];
|
||||
|
||||
ngModule.component('vnClientHistory', {
|
||||
ngModule.component('vnClientLog', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller
|
||||
controller: Controller,
|
||||
});
|
Loading…
Reference in New Issue