fix: refs #6389 fix front, filters, itp
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Carlos Satorres 2024-10-23 14:58:03 +02:00
parent daf57c9b2b
commit e8fd3c0a8f
6 changed files with 57 additions and 7 deletions

View File

@ -308,6 +308,7 @@ globals:
email: Email
SSN: SSN
fi: FI
packing: ITP
changePass: Change password
deleteConfirmTitle: Delete selected elements
errors:

View File

@ -312,6 +312,7 @@ globals:
email: Correo
SSN: NSS
fi: NIF
packing: ITP
changePass: Cambiar contraseña
deleteConfirmTitle: Eliminar los elementos seleccionados
errors:

View File

@ -222,6 +222,18 @@ const getLocale = (label) => {
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelect
outlined
dense
rounded
:label="t('globals.params.packing')"
v-model="params.packing"
url="ItemPackingTypes"
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<QCheckbox

View File

@ -23,6 +23,8 @@ const tableRef = ref(null);
const provinceOpts = ref([]);
const stateOpts = ref([]);
const zoneOpts = ref([]);
const DepartmentOpts = ref([]);
const ItemPackingTypeOpts = ref([]);
const visibleColumns = ref([]);
const { viewSummary } = useSummaryDialog();
const from = Date.vnNew();
@ -48,7 +50,10 @@ function exprBuilder(param, value) {
case 'nickname':
return { [`t.nickname`]: { like: `%${value}%` } };
case 'zoneFk':
case 'departmentId':
case 'department':
return { 'd.name': value };
case 'packing':
return { ItemPackingTypeFk: value };
case 'totalWithVat':
return { [`t.${param}`]: value };
}
@ -135,6 +140,7 @@ const columns = computed(() => [
align: 'left',
format: (row) => row.practicalHour,
columnFilter: false,
dense: true,
},
{
label: t('salesTicketsTable.preparation'),
@ -227,22 +233,32 @@ const columns = computed(() => [
label: t('salesTicketsTable.department'),
name: 'department',
align: 'left',
component: 'select',
attrs: {
url: 'Departments',
optionValue: 'name',
optionLabel: 'name',
},
columnFilter: {
component: 'select',
url: 'Departments',
attrs: {
options: DepartmentOpts.value,
optionValue: 'name',
optionLabel: 'name',
dense: true,
},
},
},
{
label: t('salesTicketsTable.packing'),
name: 'packing',
align: 'left',
columnFilter: {
component: 'select',
url: 'ItemPackingTypes',
attrs: {
options: ItemPackingTypeOpts.value,
'option-value': 'code',
'option-label': 'code',
dense: true,
},
},
},
{
align: 'right',
name: 'tableActions',
@ -349,6 +365,24 @@ const openTab = (id) =>
auto-load
@on-fetch="(data) => (zoneOpts = data)"
/>
<FetchData
url="ItemPackingTypes"
:filter="{
fields: ['code'],
order: 'code ASC',
}"
auto-load
@on-fetch="(data) => (ItemPackingTypeOpts = data)"
/>
<FetchData
url="Departments"
:filter="{
fields: ['id', 'name'],
order: 'id ASC',
}"
auto-load
@on-fetch="(data) => (DepartmentOpts = data)"
/>
<MonitorTicketSearchbar />
<RightMenu>
<template #right-panel>

View File

@ -44,6 +44,7 @@ salesTicketsTable:
preparation: Preparation
payMethod: Pay method
department: Department
packing: ITP
searchBar:
label: Search tickets
info: Search tickets by id or alias

View File

@ -44,6 +44,7 @@ salesTicketsTable:
preparation: Preparación
payMethod: Método de pago
department: Departamento
packing: ITP
searchBar:
label: Buscar tickets
info: Buscar tickets por identificador o alias