feat: add multi-select subject filtering with searchable comboboxes

This commit is contained in:
2026-01-29 02:51:49 -06:00
parent ed72ac6bff
commit 0da2e810fe
12 changed files with 987 additions and 343 deletions
+6 -2
View File
@@ -49,7 +49,7 @@ export type SortDirection = "asc" | "desc";
export interface SearchParams {
term: string;
subject?: string;
subjects?: string[];
q?: string;
open_only?: boolean;
limit?: number;
@@ -92,7 +92,11 @@ export class BannerApiClient {
async searchCourses(params: SearchParams): Promise<SearchResponse> {
const query = new URLSearchParams();
query.set("term", params.term);
if (params.subject) query.set("subject", params.subject);
if (params.subjects) {
for (const s of params.subjects) {
query.append("subject", s);
}
}
if (params.q) query.set("q", params.q);
if (params.open_only) query.set("open_only", "true");
if (params.limit !== undefined) query.set("limit", String(params.limit));