From ae6f6f7f74fd4df7704f963d2f1fdd1f3100668f Mon Sep 17 00:00:00 2001
From: yyamashita <yyamashita@mosquit.one>
Date: Fri, 8 May 2026 03:50:45 +0900
Subject: Add capacity filter for live houses (~100 / 100~300 / 300~)

- Add capacity field to VenueMeta and all 17 scrapers (researched values)
- Add capacity column to venues table with auto-migration for existing DBs
- Add capacity_range filter to queryEvents (small/medium/large)
- Add capacity selector to FilterBar UI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---
 app/components/FilterBar.tsx | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

(limited to 'app/components/FilterBar.tsx')

diff --git a/app/components/FilterBar.tsx b/app/components/FilterBar.tsx
index fd7be72..7b8ca0c 100644
--- a/app/components/FilterBar.tsx
+++ b/app/components/FilterBar.tsx
@@ -63,6 +63,21 @@ export default function FilterBar({ venues, defaultDateFrom, defaultDateTo }: Pr
         />
       </div>
 
+      {/* Capacity */}
+      <div className="flex flex-col gap-1">
+        <label className="text-xs text-gray-400">キャパシティ</label>
+        <select
+          name="capacity_range"
+          defaultValue={searchParams.get("capacity_range") ?? ""}
+          className="rounded-md bg-gray-800 border border-gray-700 px-3 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-indigo-500"
+        >
+          <option value="">すべて</option>
+          <option value="small">〜100人（小箱）</option>
+          <option value="medium">100〜300人（中箱）</option>
+          <option value="large">300人〜（大箱）</option>
+        </select>
+      </div>
+
       <button
         type="submit"
         className="rounded-md bg-gray-700 px-4 py-1.5 text-sm font-medium hover:bg-gray-600 transition-colors"
@@ -83,5 +98,5 @@ export default function FilterBar({ venues, defaultDateFrom, defaultDateTo }: Pr
 }
 
 function hasFilters(params: URLSearchParams): boolean {
-  return ["keyword", "venue_id", "date_from", "date_to"].some((k) => params.get(k));
+  return ["keyword", "venue_id", "date_from", "date_to", "capacity_range"].some((k) => params.get(k));
 }
-- 
cgit v1.2.3

