FR-14: Mark Property as Favorite
Description
As an authenticated user, I want to mark a property as a favorite so that I can easily return to it later.
Context
The advertisement should have a not filled star icon attached to it which can be clicked on to favourite the advertisement.
This should use an associative table. This should also use API routing (see https://hexdocs.pm/phoenix/routing.html and https://hexdocs.pm/phoenix/json_and_apis.html).
This is linked to #42 (closed). Do them together.
Acceptance Criteria
-
AC1 - An authenticated user should be able to favourite an advertisement on the home listing page (
/
). -
AC2 - An authenticated user should be able to favourite an advertisement from the detailed advertisement page (
/properties/:reference
). - AC3 - The author of the advertisement should not be able to favourite the advertisement.
- AC4 - The star icon should get filled after sucessfully adding it to favourites.
- AC5 - The page should not refresh after adding the advertisement as favourite.
- AC6 - The user should see a flash notifying them of a successful favourite action.
Dependencies
Requires: #18 (closed)