icefoganalytics / yhsi

Yukon Heritage Information System
0 stars 0 forks source link

Issue 21: Change Tracking and Approval: Location Form Approvablility #22

Closed klondikemarlen closed 2 years ago

klondikemarlen commented 2 years ago

Fixes https://github.com/icefoganalytics/yhsi/issues/21

User Story

See https://github.com/icefoganalytics/yhsi/issues/3 As an edit level user I can edit the /sites Location form and it will create a site change request for admin approval.

Implementation

Rework Summary form approval patterns to support the Location form as well.

Screenshots

image

Testing Instructions

  1. Update your user roles to include Site Admin via the database console.
  2. Go to the /sites table and select a site.
  3. In the Location form, make and edit and press save.
  4. The site will refresh and your edits will be saved.
  5. Update your user roles so that they do not include Site Admin or Administrator via the database console. Something like Site Viewer would probably be best.
  6. Go to the /sites table and select a site.
  7. In the Location form, make and edit (or two) and press save.
  8. The page will refresh and all Location fields will become readonly. The save button on the Location form will be disabled with an appropriate tooltip.
  9. Make yourself an Site Admin again and go to the /sites-change-requests table.
  10. The new change request will be at the top of the list. Click on it to review.
  11. Note the various features:
    • "accept/reject" toggle buttons
    • accept/reject all
    • save button is locked until all changes are approved/rejected
  12. Reject and accept some changes and press Save.
  13. Go back to the /sites table and check that you can now edit the site and that the changes have been applied or rejected correctly.