From d944f11581553c5e038b33fa4558566713f6d1f4 Mon Sep 17 00:00:00 2001 From: yyamashita Date: Sat, 9 May 2026 00:46:32 +0900 Subject: Add band description/status fields and redesign index page - bands table: add description (TEXT) and status (TEXT DEFAULT 'active') via ALTER TABLE migrations (active / hiatus / disbanded) - Home page: minimal monochrome index listing name, area, status - Band detail: show description below title, status alongside area - Band new/edit forms: textarea for description, select for status Co-Authored-By: Claude Sonnet 4.6 --- app/routes/band-edit.tsx | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'app/routes/band-edit.tsx') diff --git a/app/routes/band-edit.tsx b/app/routes/band-edit.tsx index 70e1d60..99d4ee7 100644 --- a/app/routes/band-edit.tsx +++ b/app/routes/band-edit.tsx @@ -27,6 +27,8 @@ export async function action({ params, request }: ActionFunctionArgs) { const name = (fd.get("name") as string).trim(); const slug = (fd.get("slug") as string).trim(); const area = (fd.get("area") as string).trim() || null; + const description = (fd.get("description") as string).trim() || null; + const status = (fd.get("status") as string) || "active"; const message = (fd.get("message") as string).trim(); const links: { label: string; url: string }[] = JSON.parse( (fd.get("links") as string) || "[]" @@ -42,7 +44,7 @@ export async function action({ params, request }: ActionFunctionArgs) { if (Object.keys(errors).length > 0) return { errors }; try { - updateBand(band.id, { slug, name, area, links, artists, message, ip_address: getIpAddress(request) }); + updateBand(band.id, { slug, name, area, description, status, links, artists, message, ip_address: getIpAddress(request) }); } catch (e) { if (e instanceof Error && e.message.includes("UNIQUE constraint failed: bands.slug")) { return { errors: { slug: "このslugは既に使用されています" } }; @@ -129,6 +131,29 @@ export default function BandEdit() { /> +
+ + +
+ +
+ +