Correcciones post PR

This commit is contained in:
carlosfonseca 2023-11-29 11:48:06 -05:00
parent 7dabc86e10
commit 22cf914dc6
3 changed files with 38 additions and 19 deletions

View File

@ -57,20 +57,6 @@ async function getData() {
emit('onFetch', data); 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']); const emit = defineEmits(['onFetch']);
</script> </script>
@ -110,15 +96,21 @@ const emit = defineEmits(['onFetch']);
</QBtn> </QBtn>
</RouterLink> </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> <QTooltip>
{{ t('components.cardDescriptor.moreOptions') }} {{ t('components.cardDescriptor.moreOptions') }}
</QTooltip> </QTooltip>
<QMenu> <QMenu>
<QList dense v-for="option in options" :key="option"> <QList>
<QItem v-ripple clickable> <slot name="menu" :entity="entity" />
{{ option }}
</QItem>
</QList> </QList>
</QMenu> </QMenu>
</QBtn> </QBtn>

View File

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