ucladevx / Bruin-Bite-iOS

Mozilla Public License 2.0
8 stars 1 forks source link

Add report + unmatched feature #123

Closed HirdayGupta closed 5 years ago

HirdayGupta commented 5 years ago

UI changes to begin with, networking to follow. Wait for me to merge @kamalca's changes from #122 into development before beginning this work.

Add the following two more action buttons (in addition to "Ok" which dismisses the pop up) to the pop up created in #122.

  1. Unmatch:
    • first dismisses the info pop up (to avoid potential pop ups over the current popup)
    • trigger a backend API call to a route that does un-matching (TBD). If it succeeds, should return the user back to the ChatListViewController.
    • If backend API call fails for some reason, display a UIAlertController alerting user to the error and asking them to try again later.
  2. Report (see if you can make this button's background red and text white and bold):
    • first dismisses the info pop up (to avoid potential pop ups over the current popup)
    • display a UIAlertController with a textfield, asking user if they want to add details to their report. this field should be optional to fill. this UIAlertController should have two "actions" (aka buttons) - "report" and "cancel"
    • "report" should trigger a backend API call to a route that handles reports (TBD). If it succeeds, same as above, return to user back to the ChatListViewController.
    • if it fails, same as above, display a UIAlertController alerting user to the error and asking them to try again later.

See this tutorial for adding a textField to a UIAlertController.

Networking details to follow, make the UI changes by thursday if possible! thanks :)

HirdayGupta commented 5 years ago

@kamalca now that #122 is merged, you can start work on this!