Merge pull request #3253 from CihanSenturk/fix-document-item-search-disabled-issue

Fixed document item search disabled issue
This commit is contained in:
Cihan Şentürk 2025-01-11 22:20:14 +03:00 committed by GitHub
commit 82b17da9f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -317,7 +317,7 @@ export default {
async fetchMatchedItems() {
let search_limit_value = this.getSearchLimitValue();
await window.axios.get(this.searchUrl + '?search="' + this.search + '"' + search_limit_value + ' not ' + this.price + ':NULL enabled:1 limit:10')
await window.axios.get(this.searchUrl + '?search="' + this.search + '"' + ' not ' + this.price + ':NULL enabled:1 limit:10' + search_limit_value)
.then(response => {
this.item_list = [];
let items = response.data.data;
@ -510,17 +510,17 @@ export default {
let value = '';
if (typeof this.search_list_key === 'string' && this.search_list_key !== 'value') {
value += ' or ' + this.search_list_key + ' = "' + this.search + '"';
value += ' or ' + this.search_list_key + ' = "' + this.search + '" not ' + this.price + ':NULL enabled:1 limit:10';
} else if (Array.isArray(this.search_list_key)) {
this.search_list_key.forEach(key => {
if (key !== 'value') {
value += ' or ' + key + ' = "' + this.search + '"';
value += ' or ' + key + ' = "' + this.search + '" not ' + this.price + ':NULL enabled:1 limit:10';
}
});
} else if (typeof this.search_list_key === 'object') {
Object.keys(this.search_list_key).forEach(key => {
if (key !== 'value') {
value += ' or ' + key + ' = "' + this.search + '"';
value += ' or ' + key + ' = "' + this.search + '" not ' + this.price + ':NULL enabled:1 limit:10';
}
});
}