refactor: refs #6802 update InvoiceOutNegativeBases to use Department instead of Worker

This commit is contained in:
Javi Gallego 2025-02-27 08:14:13 +01:00
parent 15ac8c36c7
commit aaa6a44f88
5 changed files with 17 additions and 14 deletions

View File

@ -8,7 +8,7 @@ import { useInvoiceOutGlobalStore } from 'src/stores/invoiceOutGlobal.js';
import { useArrayData } from 'src/composables/useArrayData';
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
import TicketDescriptorProxy from '../Ticket/Card/TicketDescriptorProxy.vue';
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
import DepartmentDescriptorProxy from '../Worker/Department/Card/DepartmentDescriptorProxy.vue';
import VnInputDate from 'components/common/VnInputDate.vue';
import InvoiceOutNegativeBasesFilter from './InvoiceOutNegativeBasesFilter.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
@ -196,10 +196,10 @@ const downloadCSV = async () => {
<TicketDescriptorProxy :id="row.ticketFk" />
</span>
</template>
<template #column-workerName="{ row }">
<template #column-departmentFk="{ row }">
<span class="link" @click.stop>
{{ row.workerName }}
<WorkerDescriptorProxy :id="row.comercialId" />
{{ row.departmentName }}
<DepartmentDescriptorProxy :id="row.departmentFk" />
</span>
</template>
<template #moreFilterPanel="{ params }">

View File

@ -129,12 +129,15 @@ const props = defineProps({
</QItem>
<QItem>
<QItemSection>
<VnSelectWorker
:label="t('invoiceOut.negativeBases.comercial')"
v-model="params.workerName"
option-value="name"
is-outlined
@update:model-value="searchFn()"
<VnSelect
outlined
dense
rounded
:label="t('globals.params.departmentFk')"
v-model="params.departmentFk"
option-value="id"
option-label="name"
url="Departments"
/>
</QItemSection>
</QItem>

View File

@ -11,7 +11,6 @@ invoiceOut:
isActive: Active
hasToInvoice: Has to invoice
hasVerifiedData: Verified data
workerName: Worker
isTaxDataChecked: Verified data
amount: Amount
clientFk: Client
@ -25,6 +24,7 @@ invoiceOut:
max: Max
hasPdf: Has PDF
search: Contains
departmentFk: Department
card:
issued: Issued
customerCard: Customer card

View File

@ -11,7 +11,6 @@ invoiceOut:
isActive: Activo
hasToInvoice: Debe facturar
hasVerifiedData: Datos verificados
workerName: Comercial
isTaxDataChecked: Datos comprobados
amount: Importe
clientFk: Cliente
@ -25,6 +24,7 @@ invoiceOut:
max: Max
hasPdf: Tiene PDF
search: Contiene
departmentFk: Departamento
card:
issued: Fecha emisión
customerCard: Ficha del cliente

View File

@ -16,9 +16,9 @@ describe('InvoiceOut negative bases', () => {
cy.get(getDescriptors('ticketFk')).click();
cy.get('.descriptor').should('be.visible');
cy.get('.q-item > .q-item__label').should('include.text', '23');
cy.get(getDescriptors('workerName')).click();
cy.get(getDescriptors('departmentFk')).click();
cy.get('.descriptor').should('be.visible');
cy.get('.q-item > .q-item__label').should('include.text', '18');
cy.get('.q-item > .q-item__label').should('include.text', '155');
});
it('should filter and download as CSV', () => {