chicommons / maps

MIT License
6 stars 18 forks source link

Frontend: Need to add reject reason modal when rejecting a propsed coop change #199

Open laredotornado opened 2 years ago

laredotornado commented 2 years ago

From the authentication branch

git checkout authentication

, fire up the app and create a coop entry to be added to the directory (). Then, login, http://localhost:3001/login, as an admin (chicommons/password) ,and review that was submitted by going to

http://localhost:3001/unapproved-list/

and clicking the pencil icon next to your entity. you will see a screen with the below buttons

Screen Shot 2022-06-13 at 3 52 50 PM

We want to change "Cancel" to "Reject". Further, when you click "Reject," a modal should appear wiht a single text field, "Reason" and a button "Submit". When the user clicks "Submit", the modal shoudl close and a PATCH request should be made to

/coops/COOP_ID/

with "approved" set to false and "reject_reason" set to what was entered in the reason box.

DaveyDevs commented 2 years ago

@laredotornado Hey Dave! I just created a pull request with a first draft for this functionality. I didn't have time to create a modal yet, so I have the fields updating in the same spot as the "Reject" button for the initial draft. Let me know what you think, happy to develop a modal as well if preferred.

laredotornado commented 2 years ago

Hi, Thanks! and apologies for the late reply. Left a couple of comments/questions on the PR but regarding my modal comment, maybe hold off on that until I get clarity from Steve that we want to go with taht UI, or if you are able to join tonight, we might show him and get his thoughts.

Also, I need to clean up the backend to accep the "reject_reason" being submitted from the front end. Will try and put that in today and will ping you when it's done.

Thanks again! - Dave

On Thu, Jun 23, 2022 at 11:34 PM Davey Devs @.***> wrote:

@laredotornado https://github.com/laredotornado Hey Dave! I just created a pull request with a first draft for this functionality. I didn't have time to create a modal yet, so I have the fields updating in place of the "Reject" button for the initial draft. Let me know what you think, happy to develop a modal as well if preferred.

— Reply to this email directly, view it on GitHub https://github.com/chicommons/maps/issues/199#issuecomment-1165185241, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRHTSLSS5WP2Y6R6O4T2JDVQU3FNANCNFSM5YVRCA5A . You are receiving this because you were mentioned.Message ID: @.***>

laredotornado commented 2 years ago

Hi @DaveyDevs , if you check out the latest from the authentication branch, there will now be support for the "reject_reason" in the PUT endpoint.

DaveyDevs commented 2 years ago

Hey @laredotornado ! Thanks for the update. I'm running into an error when running docker compose after pulling the latest from the authentication branch. Would you mind checking out the attachment and letting me know if this might be an issue on my end? Thanks!

7-3-22 error.txt

laredotornado commented 2 years ago

Oops, my bad! Can you download the latest from the authentication branch and tear down the containers/rebuild? This latest iteration should work.

Detailed stack trace you sent helped me pinpoint where things were falling apart. Thanks, - Dave

On Sun, Jul 3, 2022 at 12:19 PM Davey Devs @.***> wrote:

Hey @laredotornado https://github.com/laredotornado ! Thanks for the update. I'm running into an error when running docker compose after pulling the latest from the authentication branch. Would you mind checking out the attachment and letting me know if this might be an issue on my end? Thanks!

7-3-22 error.txt https://github.com/chicommons/maps/files/9035207/7-3-22.error.txt

— Reply to this email directly, view it on GitHub https://github.com/chicommons/maps/issues/199#issuecomment-1173139321, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRHTSJBDQHF5SJ4VDJSJLTVSHDSDANCNFSM5YVRCA5A . You are receiving this because you were mentioned.Message ID: @.***>

maxgraziano commented 4 months ago

Backend complete in branch 3.1-model-refactor.