0
0
Fork 0

fix: refs #7323 use workerFilter

This commit is contained in:
Jorge Penadés 2024-08-14 09:11:14 +02:00
parent e7def05d40
commit 30cadb5697
2 changed files with 17 additions and 16 deletions

View File

@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n';
import FetchData from 'components/FetchData.vue';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
const { t } = useI18n();
const props = defineProps({
@ -26,7 +27,7 @@ const departments = ref();
<span>{{ formatFn(tag.value) }}</span>
</div>
</template>
<template #body="{ params, searchFn }">
<template #body="{ params }">
<QItem>
<QItemSection>
<VnInput :label="t('FI')" v-model="params.fi" is-outlined
@ -67,20 +68,17 @@ const departments = ref();
<QSkeleton type="QInput" class="full-width" />
</QItemSection>
<QItemSection v-if="departments">
<QSelect
<VnSelect
:label="t('Department')"
v-model="params.departmentFk"
@update:model-value="searchFn()"
:options="departments"
option-value="id"
option-label="name"
emit-value
map-options
use-input
dense
outlined
rounded
:input-debounce="0"
/>
</QItemSection>
</QItem>
@ -107,6 +105,7 @@ en:
userName: User
extension: Extension
departmentFk: Department
id: ID
es:
params:
search: Contiene
@ -116,6 +115,7 @@ es:
userName: Usuario
extension: Extensión
departmentFk: Departamento
id: ID
FI: NIF
First Name: Nombre
Last Name: Apellidos

View File

@ -14,6 +14,8 @@ import VnLocation from 'src/components/common/VnLocation.vue';
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
import FetchData from 'src/components/FetchData.vue';
import RightMenu from 'src/components/common/RightMenu.vue';
import WorkerFilter from './WorkerFilter.vue';
const { t } = useI18n();
const tableRef = ref();
@ -28,14 +30,8 @@ const columns = computed(() => [
{
align: 'left',
name: 'id',
label: t('tableColumns.id'),
columnFilter: {
alias: 'w',
inWhere: true,
},
chip: {
condition: () => true,
},
label: t('id'),
field: 'id',
isId: true,
},
{
@ -44,7 +40,7 @@ const columns = computed(() => [
label: t('tableColumns.name'),
isTitle: true,
columnFilter: {
name: 'search',
name: 'firstName',
},
},
{
@ -54,8 +50,7 @@ const columns = computed(() => [
cardVisible: true,
columnFilter: {
component: 'select',
inWhere: true,
alias: 'wd',
name: 'departmentFk',
attrs: {
url: 'Departments',
},
@ -130,6 +125,11 @@ function uppercaseStreetModel(data) {
@on-fetch="(data) => (bankEntitiesOptions = data)"
auto-load
/>
<RightMenu>
<template #right-panel>
<WorkerFilter data-key="Worker" />
</template>
</RightMenu>
<VnTable
ref="tableRef"
data-key="Worker"
@ -145,6 +145,7 @@ function uppercaseStreetModel(data) {
:columns="columns"
default-mode="table"
redirect="worker"
:right-search="false"
auto-load
>
<template #more-create-dialog="{ data }">