2019-06-06 11:59:11 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="/client/api/ClientDms"
|
|
|
|
link="{clientFk: $ctrl.$stateParams.id}"
|
|
|
|
filter="::$ctrl.filter"
|
|
|
|
limit="20"
|
|
|
|
data="$ctrl.clientDms">
|
|
|
|
</vn-crud-model>
|
|
|
|
<vn-vertical>
|
|
|
|
<vn-card pad-large>
|
|
|
|
<vn-vertical>
|
|
|
|
<vn-table model="model">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th field="dmsFk" default-order="DESC" shrink>Id</vn-th>
|
|
|
|
<vn-th field="dmsTypeFk" shrink>Type</vn-th>
|
|
|
|
<vn-th field="reference">Reference</vn-th>
|
|
|
|
<vn-th>Description</vn-th>
|
|
|
|
<vn-th field="hasFile" center>Attached file</vn-th>
|
|
|
|
<vn-th shrink>File</vn-th>
|
|
|
|
<vn-th>Employee</vn-th>
|
|
|
|
<vn-th field="created">Created</vn-th>
|
|
|
|
<vn-th></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>
|
|
|
|
<span title="{{::document.dms.reference}}">
|
|
|
|
{{::document.dms.reference}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td>
|
|
|
|
<span title="{{::document.dms.description}}">
|
|
|
|
{{::document.dms.description}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td center>
|
|
|
|
<vn-check disabled="true"
|
|
|
|
field="document.dms.hasFile">
|
|
|
|
</vn-check>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>{{::document.dms.file}}</vn-td>
|
|
|
|
<vn-td>
|
|
|
|
<span class="link"
|
|
|
|
ng-click="$ctrl.showWorkerDescriptor($event, document.dms.workerFk)">
|
|
|
|
{{::document.dms.worker.user.nickname | dashIfEmpty}}
|
|
|
|
</span></vn-td>
|
|
|
|
<vn-td>
|
|
|
|
{{::document.dms.created | dateTime:'dd/MM/yyyy HH:mm'}}
|
|
|
|
</vn-td>
|
|
|
|
<vn-td center shrink>
|
|
|
|
<a target="_blank"
|
|
|
|
vn-tooltip="Download file"
|
2019-07-11 07:53:16 +00:00
|
|
|
href="api/dms/{{::document.dmsFk}}/downloadFile?access_token={{::$ctrl.accessToken}}"
|
|
|
|
ng-show="document.hasFile">
|
2019-06-06 11:59:11 +00:00
|
|
|
<vn-icon-button
|
|
|
|
icon="cloud_download"
|
|
|
|
title="{{'Download PDF' | translate}}">
|
|
|
|
</vn-icon-button>
|
|
|
|
</a>
|
|
|
|
<vn-icon-button
|
|
|
|
vn-tooltip="Remove file"
|
|
|
|
icon="delete"
|
|
|
|
ng-click="$ctrl.showDeleteConfirm($index)"
|
|
|
|
tabindex="-1">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
|
|
|
</vn-vertical>
|
|
|
|
<vn-pagination model="model"></vn-pagination>
|
|
|
|
</vn-card>
|
|
|
|
</vn-vertical>
|
|
|
|
<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?"
|
|
|
|
on-response="$ctrl.deleteDms(response)">
|
|
|
|
</vn-confirm>
|