forked from verdnatura/salix-front
Reviewed-on: verdnatura/salix-front#572 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
5d42a2128e
|
@ -2,8 +2,6 @@
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
@ -15,12 +13,6 @@ const { t } = useI18n();
|
||||||
const workersOptions = ref([]);
|
const workersOptions = ref([]);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
|
||||||
url="Workers/search"
|
|
||||||
:filter="{ fields: ['id', 'nickname'], order: 'nickname ASC', limit: 30 }"
|
|
||||||
@on-fetch="(data) => (workersOptions = data)"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<FormModel
|
<FormModel
|
||||||
:url="`Suppliers/${route.params.id}`"
|
:url="`Suppliers/${route.params.id}`"
|
||||||
:url-update="`Suppliers/${route.params.id}`"
|
:url-update="`Suppliers/${route.params.id}`"
|
||||||
|
@ -44,6 +36,8 @@ const workersOptions = ref([]);
|
||||||
option-label="name"
|
option-label="name"
|
||||||
hide-selected
|
hide-selected
|
||||||
map-options
|
map-options
|
||||||
|
url="Workers/search"
|
||||||
|
sortby="nickname ASC"
|
||||||
:rules="validate('supplier.workerFk')"
|
:rules="validate('supplier.workerFk')"
|
||||||
>
|
>
|
||||||
<template #append>
|
<template #append>
|
||||||
|
|
|
@ -3,8 +3,6 @@ import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import RightMenu from 'components/common/RightMenu.vue';
|
|
||||||
import SupplierListFilter from './SupplierListFilter.vue';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
@ -80,11 +78,6 @@ const columns = computed(() => [
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnSearchbar data-key="SuppliersList" :limit="20" :label="t('Search suppliers')" />
|
<VnSearchbar data-key="SuppliersList" :limit="20" :label="t('Search suppliers')" />
|
||||||
<RightMenu>
|
|
||||||
<template #right-panel>
|
|
||||||
<SupplierListFilter data-key="SuppliersList" />
|
|
||||||
</template>
|
|
||||||
</RightMenu>
|
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="SuppliersList"
|
data-key="SuppliersList"
|
||||||
|
@ -100,8 +93,6 @@ const columns = computed(() => [
|
||||||
order="id ASC"
|
order="id ASC"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
auto-load
|
auto-load
|
||||||
:right-search="false"
|
|
||||||
:use-model="true"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue