Merge pull request 'warmifx: Customer_filters' (!1131) from warmifx_customer_filters into test
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #1131
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Alex Moreno 2025-01-28 06:17:30 +00:00
commit 8b916016c6
2 changed files with 54 additions and 56 deletions

View File

@ -1,3 +1,4 @@
<script setup> <script setup>
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
@ -169,9 +170,16 @@ en:
fi: FI fi: FI
salesPersonFk: Salesperson salesPersonFk: Salesperson
provinceFk: Province provinceFk: Province
isActive: Is active
city: City city: City
phone: Phone phone: Phone
email: Email email: Email
isToBeMailed: Mailed
isEqualizated: Equailized
businessTypeFk: Business type
sageTaxTypeFk: Sage Tax Type
sageTransactionTypeFk: Sage Tax Type
payMethodFk: Billing data
zoneFk: Zone zoneFk: Zone
socialName : Social name socialName : Social name
name: Name name: Name
@ -180,6 +188,13 @@ es:
params: params:
search: Contiene search: Contiene
fi: NIF fi: NIF
isActive: Activo
isToBeMailed: A enviar
isEqualizated: Recargo de equivalencia
businessTypeFk: Tipo de negocio
sageTaxTypeFk: Tipo de impuesto Sage
sageTransactionTypeFk: Tipo de impuesto Sage
payMethodFk: Forma de pago
salesPersonFk: Comercial salesPersonFk: Comercial
provinceFk: Provincia provinceFk: Provincia
city: Ciudad city: Ciudad

View File

@ -37,8 +37,8 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('globals.name'),
name: 'name', name: 'name',
label: t('globals.name'),
isTitle: true, isTitle: true,
create: true, create: true,
columnClass: 'expand', columnClass: 'expand',
@ -50,25 +50,31 @@ const columns = computed(() => [
isTitle: true, isTitle: true,
create: true, create: true,
columnClass: 'expand', columnClass: 'expand',
attrs: {
uppercase: true,
},
columnFilter: { columnFilter: {
component: 'select',
attrs: { attrs: {
url: 'Clients',
fields: ['socialName'],
optionLabel: 'socialName',
optionValue: 'socialName',
uppercase: false, uppercase: false,
}, },
}, },
attrs: {
uppercase: true,
},
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.fi'),
name: 'fi', name: 'fi',
label: t('customer.extendedList.tableVisibleColumns.fi'),
create: true, create: true,
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
name: 'salesPersonFk', name: 'salesPersonFk',
label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
component: 'select', component: 'select',
attrs: { attrs: {
url: 'Workers/activeWithInheritedRole', url: 'Workers/activeWithInheritedRole',
@ -84,8 +90,8 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('customer.summary.credit'),
name: 'credit', name: 'credit',
label: t('customer.summary.credit'),
columnFilter: { columnFilter: {
component: 'number', component: 'number',
inWhere: true, inWhere: true,
@ -93,8 +99,8 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.creditInsurance'),
name: 'creditInsurance', name: 'creditInsurance',
label: t('customer.extendedList.tableVisibleColumns.creditInsurance'),
columnFilter: { columnFilter: {
component: 'number', component: 'number',
inWhere: true, inWhere: true,
@ -102,8 +108,8 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.phone'),
name: 'phone', name: 'phone',
label: t('customer.extendedList.tableVisibleColumns.phone'),
cardVisible: true, cardVisible: true,
columnFilter: { columnFilter: {
component: 'number', component: 'number',
@ -122,8 +128,8 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('customer.summary.mobile'),
name: 'mobile', name: 'mobile',
label: t('customer.summary.mobile'),
cardVisible: true, cardVisible: true,
columnFilter: { columnFilter: {
component: 'number', component: 'number',
@ -132,8 +138,8 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.street'),
name: 'street', name: 'street',
label: t('customer.extendedList.tableVisibleColumns.street'),
create: true, create: true,
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
@ -142,8 +148,8 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.countryFk'),
name: 'countryFk', name: 'countryFk',
label: t('customer.extendedList.tableVisibleColumns.countryFk'),
columnFilter: { columnFilter: {
component: 'select', component: 'select',
inWhere: true, inWhere: true,
@ -156,8 +162,8 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.provinceFk'),
name: 'provinceFk', name: 'provinceFk',
label: t('customer.extendedList.tableVisibleColumns.provinceFk'),
component: 'select', component: 'select',
attrs: { attrs: {
url: 'Provinces', url: 'Provinces',
@ -169,24 +175,24 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('customer.summary.city'),
name: 'city', name: 'city',
label: t('customer.summary.city'),
}, },
{ {
align: 'left', align: 'left',
label: t('customer.summary.postcode'),
name: 'postcode', name: 'postcode',
label: t('customer.summary.postcode'),
}, },
{ {
align: 'left', align: 'left',
label: t('globals.params.email'),
name: 'email', name: 'email',
label: t('globals.params.email'),
cardVisible: true, cardVisible: true,
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.created'),
name: 'created', name: 'created',
label: t('customer.extendedList.tableVisibleColumns.created'),
format: ({ created }) => toDate(created), format: ({ created }) => toDate(created),
columnFilter: { columnFilter: {
component: 'date', component: 'date',
@ -196,10 +202,13 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.businessTypeFk'),
name: 'businessTypeFk', name: 'businessTypeFk',
label: t('customer.extendedList.tableVisibleColumns.businessTypeFk'),
create: true, create: true,
component: 'select', component: 'select',
columnFilter: {
inWhere: true,
},
attrs: { attrs: {
url: 'BusinessTypes', url: 'BusinessTypes',
fields: ['code', 'description'], fields: ['code', 'description'],
@ -214,8 +223,8 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('customer.summary.payMethodFk'),
name: 'payMethodFk', name: 'payMethodFk',
label: t('customer.summary.payMethodFk'),
columnFilter: { columnFilter: {
component: 'select', component: 'select',
attrs: { attrs: {
@ -235,8 +244,6 @@ const columns = computed(() => [
optionLabel: 'vat', optionLabel: 'vat',
url: 'SageTaxTypes', url: 'SageTaxTypes',
}, },
alias: 'sti',
inWhere: true,
}, },
format: (row, dashIfEmpty) => dashIfEmpty(row.sageTaxType), format: (row, dashIfEmpty) => dashIfEmpty(row.sageTaxType),
}, },
@ -250,15 +257,13 @@ const columns = computed(() => [
optionLabel: 'transaction', optionLabel: 'transaction',
url: 'SageTransactionTypes', url: 'SageTransactionTypes',
}, },
alias: 'stt',
inWhere: true,
}, },
format: (row, dashIfEmpty) => dashIfEmpty(row.sageTransactionType), format: (row, dashIfEmpty) => dashIfEmpty(row.sageTransactionType),
}, },
{ {
align: 'left', align: 'left',
label: t('customer.summary.isActive'),
name: 'isActive', name: 'isActive',
label: t('customer.summary.isActive'),
chip: { chip: {
color: null, color: null,
condition: (value) => !value, condition: (value) => !value,
@ -270,24 +275,24 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('globals.isVies'),
name: 'isVies', name: 'isVies',
label: t('globals.isVies'),
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
}, },
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.isTaxDataChecked'),
name: 'isTaxDataChecked', name: 'isTaxDataChecked',
label: t('customer.extendedList.tableVisibleColumns.isTaxDataChecked'),
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
}, },
}, },
{ {
align: 'left', align: 'left',
label: t('customer.summary.isEqualizated'),
name: 'isEqualizated', name: 'isEqualizated',
label: t('customer.summary.isEqualizated'),
create: true, create: true,
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
@ -295,8 +300,8 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.isFreezed'),
name: 'isFreezed', name: 'isFreezed',
label: t('customer.extendedList.tableVisibleColumns.isFreezed'),
chip: { chip: {
color: null, color: null,
condition: (value) => value, condition: (value) => value,
@ -308,48 +313,48 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.hasToInvoice'),
name: 'hasToInvoice', name: 'hasToInvoice',
label: t('customer.extendedList.tableVisibleColumns.hasToInvoice'),
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
}, },
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.hasToInvoiceByAddress'),
name: 'hasToInvoiceByAddress', name: 'hasToInvoiceByAddress',
label: t('customer.extendedList.tableVisibleColumns.hasToInvoiceByAddress'),
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
}, },
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.isToBeMailed'),
name: 'isToBeMailed', name: 'isToBeMailed',
label: t('customer.extendedList.tableVisibleColumns.isToBeMailed'),
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
}, },
}, },
{ {
align: 'left', align: 'left',
label: t('customer.summary.hasLcr'),
name: 'hasLcr', name: 'hasLcr',
label: t('customer.summary.hasLcr'),
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
}, },
}, },
{ {
align: 'left', align: 'left',
label: t('customer.summary.hasCoreVnl'),
name: 'hasCoreVnl', name: 'hasCoreVnl',
label: t('customer.summary.hasCoreVnl'),
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
}, },
}, },
{ {
align: 'left', align: 'left',
label: t('customer.extendedList.tableVisibleColumns.hasSepaVnl'),
name: 'hasSepaVnl', name: 'hasSepaVnl',
label: t('customer.extendedList.tableVisibleColumns.hasSepaVnl'),
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
}, },
@ -430,32 +435,10 @@ function handleLocation(data, location) {
<VnSelectWorker <VnSelectWorker
:label="t('customer.summary.salesPerson')" :label="t('customer.summary.salesPerson')"
v-model="data.salesPersonFk" v-model="data.salesPersonFk"
:params="{
departmentCodes: ['VT'],
}"
:has-avatar="true" :has-avatar="true"
:id-value="data.salesPersonFk"
emit-value emit-value
auto-load auto-load
> >
<template #prepend>
<VnAvatar
:worker-id="data.salesPersonFk"
color="primary"
:title="title"
/>
</template>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
<QItemLabel caption
>{{ scope.opt?.nickname }},
{{ scope.opt?.code }}</QItemLabel
>
</QItemSection>
</QItem>
</template>
</VnSelectWorker> </VnSelectWorker>
<VnLocation <VnLocation
:acls="[{ model: 'Province', props: '*', accessType: 'WRITE' }]" :acls="[{ model: 'Province', props: '*', accessType: 'WRITE' }]"