As a user, I should be able to edit my news articles
Acceptance Criteria
UPDATE:
GIVEN a user wants to update a news article
WHEN the user performs a gesture on the edit affordance
THEN a form should be presented to the user
AND all the information for the article should pre-populate in the form
AND after the user edits the information and pushes a 'Save Article' button the data should update in firebase
Development
in the newsData file create editStory = storyId => axios.put
in the news.js file, include the following
inside newsBuilder() add editStoryButton to the news card
inside newsBuilder() add editedSaveButton, class="hide" to the input form
create addEvents() and include these events
editStoryButton to call newsData.getNewsByUid - populate input fields' values with results
editStoryButton to classList change saveButton to class="hide"
editStoryButton to classList change editedSaveButton to class=""
editedSaveButton to call newsData.editStory
editedSaveButton to call newsBuilder
editedSaveButton to classList change saveButton to class=""
User Story
As a user, I should be able to edit my news articles
Acceptance Criteria
UPDATE: GIVEN a user wants to update a news article WHEN the user performs a gesture on the edit affordance THEN a form should be presented to the user AND all the information for the article should pre-populate in the form AND after the user edits the information and pushes a 'Save Article' button the data should update in firebase
Development
newsData
file createeditStory = storyId => axios.put
news.js
file, include the followingnewsBuilder()
addeditStoryButton
to the news cardnewsBuilder()
addeditedSaveButton
,class="hide"
to the input formaddEvents()
and include these eventseditStoryButton
to callnewsData.getNewsByUid
- populate input fields' values with resultseditStoryButton
to classList changesaveButton
toclass="hide"
editStoryButton
to classList changeeditedSaveButton
toclass=""
editedSaveButton
to callnewsData.editStory
editedSaveButton
to callnewsBuilder
editedSaveButton
to classList changesaveButton
toclass=""