mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 15:32:17 +00:00
handle condition when endpoint has not been set
This commit is contained in:
@@ -108,8 +108,16 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
ajaxRequestFunc: (url, params) => this.$api.call({url, params}),
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
ajaxRequestFunc: (url, params) => {
|
||||
if( url === '' )
|
||||
{
|
||||
return Promise.resolve({ data: []});
|
||||
}
|
||||
return this.$api.call({url, params});
|
||||
},
|
||||
ajaxResponse: (url, params, response) => {
|
||||
return response?.data;
|
||||
},
|
||||
|
||||
layout: 'fitDataStretch',
|
||||
layoutColumnsOnNewData: false,
|
||||
@@ -180,6 +188,15 @@ export default {
|
||||
updateUrl(endpoint, first) {
|
||||
this.lastSelected = first ? undefined : this.selected;
|
||||
|
||||
if( endpoint === undefined )
|
||||
{
|
||||
endpoint = { url: '' };
|
||||
}
|
||||
else if( endpoint.url === undefined )
|
||||
{
|
||||
endpoint.url = '';
|
||||
}
|
||||
|
||||
const params = {}, filter = {};
|
||||
if (this.filterKontoCount0)
|
||||
filter.konto_count_0 = this.filterKontoCount0;
|
||||
|
||||
Reference in New Issue
Block a user