Skip to content

Allow supervisors/ admin to update court report due date#999

Merged
compwron merged 1 commit into
rubyforgood:masterfrom
khiga8:kh-808_court_report_due_date
Oct 7, 2020
Merged

Allow supervisors/ admin to update court report due date#999
compwron merged 1 commit into
rubyforgood:masterfrom
khiga8:kh-808_court_report_due_date

Conversation

@khiga8

@khiga8 khiga8 commented Oct 7, 2020

Copy link
Copy Markdown
Collaborator

What github issue is this PR for, if any?

Resolves #808

What changed, and why?

  • Adds a court_report_due_date column to the CasaCase table.
  • Adds a court_report_due_date date field in the details view that
    admins and supervisors can edit. Volunteers will see a non-editable
    date.
  • Minor refactor of date parse method in CasaCase to allow court report
    due date validation.

How will this affect user permissions?

  • Volunteer permissions: View court report due date.
  • Supervisor permissions: View/Edit court report due date.
  • Admin permissions: View/Edit court report due date.

How is this tested? (please write tests!)

  • Test that the court report due date field is editable in
    supervisor_edits_case_spec and admin_edits_case_spec.
  • Test the the court report due date field is visible in
    volunteer_edits_case_spec.
  • Test that an invalid court report due date throws an error in
    supervisor_edits_case_spec.

Screenshots

Screen Shot 2020-10-07 at 8 36 45 AM
Screen Shot 2020-10-07 at 8 36 27 AM

**What github issue is this PR for, if any?**
Resolves rubyforgood#808

**What changed, and why?**
- Adds a  `court_report_due_date` column to the `CasaCase` table.
- Adds a `court_report_due_date` date field in the details view that
admins and supervisors can edit. Volunteers will see a non-editable
date.
- Minor refactor of date parse method in `CasaCase` to allow court report
due date validation.

**How will this affect user permissions?**
- Volunteer permissions: View court report due date.
- Supervisor permissions: View/Edit court report due date.
- Admin permissions: View/Edit court report due date.

**How is this tested? (please write tests!)**
- Test that the court report due date field is editable in
`supervisor_edits_case_spec` and `admin_edits_case_spec`.
- Test the the court report due date field is visible in
`volunteer_edits_case_spec`.
- Test that an invalid court report due date throws an error in
`supervisor_edits_case_spec`.
@khiga8

khiga8 commented Oct 7, 2020

Copy link
Copy Markdown
Collaborator Author

I largely followed the existing implementation from #807.

I ran the linters on the files I changed and so a few additional changes seem to have slipped in. 😅

@compwron compwron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful :) ✨

@compwron compwron merged commit 77a7f7d into rubyforgood:master Oct 7, 2020
@Zrrrpy Zrrrpy added the working-in-qa Tested and working in QA label Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

working-in-qa Tested and working in QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

supervisors and admins can add court report due date per casa_case

3 participants