nyitgtm / AttendMate

Attendance monitor made simple.
https://attendmate.netlify.app/
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

Create Student Dashboard #6

Closed navraj213 closed 1 week ago

navraj213 commented 3 weeks ago

@Anmolak21 @BikramSingh04

Communicate with team B to help create a similar page. This page will serve to show the student his classes and qr code and leaderboard section.

Deadline: Sunday Night

You have to connect it to the database, create a new schema, create the front end, and handle all the backend requests.

Inspo: image

navraj213 commented 3 weeks ago

work in branch: teamA area to work: src/app/teacher/dashboard/page.tsx

navraj213 commented 3 weeks ago

Created Schema for Students

studentId: "S12345", studentName: "John Doe", studentEmail: "john.doe@example.com", password: "hashed_password", macAddress: "00:1A:2B:3C:4D:5E", points: 0, classes: [ { classId: "C101", classPoints: 0, attendance: [ { scheduledTime: new Date("2023-10-01T08:00:00Z"), checkInTime: new Date("2023-10-01T07:55:00Z"), status: "present", points: 5 } ] }

  _________________ (on MongoDB)
  {"_id":{"$oid":"67305fde93d8508ac4db53da"},"classId":"C101","className":"Math 101","teacherId":"T67890","students":[{"studentId":"S12345","attendance":[{"scheduledTime":{"$date":{"$numberLong":"1696147200000"}},"checkInTime":{"$date":{"$numberLong":"1696146900000"}},"status":"present","points":{"$numberInt":"5"}}]}]}

image

image

Screenshot 2024-11-10 at 1 29 03 AM

navraj213 commented 3 weeks ago

Collaborated with teamB on issue #7 @Armaan294 @bthoma31

Class Schema was also created

classId: "C101", className: "Math 101", teacherId: "T67890", students: [ { studentId: "S12345", attendance: [ { scheduledTime: new Date("2023-10-01T08:00:00Z"), checkInTime: new Date("2023-10-01T07:55:00Z"), status: "present", points: 5 } ] } ___(on MongoDB) {"_id":{"$oid":"67305fde93d8508ac4db53da"},"classId":"C101","className":"Math 101","teacherId":"T67890","students":[{"studentId":"S12345","attendance":[{"scheduledTime":{"$date":{"$numberLong":"1696147200000"}},"checkInTime":{"$date":{"$numberLong":"1696146900000"}},"status":"present","points":{"$numberInt":"5"}}]}]}

image

image

Screenshot 2024-11-10 at 1 29 08 AM

navraj213 commented 3 weeks ago

Overview

Created framework in 58ed176f8eaba37fe78f4ffa025dd114cd6331a5 (find code changed within commit)

Insight

Made simple dashboard page redirect.

example login is: john.doe@example.com hashed_password

image

✓ Compiled in 266ms (312 modules) GET / 200 in 1144ms ○ Compiling /student ... ✓ Compiled /student in 681ms (669 modules) GET /student 200 in 793ms ✓ Compiled /api/auth/studentlogin in 191ms (680 modules) POST /api/auth/studentlogin 200 in 1231ms ✓ Compiled /student/dashboard in 137ms (687 modules) GET /student/dashboard 200 in 176ms

Next Steps (in terms of priority)

The deadline should be latest Wednesday Night (11/13 11:59 pm), so if I don't see anything started by Tuesday Night, I will finish it.