refcactor: refs #6899 deleted warnings
This commit is contained in:
parent
8dc1ec75b3
commit
90fbfd38e0
|
@ -63,6 +63,10 @@ const $props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
table: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -243,7 +247,7 @@ defineExpose({
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
<QTable
|
<QTable
|
||||||
v-bind="$attrs['q-table']"
|
v-bind="table"
|
||||||
class="vnTable"
|
class="vnTable"
|
||||||
:columns="splittedColumns.columns"
|
:columns="splittedColumns.columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
|
|
|
@ -48,7 +48,7 @@ const getStatus = computed({
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await invoiceOutGlobalStore.init();
|
await invoiceOutGlobalStore.init();
|
||||||
formData.value = { ...formInitialData.value };
|
formData.value = formInitialData.value.invoiceDate;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, onUnmounted, ref, computed, watch } from 'vue';
|
import { onMounted, onUnmounted, ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
|
@ -12,6 +12,7 @@ import InvoiceOutSummary from './Card/InvoiceOutSummary.vue';
|
||||||
import { toCurrency, toDate } from 'src/filters/index';
|
import { toCurrency, toDate } from 'src/filters/index';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { QBtn } from 'quasar';
|
import { QBtn } from 'quasar';
|
||||||
|
import { watchEffect } from 'vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -140,12 +141,12 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
|
|
||||||
function openPdf(id) {
|
function openPdf(id) {
|
||||||
try {
|
try {
|
||||||
const url = `api/InvoiceOuts/${id}/download?access_token=${tokenMultimedia}`;
|
const url = `api/InvoiceOuts/${id}/download?access_token=${tokenMultimedia}`;
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Error opening PDF', err);
|
console.error('Error opening PDF', err);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
function downloadPdf() {
|
function downloadPdf() {
|
||||||
try {
|
try {
|
||||||
|
@ -174,7 +175,7 @@ function downloadPdf() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(selectedRows, { deep: true });
|
watchEffect(selectedRows);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -185,7 +186,12 @@ watch(selectedRows, { deep: true });
|
||||||
/>
|
/>
|
||||||
<VnSubToolbar>
|
<VnSubToolbar>
|
||||||
<template #st-actions>
|
<template #st-actions>
|
||||||
<QBtn color="primary" icon-right="cloud_download" @click="downloadPdf()" :disable="!hasSelectedCards">
|
<QBtn
|
||||||
|
color="primary"
|
||||||
|
icon-right="cloud_download"
|
||||||
|
@click="downloadPdf()"
|
||||||
|
:disable="!hasSelectedCards"
|
||||||
|
>
|
||||||
<QTooltip>{{ t('globals.downloadPdf') }}</QTooltip>
|
<QTooltip>{{ t('globals.downloadPdf') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</template>
|
</template>
|
||||||
|
@ -208,13 +214,12 @@ watch(selectedRows, { deep: true });
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
redirect="invoice-out"
|
redirect="invoice-out"
|
||||||
auto-load
|
auto-load
|
||||||
:q-table="{
|
:table="{
|
||||||
'row-key':'id',
|
'row-key': 'id',
|
||||||
selection:'multiple'
|
selection: 'multiple',
|
||||||
}"
|
}"
|
||||||
|
|
||||||
>
|
>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="Tickets"
|
url="Tickets"
|
||||||
v-model="data.ticketFk"
|
v-model="data.ticketFk"
|
||||||
|
@ -272,4 +277,4 @@ es:
|
||||||
fileAllowed: Descarga exitosa de archivo CSV
|
fileAllowed: Descarga exitosa de archivo CSV
|
||||||
youCanSearchByInvoiceReference: Puedes buscar por referencia de la factura
|
youCanSearchByInvoiceReference: Puedes buscar por referencia de la factura
|
||||||
createInvoice: Crear factura
|
createInvoice: Crear factura
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
Loading…
Reference in New Issue