Skip to content

Resolves #35 "Implement Marketplace likes"

YE Scotland Admin requested to merge 35-implement-marketplace-likes into master

Closes #35 (closed)

Notes:

Adds frontend button for liking marketplace stalls that turns to a unlike when a marketplace stall is liked. Spinner for while REST call is made. Only displays for team users an not on their own page.

Button state is loaded in componentDidMount to see if liked and if the user can like (can only like if do not have the same teacher, is not their own stall, they haven't used all their votes, they haven't liked it before, and they are a team user).

Backend implements GET for /can_like which returns based on criteria. GET, POST, and DELETE for the /marketplace_like which returns if liked, creates a like (if can based on criteria), and delete/un like (if it exists).

Relies on:

Demo

Screen_Recording_2022-03-04_at_19.44.43

Manual Testing TBC

  • Can like marketplace stalls from different teachers
  • Cannot like marketplace stalls from the same teacher
  • Can unlike marketplace stalls
  • The Like button does not show for Teacher, Judge or Admin users
  • Can like and unlike infinitely
Edited by YE Scotland Admin

Merge request reports