diff --git a/.playwright-mcp/step10-score-check.md b/.playwright-mcp/step10-score-check.md new file mode 100644 index 0000000..6c4aec8 --- /dev/null +++ b/.playwright-mcp/step10-score-check.md @@ -0,0 +1,277 @@ +- generic [ref=e3]: + - banner [ref=e4]: + - generic [ref=e6]: Piccadilly + - main [ref=e7]: + - generic [ref=e140]: + - generic [ref=e141]: + - heading "Audit Questionnaire" [level=1] [ref=e142] + - generic [ref=e417]: + - generic [ref=e418]: + - generic [ref=e419]: "5" + - generic [ref=e420]: points + - generic [ref=e421]: Consult Leadership + - generic [ref=e143]: + - heading "Basic Information" [level=2] [ref=e144] + - paragraph [ref=e145]: All fields are required before you can proceed to the questionnaire. + - generic [ref=e146]: + - generic [ref=e147]: + - generic [ref=e148]: Client Name + - textbox "Client Name" [ref=e149]: + - /placeholder: Enter client name + - generic [ref=e150]: + - generic [ref=e151]: Client Contact + - textbox "Client Contact" [ref=e152]: + - /placeholder: Enter client contact + - generic [ref=e153]: + - generic [ref=e154]: Lead Firm Name + - textbox "Lead Firm Name" [ref=e155]: + - /placeholder: Enter lead firm name + - generic [ref=e156]: + - generic [ref=e157]: Lead Firm Contact + - textbox "Lead Firm Contact" [ref=e158]: + - /placeholder: Enter lead firm contact + - button "Save Basic Info" [ref=e160] + - generic [ref=e161]: + - heading "Opportunity Details" [level=2] [ref=e162] + - generic [ref=e163]: + - generic [ref=e164]: + - paragraph [ref=e165]: What sort of audit opportunity is it? + - textbox "Enter your response..." [ref=e167] + - generic [ref=e168]: + - paragraph [ref=e169]: How many locations involved in this opportunity? + - textbox "Enter your response..." [ref=e171] + - generic [ref=e172]: + - paragraph [ref=e173]: List any locations included in this opportunity where we do not have a Baker Tilly firm. + - textbox "Enter your response..." [ref=e175] + - generic [ref=e176]: + - paragraph [ref=e177]: Where is the client HQ? + - textbox "Enter your response..." [ref=e179] + - generic [ref=e180]: + - paragraph [ref=e181]: Who is the competition? + - textbox "Enter your response..." [ref=e183] + - generic [ref=e184]: + - heading "Client Background and History" [level=2] [ref=e185] + - paragraph [ref=e186]: If you answer yes, you will score 1 point, if you answer no you will score 0 points + - generic [ref=e187]: + - generic [ref=e188]: + - paragraph [ref=e189]: What is the client's business and industry? + - textbox "Enter your response..." [ref=e191] + - generic [ref=e192]: + - paragraph [ref=e193]: There have been no significant changes in the client's business operations or structure recently? + - generic [ref=e195]: + - generic [ref=e196] [cursor=pointer]: + - radio "Yes" [checked] [ref=e197] + - generic [ref=e198]: "Yes" + - generic [ref=e199] [cursor=pointer]: + - radio "No" [ref=e200] + - generic [ref=e201]: "No" + - generic [ref=e202] [cursor=pointer]: + - radio "N/A" [ref=e203] + - generic [ref=e204]: N/A + - generic [ref=e205]: + - paragraph [ref=e206]: Does the sector and/or client come with a reputation which we are comfortable that Baker Tilly is associated with? + - generic [ref=e208]: + - generic [ref=e209] [cursor=pointer]: + - radio "Yes" [checked] [ref=e210] + - generic [ref=e211]: "Yes" + - generic [ref=e212] [cursor=pointer]: + - radio "No" [ref=e213] + - generic [ref=e214]: "No" + - generic [ref=e215] [cursor=pointer]: + - radio "N/A" [ref=e216] + - generic [ref=e217]: N/A + - generic [ref=e218]: + - paragraph [ref=e219]: Are there any previous audit reports or findings that need to be considered? + - generic [ref=e220]: + - generic [ref=e221]: + - generic [ref=e222] [cursor=pointer]: + - radio "Yes" [checked] [ref=e223] + - generic [ref=e224]: "Yes" + - generic [ref=e225] [cursor=pointer]: + - radio "No" [ref=e226] + - generic [ref=e227]: "No" + - generic [ref=e228] [cursor=pointer]: + - radio "N/A" [ref=e229] + - generic [ref=e230]: N/A + - generic [ref=e422]: + - generic [ref=e423]: Details (required) + - textbox "Enter details..." [ref=e424] + - generic [ref=e231]: + - heading "Financial Information" [level=2] [ref=e232] + - paragraph [ref=e233]: If you answer yes, you will score 1 point, if you answer no you will score 0 points + - generic [ref=e234]: + - generic [ref=e235]: + - paragraph [ref=e236]: Has the client provided financial statements or balance sheet? + - generic [ref=e237]: + - generic [ref=e238]: + - generic [ref=e239] [cursor=pointer]: + - radio "Yes" [checked] [ref=e240] + - generic [ref=e241]: "Yes" + - generic [ref=e242] [cursor=pointer]: + - radio "No" [ref=e243] + - generic [ref=e244]: "No" + - generic [ref=e245] [cursor=pointer]: + - radio "N/A" [ref=e246] + - generic [ref=e247]: N/A + - generic [ref=e248]: + - generic [ref=e249]: Details (optional) + - textbox "Enter details..." [ref=e250] + - generic [ref=e251]: + - paragraph [ref=e252]: Are the client's financial statements complete and accurate? + - generic [ref=e253]: + - generic [ref=e254]: + - generic [ref=e255] [cursor=pointer]: + - radio "Yes" [checked] [ref=e256] + - generic [ref=e257]: "Yes" + - generic [ref=e258] [cursor=pointer]: + - radio "No" [ref=e259] + - generic [ref=e260]: "No" + - generic [ref=e261] [cursor=pointer]: + - radio "N/A" [ref=e262] + - generic [ref=e263]: N/A + - generic [ref=e264]: + - generic [ref=e265]: Details (optional) + - textbox "Enter details..." [ref=e266] + - generic [ref=e267]: + - heading "Regulatory Compliance" [level=2] [ref=e268] + - paragraph [ref=e269]: If you answer yes, you will score 1 point, if you answer no you will score 0 points + - generic [ref=e270]: + - generic [ref=e271]: + - paragraph [ref=e272]: Does the client comply with all relevant regulatory requirements and standards? + - generic [ref=e274]: + - generic [ref=e275] [cursor=pointer]: + - radio "Yes" [checked] [ref=e276] + - generic [ref=e277]: "Yes" + - generic [ref=e278] [cursor=pointer]: + - radio "No" [ref=e279] + - generic [ref=e280]: "No" + - generic [ref=e281] [cursor=pointer]: + - radio "N/A" [ref=e282] + - generic [ref=e283]: N/A + - generic [ref=e284]: + - paragraph [ref=e285]: The client has no pending legal or regulatory issues that you know of that could impact the audit? + - generic [ref=e287]: + - generic [ref=e288] [cursor=pointer]: + - radio "Yes" [checked] [ref=e289] + - generic [ref=e290]: "Yes" + - generic [ref=e291] [cursor=pointer]: + - radio "No" [ref=e292] + - generic [ref=e293]: "No" + - generic [ref=e294] [cursor=pointer]: + - radio "N/A" [ref=e295] + - generic [ref=e296]: N/A + - generic [ref=e297]: + - paragraph [ref=e298]: The client has been subject to no regulatory investigations or penalties? + - generic [ref=e300]: + - generic [ref=e301] [cursor=pointer]: + - radio "Yes" [checked] [ref=e302] + - generic [ref=e303]: "Yes" + - generic [ref=e304] [cursor=pointer]: + - radio "No" [ref=e305] + - generic [ref=e306]: "No" + - generic [ref=e307] [cursor=pointer]: + - radio "N/A" [ref=e308] + - generic [ref=e309]: N/A + - generic [ref=e310]: + - heading "Risk Assessment" [level=2] [ref=e311] + - paragraph [ref=e312]: If you answer yes, you will score 1 point, if you answer no you will score 0 points + - generic [ref=e313]: + - generic [ref=e314]: + - paragraph [ref=e315]: There are no key risks associated with the audit? + - generic [ref=e317]: + - generic [ref=e318] [cursor=pointer]: + - radio "Yes" [checked] [ref=e319] + - generic [ref=e320]: "Yes" + - generic [ref=e321] [cursor=pointer]: + - radio "No" [ref=e322] + - generic [ref=e323]: "No" + - generic [ref=e324] [cursor=pointer]: + - radio "N/A" [ref=e325] + - generic [ref=e326]: N/A + - generic [ref=e327]: + - paragraph [ref=e328]: Have you completed a conflict check? + - generic [ref=e329]: + - generic [ref=e330]: + - generic [ref=e331] [cursor=pointer]: + - radio "Yes" [checked] [ref=e332] + - generic [ref=e333]: "Yes" + - generic [ref=e334] [cursor=pointer]: + - radio "No" [ref=e335] + - generic [ref=e336]: "No" + - generic [ref=e337] [cursor=pointer]: + - radio "N/A" [ref=e338] + - generic [ref=e339]: N/A + - generic [ref=e340]: + - generic [ref=e341]: Details (required) + - textbox "Enter details..." [ref=e342] + - generic [ref=e343]: + - paragraph [ref=e344]: Are you and other BTI member firms independent with the meaning of local and IESBA rules? + - generic [ref=e346]: + - generic [ref=e347] [cursor=pointer]: + - radio "Yes" [checked] [ref=e348] + - generic [ref=e349]: "Yes" + - generic [ref=e350] [cursor=pointer]: + - radio "No" [ref=e351] + - generic [ref=e352]: "No" + - generic [ref=e353] [cursor=pointer]: + - radio "N/A" [ref=e354] + - generic [ref=e355]: N/A + - generic [ref=e356]: + - heading "Resource Allocation" [level=2] [ref=e357] + - paragraph [ref=e358]: If you answer yes, you will score 1 point, if you answer no you will score 0 points + - generic [ref=e359]: + - generic [ref=e360]: + - paragraph [ref=e361]: What resources are required for the audit (personnel, time, budget)? + - generic [ref=e362]: + - generic [ref=e363]: + - generic [ref=e364] [cursor=pointer]: + - radio "Yes" [checked] [ref=e365] + - generic [ref=e366]: "Yes" + - generic [ref=e367] [cursor=pointer]: + - radio "No" [ref=e368] + - generic [ref=e369]: "No" + - generic [ref=e370] [cursor=pointer]: + - radio "N/A" [ref=e371] + - generic [ref=e372]: N/A + - generic [ref=e373]: + - generic [ref=e374]: Details (optional) + - textbox "Enter details..." [ref=e375] + - generic [ref=e376]: + - paragraph [ref=e377]: Does your firm have the scale, seniority and degree of expertise available at the right time to report in accordance with the client's schedule? + - generic [ref=e378]: + - generic [ref=e379]: + - generic [ref=e380] [cursor=pointer]: + - radio "Yes" [checked] [ref=e381] + - generic [ref=e382]: "Yes" + - generic [ref=e383] [cursor=pointer]: + - radio "No" [ref=e384] + - generic [ref=e385]: "No" + - generic [ref=e386] [cursor=pointer]: + - radio "N/A" [ref=e387] + - generic [ref=e388]: N/A + - generic [ref=e389]: + - generic [ref=e390]: Details (optional) + - textbox "Enter details..." [ref=e391] + - generic [ref=e392]: + - heading "Reporting Requirements" [level=2] [ref=e393] + - paragraph [ref=e394]: If you answer yes, you will score 1 point, if you answer no you will score 0 points + - generic [ref=e396]: + - paragraph [ref=e397]: Do we understand reporting rules, regulatory environment and stakeholder expectations? + - generic [ref=e398]: + - generic [ref=e399]: + - generic [ref=e400] [cursor=pointer]: + - radio "Yes" [checked] [active] [ref=e401] + - generic [ref=e402]: "Yes" + - generic [ref=e403] [cursor=pointer]: + - radio "No" [ref=e404] + - generic [ref=e405]: "No" + - generic [ref=e406] [cursor=pointer]: + - radio "N/A" [ref=e407] + - generic [ref=e408]: N/A + - generic [ref=e409]: + - generic [ref=e410]: Details (optional) + - textbox "Enter details..." [ref=e411] + - generic [ref=e412]: + - heading "Additional Comments" [level=2] [ref=e413] + - textbox "Enter any additional comments to support your decision..." [ref=e414] + - button "Complete" [ref=e416] \ No newline at end of file diff --git a/docs/implementation-plan.md b/docs/implementation-plan.md index 349cefb..4aa9c99 100644 --- a/docs/implementation-plan.md +++ b/docs/implementation-plan.md @@ -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.