bcgov / bcgov/wps

HFI Calculator: Enhance clarity around setting prep dates, and prevent ZWCOs from doing so

Open
#1,860 3 comments 0 reactions 0 assignees View on GitHub
4Refinement User Requested User Story
Dominant language
Python
Stars
65
Forks
11
Avg merge
21h 25m
Merged PRs (30d)
70

Description

**As a** *Plans, Ops, or RWCO user* **I want** *to set the prep date range with confidence/clarity* **So That** * lorem*

**As a** *HFI user - all roles including stakeholders* **I want** *to be able to navigate different date ranges with clarity and without disrupting others* **So That** *I can navigate to the current prep period with clarity/confidence or navigate back in time to review actuals*

**Additional Context**
- [FIGMA](https://www.figma.com/file/FReMPNBDzxYeE8hlxRvsoB/HFI-Calc-(Prepski)-2022?node-id=1474%3A7229)
- By default the HFI Calc opens to the most recent prep set by an RWCO/Plans person for all users
- In date range picker, add two new buttons, relabel the existing button:
- Set prep period (Plans/RWCO)
- primary button style: filled
- hide from non-Plans/RWCO
- on click: close modal, show success toast, display that prep period
- View date range (all IDIR)
- secondary button style: outline
- on click: close modal, navigate to that date range
- this button is allowing users to navigate freely, with clarity that they're working independently and outside the current prep dates
- relabel ‘Reset’ to ‘Clear selection’
- tertiary action style: no button outline
- rationale: ‘reset’ in proximity to ‘set prep’ may be confusing: am I resetting prep or clearing the date range?
![Set prep, navigate date ranges.png](https://images.zenhubusercontent.com/60b527e413189cbf16c31d48/8fce25cd-bd2b-44eb-a8d2-a6e6975cf918)

- Add a ‘go to current prep’ button in the header to the right of the date range picker
- Takes user to the most recent prep set by plans/RWCO
- this is for 1. confirmation that they’re viewing the correct dates (they won’t know the default behaviour) and 2. helps them quickly get back to prep if they chose to navigate forward/backward in time, e.g. to look at last prep’s actuals
![DECISION_ Ready for Review Toggle_ Editing (1).png](https://images.zenhubusercontent.com/60b527e413189cbf16c31d48/de0723e9-6fd0-433c-8638-8983b1244d08)

**Acceptance Criteria**
- [x] Given I am an RWCO/Plans using HFI, When I open the date range picker, Then I see 3 buttons/links
- [ ] 'Set prep period' button: this creates a prep period, the most recent prep period is the default date range for all users in that Fire Centre
- [ ] primary button style = filled
- [ ] hide (disable if easier) from non-Plans/RWCO roles
- [ ] close modal, show success toast, load the selected prep period
- [x] 'View date range': this button is allowing users to navigate freely, with clarity that they're working independently and outside the current prep dates
- [x] secondary button style = outline
- [x] on click: close modal, navigate to that date range
- [x] viewing date ranges is read only
- [x] relabel ‘Reset’ to ‘Clear selection’: rationale: ‘reset’ in proximity to ‘set prep’ may be confusing: am I resetting prep or clearing the date range?
- [x] tertiary action style = no button outline
- [ ] Given I am a ZWCO or personal IDIR accessing HFI Calc., When I open the date picker modal, Then I cannot see 'set prep' button (or it is disabled if that is significantly easier)
- [ ] Given I am accessing HFI Calc. as any user/any permissions, I see a 'Go to current prep’ button in the header - to the right of the date field. This takes me to the most recent prep set by plans/RWCO
- [ ] If I am already on the current prep (loaded by default) still reload the page so I get confirmation that I'm looking at the right dates (they won’t know the default behaviour)

NEW:
- [ ] if I'm looking at a date range that is NOT a prep record, all fields should be disabled / not editable (we need feedback about _why_ somewhere)

**Definition of Done**
- [ ] Ready to Demo in Sprint Review
- [ ] Does what I have made have appropriate test coverage?
- [ ] Documentation and/or scientific documentation exists and can be found
- [ ] Peer Reviewed by 2 people on the team
- [ ] Manual testing of all PRs in Dev and Prod
- [ ] Merged

Contributor guide

Open the contributing guide

Research direction

Start at the HFI Calc date-range picker and header entry points, then trace how prep periods and user roles are loaded. Run the existing HFI Calc tests and manually check Plans/RWCO, ZWCO, and personal IDIR flows against the acceptance criteria. Done means the controls, permissions, navigation, read-only state, feedback, and test coverage match the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
authorization, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.