As a user, I should be able to enter in an event that will happen at a future date and see all my events.
Acceptance Criteria
CREATE
GIVEN a user wants to keep track on a future event
WHEN the user clicks an affordance to enter a new event in the application
THEN a form should be presented to the user in which the following properties of the event can be provided
Name of event
Date of event
Location of event
GIVEN a user has entered in all details of an event
WHEN the user performs a gesture to save the event
THEN the event should be displayed in the application in the Events component
READ
GIVEN a user has saved events
WHEN the user visits their dashboard
THEN the events should be presented in the Events component
AND the user should only see articles that belong to their uid.
UPDATE
GIVEN a user wants to change the details of an event
WHEN the user performs a gesture to edit an event
THEN the user should be presented with a form that has the event details pre-filled into the fields
AND there should be an affordance to save the new details
DELETE
GIVEN a user wants to delete an event
WHEN the user clicks a delete affordance
THEN the event is removed from firebase and no longer displays in the event component
DEV NOTES
create a eventsData file containing a promise to getEventsByUid via axios.get the apiKeys
Object.keys(eventsResults).forEach((eventId) => to push the object id results into a eventsarray,
and resolve the array
addEvent = eventsObject => axios.post
deleteEvent = eventsId => axios.delete
editEvent = eventsId => axios.put
create a events.js file to eventsBuilder = (uid) => the data from eventsData.getEventsByUid
include edit, save and delete buttons in the eventsBuilder with id="eventId"
add an input form with submitButton for news stories to be added: eventsTitle, imageUrl, and synopsis
add eventListeners to saveButton to call eventsData.addStory
add eventListeners to deleteEvent buttons to call eventsData.deleteEvent
add eventListeners to editEvent buttons to call eventsData.editEvent
User Story
As a user, I should be able to enter in an event that will happen at a future date and see all my events.
Acceptance Criteria
CREATE
GIVEN a user wants to keep track on a future event WHEN the user clicks an affordance to enter a new event in the application THEN a form should be presented to the user in which the following properties of the event can be provided
GIVEN a user has entered in all details of an event WHEN the user performs a gesture to save the event THEN the event should be displayed in the application in the
Events
componentREAD
GIVEN a user has saved events WHEN the user visits their dashboard THEN the events should be presented in the
Events
component AND the user should only see articles that belong to their uid.UPDATE
GIVEN a user wants to change the details of an event WHEN the user performs a gesture to edit an event THEN the user should be presented with a form that has the event details pre-filled into the fields AND there should be an affordance to save the new details
DELETE
GIVEN a user wants to delete an event WHEN the user clicks a delete affordance THEN the event is removed from firebase and no longer displays in the event component
DEV NOTES
eventsData
file containing a promise togetEventsByUid
viaaxios.get
theapiKeys
Object.keys(eventsResults).forEach((eventId) =>
to push the object id results into aevents
array, and resolve the arrayaddEvent = eventsObject => axios.post
deleteEvent = eventsId => axios.delete
editEvent = eventsId => axios.put
events.js
file toeventsBuilder = (uid) =>
the data fromeventsData.getEventsByUid
edit
,save
anddelete
buttons in theeventsBuilder
withid="eventId"
submitButton
for news stories to be added:eventsTitle
,imageUrl
, andsynopsis
saveButton
to calleventsData.addStory
deleteEvent
buttons to calleventsData.deleteEvent
editEvent
buttons to calleventsData.editEvent