2999-ticket_dms_import_from_existing + buyer to ticket.isEditable #678
|
@ -96,18 +96,48 @@
|
|||
</vn-table>
|
||||
</vn-card>
|
||||
</vn-data-viewer>
|
||||
<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>
|
||||
<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-worker-descriptor-popover>
|
||||
<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>
|
||||
</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>
|
|
@ -55,6 +55,18 @@ class Controller extends Section {
|
|||
downloadFile(dmsId) {
|
||||
this.vnFile.download(`api/dms/${dmsId}/downloadFile`);
|
||||
}
|
||||
|
||||
importDms() {
|
||||
const data = {
|
||||
ticketFk: this.$params.id,
|
||||
dmsFk: this.dmsId
|
||||
};
|
||||
|
||||
this.$http.post('ticketDms', data).then(() => {
|
||||
this.vnApp.showSuccess(this.$t('Data saved!'));
|
||||
this.$.model.refresh();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$element', '$scope', 'vnFile'];
|
||||
|
|
|
@ -6,4 +6,6 @@ FileDescription: Ticket id {{ticketId}} del cliente {{clientName}} id {{clientId
|
|||
Generate identifier for original file: Generar identificador para archivo original
|
||||
ContentTypesInfo: 'Tipos de archivo permitidos: {{allowedContentTypes}}'
|
||||
Are you sure you want to continue?: ¿Seguro que quieres continuar?
|
||||
File management: Gestión documental
|
||||
File management: Gestión documental
|
||||
Select document id: Introduzca id de gestion documental
|
||||
Import from existing: Importar desde existente
|
Loading…
Reference in New Issue