{item.question}
++ {item.guidance} +
+ ++ {hasAction + ? "An action has been raised for this item." + : "This item needs a follow-up action."} +
+ {!hasAction ? ( + + ) : null} +From 62d9a2b3045f00061b4bc2ce2ddfd487227ea0df Mon Sep 17 00:00:00 2001
From: Cursor Agent Premises profile {premises.address}
+ Answer a few questions about your premises. We'll tailor the annual
+ safety audit to what applies to your building — usually about five
+ minutes.
+
+
Compliance management for volunteer-run community buildings
+ Run
+ Step {stepIndex + 1} of {PROFILE_STEPS.length}
+ {currentStep.description} Your answers
+ {previewSections.length} audit sections will apply
+
+ Based on your profile, we'll include the relevant sections
+ from the Scout Association September 2025 audit template.
+ Annual safety audit {premises.address}{premises.name}
+ Vigil
- ScoutBase
+ npm run db:seed{" "}
+ to create a demo premises.
+
+ {currentStep.title}
+
+
+
+
+ {previewSections.map((sectionId) => (
+
+ {premises.name}
+
Run
+ We need to know about your building before we can tailor the audit
+ for {premisesName}.
+
+ Work through the Scout Association premises audit section by section.
+ You can save your progress and come back later.
+
+ You have a draft audit in progress.
+ {error}
+ Template {overview.templateVersion} · Draft audit
+
+ {overview.progress.completedSections} of{" "}
+ {overview.progress.totalSections} sections complete
+
+ Section {activeSection.number}
+
+ Answer each question below. Your responses are saved automatically.
+ Loading questions…
+ {item.guidance}
+
+ {hasAction
+ ? "An action has been raised for this item."
+ : "This item needs a follow-up action."}
+ npm run db:seed{" "}
diff --git a/components/audit/ActionRaiseForm.tsx b/components/audit/ActionRaiseForm.tsx
new file mode 100644
index 0000000..6a3851f
--- /dev/null
+++ b/components/audit/ActionRaiseForm.tsx
@@ -0,0 +1,153 @@
+"use client";
+
+import { useState } from "react";
+import type { Priority } from "@prisma/client";
+import type { AuditItemWithResponse } from "@/types/audit";
+import { Button } from "@/components/ui/form";
+
+const PRIORITY_OPTIONS: { value: Priority; label: string }[] = [
+ { value: "HIGH", label: "High" },
+ { value: "MEDIUM", label: "Medium" },
+ { value: "LOW", label: "Low" },
+];
+
+type ActionRaiseFormProps = {
+ item: AuditItemWithResponse;
+ saving: boolean;
+ onSubmit: (input: {
+ title: string;
+ description: string;
+ priority: Priority;
+ dueDate: string;
+ }) => Promise
+ Complete your premises profile first
+
+ Annual safety audit
+
+ {overview.premises.name}
+
+
+ {activeSection.title}
+
+ {item.question}
+
{validationError}
) : null} - {(needsAction || hasAction) && response && response !== "NA" && !isOpenTextQuestion && !isDateQuestion ? ( + {(needsAction || linkedAction) && response && response !== "NA" && !isOpenTextQuestion && !isDateQuestion ? (- {hasAction + {linkedAction ? "An action has been raised for this item." : "Raise an action to track the follow-up."}
- {!hasAction ? ( + {linkedAction ? ( + + ) : needsAction ? (