amcnulty / Whoop-It-Up

A platform for viewing and creating events for the general public and friends.
https://whoopitup.herokuapp.com/
1 stars 1 forks source link

Add edit event functionality to the event detail page #44

Closed yankwong closed 6 years ago

yankwong commented 6 years ago
yankwong commented 6 years ago

We'll need a way for user to edit an event if they are the host (aka. creator) of the event they are viewing. This can be done through handlebar. We'll need conditional statement such as {{#if isHost}} and then print out all the edit options.

yankwong commented 6 years ago

Hey Brendan, I added the handlebar part of this task. Could you please handle the front end JS part? You need to bind the "Update Event" button and do the following:

1) verify that the event name is not empty, use .trim() to make sure 2) you then need to call $.ajax() to pass the object to the API. We'll need an edit event endpoint. This need to be done by the backend team. 3) after the ajax call is done (meaning .done()), refresh the event page using javascript

Let me know when u have any question.