From d670e093d91762f07e3b4c237f97e10e65f72c67 Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Sat, 13 Jun 2026 10:49:33 +0900 Subject: [PATCH 1/6] Add gigs dashboard search --- apps/admin_dashboard/src/main.tsx | 26 +++++++- apps/api/src/five08/backend/api.py | 2 + .../static/dashboard/.vite/manifest.json | 4 +- .../static/dashboard/assets/index-BLWyIl8z.js | 9 +++ ...{index-C6NyLxSa.css => index-BoK8s4aw.css} | 2 +- .../static/dashboard/assets/index-CW2CEmHG.js | 9 --- .../backend/static/dashboard/index.html | 4 +- packages/shared/src/five08/engagements.py | 50 ++++++++++++++ .../integration/test_dashboard_playwright.py | 65 ++++++++++++++++++- tests/unit/test_backend_api.py | 40 ++++++++++++ tests/unit/test_engagements.py | 55 ++++++++++++++++ 11 files changed, 248 insertions(+), 18 deletions(-) create mode 100644 apps/api/src/five08/backend/static/dashboard/assets/index-BLWyIl8z.js rename apps/api/src/five08/backend/static/dashboard/assets/{index-C6NyLxSa.css => index-BoK8s4aw.css} (82%) delete mode 100644 apps/api/src/five08/backend/static/dashboard/assets/index-CW2CEmHG.js diff --git a/apps/admin_dashboard/src/main.tsx b/apps/admin_dashboard/src/main.tsx index eb4ae2ed..f70c3807 100644 --- a/apps/admin_dashboard/src/main.tsx +++ b/apps/admin_dashboard/src/main.tsx @@ -959,6 +959,7 @@ function App() { const [status, setStatus] = useState("") const [jobType, setJobType] = useState("") const [gigStatus, setGigStatus] = useState("recruiting") + const [gigQuery, setGigQuery] = useState("") const [gigIncludeHistorical, setGigIncludeHistorical] = useState(false) const [gigLimit, setGigLimit] = useState(100) const [projectQuery, setProjectQuery] = useState("") @@ -1108,6 +1109,7 @@ function App() { function gigsUrl() { const params = new URLSearchParams({ limit: String(gigLimit) }) if (gigStatus) params.set("status", gigStatus) + if (gigQuery.trim()) params.set("query", gigQuery.trim()) if (gigIncludeHistorical) params.set("include_historical", "true") return `/dashboard/api/gigs?${params.toString()}` } @@ -2491,6 +2493,7 @@ function App() { sort={sort.gigs} loading={loading} status={gigStatus} + query={gigQuery} includeHistorical={gigIncludeHistorical} limit={gigLimit} staleDays={staleRecruitingDays} @@ -2499,6 +2502,7 @@ function App() { crmContactUrl={crmContactUrl} crmAttachmentUrl={crmAttachmentUrl} setStatus={setGigStatus} + setQuery={setGigQuery} setIncludeHistorical={setGigIncludeHistorical} setLimit={setGigLimit} onRefresh={refreshGigsView} @@ -4840,6 +4844,7 @@ function GigsView(props: { sort: { key: string; direction: SortDirection } loading: Record status: string + query: string includeHistorical: boolean limit: number staleDays: number @@ -4848,6 +4853,7 @@ function GigsView(props: { crmContactUrl: (contactId?: string) => string crmAttachmentUrl: (attachmentId?: string) => string setStatus: (value: string) => void + setQuery: (value: string) => void setIncludeHistorical: (value: boolean) => void setLimit: (value: number) => void onRefresh: () => void @@ -4869,7 +4875,7 @@ function GigsView(props: { { total: 0, applications: 0, interested: 0, stale: 0 }, ) const filterBar = ( - + {props.canIncludeHistorical ? (