2019-06-06 11:59:11 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="ClientDms"
|
2019-06-06 11:59:11 +00:00
|
|
|
link="{clientFk: $ctrl.$stateParams.id}"
|
|
|
|
filter="::$ctrl.filter"
|
|
|
|
limit="20"
|
2019-10-02 17:24:42 +00:00
|
|
|
data="$ctrl.clientDms"
|
|
|
|
order="dmsFk DESC"
|
|
|
|
auto-load="true">
|
2019-06-06 11:59:11 +00:00
|
|
|
</vn-crud-model>
|
2019-10-02 17:24:42 +00:00
|
|
|
<vn-data-viewer
|
|
|
|
model="model"
|
|
|
|
class="vn-w-lg">
|
2019-10-01 14:17:57 +00:00
|
|
|
<vn-card>
|
2019-10-02 17:24:42 +00:00
|
|
|
<vn-table model="model">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th field="dmsFk" 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.clientDms">
|
|
|
|
<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 disabled="true"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="document.dms.hasFile">
|
2019-10-02 17:24:42 +00:00
|
|
|
</vn-check>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>
|
|
|
|
<a target="_blank"
|
|
|
|
title="{{'Download file' | translate}}"
|
2019-12-19 13:21:18 +00:00
|
|
|
href="api/dms/{{::document.dmsFk}}/downloadFile?access_token={{::$ctrl.accessToken}}">
|
|
|
|
{{::document.dms.file}}
|
2019-10-02 17:24:42 +00:00
|
|
|
</a>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>
|
|
|
|
<span class="link"
|
|
|
|
ng-click="$ctrl.showWorkerDescriptor($event, document.dms.workerFk)">
|
|
|
|
{{::document.dms.worker.user.nickname | dashIfEmpty}}
|
|
|
|
</span></vn-td>
|
|
|
|
<vn-td>
|
2019-10-18 23:18:25 +00:00
|
|
|
{{::document.dms.created | date:'dd/MM/yyyy HH:mm'}}
|
2019-10-02 17:24:42 +00:00
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>
|
|
|
|
<a target="_blank"
|
2019-12-19 13:13:24 +00:00
|
|
|
href="api/dms/{{::document.dmsFk}}/downloadFile?access_token={{::$ctrl.accessToken}}">
|
2019-10-01 14:17:57 +00:00
|
|
|
<vn-icon-button
|
2019-10-02 17:24:42 +00:00
|
|
|
icon="cloud_download"
|
|
|
|
title="{{'Download file' | translate}}">
|
2019-10-01 14:17:57 +00:00
|
|
|
</vn-icon-button>
|
2019-10-02 17:24:42 +00:00
|
|
|
</a>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>
|
|
|
|
<vn-icon-button ui-sref="client.card.dms.edit({dmsId: {{::document.dmsFk}}})"
|
|
|
|
icon="edit"
|
|
|
|
title="{{'Edit file' | translate}}">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>
|
|
|
|
<vn-icon-button
|
|
|
|
icon="delete"
|
|
|
|
ng-click="$ctrl.showDeleteConfirm($index)"
|
|
|
|
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-02 17:24:42 +00:00
|
|
|
</vn-data-viewer>
|
2019-06-06 11:59:11 +00:00
|
|
|
<vn-worker-descriptor-popover
|
|
|
|
vn-id="workerDescriptor">
|
|
|
|
</vn-worker-descriptor-popover>
|
|
|
|
<a ui-sref="client.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?"
|
2019-10-30 15:57:14 +00:00
|
|
|
on-response="$ctrl.deleteDms($response)">
|
2019-06-06 11:59:11 +00:00
|
|
|
</vn-confirm>
|