This commit is contained in:
William Buezas 2023-11-29 14:21:36 -03:00
commit 3bb4a75df7
5 changed files with 45 additions and 29 deletions

View File

@ -15,8 +15,6 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"cSpell.words": ["axios"],
"editor.tabSize": 2,
"files.autoSave": "onFocusChange",
"files.trimTrailingWhitespace": true,
"editor.hover.enabled": true,

View File

@ -57,20 +57,6 @@ async function getData() {
emit('onFetch', data);
}
// watch($props, async () => {
// entity.value = null;
// await fetch();
// });
const options = [
'Transferir factura a ...',
'Ver factura ...',
'Enviar factura ...',
'Eliminar factura',
'Asentar factura',
'Regenerar PDF factura',
'Abono ...',
];
const emit = defineEmits(['onFetch']);
</script>
@ -110,15 +96,21 @@ const emit = defineEmits(['onFetch']);
</QBtn>
</RouterLink>
<QBtn color="white" dense flat icon="more_vert" round size="md">
<QBtn
color="white"
dense
flat
icon="more_vert"
round
size="md"
v-if="slots.menu"
>
<QTooltip>
{{ t('components.cardDescriptor.moreOptions') }}
</QTooltip>
<QMenu>
<QList dense v-for="option in options" :key="option">
<QItem v-ripple clickable>
{{ option }}
</QItem>
<QList>
<slot name="menu" :entity="entity" />
</QList>
</QMenu>
</QBtn>

View File

@ -7,6 +7,7 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue';
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import useCardDescription from 'src/composables/useCardDescription';
import InvoiceOutDescriptorMenu from './InvoiceOutDescriptorMenu.vue';
const $props = defineProps({
id: {
@ -59,6 +60,9 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
@on-fetch="setData"
data-key="invoiceOutData"
>
<template #menu="{ entity }">
<InvoiceOutDescriptorMenu :invoiceOut="entity" />
</template>
<template #body="{ entity }">
<VnLv :label="t('invoiceOut.card.issued')" :value="toDate(entity.issued)" />
<VnLv

View File

@ -0,0 +1,23 @@
<template>
<QItem v-ripple clickable>
<QItemSection>Transferir factura a ...</QItemSection>
</QItem>
<QItem v-ripple clickable>
<QItemSection>Ver factura ...</QItemSection>
</QItem>
<QItem v-ripple clickable>
<QItemSection>Enviar factura ...</QItemSection>
</QItem>
<QItem v-ripple clickable>
<QItemSection>Eliminar factura</QItemSection>
</QItem>
<QItem v-ripple clickable>
<QItemSection>Asentar factura</QItemSection>
</QItem>
<QItem v-ripple clickable>
<QItemSection>Regenerar PDF factura</QItemSection>
</QItem>
<QItem v-ripple clickable>
<QItemSection>Abono ...</QItemSection>
</QItem>
</template>

View File

@ -1,5 +1,5 @@
<script setup>
import { onMounted, onUnmounted, ref } from 'vue';
import { onMounted, onUnmounted, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import { exportFile, useQuasar } from 'quasar';
@ -55,6 +55,12 @@ const addElement = (element) => {
}
};
watch(manageCheckboxes, (current, prev) => {
if (!current) {
arrayElements.value = [];
}
});
const downloadCsv = (rows) => {
const data = arrayElements.value.length ? arrayElements.value : rows;
let file;
@ -244,13 +250,6 @@ const downloadCsv = (rows) => {
.dark_icon {
color: #121212;
}
.disabled,
.disabled *,
[disabled],
[disabled] * {
cursor: default !important;
}
</style>
<i18n>