forked from verdnatura/salix-front
fix: refs #7323 use workerFilter
This commit is contained in:
parent
e7def05d40
commit
30cadb5697
|
@ -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
|
||||||
|
|
|
@ -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 }">
|
||||||
|
|
Loading…
Reference in New Issue