mirror of
https://github.com/ae-utbm/sith.git
synced 2026-03-13 15:15:03 +00:00
Merge pull request #1310 from ae-utbm/product-input
exclude archived products from product autocompletion.
This commit is contained in:
@@ -18,7 +18,10 @@ export class ProductAjaxSelect extends AjaxSelect {
|
|||||||
protected searchField = ["code", "name"];
|
protected searchField = ["code", "name"];
|
||||||
|
|
||||||
protected async search(query: string): Promise<TomOption[]> {
|
protected async search(query: string): Promise<TomOption[]> {
|
||||||
const resp = await productSearchProducts({ query: { search: query } });
|
const resp = await productSearchProducts({
|
||||||
|
// biome-ignore lint/style/useNamingConvention: API is snake_case
|
||||||
|
query: { search: query, is_archived: false },
|
||||||
|
});
|
||||||
if (resp.data) {
|
if (resp.data) {
|
||||||
return resp.data.results;
|
return resp.data.results;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user