forked from verdnatura/salix-front
Reviewed-on: verdnatura/salix-front#594 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
9a165b38c9
|
@ -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"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -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('');
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue