From 312896f6b22fb0a0734f29f76ca139bd9e016af1 Mon Sep 17 00:00:00 2001 From: SarveshMina <105467665+SarveshMina@users.noreply.github.com> Date: Wed, 5 Mar 2025 20:37:48 +0000 Subject: [PATCH] Added sample data in dashboard and updated welcome form. --- backend/function_app.py | 39 - .../{modules_routes.py => module_routes.py} | 0 gradehome-frontend/src/views/DashBoard.vue | 736 +++++++++++++----- gradehome-frontend/vite.config.js | 2 +- 4 files changed, 521 insertions(+), 256 deletions(-) rename backend/{modules_routes.py => module_routes.py} (100%) diff --git a/backend/function_app.py b/backend/function_app.py index d385699..d15bba7 100644 --- a/backend/function_app.py +++ b/backend/function_app.py @@ -14,7 +14,6 @@ from calendar_routes import get_events, create_event, update_event, delete_event from user_profile_routes import get_user_profile, update_user_profile, get_avatar_upload_url from account_routes import change_password, get_settings, update_settings -from module_routes import get_modules, create_or_update_module, delete_module # We'll also import our helper from user_routes to verify session from user_routes import verify_session @@ -247,42 +246,4 @@ def settings_endpoint(req: func.HttpRequest) -> func.HttpResponse: mimetype="application/json" ) - return add_cors_headers(response) - - - -@app.route(route="modules", methods=["GET", "POST", "OPTIONS"], auth_level=func.AuthLevel.ANONYMOUS) -def modules_endpoint(req: func.HttpRequest) -> func.HttpResponse: - if req.method == "OPTIONS": - return cors_preflight_response() - - if req.method == "GET": - response = get_modules(req) - elif req.method == "POST": - response = create_or_update_module(req) - else: - response = func.HttpResponse( - json.dumps({"error": f"Method {req.method} not allowed"}), - status_code=405, - mimetype="application/json" - ) - - return add_cors_headers(response) - -@app.route(route="modules/{id}", methods=["PUT", "DELETE", "OPTIONS"], auth_level=func.AuthLevel.ANONYMOUS) -def module_by_id_endpoint(req: func.HttpRequest) -> func.HttpResponse: - if req.method == "OPTIONS": - return cors_preflight_response() - - if req.method == "PUT": - response = create_or_update_module(req) - elif req.method == "DELETE": - response = delete_module(req) - else: - response = func.HttpResponse( - json.dumps({"error": f"Method {req.method} not allowed"}), - status_code=405, - mimetype="application/json" - ) - return add_cors_headers(response) \ No newline at end of file diff --git a/backend/modules_routes.py b/backend/module_routes.py similarity index 100% rename from backend/modules_routes.py rename to backend/module_routes.py diff --git a/gradehome-frontend/src/views/DashBoard.vue b/gradehome-frontend/src/views/DashBoard.vue index 84b30ac..5555cea 100644 --- a/gradehome-frontend/src/views/DashBoard.vue +++ b/gradehome-frontend/src/views/DashBoard.vue @@ -54,7 +54,7 @@
-
Step 1 of 2
+
Step 1 of 3

Welcome! Let's set up your preferences

Please select an option for each question to personalize your experience.

@@ -151,34 +151,45 @@
-
Step 2 of 2
+
Step 2 of 3

Degree Configuration

Please provide the details for your degree program.

- +
- +
- +
+ +
+ + +
+ +
- - - - +
+
+
+
+ + +
+
+
+
+
Step 3 of 3
+

Year Weightings

+

Please specify how much each year contributes to your final grade.

+
+ +
+
+
Year
+
Weight (%)
+
Active
+
+ +
+
Year {{ index + 1 }}
+
+ +
+
+ +
+
+ +
+ Total Weight: {{ totalWeight }}% {{ totalWeight !== 100 && hasActiveYears ? '(Should be 100%)' : '' }} +
+
+ + +
+ +
+ + + + + +
+ +
+ +
+ +