item history

This commit is contained in:
Daniel Herrero 2018-02-08 12:04:33 +01:00
parent 71eaa53dae
commit 4ec0a3c46d
5 changed files with 14 additions and 5 deletions

View File

@ -1,4 +1,4 @@
<mg-ajax path="/item/api/ItemLogs/getLog" options="vnIndex"></mg-ajax> <mg-ajax path="/item/api/ItemLogs/getLog" options="vnIndexNonAuto"></mg-ajax>
<vn-card pad-medium> <vn-card pad-medium>
<vn-vertical pad-medium> <vn-vertical pad-medium>
<vn-title vn-one margin-large-bottom>Item history</vn-title> <vn-title vn-one margin-large-bottom>Item history</vn-title>
@ -6,7 +6,7 @@
<vn-column-header vn-one pad-medium-h field="originFk" text="Origin"></vn-column-header> <vn-column-header vn-one pad-medium-h field="originFk" text="Origin"></vn-column-header>
<vn-column-header vn-two pad-medium-h field="userFk" text="Changed by"></vn-column-header> <vn-column-header vn-two pad-medium-h field="userFk" text="Changed by"></vn-column-header>
<vn-column-header vn-one pad-medium-h field="action" text="Action"></vn-column-header> <vn-column-header vn-one pad-medium-h field="action" text="Action"></vn-column-header>
<vn-column-header vn-one pad-medium-h field="creationDate" text="Date"></vn-column-header> <vn-column-header vn-one pad-medium-h field="creationDate" text="Date" default-order="ASC"></vn-column-header>
<vn-column-header vn-one pad-medium-h field="description" text="Description"></vn-column-header> <vn-column-header vn-one pad-medium-h field="description" text="Description"></vn-column-header>
</vn-grid-header> </vn-grid-header>
<vn-one class="list list-content"> <vn-one class="list list-content">

View File

@ -1,5 +1,7 @@
import ngModule from '../module'; import ngModule from '../module';
import FilterItemList from '../filterItemList';
ngModule.component('vnItemHistory', { ngModule.component('vnItemHistory', {
template: require('./item-history.html') template: require('./item-history.html'),
controller: FilterItemList
}); });

View File

@ -1,5 +1,6 @@
export * from './module'; export * from './module';
import './filterItemList';
import './list/list'; import './list/list';
import './filter-panel/filter-panel'; import './filter-panel/filter-panel';
import './create/item-create'; import './create/item-create';

View File

@ -12,7 +12,10 @@ module.exports = Self => {
relation: "item" relation: "item"
}, },
{ {
relation: "user" relation: "user",
scope: {
fields: ["name"]
}
}] }]
}; };
} }

View File

@ -18,6 +18,9 @@
}, },
"description": { "description": {
"type": "String" "type": "String"
},
"action": {
"type": "String"
} }
}, },
"relations": { "relations": {
@ -28,7 +31,7 @@
}, },
"user": { "user": {
"type": "belongsTo", "type": "belongsTo",
"model": "User", "model": "Account",
"foreignKey": "userFk" "foreignKey": "userFk"
} }
} }