salix/modules/worker/front/log/index.html

104 lines
4.9 KiB
HTML
Raw Normal View History

<vn-crud-model
vn-id="model"
url="{{$ctrl.url}}"
filter="$ctrl.filter"
link="{originFk: $ctrl.originId}"
data="$ctrl.logs"
limit="20"
auto-load="true">
</vn-crud-model>
2019-10-02 17:24:42 +00:00
<vn-data-viewer
model="model"
2019-11-04 07:05:00 +00:00
class="vn-w-xl">
2019-10-01 14:17:57 +00:00
<vn-card>
<vn-table model="model">
<vn-thead>
<vn-tr>
2020-02-10 13:32:52 +00:00
<vn-th field="creationDate">Date</vn-th>
2019-11-04 07:05:00 +00:00
<vn-th field="userFk" class="expendable" shrink>Author</vn-th>
<vn-th field="changedModel" class="expendable" shrink>Model</vn-th>
<vn-th field="action" class="expendable" shrink>Action</vn-th>
2020-02-10 13:32:52 +00:00
<vn-th field="changedModelValue" class="expendable">Name</vn-th>
<vn-th expand>Before</vn-th>
<vn-th expand>After</vn-th>
2019-10-01 14:17:57 +00:00
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="log in $ctrl.logs">
2020-02-10 13:32:52 +00:00
<vn-td expand>
{{::log.creationDate | date:'dd/MM/yyyy HH:mm'}}
2019-10-01 14:17:57 +00:00
<div class="changes">
<div>
<span translate class="label">Changed by</span><span class="label">: </span>
<span
ng-class="{'link': log.user.worker.id, 'value': !log.user.worker.id}"
2020-06-08 09:05:17 +00:00
ng-click="$ctrl.showWorkerDescriptor($event, log.user.worker.id)"
translate>{{::log.user.name || 'System' | translate}}
2019-10-01 14:17:57 +00:00
</span>
2018-11-05 08:29:05 +00:00
</div>
2019-10-01 14:17:57 +00:00
<div>
<span translate class="label">Model</span><span class="label">: </span>
<span translate class="value">{{::log.changedModel | dashIfEmpty}}</span>
</div>
<div>
<span translate class="label">Action</span><span class="label">: </span>
<span translate class="value">{{::$ctrl.actionsText[log.action] | dashIfEmpty}}</span>
</div>
<div>
<span translate class="label">Name</span><span class="label">: </span>
<span translate class="value">{{::log.changedModelValue | dashIfEmpty}}</span>
</div>
</div>
</vn-td>
<vn-td class="expendable">
<span
2020-06-08 09:05:17 +00:00
ng-class="{'link': log.user.worker.id, 'value': !log.user.worker.id}"
ng-click="$ctrl.showWorkerDescriptor($event, log.user.worker.id)"
translate>{{::log.user.name || 'System' | translate}}
2019-10-01 14:17:57 +00:00
</span>
</vn-td>
<vn-td class="expendable">
{{::log.changedModel}}
</vn-td>
<vn-td translate class="expendable">
{{::$ctrl.actionsText[log.action]}}
</vn-td>
2020-02-10 13:32:52 +00:00
<vn-td class="expendable" expand>
2019-10-01 14:17:57 +00:00
{{::log.changedModelValue}}
</vn-td>
<vn-td expand class="before">
2019-10-01 14:17:57 +00:00
<vn-one ng-repeat="old in log.oldProperties">
<div>
<span translate class="label">{{::old.key}}</span><span class="label">: </span>
<span translate class="value">{{::old.value | dashIfEmpty}}</span>
2019-10-01 14:17:57 +00:00
</div>
</vn-one>
</vn-td>
<vn-td expand class="after">
2019-10-01 14:17:57 +00:00
<vn-one
ng-repeat="new in log.newProperties"
ng-if="!log.description"
id="newInstance">
<div>
<span translate class="label">{{::new.key}}</span><span class="label">: </span>
<span translate class="value">{{::new.value | dashIfEmpty}}</span>
2019-10-01 14:17:57 +00:00
</div>
</vn-one>
<vn-one
ng-if="!log.newProperties"
id="description">
<div>
<span>{{::log.description}}</span>
2019-10-01 14:17:57 +00:00
</div>
</vn-one>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
<vn-pagination model="model"></vn-pagination>
2018-11-05 08:29:05 +00:00
</vn-card>
2019-10-02 17:24:42 +00:00
</vn-data-viewer>
2019-04-02 09:04:53 +00:00
<vn-worker-descriptor-popover
2020-04-25 09:50:04 +00:00
vn-id="workerDescriptor">
2019-04-02 09:04:53 +00:00
</vn-worker-descriptor-popover>