0
0
Fork 0

fix: refs #7323 workerList

This commit is contained in:
Jorge Penadés 2024-09-16 16:33:09 +02:00
parent b4cee6b02f
commit 1ff15da8ca
6 changed files with 86 additions and 17 deletions

View File

@ -286,6 +286,7 @@ globals:
myAccount: My account myAccount: My account
noOne: No one noOne: No one
params: params:
id: ID
clientFk: Client id clientFk: Client id
salesPersonFk: Sales person salesPersonFk: Sales person
warehouseFk: Warehouse warehouseFk: Warehouse
@ -293,6 +294,10 @@ globals:
from: From from: From
To: To To: To
stateFk: State stateFk: State
departmentFk: Department
email: Email
SSN: SSN
fi: FI
errors: errors:
statusUnauthorized: Access denied statusUnauthorized: Access denied
statusInternalServerError: An internal server error has ocurred statusInternalServerError: An internal server error has ocurred

View File

@ -290,6 +290,7 @@ globals:
myAccount: Mi cuenta myAccount: Mi cuenta
noOne: Nadie noOne: Nadie
params: params:
id: Id
clientFk: Id cliente clientFk: Id cliente
salesPersonFk: Comercial salesPersonFk: Comercial
warehouseFk: Almacén warehouseFk: Almacén
@ -297,6 +298,10 @@ globals:
from: Desde from: Desde
To: Hasta To: Hasta
stateFk: Estado stateFk: Estado
departmentFk: Departamento
email: Correo
SSN: NSS
fi: NIF
errors: errors:
statusUnauthorized: Acceso denegado statusUnauthorized: Acceso denegado
statusInternalServerError: Ha ocurrido un error interno del servidor statusInternalServerError: Ha ocurrido un error interno del servidor

View File

@ -7,7 +7,7 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnInput from 'src/components/common/VnInput.vue'; import VnInput from 'src/components/common/VnInput.vue';
import VnSelect from 'src/components/common/VnSelect.vue'; import VnSelect from 'src/components/common/VnSelect.vue';
const { t } = useI18n(); const { t, te } = useI18n();
const props = defineProps({ const props = defineProps({
dataKey: { dataKey: {
type: String, type: String,
@ -16,6 +16,11 @@ const props = defineProps({
}); });
const departments = ref(); const departments = ref();
const getLocale = (label) => {
const globalLocale = `globals.params.${label}`;
return te(globalLocale) ? t(globalLocale) : t(`params.${label}`);
};
</script> </script>
<template> <template>
@ -23,7 +28,7 @@ const departments = ref();
<VnFilterPanel :data-key="props.dataKey" :search-button="true"> <VnFilterPanel :data-key="props.dataKey" :search-button="true">
<template #tags="{ tag, formatFn }"> <template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs"> <div class="q-gutter-x-xs">
<strong>{{ t(`params.${tag.label}`) }}: </strong> <strong>{{ getLocale(tag.label) }}: </strong>
<span>{{ formatFn(tag.value) }}</span> <span>{{ formatFn(tag.value) }}</span>
</div> </div>
</template> </template>
@ -64,10 +69,7 @@ const departments = ref();
</QItemSection> </QItemSection>
</QItem> </QItem>
<QItem> <QItem>
<QItemSection v-if="!departments"> <QItemSection>
<QSkeleton type="QInput" class="full-width" />
</QItemSection>
<QItemSection v-if="departments">
<VnSelect <VnSelect
:label="t('Department')" :label="t('Department')"
v-model="params.departmentFk" v-model="params.departmentFk"
@ -82,6 +84,16 @@ const departments = ref();
/> />
</QItemSection> </QItemSection>
</QItem> </QItem>
<QItem>
<QItemSection>
<VnInput :label="t('SSN')" v-model="params.SSN" is-outlined />
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnInput :label="t('Email')" v-model="params.email" is-outlined />
</QItemSection>
</QItem>
<QItem> <QItem>
<QItemSection> <QItemSection>
<VnInput <VnInput
@ -99,23 +111,17 @@ const departments = ref();
en: en:
params: params:
search: Contains search: Contains
fi: FI
firstName: First name firstName: First name
lastName: Last name lastName: Last name
userName: User userName: User
extension: Extension extension: Extension
departmentFk: Department
id: ID
es: es:
params: params:
search: Contiene search: Contiene
fi: NIF
firstName: Nombre firstName: Nombre
lastName: Apellidos lastName: Apellidos
userName: Usuario userName: Usuario
extension: Extensión extension: Extensión
departmentFk: Departamento
id: ID
FI: NIF FI: NIF
First Name: Nombre First Name: Nombre
Last Name: Apellidos Last Name: Apellidos

View File

@ -39,13 +39,31 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
name: 'nickname', name: 'firstName',
label: t('tableColumns.name'), label: t('tableColumns.name'),
isTitle: true, isTitle: true,
columnFilter: { columnFilter: {
name: 'firstName', name: 'firstName',
}, },
}, },
{
align: 'left',
name: 'lastName',
label: t('tableColumns.lastName'),
isTitle: true,
columnFilter: {
name: 'lastName',
},
},
{
align: 'left',
name: 'nickname',
label: t('tableColumns.userName'),
isTitle: true,
columnFilter: {
name: 'userName',
},
},
{ {
align: 'left', align: 'left',
name: 'departmentFk', name: 'departmentFk',
@ -60,16 +78,41 @@ const columns = computed(() => [
}, },
format: (row, dashIfEmpty) => dashIfEmpty(row.department), format: (row, dashIfEmpty) => dashIfEmpty(row.department),
}, },
{
align: 'left',
name: 'fi',
label: t('tableColumns.fi'),
isTitle: true,
columnFilter: {
name: 'fi',
},
},
{
align: 'left',
name: 'SSN',
label: t('tableColumns.SSN'),
isTitle: true,
columnFilter: {
name: 'SSN',
},
},
{ {
align: 'left', align: 'left',
name: 'email', name: 'email',
label: t('tableColumns.email'), label: t('tableColumns.email'),
cardVisible: true, cardVisible: true,
columnFilter: { columnFilter: {
alias: 'mu', name: 'email',
inWhere: true, },
},
{
align: 'left',
name: 'extension',
label: t('tableColumns.extension'),
cardVisible: true,
columnFilter: {
name: 'extension',
}, },
hidden: true,
}, },
{ {
align: 'right', align: 'right',
@ -180,7 +223,7 @@ async function autofillBic(worker) {
default-mode="table" default-mode="table"
redirect="worker" redirect="worker"
:right-search="false" :right-search="false"
auto-load :order="['id DESC']"
> >
<template #more-create-dialog="{ data }"> <template #more-create-dialog="{ data }">
<div class="q-pa-lg full-width"> <div class="q-pa-lg full-width">

View File

@ -2,5 +2,10 @@ passwordRequirements: 'The password must have at least { length } length charact
tableColumns: tableColumns:
id: ID id: ID
name: Name name: Name
lastName: Last Name
userName: User Name
department: Department department: Department
email: Email email: Email
fi: FI
SSN: SSN
extension: Extension

View File

@ -7,5 +7,10 @@ passwordRequirements: 'La contraseña debe tener al menos { length } caracteres
tableColumns: tableColumns:
id: ID id: ID
name: Nombre name: Nombre
lastName: Apellidos
userName: Nombre de usuario
department: Departamento department: Departamento
email: Email email: Email
fi: NIF
SSN: NSS
extension: Extensión