mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-21 15:36:18 -05:00
Global search waits for selection before submitting.
This commit is contained in:
parent
377c69e8a7
commit
3ad7b8af00
9 changed files with 141 additions and 169 deletions
|
|
@ -1003,36 +1003,23 @@ export async function fetchDecoded(vinNumber) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function searchSuggestions(search_str) {
|
||||
const body = {search_str: search_str};
|
||||
export async function searchSuggestions(search_str, tagNames) {
|
||||
const body = {search_str: search_str, tag_names: tagNames};
|
||||
const response = await apiPost(`${API_URI}/search_suggestions`, body);
|
||||
if (response.ok) {
|
||||
const content = await response.json();
|
||||
|
||||
const fileGroups = content.file_groups;
|
||||
const zimsEstimates = content.zims_estimates;
|
||||
const channels = content.channels;
|
||||
const domains = content.domains;
|
||||
return {
|
||||
fileGroups,
|
||||
zimsEstimates,
|
||||
channels,
|
||||
domains,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function searchEstimateFiles(search_str, tagNames) {
|
||||
const body = {search_str: search_str, tag_names: tagNames};
|
||||
const response = await apiPost(`${API_URI}/files/search_estimates`, body);
|
||||
if (response.ok) {
|
||||
const content = await response.json();
|
||||
return {
|
||||
fileGroups: content.file_groups,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function searchEstimateZims(search_str, tagNames) {
|
||||
const body = {search_str: search_str, tag_names: tagNames};
|
||||
const response = await apiPost(`${API_URI}/zim/search_estimates`, body);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue