fixes #4866 más detalle en faltas #1201
|
@ -3,6 +3,8 @@
|
|||
url="{{$ctrl.url}}"
|
||||
filter="$ctrl.filter"
|
||||
link="{originFk: $ctrl.originId}"
|
||||
where="{changedModel: $ctrl.changedModel,
|
||||
changedModelId: $ctrl.changedModelId}"
|
||||
data="$ctrl.logs"
|
||||
limit="20"
|
||||
auto-load="true">
|
||||
|
@ -14,9 +16,9 @@
|
|||
<vn-tr>
|
||||
<vn-th field="creationDate">Date</vn-th>
|
||||
<vn-th field="userFk" shrink>User</vn-th>
|
||||
<vn-th field="changedModel">Model</vn-th>
|
||||
<vn-th field="changedModel" ng-if="$ctrl.showModelName">Model</vn-th>
|
||||
<vn-th field="action" shrink>Action</vn-th>
|
||||
<vn-th field="changedModelValue">Name</vn-th>
|
||||
<vn-th field="changedModelValue" ng-if="$ctrl.showModelName">Name</vn-th>
|
||||
<vn-th expand>Changes</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
|
@ -31,13 +33,13 @@
|
|||
translate>{{::log.user.name || 'System' | translate}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td>
|
||||
<vn-td ng-if="$ctrl.showModelName">
|
||||
{{::log.changedModel}}
|
||||
</vn-td>
|
||||
<vn-td translate>
|
||||
{{::$ctrl.actionsText[log.action]}}
|
||||
</vn-td>
|
||||
<vn-td expand>
|
||||
<vn-td expand ng-if="$ctrl.showModelName">
|
||||
{{::log.changedModelValue}}
|
||||
</vn-td>
|
||||
<vn-td expand>
|
||||
|
|
|
@ -57,6 +57,10 @@ export default class Controller extends Section {
|
|||
}
|
||||
}
|
||||
|
||||
get showModelName() {
|
||||
return !(this.changedModel && this.changedModelId);
|
||||
}
|
||||
|
||||
formatValue(value) {
|
||||
if (typeof value === 'string' && validDate.test(value))
|
||||
value = new Date(value);
|
||||
|
@ -86,6 +90,8 @@ ngModule.vnComponent('vnLog', {
|
|||
bindings: {
|
||||
model: '<',
|
||||
originId: '<',
|
||||
changedModel: '<?',
|
||||
changedModelId: '<?',
|
||||
url: '@'
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue