Make a table with a list of surveys. Each survey will show information and have buttons/a drop-down menu of options
Information to show:
Survey Title
If it’s live
Date it went live
Date it closed on
if this is empty, show a little - to show this cell is empty
Options for each survey
Respond to it —> this routes to the /survey/:id page
This option should only be clickable if the survey is live
View metrics —> This routes to the /surveyResponses/:surveyId page
This option should only be clickable if the survey is NOT live
Close survey —> This button calls the PATCH api/v1/surveys/:id API. Send a body with isLive = false Then route the user to the /surveyResponses/:surveyId page (or if that’s too hard then reload the dashboard page)
This option should only be clickable if the survey is live
/survey/:id
page/surveyResponses/:surveyId
pagePATCH api/v1/surveys/:id
API. Send a body withisLive = false
Then route the user to the/surveyResponses/:surveyId
page (or if that’s too hard then reload the dashboard page)