2019-06-06 11:59:11 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="TicketDms"
|
2020-03-18 13:08:04 +00:00
|
|
|
link="{ticketFk: $ctrl.$params.id}"
|
2019-06-06 11:59:11 +00:00
|
|
|
filter="::$ctrl.filter"
|
|
|
|
limit="20"
|
2019-10-11 15:38:04 +00:00
|
|
|
data="$ctrl.ticketDms"
|
|
|
|
order="dmsFk DESC"
|
|
|
|
auto-load="true">
|
2019-06-06 11:59:11 +00:00
|
|
|
</vn-crud-model>
|
2019-10-11 15:38:04 +00:00
|
|
|
<vn-data-viewer model="model">
|
|
|
|
<vn-card class="vn-w-lg">
|
|
|
|
<vn-table model="model">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
2019-10-11 15:43:29 +00:00
|
|
|
<vn-th field="dmsFk" number shrink>Id</vn-th>
|
2019-10-11 15:38:04 +00:00
|
|
|
<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>
|
2020-11-10 15:47:39 +00:00
|
|
|
<vn-th field="created" expand>Created</vn-th>
|
2019-10-11 15:38:04 +00:00
|
|
|
<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>
|
2020-09-03 13:11:16 +00:00
|
|
|
<vn-td shrink>
|
|
|
|
<vn-check
|
|
|
|
ng-model="document.dms.hasFile"
|
|
|
|
disabled="true">
|
|
|
|
</vn-check>
|
|
|
|
</vn-td>
|
2019-10-11 15:38:04 +00:00
|
|
|
<vn-td shrink>
|
2020-06-12 12:28:29 +00:00
|
|
|
<span title="{{'Download file' | translate}}" class="link"
|
|
|
|
ng-click="$ctrl.downloadFile(document.dmsFk)">
|
2019-10-11 15:38:04 +00:00
|
|
|
{{::document.dms.file}}
|
2020-06-12 12:28:29 +00:00
|
|
|
</span>
|
2019-10-11 15:38:04 +00:00
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>
|
|
|
|
<span class="link"
|
2020-04-28 12:26:02 +00:00
|
|
|
ng-click="workerDescriptor.show($event, document.dms.workerFk)">
|
2020-09-03 13:11:16 +00:00
|
|
|
{{::document.dms.worker.user.name | dashIfEmpty}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2020-11-10 15:47:39 +00:00
|
|
|
<vn-td expand>
|
2019-10-18 23:18:25 +00:00
|
|
|
{{::document.dms.created | date:'dd/MM/yyyy HH:mm'}}
|
2019-10-11 15:38:04 +00:00
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>
|
2020-06-12 12:28:29 +00:00
|
|
|
<vn-icon-button title="{{'Download file' | translate}}"
|
|
|
|
icon="cloud_download"
|
|
|
|
ng-click="$ctrl.downloadFile(document.dmsFk)">
|
|
|
|
</vn-icon-button>
|
2019-10-11 15:38:04 +00:00
|
|
|
</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"
|
2020-04-28 12:26:02 +00:00
|
|
|
ng-click="confirm.show($index)"
|
2019-10-11 15:38:04 +00:00
|
|
|
title="{{'Remove file' | translate}}"
|
|
|
|
tabindex="-1">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
2019-06-06 11:59:11 +00:00
|
|
|
</vn-card>
|
2019-10-11 15:38:04 +00:00
|
|
|
</vn-data-viewer>
|
2021-06-25 08:12:41 +00:00
|
|
|
<div fixed-bottom-right>
|
|
|
|
<vn-vertical style="align-items: center;">
|
|
|
|
<vn-button class="round sm vn-mb-sm"
|
|
|
|
icon="file_copy"
|
|
|
|
ng-click="$ctrl.$.dmsImportDialog.show()"
|
|
|
|
vn-tooltip="Import from existing"
|
|
|
|
tooltip-position="left">
|
|
|
|
</vn-button>
|
|
|
|
<a ui-sref="ticket.card.dms.create" vn-bind="+">
|
|
|
|
<vn-button class="round md vn-mb-sm"
|
|
|
|
icon="publish"
|
|
|
|
vn-tooltip="Upload file"
|
|
|
|
tooltip-position="left">
|
|
|
|
</vn-button>
|
|
|
|
</a>
|
|
|
|
</vn-vertical>
|
|
|
|
</div>
|
2019-06-06 11:59:11 +00:00
|
|
|
<vn-worker-descriptor-popover
|
|
|
|
vn-id="workerDescriptor">
|
2021-06-25 08:12:41 +00:00
|
|
|
</vn-worker-descriptor-popover>
|
2019-06-06 11:59:11 +00:00
|
|
|
<vn-confirm
|
|
|
|
vn-id="confirm"
|
|
|
|
message="This file will be deleted"
|
|
|
|
question="Are you sure you want to continue?"
|
2020-04-28 12:26:02 +00:00
|
|
|
on-accept="$ctrl.deleteDms($data)">
|
2021-06-25 08:12:41 +00:00
|
|
|
</vn-confirm>
|
|
|
|
|
|
|
|
<vn-dialog
|
|
|
|
message="Select document id"
|
|
|
|
vn-id="dmsImportDialog"
|
|
|
|
on-accept="$ctrl.importDms()">
|
|
|
|
<tpl-body>
|
|
|
|
<vn-autocomplete
|
|
|
|
label="Document"
|
|
|
|
ng-model="$ctrl.dmsId"
|
|
|
|
url="Dms"
|
|
|
|
show-field="id"
|
|
|
|
vn-focus>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Save</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|