diff --git a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue index 0995b75b9..905ddebb2 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue @@ -2,18 +2,24 @@ import { ref, computed } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; +import { useQuasar } from 'quasar'; +import { downloadFile } from 'src/composables/downloadFile'; import FormModel from 'components/FormModel.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; import FetchData from 'src/components/FetchData.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnInputDate from 'src/components/common/VnInputDate.vue'; import VnInput from 'src/components/common/VnInput.vue'; +import VnDms from 'src/components/common/VnDms.vue'; +import VnConfirm from 'src/components/ui/VnConfirm.vue'; +import axios from 'axios'; import VnSelectSupplier from 'src/components/common/VnSelectSupplier.vue'; -import VnDmsInput from 'src/components/common/VnDmsInput.vue'; const { t } = useI18n(); const route = useRoute(); +const quasar = useQuasar(); +const editDownloadDisabled = ref(false); const userConfig = ref(null); const invoiceId = computed(() => +route.params.id); @@ -31,6 +37,24 @@ const allowedContentTypes = ref([]); const sageWithholdings = ref([]); const documentDialogRef = ref({}); const invoiceInRef = ref({}); + +function deleteFile(dmsFk) { + quasar + .dialog({ + component: VnConfirm, + componentProps: { + title: t('globals.confirmDeletion'), + message: t('globals.confirmDeletionMessage'), + }, + }) + .onOk(async () => { + await axios.post(`dms/${dmsFk}/removeFile`); + invoiceInRef.value.formData.dmsFk = null; + invoiceInRef.value.formData.dms = undefined; + invoiceInRef.value.hasChanges = true; + invoiceInRef.value.save(); + }); +} - + +
+ +
+ + + {{ t('Edit document') }} + + +
+ + {{ t('Create document') }} + +
+ + +