feat: update labels and add department selection in InvoiceOut filter and list

This commit is contained in:
Javi Gallego 2025-03-12 13:30:07 +01:00
parent f089b3bf4c
commit 22952befa9
5 changed files with 55 additions and 12 deletions

View File

@ -7,6 +7,7 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnInputDate from 'components/common/VnInputDate.vue';
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
const { t } = useI18n();
const props = defineProps({
@ -30,7 +31,7 @@ const states = ref();
<QItem>
<QItemSection>
<VnInput
:label="t('Customer ID')"
:label="t('globals.params.clientFk')"
v-model="params.clientFk"
is-outlined
/>
@ -38,13 +39,17 @@ const states = ref();
</QItem>
<QItem>
<QItemSection>
<VnInput v-model="params.fi" :label="t('FI')" is-outlined />
<VnInput
v-model="params.fi"
:label="t('globals.params.fi')"
is-outlined
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnInputNumber
:label="t('Amount')"
:label="t('globals.amount')"
v-model="params.amount"
is-outlined
data-cy="InvoiceOutFilterAmountBtn"
@ -54,7 +59,7 @@ const states = ref();
<QItem>
<QItemSection>
<QInput
:label="t('Min')"
:label="t('invoiceOut.params.min')"
dense
lazy-rules
outlined
@ -65,7 +70,7 @@ const states = ref();
</QItemSection>
<QItemSection>
<QInput
:label="t('Max')"
:label="t('invoiceOut.params.max')"
dense
lazy-rules
outlined
@ -78,7 +83,7 @@ const states = ref();
<QItem>
<QItemSection>
<QCheckbox
:label="t('Has PDF')"
:label="t('invoiceOut.params.hasPdf')"
toggle-indeterminate
v-model="params.hasPdf"
/>
@ -88,14 +93,31 @@ const states = ref();
<QItemSection>
<VnInputDate
v-model="params.created"
:label="t('Created')"
:label="t('invoiceOut.params.created')"
is-outlined
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnInputDate v-model="params.dued" :label="t('Dued')" is-outlined />
<VnInputDate
v-model="params.dued"
:label="t('invoiceOut.params.dued')"
is-outlined
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelect
outlined
rounded
:label="t('globals.params.departmentFk')"
v-model="params.departmentFk"
option-value="id"
option-label="name"
url="Departments"
/>
</QItemSection>
</QItem>
</template>

View File

@ -16,6 +16,7 @@ import VnRow from 'src/components/ui/VnRow.vue';
import VnRadio from 'src/components/common/VnRadio.vue';
import VnInput from 'src/components/common/VnInput.vue';
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
import VnSection from 'src/components/common/VnSection.vue';
const { t } = useI18n();
@ -86,6 +87,20 @@ const columns = computed(() => [
component: null,
},
},
{
align: 'left',
name: 'departmentFk',
label: t('globals.params.departmentFk'),
component: 'select',
attrs: {
url: 'Departments',
},
create: true,
columnField: {
component: null,
},
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
},
{
align: 'left',
name: 'companyFk',
@ -229,6 +244,12 @@ watchEffect(selectedRows);
<CustomerDescriptorProxy :id="row.clientFk" />
</span>
</template>
<template #column-departmentFk="{ row }">
<span class="link" @click.stop>
{{ row.departmentName || '-' }}
<DepartmentDescriptorProxy :id="row?.departmentFk" />
</span>
</template>
<template #more-create-dialog="{ data }">
<div class="row q-col-gutter-xs col-span-2">
<div class="col-12">

View File

@ -221,7 +221,7 @@ en:
attenderFk: Atender
clientFk: Client id
warehouseFk: Warehouse
requesterFk: Salesperson
requesterFk: Requester
from: From
to: To
mine: For me
@ -239,7 +239,7 @@ es:
attenderFk: Comprador
clientFk: Id cliente
warehouseFk: Almacén
requesterFk: Comercial
requesterFk: Solicitante
from: Desde
to: Hasta
mine: Para mi

View File

@ -84,7 +84,7 @@ item:
attenderFk: Atender
clientFk: Client id
warehouseFk: Warehouse
requesterFk: Salesperson
requesterFk: Requester
from: From
to: To
mine: For me

View File

@ -93,7 +93,7 @@ item:
attenderFk: Comprador
clientFk: Id cliente
warehouseFk: Almacén
requesterFk: Comercial
requesterFk: Solicitante
from: Desde
to: Hasta
mine: Para mi