diff options
| author | yyamashita <yyamashita@mosquit.one> | 2026-05-08 08:38:32 +0900 |
|---|---|---|
| committer | yyamashita <yyamashita@mosquit.one> | 2026-05-08 08:38:32 +0900 |
| commit | 1246c8382c8734dc705f96bf9fa6b5efdd3819bc (patch) | |
| tree | cc840910f942aace0f21f3550151e95d08dafcf2 /app/lib | |
| parent | 6579d8423bdeeca0e6b11df5410051c0aaed5d16 (diff) | |
Fix all TODO bugs and implement feature additions
- SCRAPE_TARGETS.md: add 5 missing venues (nine-spices, nishieifuku-jam,
fever-shindaita, moon-step-nakano, mod-shibasaki)
- Navigation: add 日付別 link to venues.tsx and events.$id.tsx headers
- venues.tsx: add official site external links per venue card
- ScrapeButton: new component with useFetcher-based trigger + 2s polling
progress UI showing per-venue status and event count
- venues.tsx / events._index.tsx: wire in ScrapeButton
- FilterBar + db.server.ts: add area filter derived from venues, threaded
through queryEvents
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/db.server.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/lib/db.server.ts b/app/lib/db.server.ts index a4671b4..82a0025 100644 --- a/app/lib/db.server.ts +++ b/app/lib/db.server.ts @@ -172,12 +172,13 @@ export interface QueryEventsParams { venue_id?: string; keyword?: string; capacity_range?: CapacityRange; + area?: string; limit?: number; offset?: number; } export function queryEvents(params: QueryEventsParams = {}): Event[] { - const { date_from, date_to, venue_id, keyword, capacity_range, limit = 60, offset = 0 } = + const { date_from, date_to, venue_id, keyword, capacity_range, area, limit = 60, offset = 0 } = params; const clauses: string[] = []; @@ -206,6 +207,10 @@ export function queryEvents(params: QueryEventsParams = {}): Event[] { } else if (capacity_range === "large") { clauses.push("v.capacity >= 300"); } + if (area) { + clauses.push("v.area = ?"); + args.push(area); + } const where = clauses.length ? `WHERE ${clauses.join(" AND ")}` : ""; |
