diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 6a547d95dbc..8f64dc8571a 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -895,7 +895,7 @@ const rowCtrlClickFunction = computed(() => { {{ row[splittedColumns.title.name] }} - + +import VnConfirm from '../ui/VnConfirm.vue'; +import VnInput from './VnInput.vue'; +import VnDms from './VnDms.vue'; +import axios from 'axios'; +import { useQuasar } from 'quasar'; +import { ref } from 'vue'; +import { useI18n } from 'vue-i18n'; +import { downloadFile } from 'src/composables/downloadFile'; + +const { t } = useI18n(); +const quasar = useQuasar(); +const documentDialogRef = ref({}); +const editDownloadDisabled = ref(false); +const $props = defineProps({ + defaultDmsCode: { + type: String, + default: 'InvoiceIn', + }, + disable: { + type: Boolean, + default: true, + }, + data: { + type: Object, + default: null, + }, + formRef: { + type: Object, + default: null, + }, +}); + +function deleteFile(dmsFk) { + quasar + .dialog({ + component: VnConfirm, + componentProps: { + title: t('globals.confirmDeletion'), + message: t('globals.confirmDeletionMessage'), + }, + }) + .onOk(async () => { + await axios.post(`dms/${dmsFk}/removeFile`); + $props.formRef.formData.dmsFk = null; + $props.formRef.formData.dms = undefined; + $props.formRef.hasChanges = true; + $props.formRef.save(); + }); +} + + + +es: + Document: Documento + Download file: Descargar archivo + Edit document: Editar documento + Delete file: Eliminar archivo + Create document: Crear documento + + diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 9821992cbf2..474d681165c 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -84,7 +84,7 @@ const mixinRules = [ ...($attrs.rules ?? []), (val) => { const maxlength = $props.maxlength; - if (maxlength && +val.length > maxlength) + if (maxlength && +val?.length > maxlength) return t(`maxLength`, { value: maxlength }); const { min, max } = vnInputRef.value.$attrs; if (!min) return null; diff --git a/src/css/app.scss b/src/css/app.scss index 5befd150b0d..b299973d1d9 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -325,7 +325,6 @@ input::-webkit-inner-spin-button { min-height: auto !important; display: flex; align-items: flex-end; - padding-bottom: 2px; .q-field__native.row { min-height: auto !important; } diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 6be11b5ed54..d0911d41d7b 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -816,6 +816,7 @@ travel: search: Search travel searchInfo: You can search by travel id or name id: Id + awbFk: AWB travelList: tableVisibleColumns: ref: Reference diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 55e5abd95e3..ac441d28d16 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -899,6 +899,7 @@ travel: search: Buscar envío searchInfo: Buscar envío por id o nombre id: Id + awbFk: Guía aérea travelList: tableVisibleColumns: ref: Referencia diff --git a/src/pages/Account/Card/AccountSummary.vue b/src/pages/Account/Card/AccountSummary.vue index 2172fec9af3..a098f10ee39 100644 --- a/src/pages/Account/Card/AccountSummary.vue +++ b/src/pages/Account/Card/AccountSummary.vue @@ -18,7 +18,7 @@ const entityId = computed(() => $props.id || route.params.id); data-key="Account" ref="AccountSummary" url="VnUsers/preview" - :filter="filter" + :filter="{ ...filter, where: { id: entityId } }" >