So that I can manage those reviews (edit, delete, etc.)
As an admin
I can see all reviews awaiting moderation, and can update their moderation status
So that reviews with inappropriate content (e.g. spam) don't end up flooding my database
As a user
I can see all reviews for a menu item
So that I can decide what to eat
Frontend 1
Create a placeholder page at the url /myreviews and link to it from Menu Bar item "My Reviews"
It should say: this page will eventually show all reviews entered by the user
Frontend 2
Create a ReviewTable component that shows all reviews in the format returned by the backend endpoint described in #5 for retreiving reviews by user.
It should have an optional columns for "Approve" and "Reject" that appear only if a flag "moderatorOptions" is passed as true in the props to the component.
it should also have a Delete column available only if deleteColumn=true is passed.
Frontend 3: Add the ReviewTable and backend call to the placeholder page /myreviews
deleteColumn=true in this case.
Frontend 4: Add placeholder page /moderate accessible only to admins and link in menu bar as "Moderate"
Frontend 5: Populate /moderate page with the ReviewTable with moderateOptions=true.
When the buttons are clicked, add a modal where the admin can enter a moderation message, and call the backend endpoint to update the moderation status.
Review should disappear from /moderate page after it is updated.
Frontend 6: Create placeholder page for reviews at /reviews/:itemid
Frontend 7: Add ReviewTables to placeholder page /reviews/:itemid and look up all reviews for that item.
Frontend 8: Update MenuItemsTable to show average stars, and with a link to the /reviews/:itemid page.
User Story
As a user
I can see the reviews I've entered
So that I can manage those reviews (edit, delete, etc.)
As an admin
I can see all reviews awaiting moderation, and can update their moderation status
So that reviews with inappropriate content (e.g. spam) don't end up flooding my database
As a user
I can see all reviews for a menu item
So that I can decide what to eat
Frontend 1
Create a placeholder page at the url /myreviews and link to it from Menu Bar item "My Reviews"
It should say: this page will eventually show all reviews entered by the user
Frontend 2
Create a ReviewTable component that shows all reviews in the format returned by the backend endpoint described in #5 for retreiving reviews by user.
It should have an optional columns for "Approve" and "Reject" that appear only if a flag "moderatorOptions" is passed as true in the props to the component.
it should also have a Delete column available only if deleteColumn=true is passed.
Frontend 3: Add the ReviewTable and backend call to the placeholder page /myreviews
deleteColumn=true in this case.
Frontend 4: Add placeholder page /moderate accessible only to admins and link in menu bar as "Moderate"
Frontend 5: Populate /moderate page with the ReviewTable with
moderateOptions=true
.When the buttons are clicked, add a modal where the admin can enter a moderation message, and call the backend endpoint to update the moderation status.
Review should disappear from /moderate page after it is updated.
Frontend 6: Create placeholder page for reviews at /reviews/:itemid
Frontend 7: Add ReviewTables to placeholder page /reviews/:itemid and look up all reviews for that item.
Frontend 8: Update MenuItemsTable to show average stars, and with a link to the /reviews/:itemid page.