113 lines
4.3 KiB
HTML
113 lines
4.3 KiB
HTML
<vn-crud-model
|
|
vn-id="model"
|
|
url="TicketDms"
|
|
link="{ticketFk: $ctrl.$params.id}"
|
|
filter="::$ctrl.filter"
|
|
limit="20"
|
|
data="$ctrl.ticketDms"
|
|
order="dmsFk DESC"
|
|
auto-load="true">
|
|
</vn-crud-model>
|
|
<vn-data-viewer model="model">
|
|
<vn-card class="vn-w-lg">
|
|
<vn-table model="model">
|
|
<vn-thead>
|
|
<vn-tr>
|
|
<vn-th field="dmsFk" number shrink>Id</vn-th>
|
|
<vn-th field="dmsTypeFk" shrink>Type</vn-th>
|
|
<vn-th field="hardCopyNumber" shrink number>Order</vn-th>
|
|
<vn-th field="reference" shrink>Reference</vn-th>
|
|
<vn-th expand>Description</vn-th>
|
|
<vn-th field="hasFile" shrink>Original</vn-th>
|
|
<vn-th shrink>File</vn-th>
|
|
<vn-th shrink>Employee</vn-th>
|
|
<vn-th field="created">Created</vn-th>
|
|
<vn-th shrink></vn-th>
|
|
<vn-th shrink></vn-th>
|
|
<vn-th shrink></vn-th>
|
|
</vn-tr>
|
|
</vn-thead>
|
|
<vn-tbody>
|
|
<vn-tr ng-repeat="document in $ctrl.ticketDms">
|
|
<vn-td number shrink>{{::document.dmsFk}}</vn-td>
|
|
<vn-td shrink>
|
|
<span title="{{::document.dms.dmsType.name}}">
|
|
{{::document.dms.dmsType.name}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td shrink number>
|
|
<span class="chip" title="{{::document.dms.hardCopyNumber}}"
|
|
ng-class="{'message': document.dms.hardCopyNumber}">
|
|
{{::document.dms.hardCopyNumber}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<span title="{{::document.dms.reference}}">
|
|
{{::document.dms.reference}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td expand>
|
|
<span title="{{::document.dms.description}}">
|
|
{{::document.dms.description}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<vn-check
|
|
ng-model="document.dms.hasFile"
|
|
disabled="true">
|
|
</vn-check>
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<span title="{{'Download file' | translate}}" class="link"
|
|
ng-click="$ctrl.downloadFile(document.dmsFk)">
|
|
{{::document.dms.file}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<span class="link"
|
|
ng-click="workerDescriptor.show($event, document.dms.workerFk)">
|
|
{{::document.dms.worker.user.name | dashIfEmpty}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td>
|
|
{{::document.dms.created | date:'dd/MM/yyyy HH:mm'}}
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<vn-icon-button title="{{'Download file' | translate}}"
|
|
icon="cloud_download"
|
|
ng-click="$ctrl.downloadFile(document.dmsFk)">
|
|
</vn-icon-button>
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<vn-icon-button icon="edit"
|
|
ui-sref="ticket.card.dms.edit({dmsId: {{::document.dmsFk}}})"
|
|
title="{{'Edit file' | translate}}">
|
|
</vn-icon-button>
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<vn-icon-button icon="delete"
|
|
ng-click="confirm.show($index)"
|
|
title="{{'Remove file' | translate}}"
|
|
tabindex="-1">
|
|
</vn-icon-button>
|
|
</vn-td>
|
|
</vn-tr>
|
|
</vn-tbody>
|
|
</vn-table>
|
|
</vn-card>
|
|
</vn-data-viewer>
|
|
<vn-worker-descriptor-popover
|
|
vn-id="workerDescriptor">
|
|
</vn-worker-descriptor-popover>
|
|
<a ui-sref="ticket.card.dms.create"
|
|
vn-tooltip="Upload file"
|
|
vn-bind="+"
|
|
fixed-bottom-right>
|
|
<vn-float-button icon="add"></vn-float-button>
|
|
</a>
|
|
<vn-confirm
|
|
vn-id="confirm"
|
|
message="This file will be deleted"
|
|
question="Are you sure you want to continue?"
|
|
on-accept="$ctrl.deleteDms($data)">
|
|
</vn-confirm> |