fix: refs #7323 use workerFilter
gitea/salix-front/pipeline/pr-test This commit looks good Details

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 FetchData from 'components/FetchData.vue';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; 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';
const { t } = useI18n(); const { t } = useI18n();
const props = defineProps({ const props = defineProps({
@ -26,7 +27,7 @@ const departments = ref();
<span>{{ formatFn(tag.value) }}</span> <span>{{ formatFn(tag.value) }}</span>
</div> </div>
</template> </template>
<template #body="{ params, searchFn }"> <template #body="{ params }">
<QItem> <QItem>
<QItemSection> <QItemSection>
<VnInput :label="t('FI')" v-model="params.fi" is-outlined <VnInput :label="t('FI')" v-model="params.fi" is-outlined
@ -67,20 +68,17 @@ const departments = ref();
<QSkeleton type="QInput" class="full-width" /> <QSkeleton type="QInput" class="full-width" />
</QItemSection> </QItemSection>
<QItemSection v-if="departments"> <QItemSection v-if="departments">
<QSelect <VnSelect
:label="t('Department')" :label="t('Department')"
v-model="params.departmentFk" v-model="params.departmentFk"
@update:model-value="searchFn()"
:options="departments" :options="departments"
option-value="id" option-value="id"
option-label="name" option-label="name"
emit-value emit-value
map-options map-options
use-input
dense dense
outlined outlined
rounded rounded
:input-debounce="0"
/> />
</QItemSection> </QItemSection>
</QItem> </QItem>
@ -107,6 +105,7 @@ en:
userName: User userName: User
extension: Extension extension: Extension
departmentFk: Department departmentFk: Department
id: ID
es: es:
params: params:
search: Contiene search: Contiene
@ -116,6 +115,7 @@ es:
userName: Usuario userName: Usuario
extension: Extensión extension: Extensión
departmentFk: Departamento departmentFk: Departamento
id: ID
FI: NIF FI: NIF
First Name: Nombre First Name: Nombre
Last Name: Apellidos 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 VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue'; import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
import FetchData from 'src/components/FetchData.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 { t } = useI18n();
const tableRef = ref(); const tableRef = ref();
@ -28,14 +30,8 @@ const columns = computed(() => [
{ {
align: 'left', align: 'left',
name: 'id', name: 'id',
label: t('tableColumns.id'), label: t('id'),
columnFilter: { field: 'id',
alias: 'w',
inWhere: true,
},
chip: {
condition: () => true,
},
isId: true, isId: true,
}, },
{ {
@ -44,7 +40,7 @@ const columns = computed(() => [
label: t('tableColumns.name'), label: t('tableColumns.name'),
isTitle: true, isTitle: true,
columnFilter: { columnFilter: {
name: 'search', name: 'firstName',
}, },
}, },
{ {
@ -54,8 +50,7 @@ const columns = computed(() => [
cardVisible: true, cardVisible: true,
columnFilter: { columnFilter: {
component: 'select', component: 'select',
inWhere: true, name: 'departmentFk',
alias: 'wd',
attrs: { attrs: {
url: 'Departments', url: 'Departments',
}, },
@ -130,6 +125,11 @@ function uppercaseStreetModel(data) {
@on-fetch="(data) => (bankEntitiesOptions = data)" @on-fetch="(data) => (bankEntitiesOptions = data)"
auto-load auto-load
/> />
<RightMenu>
<template #right-panel>
<WorkerFilter data-key="Worker" />
</template>
</RightMenu>
<VnTable <VnTable
ref="tableRef" ref="tableRef"
data-key="Worker" data-key="Worker"
@ -145,6 +145,7 @@ function uppercaseStreetModel(data) {
:columns="columns" :columns="columns"
default-mode="table" default-mode="table"
redirect="worker" redirect="worker"
:right-search="false"
auto-load auto-load
> >
<template #more-create-dialog="{ data }"> <template #more-create-dialog="{ data }">