Skip to content

Announcements Specification

Raina Song edited this page Apr 4, 2022 · 3 revisions

Implementation due 2 April 2022

Specification

  • Users can add announcements for the flat.
  • The User who makes the announcement is the Author of that announcement.
  • Announcements should be associated with a house code and date of creation.
  • Announcements should have a title and description set by the Author.
  • Announcements are only visible to users in the same flat as the Author.
  • Announcements cannot be edited.

Back-End Specification

  • Introduced a new "announcements" table with the following structure:
    • houseCode
    • author
    • title
    • description
    • createdAt
    • updatedAt
  • Add the following endpoints:
    • GET /house/announcements
      • Returns all announcements in a house
    • POST /house/announcements
      • Creates a new announcement for the house

Front-End Specification

  • Add a new PRIVATE page in AUTHENTICATED ROUTES - /announcement
  • The top of the page should have a 'New Announcement' Button.
    • Clicking on this button will open a modal form for creating an announcement.
    • The form should have input fields for a 'Title' and 'Description'.
    • Both input fields should be optional.
    • The form should have a 'Submit' button that will save the announcement.
  • Below the 'New Announcement' button is a vertically stacked list of Announcement Cards.
    • The list should contain every announcement related to the house.
    • The page should scroll infinitely.
    • Announcement cards should have the following information displayed on them:
      • Title
      • Description
      • Date Created
      • Author Name

screencapture-localhost-3001-announcement-2022-04-05-11_05_29 screencapture-localhost-3001-dashboard-2022-04-05-11_05_51

Clone this wiki locally