User stories - NoahNim/eventsonly GitHub Wiki

Event

Create

As the PM when I click the create event button, I am directed to a form to fill out that lets me put in an event name, an event image, a description of the event, and a date for the event. If I do not fill out the required fields correctly, I am given validation errors telling me what I have to do to create an event correctly.

  • When clicking the Create Event button the user is redirected to a Create Event form
  • If the form is filled out incorrectly they will be unable to create an event until they fix their validations errors
  • If the user gets validation errors those errors will be displayed at the top of the form as a list.
  • After filling out the form and clicking Create (after confirming there are no validation errors), the user is redirected to the event page displaying their event

Read

As the PM when I either finish creating an event or if I click on an event, I am directed to that events page. I can see that the page displays an event photo, the events details, and any comments that event might have.

  • When the user has created an event they are redirected to their event
  • OR
  • When the user clicks an event in the event feed they are redirected to that events page
  • The page displays a photo (if applicable)
  • The page displays the event details
  • The page displays any comments made by users

Update

As a PM when I click the edit event button on the page of an event I own, I am directed to a form to fill out that lets me edit the event name, edit the event image, edit description of the event, and edit the date for the event. If I do not fill out the required fields correctly, I am given validation errors telling me what I have to do to have a correct event edit.

  • There is an edit button if that event belongs to the user
  • When clicking the Edit Event button the user is redirected to a Edit Event form
  • If the form is filled out incorrectly they will be unable to edit an event until they fix their validations errors
  • If the user gets validation errors those errors will be displayed at the top of the form as a list.
  • After filling out the form and clicking Edit (after confirming there are no validation errors), the user is redirected to the event page displaying their event

Destroy

As the PM when I am on the event page, if I click the delete event button then the event is deleted and I am redirected to the event listings page

  • There is a delete button on the event info page if that event belongs to the user
  • When the user clicks the delete button, the event is deleted

Comments

Create

As the PM, when I click the Comment button I am given an input. I can type words into that input and when I click submit that comment appears on the page. If I do not fill out the comment input correctly I get a validation error.

  • There is a Comment button
  • When user clicks a comment an input is displayed
  • User can type into that input
  • If user tries to submit a comment that is empty or just 1 character they'll get a validation error
  • When user clicks the submit button their comment appears on the event page

Read

As a PM, I can view both my comments and the comments of other users.

  • Comments by the user are viewable on the page
  • Comments by other users are viewable on the page

Update

As a PM, when I click the edit comment button on comments I have created an input appears letting me edit my comment. Then after hitting the submit button, my edited comment replaces the original. If I try to submit the edited comment without putting in anything I get validation errors

  • Users can see an edit comment button for comments they own
  • When users click the edit button they are given an input that has the current comment string in it, that string is now editable
  • If user tries to submit a comment that is empty or just 1 character they'll get a validation error
  • When user clicks the submit button their edited comment appears on the event page, their old comment is no longer there

Destroy

As a PM, when I click the delete comment button of a comment I own that comment is deleted.

  • User can see a delete comment button for comments they own
  • When the user clicks delete button they are asked to confirm
  • If they confirm they want to delete that comment, that comment no longer displays on the event page