until step 10
This commit is contained in:
@@ -165,7 +165,7 @@ ## Step 5: Page Stubs and Click-Through Flow
|
||||
|
||||
## Step 6: Seeders -- Categories, Question Groups, and Questions
|
||||
|
||||
[ ] **Seed all reference data: pre-screening questions, 6 categories, their question groups, and all questions with correct field configuration.**
|
||||
[x] **Seed all reference data: pre-screening questions, 6 categories, their question groups, and all questions with correct field configuration.**
|
||||
|
||||
Create `DatabaseSeeder` (or dedicated seeders) for: the 10 pre-screening Yes/No questions (stored in config or a seeder — these are not in the `questions` table, they are handled by the screening flow), the 6 categories (Audit, Outsource, Solution, Digital Solutions, Legal, Tax) with correct `sort_order`, all question groups per category with names, descriptions, and `scoring_instructions` where applicable, and all questions with the correct `has_yes`, `has_no`, `has_na`, `details`, `is_scored`, and `sort_order` values. Source question data from `docs/questions-audit.md`, `docs/questions-outsource-solutions.md`, `docs/questions-digital-solutions.md`, `docs/questions-legal.md`, `docs/questions-tax.md`.
|
||||
|
||||
@@ -191,7 +191,7 @@ ## Step 6: Seeders -- Categories, Question Groups, and Questions
|
||||
|
||||
## Step 7: Landing Page and Pre-Screening Flow
|
||||
|
||||
[ ] **Build the real landing page and pre-screening questionnaire.**
|
||||
[x] **Build the real landing page and pre-screening questionnaire.**
|
||||
|
||||
Build the Landing page: describes the application purpose (what Go/No Go is, what the user will do), with a "Continue" button that creates a screening and redirects to the pre-screening questions. Build the Screening/Show page: render the 10 Yes/No pre-screening questions using `useForm`. Save screening answers via `PUT /screening/{screening}`. On submit, calculate the screening score (Yes=1 point each), determine pass/fail (>=5 = pass), and redirect to the screening result page. Build Screening/Result: if failed (<5 points), show No Go result with "Again" button back to `/`. If passed, show the category picker (list of 6 categories) with "Start" buttons. Selecting a category creates a session linked to this screening and redirects to Session/Show.
|
||||
|
||||
@@ -236,7 +236,7 @@ ## Step 7: Landing Page and Pre-Screening Flow
|
||||
|
||||
## Step 8: Basic Info Form
|
||||
|
||||
[ ] **Build the basic info step as the first section of Session/Show.**
|
||||
[x] **Build the basic info step as the first section of Session/Show.**
|
||||
|
||||
Add the basic info form fields to the Session/Show page: `client_name`, `client_contact`, `lead_firm_name`, `lead_firm_contact`. Use Inertia `useForm` to save data to the session's `basic_info` JSON column via `PUT /sessions/{session}`. All four fields are required before the user can proceed to questions. Display validation errors inline.
|
||||
|
||||
@@ -278,7 +278,7 @@ ## Step 8: Basic Info Form
|
||||
|
||||
## Step 9: Questionnaire Flow -- Question Rendering and Answer Saving
|
||||
|
||||
[ ] **Build the full questionnaire UI with all 6 question patterns and answer persistence.**
|
||||
[x] **Build the full questionnaire UI with all 6 question patterns and answer persistence.**
|
||||
|
||||
Create the `QuestionCard` component that renders questions based on their field configuration (see the 6 patterns in `docs/technical-requirements.md` section 5). Render all questions on a single scrollable page within `Session/Show` (not paginated per group). In phase 2, questions will be visually grouped by their question group with group headers and scoring instructions. Save answers via `PUT /sessions/{session}` using Inertia `useForm` with partial reloads (only reload answers/score, not the full question set). Handle `details` textarea visibility: show when `details` is `required` or `optional`; show conditionally for `req_on_yes` / `req_on_no` based on the selected value. Include the Additional Comments textarea at the bottom of the page.
|
||||
|
||||
@@ -323,7 +323,7 @@ ## Step 9: Questionnaire Flow -- Question Rendering and Answer Saving
|
||||
|
||||
## Step 10: Scoring and Result
|
||||
|
||||
[ ] **Implement server-side scoring and the result page.**
|
||||
[x] **Implement server-side scoring and the result page.**
|
||||
|
||||
Calculate the score server-side from `is_scored` answers: Yes=1, No=0, NA=excluded. Return the running score and current result threshold via Inertia props during the questionnaire. Build the `ScoreIndicator` into the questionnaire flow with live color updates (green 10+, yellow 5-9, red 1-4). Build the real `Session/Result` page showing the final GO / NO GO / Consult Leadership result with color coding and an "Again" button that returns to `/`. On session submission, calculate final score and persist `score`, `result`, `status=completed`, and `completed_at` to the session.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user