rubyforgood / casa

Volunteer management system for nonprofit CASA, which serves foster youth in counties across America.
https://casavolunteertracking.org/
MIT License
314 stars 478 forks source link

Apply Supervisor/Admin "Other Duties" view for volunteers - Remove "Other Duties" from cases view for all users #5174

Closed bcastillo32 closed 1 year ago

bcastillo32 commented 1 year ago

Impacted User Types

Environment

Web app

Current Behavior

"Other Duties" appears in the "My Cases" tab for all users.

image

Expected Behavior after changes

How to access the QA site

Login Details:
Link to QA site

Login Emails:

password for all users: 12345678

Questions? Join Slack!

We highly recommend that you join us in slack https://rubyforgood.herokuapp.com/ #casa channel to ask questions quickly and hear about office hours (currently Tuesday 5-7pm Pacific), stakeholder news, and upcoming new issues.

chahmedejaz commented 1 year ago

Hey @bcastillo32, I'd like to work on this issue. Can you please assign it to me? Thanks :)

bcastillo32 commented 1 year ago

Hey @bcastillo32, I'd like to work on this issue. Can you please assign it to me? Thanks :)

All set!

chahmedejaz commented 1 year ago

Hey @bcastillo32 - I just observed that we have the Other Duties under My Cases for Supervisors/Admins as well. Do you want it removed for them under My Cases as well?

bcastillo32 commented 1 year ago

Hey @bcastillo32 - I just observed that we have the Other Duties under My Cases for Supervisors/Admins as well. Do you want it removed for them under My Cases as well?

yes you're right. That was an oversight on my part - Other duties should only show on the separate page and be removed from the cases page for all users. I will update the ticket

chahmedejaz commented 1 year ago

@bcastillo32 -

  1. We can safely remove the Other Duties from Cases for supervisors and admin because it's already breaking for them when they try adding a new duty
  2. However, currently volunteers can only Add/Edit Duties from the My Cases page
  3. Other Duties page is the view-only page for duties
  4. Please let me know how do we want to handle the point#2. Thanks.
chahmedejaz commented 1 year ago

Update: @bcastillo32 - The development work is complete as per the Expected Behavior of the issue. We can finalize this once we get update on this comment. Thanks.

bcastillo32 commented 1 year ago

Update: @bcastillo32 - The development work is complete as per the Expected Behavior of the issue. We can finalize this once we get update on this comment. Thanks.

Let's add the " + New Duty" button to the "Other Duties" page for all users - I think it makes most sense to enter the form from there. Place the button to the right of the "Other Duties" text on the separate page the same way it shows on the "My cases" page - let me know if this helps :)

chahmedejaz commented 1 year ago

@bcastillo32 - These requirements are apparently going against the existing implementation. That's why I think before moving forward, we should discuss them as well:

Existing Implementation

  1. Supervisors and Admins cannot add new duties, even though they can see the button. Upon clicking, they would see the unauthorized message
  2. Supervisors can only view his volunteers' duties on the Other Duties page
  3. Admins can view all of the duties added by all volunteers
  4. According to the 2nd and 3rd points, 1st point seems to be the bug. i.e. Supervisors and Admins should not be able to view the "Add New Duties" button
  5. Only the Volunteers can successfully add new duty
  6. Duties on Other Duties page are viewed as following:
  7. image
  8. The highlighted link goes to the edit profile page for the volunteer only accessible by supervisors and admins.

After the Issue's Fix

Please let me know how we want to handle the existing functionality with these requirements. Please let me know if you have any follow-up questions. Thanks :)

bcastillo32 commented 1 year ago

@bcastillo32 - These requirements are apparently going against the existing implementation. That's why I think before moving forward, we should discuss them as well:

Existing Implementation

  1. Supervisors and Admins cannot add new duties, even though they can see the button. Upon clicking, they would see the unauthorized message
  2. Supervisors can only view his volunteers' duties on the Other Duties page
  3. Admins can view all of the duties added by all volunteers
  4. According to the 2nd and 3rd points, 1st point seems to be the bug. i.e. Supervisors and Admins should not be able to view the "Add New Duties" button
  5. Only the Volunteers can successfully add new duty
  6. Duties on Other Duties page are viewed as following:
  7. image
  8. The highlighted link goes to the edit profile page for the volunteer only accessible by supervisors and admins.

After the Issue's Fix

  • Volunteers can only view their own duties on the Other Duty Page
  • I believe according to the 8th point, we should now hide the profile link if the volunteer is viewing their own duties.

Please let me know how we want to handle the existing functionality with these requirements. Please let me know if you have any follow-up questions. Thanks :)

I see what you are saying - sorry for not being specific. I updated the expected behavior. I like your idea about the unnecessary link when a volunteer is viewing their own other duties. Let's hide it for volunteers.

chahmedejaz commented 1 year ago

Hey @bcastillo32 - The development work has been completed. The PR is ready now :) Please review the following video and let me know if I'm missing anything. Thanks. :) Screencast from 09-05-2023 02:36:30 PM.webm