Closed stephencastaneda closed 4 years ago
As a user, when the set page loads, I should be able to add songs to a set.
WHEN I look at the set page THEN I click on the create set button AND a form appears AND I should be able to create a set
add a create set button to the top of the Set.js component
Set.js
onClick the button should open a modal
onClick
the modal should have a form that has three inputs
one input should allow the user to create a setTitle of their choice
setTitle
other should allow the user to select a date for the set using moment js
moment js
the other input should be a drop down list of all the songs from the songs array in Songs.js
Songs.js
add a save button to the bottom of the form
onClick of button should call the saveSetSong function
saveSetSong
saveSetSong function should get setTitle setDate songId from state
setDate
songId
it should then save newSetSong as an object and call a post function from setSongsData.js
newSetSong
post
setSongsData.js
.then should use this.props.history.push to go back to /setSongs
.then
this.props.history.push
/setSongs
.catch should console unable to save setSong
.catch
User Story
As a user, when the set page loads, I should be able to add songs to a set.
AC
WHEN I look at the set page THEN I click on the create set button AND a form appears AND I should be able to create a set
Dev Notes
add a create set button to the top of the
Set.js
componentonClick
the button should open a modalthe modal should have a form that has three inputs
one input should allow the user to create a
setTitle
of their choiceother should allow the user to select a date for the set using
moment js
the other input should be a drop down list of all the songs from the songs array in
Songs.js
add a save button to the bottom of the form
onClick
of button should call thesaveSetSong
functionsaveSetSong
function should getsetTitle
setDate
songId
from stateit should then save
newSetSong
as an object and call apost
function fromsetSongsData.js
.then
should usethis.props.history.push
to go back to/setSongs
.catch
should console unable to save setSong