0
0
Fork 0

refactor: refs #7553 refs #7356 changed generatePdf name, fixed changeTime & added order in TicketVolume

This commit is contained in:
Jon Elias 2024-08-21 12:41:04 +02:00
parent 79a26d7b94
commit 56c461f085
2 changed files with 13 additions and 7 deletions

View File

@ -166,16 +166,16 @@ function openConfirmDialog(callback) {
}); });
} }
function createPdfDialog() { function generatePdfDialog() {
dialog({ dialog({
component: VnConfirm, component: VnConfirm,
componentProps: { componentProps: {
promise: createPdfInvoice, promise: generatePdfInvoice,
}, },
}); });
} }
async function createPdfInvoice() { async function generatePdfInvoice() {
const { data } = await axios.get('invoiceOuts', { const { data } = await axios.get('invoiceOuts', {
params: { params: {
filter: JSON.stringify({ filter: JSON.stringify({
@ -478,7 +478,12 @@ async function handleInvoiceOutData() {
</QItemSection> </QItemSection>
<QItemSection>{{ t('Show Proforma') }}</QItemSection> <QItemSection>{{ t('Show Proforma') }}</QItemSection>
</QItem> </QItem>
<QItem @click="showChangeTimeDialog = !showChangeTimeDialog" v-ripple clickable> <QItem
v-if="isEditable"
@click="showChangeTimeDialog = !showChangeTimeDialog"
v-ripple
clickable
>
<QItemSection avatar> <QItemSection avatar>
<QIcon name="schedule" /> <QIcon name="schedule" />
</QItemSection> </QItemSection>
@ -487,7 +492,7 @@ async function handleInvoiceOutData() {
<QDialog ref="dialogRef" v-model="showChangeTimeDialog"> <QDialog ref="dialogRef" v-model="showChangeTimeDialog">
<FormPopup @on-submit="changeShippedHour(time)" :title="t('Change shipped hour')"> <FormPopup @on-submit="changeShippedHour(time)" :title="t('Change shipped hour')">
<template #form-inputs> <template #form-inputs>
<!--TODO: pone el año a 1970, corregir--> <!--TODO: pone el año a 1970, esperar corrección componente VnInputTime-->
<VnInputTime v-model="time" :label="t('Shipped hour')" clearable /> <VnInputTime v-model="time" :label="t('Shipped hour')" clearable />
</template> </template>
</FormPopup> </FormPopup>
@ -526,7 +531,7 @@ async function handleInvoiceOutData() {
</QItem> </QItem>
<!--TODO: acabar esta parte, falta el campo hasInvoicing--> <!--TODO: acabar esta parte, falta el campo hasInvoicing-->
<QItem <QItem
@click="createPdfDialog()" @click="generatePdfDialog()"
v-ripple v-ripple
clickable clickable
v-if="ticket.refFk !== null && (ticket.hasInvoicing || hasPdf)" v-if="ticket.refFk !== null && (ticket.hasInvoicing || hasPdf)"
@ -544,7 +549,7 @@ async function handleInvoiceOutData() {
</QItemSection> </QItemSection>
<QItemSection>{{ t('To clone ticket') }}</QItemSection> <QItemSection>{{ t('To clone ticket') }}</QItemSection>
</QItem> </QItem>
<QItem @click="openRecalculateDialog()" v-ripple clickable> <QItem v-if="isEditable" @click="openRecalculateDialog()" v-ripple clickable>
<QItemSection avatar> <QItemSection avatar>
<QIcon name="refresh" /> <QIcon name="refresh" />
</QItemSection> </QItemSection>

View File

@ -130,6 +130,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
:columns="columns" :columns="columns"
:right-search="false" :right-search="false"
:column-search="false" :column-search="false"
:order="['itemPackingTypeFk']"
auto-load auto-load
> >
<template #column-itemFk="{ row }"> <template #column-itemFk="{ row }">