stamford-syntax-club / course-compose

Course Compose is a course-review website tailored for Stamford students, providing a platform for sharing and discovering insights about various courses
MIT License
2 stars 0 forks source link

MyReviews Page #39

Closed chinathaip closed 6 months ago

chinathaip commented 9 months ago

Overview

This is a page for displaying all the reviews which that users have written.

This should help users keep track of their review status (See which reviews of theirs have been approved, rejected, or still pending)

Design: - @chinathaip & @CryoMilo

No design as of now, please start drafting here: https://www.figma.com/file/PXPMF9wEKCCGy8x1t0DVPJ/Course-Compose?type=design&node-id=0%3A1&mode=design&t=2XR2zFkFSFyocduy-1

Backend - @chinathaip

Frontend - @CryoMilo

DTO

Because we have a very limited time, the pagination query will be forced to return the entire thing (9999 items max)

// GET /api/myreviews
{
    "pageInformation": {
        "number": 1,
        "size": 9999
    },
    "totalNumberOfItems": 2,
    "totalPages": 1,
    "data": [
                 {
                     "id": 5,
                     "academicYear": 2022,
                     "description": "Some review for ITE221!",
                     "rating": 2,
                     "status": "APPROVED",
                     "votes": 5,
                     "course": {
                           "id": 2,
                           "code": "ITE221"
                     },
                     "profile": {
                           "id": "d5a59cb2-1f22-4e23-8ef0-7108e54f842b"
                     },
                     "created_at": "2023-11-23T14:00:00Z"
                 },
                 {
                     "id": 9,
                     "academicYear": 2022,
                     "description": "Some review for ITE442",
                     "rating": 2,
                     "status": "PENDING",
                     "votes": 0,
                     "course": {
                           "id": 5,
                           "code": "ITE442"
                     },
                     "profile": {
                           "id": "d5a59cb2-1f22-4e23-8ef0-7108e54f842b"
                     },
                     "created_at": "2023-11-23T14:00:00Z"
                 }
     ]
}
chinathaip commented 6 months ago

https://github.com/stamford-syntax-club/course-compose/pull/58