Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to resubmit boundary #185

Merged
merged 9 commits into from
Nov 8, 2022

Conversation

mstone121
Copy link
Contributor

@mstone121 mstone121 commented Nov 7, 2022

Overview

This PR adds the ability to resubmit boundaries.

Closes #180

Demo

Screen.Recording.2022-11-07.at.11.56.39.AM-1.mov

Notes

Showing annotations on the next draft required returning previous submission info from the boundary details route.

Testing Instructions

  • Login as c1@azavea.com
  • Select "Azavea Test Utility"
  • Go to the submission in status "Needs Revisions"
    • Ensure "go to draw page" button reads "Revise map"
    • Ensure clicking this button starts a new submission and redirects you to the draw page
    • Ensure the shape from the last submission is populated by default
    • Ensure annotations from the last submission's review are visible and read-only
  • Make some changes to the shape
  • Click "Review and submit" and go through the modals
    • Ensure the boundary is now in "Submitted" status and has the correct shape/comments

Checklist

  • fixup! commits have been squashed
  • CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines
  • README.md updated if necessary to reflect the changes
  • CI passes after rebase

@mstone121 mstone121 force-pushed the ms/add-ability-to-resubmit-boundary branch from 2a025f2 to d8fd1e1 Compare November 7, 2022 19:06
@@ -131,6 +131,7 @@ export function getBoundaryPermissions({ boundary, user }) {
canWrite: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll be updating this function again in the PR for #151 to separate the role and boundary aspects of these permissions. It might not be worth getting into too much detail here.

Copy link
Contributor

@rajadain rajadain left a comment

Choose a reason for hiding this comment

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

+1 tested. Nice work including the previous submission in the API and making the choice in the front-end about which annotations to show.

if (canWrite && boundary.status === BOUNDARY_STATUS.NEEDS_REVISIONS) {
label = 'Revise boundary';
if (canCreateDraft && boundary.status === BOUNDARY_STATUS.NEEDS_REVISIONS) {
label = 'Revise map';
Copy link
Contributor

Choose a reason for hiding this comment

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

Apologies, this should still be Review boundary.

@mstone121
Copy link
Contributor Author

mstone121 commented Nov 7, 2022

@rajadain I accidentally commited Split boundary and user permission logic to this branch when I meant to commit to add-support-for-approving-boundaries. I was going to cherry-pick it off this branch, but then I decided not to because it does override some of the changes from this PR (and works without the changes from the newer branch).

I think it happened while you were reviewing so you might not have seen those changes. Let me know if you want me to move forward with cherry-pick or if you want to review it here.

@rajadain
Copy link
Contributor

rajadain commented Nov 7, 2022

Will take a look here

Copy link
Contributor

@rajadain rajadain left a comment

Choose a reason for hiding this comment

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

Tested all the permissions use cases, this is working well. Nice job!

@mstone121 mstone121 force-pushed the ms/add-ability-to-resubmit-boundary branch from 4c866ef to 41f5056 Compare November 8, 2022 15:27
@mstone121 mstone121 force-pushed the ms/add-ability-to-resubmit-boundary branch from 41f5056 to f33fc7e Compare November 8, 2022 15:29
@mstone121 mstone121 merged commit 90b1b4f into develop Nov 8, 2022
@mstone121 mstone121 deleted the ms/add-ability-to-resubmit-boundary branch November 8, 2022 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Ability to Resubmit a Boundary
2 participants