diff --git a/src/app/admin/problems/[slug]/edit/page.tsx b/src/app/admin/problems/[slug]/edit/page.tsx index bcfa137..f41d2ba 100644 --- a/src/app/admin/problems/[slug]/edit/page.tsx +++ b/src/app/admin/problems/[slug]/edit/page.tsx @@ -24,7 +24,7 @@ export default async function EditProblemPage({ return (
-
+
-
+
-
+

Management diff --git a/src/components/admin/RecruitmentPanel.tsx b/src/components/admin/RecruitmentPanel.tsx index 7c28ed7..d5b6c66 100644 --- a/src/components/admin/RecruitmentPanel.tsx +++ b/src/components/admin/RecruitmentPanel.tsx @@ -1,6 +1,7 @@ "use client"; import { useState } from "react"; +import { toShareUrl } from "@/lib/recruitment"; export interface RecruitmentPanelState { isOpen: boolean; @@ -20,6 +21,15 @@ export default function RecruitmentPanel({ initial }: { initial: RecruitmentPane const [error, setError] = useState(null); const [saving, setSaving] = useState(false); + // Deliberately derived from `saved`, not the editor state: this line describes + // what /join is serving right now. Reading the unsaved fields would announce a + // drive as open the moment someone ticked the box, before anything was written. + const liveStatus = !saved.formUrl + ? "No form link saved yet — /join is showing the closed notice." + : saved.isOpen + ? "Recruitment is open. /join is showing the form." + : "Recruitment is closed. /join is showing the closed notice."; + const dirty = isOpen !== saved.isOpen || formUrl !== (saved.formUrl ?? "") || @@ -129,6 +139,20 @@ export default function RecruitmentPanel({ initial }: { initial: RecruitmentPane )}

+
+ {liveStatus} + {saved.formUrl && ( + + Preview the saved form → + + )} +
+

Paste either the plain form link or the one from the embed (<>) dialog — both work. Must be an https://docs.google.com/forms/… URL.