diff --git a/src/components/CreateManualInvoiceForm.vue b/src/components/CreateManualInvoiceForm.vue index 92399c20c..1aa95011f 100644 --- a/src/components/CreateManualInvoiceForm.vue +++ b/src/components/CreateManualInvoiceForm.vue @@ -46,22 +46,6 @@ const onDataSaved = async (formData, requestResponse) => { @on-fetch="(data) => (taxAreasOptions = data)" auto-load /> - - { option-value="id" v-model="data.ticketFk" @update:model-value="data.clientFk = null" + url="Tickets" + :where="{ refFk: null }" + :fields="['id', 'nickname']" + :filter-options="{ order: 'shipped DESC' }" > + + diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 1610735a4..1d5072646 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -13,6 +13,7 @@ import VnLv from 'components/ui/VnLv.vue'; import VnTableColumn from 'components/VnTable/VnColumn.vue'; import VnTableFilter from 'components/VnTable/VnFilter.vue'; import VnTableChip from 'components/VnTable/VnChip.vue'; +import TableVisibleColumns from 'src/components/VnTable/VnVisibleColumn.vue'; const $props = defineProps({ columns: { @@ -67,6 +68,14 @@ const $props = defineProps({ type: Object, default: () => ({ card: false, table: false }), }, + tableCode: { + type: String, + default: null, + }, + table: { + type: Object, + default: () => ({}), + }, }); const { t } = useI18n(); const stateStore = useStateStore(); @@ -115,6 +124,14 @@ watch( (val) => setUserParams(val) ); +const rowClickFunction = computed(() => { + if ($props.rowClick) return $props.rowClick; + if ($props.redirect) return ({ id }) => redirectFn(id); + return () => {}; +}); + +const isTableMode = computed(() => mode.value == TABLE_MODE); + function setUserParams(watchedParams) { if (!watchedParams) return; @@ -158,12 +175,6 @@ function splitColumns(columns) { } } -const rowClickFunction = computed(() => { - if ($props.rowClick) return $props.rowClick; - if ($props.redirect) return ({ id }) => redirectFn(id); - return () => {}; -}); - function redirectFn(id) { router.push({ path: `/${$props.redirect}/${id}` }); } @@ -236,7 +247,7 @@ defineExpose({ :limit="20" ref="CrudModelRef" :search-url="searchUrl" - :disable-infinite-scroll="mode == TABLE_MODE" + :disable-infinite-scroll="isTableMode" @save-changes="reload" :has-sub-toolbar="$attrs['hasSubToolbar'] ?? isEditable" > @@ -249,16 +260,16 @@ defineExpose({ @@ -176,6 +177,7 @@ es: onlyLetters: Sólo se pueden usar letras, números y espacios whenActivatingIt: Al activarlo, no informar el código del país en el campo nif inOrderToInvoice: Para facturar no se consulta este campo, sino el RE de consignatario. Al modificar este campo si no esta marcada la casilla Facturar por consignatario, se propagará automaticamente el cambio a todos lo consignatarios, en caso contrario preguntará al usuario si quiere o no propagar + Daily invoice: Facturación diaria en: onlyLetters: Only letters, numbers and spaces can be used whenActivatingIt: When activating it, do not enter the country code in the ID field diff --git a/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue b/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue index e01706e84..42b8d92d9 100644 --- a/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue +++ b/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue @@ -63,8 +63,8 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity. @on-fetch="setData" data-key="invoiceOutData" > -