fix: refs #6389 ipt #846

Open
carlossa wants to merge 18 commits from 6389-changesMonitor into dev
6 changed files with 104 additions and 8 deletions

View File

@ -329,6 +329,7 @@ globals:
email: Email
SSN: SSN
fi: FI
packing: ITP
myTeam: My team
departmentFk: Department
countryFk: Country

View File

@ -335,6 +335,7 @@ globals:
SSN: NSS
fi: NIF
myTeam: Mi equipo
packing: ITP
countryFk: País
changePass: Cambiar contraseña
deleteConfirmTitle: Eliminar los elementos seleccionados

View File

@ -134,6 +134,7 @@ const getLocale = (label) => {
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelect
@ -209,6 +210,32 @@ const getLocale = (label) => {
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelect
outlined
dense
rounded
:label="t('globals.params.departmentFk')"
v-model="params.department"
url="Departments"
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelect
outlined
dense
rounded
:label="t('globals.params.packing')"
v-model="params.packing"
url="ItemPackingTypes"
option-label="code"
option-value="code"
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<QCheckbox

View File

@ -24,6 +24,9 @@ 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, to] = dateRange(Date.vnNew());
@ -51,6 +54,8 @@ function exprBuilder(param, value) {
case 'nickname':
return { [`t.nickname`]: { like: `%${value}%` } };
case 'zoneFk':
case 'department':
return { 'd.name': value };
case 'totalWithVat':
return { [`t.${param}`]: value };
}
@ -137,6 +142,7 @@ const columns = computed(() => [
align: 'left',
format: (row) => row.practicalHour,
columnFilter: false,
dense: true,
},
{
label: t('salesTicketsTable.preparation'),
@ -190,6 +196,7 @@ const columns = computed(() => [
'false-value': 0,
'true-value': 1,
},
component: false,
},
{
label: t('salesTicketsTable.zone'),
@ -206,6 +213,12 @@ const columns = computed(() => [
},
},
},
{
label: t('salesTicketsTable.payMethod'),
name: 'payMethod',
align: 'left',
columnFilter: false,
},
{
label: t('salesTicketsTable.total'),
name: 'totalWithVat',
@ -219,6 +232,36 @@ const columns = computed(() => [
},
},
},
{
label: t('salesTicketsTable.department'),
name: 'department',
align: 'left',
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',
@ -318,6 +361,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>
@ -337,7 +398,7 @@ const openTab = (id) =>
auto-load
:row-click="({ id }) => openTab(id)"
:disable-option="{ card: true }"
:user-params="{ from, to, scopeDays: 0 }"
:user-params="{ from, to, scopeDays: 0, packing }"
>
<template #top-left>
<QBtn

View File

@ -26,8 +26,8 @@ salesTicketsTable:
componentLack: Component lack
tooLittle: Ticket too little
identifier: Identifier
theoretical: Theoretical
practical: Practical
theoretical: H.Theor
practical: H.Prac
province: Province
state: State
isFragile: Is fragile
@ -35,7 +35,10 @@ salesTicketsTable:
goToLines: Go to lines
preview: Preview
total: Total
preparation: Preparation
preparation: H.Prep
payMethod: Pay method
department: Department
packing: ITP
searchBar:
label: Search tickets
info: Search tickets by id or alias

View File

@ -26,8 +26,8 @@ salesTicketsTable:
componentLack: Faltan componentes
tooLittle: Ticket demasiado pequeño
identifier: Identificador
theoretical: Teórica
practical: Práctica
theoretical: H.Teór
practical: H.Prác
province: Provincia
state: Estado
isFragile: Es frágil
@ -35,7 +35,10 @@ salesTicketsTable:
goToLines: Ir a líneas
preview: Vista previa
total: Total
preparation: Preparación
preparation: H.Prep
payMethod: Método de pago
department: Departamento
packing: ITP
searchBar:
label: Buscar tickets
info: Buscar tickets por identificador o alias