John-sCC / jcc_frontend

Apache License 2.0
0 stars 0 forks source link

Big Project Feature Check #2 - 4/18 Team Review #77

Open aidenhuynh opened 7 months ago

aidenhuynh commented 7 months ago

Runtime Links

Quick Scoring Box

Name Comments Issue/Blog
Aiden Completed backend integration for table generator [Blog]()
Ryan Ui fixes in sign in page, message inbox system.
Edwin
Ekam Finished Resume feature, started backend with exporting resume as PDF, general frontend/UI fixes
Ishi Finished the coin-flip half of the probability simulator, will start working on the dice-roll half soon
Drew Finished backend implementation of the assignment submission process using Raymond's setup, implementing JWT, creating submission object and creating backend endpoint
Haoxuan Worked on initial versions of backend data storage
Raymond Began framework of backend data storage for Stapplet features, researched and created file upload system for assignment submission (endpoint method, variables, etc.)
AJ Pair programmed with Drew on backend assignment submission, provided guidance on Assignment functionality, worked on translating wireframes to frontend
Toby Worked on backend features for graphing, including quantitative and categorical variables; finished implementation of issue conversion to blog
Kevin Worked on student search features, prior to full implementation with current objects
Isabelle Worked on video call and person status features
Aaron Worked on frontend connection and implementation of graphing features

Features & Demos

Backend Integration of Table Generator

Functionality

Here is the main function for connecting with the backend. It is async so that when it is called using await we can return the user's classes if there are any. If the user isn't signed in, it will return an empty array that is checked for in other parts of the code.

async function fetchClassList() {
    // Create array of classes
    var classes = []

    // Fetch backend
    try {
        const response = await fetch(url + '/api/class_period/dashboard', {
            method: 'GET',
            mode: 'cors',
            cache: 'no-cache',
            credentials: 'include',
            headers: {
                "content-type": "application/json",
            },
        })

        // Error check
        if (!response.ok) {
            throw new Error('Network response was not ok')
        }

        // Convert response to JSON, which contains classes that user is the leader of
        const data = await response.json()
        console.log(JSON.stringify(data))
        var classList = data.leader

        // For each class of the user
        for (let classData of classList) {
            // Define list of students in each class
            var studentList = []

            // Push students from response into class array
            for (let student of classData.students) {
                studentList.push(student.name)
            }

            // Add each class from response into frontend class array
            classes.push({id: `class-${classData.id}`, class: studentList, name: classData.name})
        }
    } 
    // If there is an error, return an empty array
    catch (error) {
        console.error('There was a problem with the fetch operation:', error)

        // This only occurs when not signed in
        return []
    }

    return classes
}

On the backend, the code looks like this, returning the data tied to the user, including their classes.

@GetMapping("/dashboard")
    public ResponseEntity<?> fetchBothClassData(@CookieValue("jwt") String jwtToken) {
        // checking if JWT token is missing
        if (jwtToken.isEmpty()) {
            return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
        }

        // getting user data
        String userEmail = tokenUtil.getUsernameFromToken(jwtToken);
        Person existingPerson = personRepository.findByEmail(userEmail);
        if (existingPerson == null) {
            return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
        }
        List<ClassPeriod> student = classPeriodDetailsService.getClassPeriodsByStudent(existingPerson);
        List<ClassPeriod> leader = classPeriodDetailsService.getClassPeriodsByLeader(existingPerson);

        // initializing storage device vrrrmmmm ERRT ERRT ERRT beeeeeep
        HashMap<String, List<ClassPeriod>> classData = new HashMap<>();

        // adding class periods to storage device brrp brrp bleeeeeeebpt
        classData.put("student", student);
        classData.put("leader", leader);

        // return class data
        return new ResponseEntity<>(classData, HttpStatus.OK);
    }

Styling updates

Wireframe:

Screen Shot 2024-04-24 at 10 09 45 AM

Integration:

If the user isn't signed in (an empty array is returned by the fetch)

Screen Shot 2024-04-24 at 10 42 45 AM

When signed in:

Screen Shot 2024-04-24 at 10 44 55 AM

Links

Resume Builder

Screen Shot 2024-04-18 at 8 47 34 AM Screen Shot 2024-04-18 at 8 50 14 AM

Finished the feature --> pull request with all info

Links

Finished up the user inputs Fixed resume framework Fixed all css/sass for the pages

Menu UI

Better menu!!

Screen Shot 2024-04-18 at 8 50 36 AM

https://github.com/John-sCC/jcc_frontend/assets/111466888/4de60638-a592-4925-a05c-e1a8b4e6cd37

Message Inbox system

image

More Wireframes!!

Stats Display Page

Screen Shot 2024-04-18 at 8 44 23 AM

Probability Simulation

image

Wireframe: image

Assignment Submission and File Uploads

Pull Request linked here contains code and key commits.

Initial SQL Table

Screen Shot 2024-04-18 at 1 12 18 AM

File Upload

Signed in as "jm1021@gmail.com", the file "python code image.png" will be uploaded to the assignment "Teddy's Big Bready":

Screen Shot 2024-04-18 at 1 18 31 AM

image

image

SQL Tables After Upload

This is the AssignmentSubmission successfully uploaded:

Screen Shot 2024-04-18 at 1 19 20 AM

Student Search Feature

Full pull request with relevant code is linked here.

image Here is the display for searching for most students:

Adding a New Student

Input:

image

Output:

image

Weekly Analytics

Triangle 1

Aiden
Edwin image
Ryan

Triangle 2

Ekam
Ishi

Triangle 3

Drew Screen Shot 2024-03-17 at 10 47 27 PM
AJ Screen Shot 2024-03-17 at 10 49 31 PM
Raymond Screen Shot 2024-03-17 at 10 50 40 PM
Haoxuan Screen Shot 2024-03-17 at 10 52 43 PM

Triangle 4

Toby Screen Shot 2024-03-17 at 9 46 14 PM
Aaron Screen Shot 2024-03-17 at 9 46 56 PM
Isabelle Screen Shot 2024-03-17 at 9 47 10 PM
Kevin Screen Shot 2024-03-17 at 9 47 25 PM
TheoH32 commented 7 months ago

Grading

goal: resource page for students and teachers

Overall: I like the project and idea. Features seem useful and sufficient but there seemed to be bugs and that needed to be fixed before I could be wowed

Orlando-c commented 7 months ago

Notes:

Sign in feature Create classes, add students to classes Polished and refined frontend

Glows:

Grows:

lunaiwa commented 7 months ago

Overview:

Glows:

Grows:

jm1021 commented 7 months ago

Mystery Enactment over two period shared many features and had a lot of evidence of design and planning. The morning group was very organized on four corners and hit on many of my asks. The adapted to CTE interrupt and were able to engage at least one lady.

Slow down pace, discuss a "short" plan, show a "short" demo, and "show" behind the scenes logs, database change, or code written to illustrate work. Work the corners, then move on.

Glows - In morning session where Aiden and Drew teamed up, the presentation had meaning going back and forth through features.
Grows - In 3rd period session we lost what was working, little connection for me. Having different two or three person groups showing off presentations Groups 1: Resume builder, Group 2: Adding Students -> Organizing Students, Group 3: GitHub Project -> GitHub pages, Group 4: Screen Designs to Implementation