0
0
Fork 0

refs #6898 fix new list

This commit is contained in:
Carlos Satorres 2024-08-06 11:00:59 +02:00
parent 28efe4aacf
commit 75866f2d27
4 changed files with 12 additions and 3 deletions

View File

@ -23,6 +23,7 @@ const props = defineProps({
searchCustomRouteRedirect: { type: String, default: undefined }, searchCustomRouteRedirect: { type: String, default: undefined },
searchRedirect: { type: Boolean, default: true }, searchRedirect: { type: Boolean, default: true },
searchMakeFetch: { type: Boolean, default: true }, searchMakeFetch: { type: Boolean, default: true },
searchUrlQuery: { type: String, default: undefined },
}); });
const stateStore = useStateStore(); const stateStore = useStateStore();
@ -70,6 +71,7 @@ if (props.baseUrl) {
:url="props.searchUrl" :url="props.searchUrl"
:label="props.searchbarLabel" :label="props.searchbarLabel"
:info="props.searchbarInfo" :info="props.searchbarInfo"
:search-url="props.searchUrlQuery"
:custom-route-redirect-name="searchCustomRouteRedirect" :custom-route-redirect-name="searchCustomRouteRedirect"
:redirect="searchRedirect" :redirect="searchRedirect"
/> />

View File

@ -67,6 +67,10 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: true, default: true,
}, },
searchUrl: {
type: String,
default: 'params',
},
}); });
const searchText = ref(''); const searchText = ref('');

View File

@ -12,5 +12,6 @@ import SupplierListFilter from '../SupplierListFilter.vue';
search-data-key="SupplierList" search-data-key="SupplierList"
search-url="Suppliers/filter" search-url="Suppliers/filter"
searchbar-label="Search suppliers" searchbar-label="Search suppliers"
search-url-query="table"
/> />
</template> </template>

View File

@ -19,9 +19,6 @@ const columns = computed(() => [
label: t('supplier.list.tableVisibleColumns.name'), label: t('supplier.list.tableVisibleColumns.name'),
name: 'socialName', name: 'socialName',
create: true, create: true,
columnCreate: {
component: 'input',
},
columnFilter: { columnFilter: {
name: 'search', name: 'search',
}, },
@ -93,6 +90,11 @@ const columns = computed(() => [
title: t('Create Supplier'), title: t('Create Supplier'),
onDataSaved: ({ id }) => tableRef.redirect(id), onDataSaved: ({ id }) => tableRef.redirect(id),
formInitialData: {}, formInitialData: {},
mapper: (data) => {
data.name = data.socialName;
delete data.socialName;
return data;
},
}" }"
order="id ASC" order="id ASC"
:columns="columns" :columns="columns"