diff --git a/frontend/composables/use-item-search.ts b/frontend/composables/use-item-search.ts index 9944edd..b9d1eff 100644 --- a/frontend/composables/use-item-search.ts +++ b/frontend/composables/use-item-search.ts @@ -10,13 +10,19 @@ export function useItemSearch(client: UserClient, opts?: SearchOptions) { const locations = ref([]); const labels = ref([]); const results = ref([]); + const includeArchived = ref(false); watchDebounced(query, search, { debounce: 250, maxWait: 1000 }); async function search() { const locIds = locations.value.map(l => l.id); const labelIds = labels.value.map(l => l.id); - const { data, error } = await client.items.getAll({ q: query.value, locations: locIds, labels: labelIds }); + const { data, error } = await client.items.getAll({ + q: query.value, + locations: locIds, + labels: labelIds, + includeArchived: includeArchived.value, + }); if (error) { return; } diff --git a/frontend/lib/api/classes/items.ts b/frontend/lib/api/classes/items.ts index cd268ff..a97152d 100644 --- a/frontend/lib/api/classes/items.ts +++ b/frontend/lib/api/classes/items.ts @@ -11,6 +11,7 @@ import { import { AttachmentTypes, PaginationResult } from "../types/non-generated"; export type ItemsQuery = { + includeArchived?: boolean; page?: number; pageSize?: number; locations?: string[];