Skip to content

Grades/dashboard - #156

Draft
FrstF4ll wants to merge 4 commits into
mainfrom
grades/dashboard
Draft

Grades/dashboard#156
FrstF4ll wants to merge 4 commits into
mainfrom
grades/dashboard

Conversation

@FrstF4ll

Copy link
Copy Markdown
Collaborator

Dashboard frontend, displaying grades with averages

# Conflicts:
#	resources/js/layouts/AppLayout.vue
#	resources/js/layouts/MainNavbar.vue
#	routes/web.php
Move centering properties from app layout

Let components manage their alignement themself. Update creategrade accordingly
@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds an authenticated dashboard route and navbar link, introduces a card-based grade overview, and moves content alignment responsibility from the shared layout into individual pages. The dashboard currently renders static grade values rather than account data, includes an incorrect domain weight, and is not responsive on narrow screens. The shared layout change also alters existing Home and Profile positioning.

  • Adds /dashboard under the existing authenticated and verified middleware.
  • Adds final-grade and domain-grade cards.
  • Adds Dashboard navigation to the main navbar.
  • Adjusts CreateGrade to preserve its centered layout after changing AppLayout.

How to test manually

  1. Sign in with a verified account on the preview environment.
  2. Open Dashboard from the navbar and compare every displayed grade with that account's grades.
  3. Verify that the four domain weights total 100% and that the final grade reflects their weighted average.
  4. Resize to a mobile viewport and confirm that cards remain readable without overflow or excessive compression.
  5. Visit Home, Profile, and Create Grade and confirm their content remains positioned as intended.

Confidence Score: 2/5

The PR is not safe to merge until the dashboard uses real grade data, displays the correct weighting, and the shared-layout regression is addressed.

Every authenticated user currently receives the same hard-coded grades, the displayed weights total 110% instead of 100%, and removing shared centering visibly changes existing Home and Profile pages.

Files Needing Attention: resources/js/pages/Dashboard.vue, resources/js/layouts/AppLayout.vue

Important Files Changed

Filename Overview
resources/js/pages/Dashboard.vue Adds the grade dashboard, but uses static values, an incorrect 30% general-education weight, and a non-responsive four-column grid.
resources/js/layouts/AppLayout.vue Removes shared centering without compensating unchanged Home and Profile consumers.
resources/js/layouts/MainNavbar.vue Adds a link to the newly named authenticated dashboard route.
resources/js/pages/CreateGrade.vue Adds local sizing and centering to preserve this page after the shared layout change.
routes/web.php Registers the Dashboard Inertia page under existing authentication and verification middleware.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    U[Verified user] --> N[Dashboard navbar link]
    N --> R["GET /dashboard"]
    R --> I[Inertia Dashboard.vue]
    I --> D[Hard-coded domain cards]
    I --> F[Hard-coded final grade]
Loading
Prompt To Fix All With AI
### Issue 1
resources/js/pages/Dashboard.vue:9-12
**Grades Are Hard-Coded**

The dashboard route provides no grade data, while these constants and the final-grade literal on line 24 are shown to every authenticated user. As a result, every account sees the same sample results instead of averages based on that user's grades.

### Issue 2
resources/js/pages/Dashboard.vue:12
**Weights Total 110 Percent**

The established IT grading breakdown assigns 20% to `Culture générale`, but this card displays 30%. Together, the four displayed weights total 110% even though the final card says 100%, so users receive an incorrect grading breakdown.

```suggestion
const generalEducation = new DomainAverage("Culture générale", "20%", 5.5)
```

### Issue 3
resources/js/layouts/AppLayout.vue:10
**Existing Pages Lose Centering**

Removing these shared alignment classes moves existing AppLayout consumers such as Home and Profile from centered content to top-left-aligned content. CreateGrade adds replacement alignment in this PR, but those unchanged pages do not, causing a visible layout regression outside the new dashboard.

### Issue 4
resources/js/pages/Dashboard.vue:18
**Grid Is Not Responsive**

`grid-cols-4` applies at every viewport width. On mobile, each domain card receives only one quarter of the screen while its header contains a long French title and a weight badge, making the dashboard cramped or prone to overflow. Responsive column classes would keep the cards readable.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat: build dashboard card layout first ..." | Re-trigger Greptile

Comment on lines +9 to +12
const tpi = new DomainAverage("TPI", "40%", 5.0)
const computerScienceSkills = new DomainAverage("Compétences en informatiques", "30%", 5.0)
const expandedBasicSkills = new DomainAverage("Compétence de base élargies", "10%", 4.5)
const generalEducation = new DomainAverage("Culture générale", "30%", 5.5)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Grades Are Hard-Coded

The dashboard route provides no grade data, while these constants and the final-grade literal on line 24 are shown to every authenticated user. As a result, every account sees the same sample results instead of averages based on that user's grades.

Prompt To Fix With AI
This is a comment left during a code review.
Path: resources/js/pages/Dashboard.vue
Line: 9-12

Comment:
**Grades Are Hard-Coded**

The dashboard route provides no grade data, while these constants and the final-grade literal on line 24 are shown to every authenticated user. As a result, every account sees the same sample results instead of averages based on that user's grades.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

const tpi = new DomainAverage("TPI", "40%", 5.0)
const computerScienceSkills = new DomainAverage("Compétences en informatiques", "30%", 5.0)
const expandedBasicSkills = new DomainAverage("Compétence de base élargies", "10%", 4.5)
const generalEducation = new DomainAverage("Culture générale", "30%", 5.5)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Weights Total 110 Percent

The established IT grading breakdown assigns 20% to Culture générale, but this card displays 30%. Together, the four displayed weights total 110% even though the final card says 100%, so users receive an incorrect grading breakdown.

Suggested change
const generalEducation = new DomainAverage("Culture générale", "30%", 5.5)
const generalEducation = new DomainAverage("Culture générale", "20%", 5.5)
Prompt To Fix With AI
This is a comment left during a code review.
Path: resources/js/pages/Dashboard.vue
Line: 12

Comment:
**Weights Total 110 Percent**

The established IT grading breakdown assigns 20% to `Culture générale`, but this card displays 30%. Together, the four displayed weights total 110% even though the final card says 100%, so users receive an incorrect grading breakdown.

```suggestion
const generalEducation = new DomainAverage("Culture générale", "20%", 5.5)
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

<MainNavbar />

<main class="flex flex-1 flex-col justify-center items-center">
<main class="flex flex-1 flex-col">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Existing Pages Lose Centering

Removing these shared alignment classes moves existing AppLayout consumers such as Home and Profile from centered content to top-left-aligned content. CreateGrade adds replacement alignment in this PR, but those unchanged pages do not, causing a visible layout regression outside the new dashboard.

Prompt To Fix With AI
This is a comment left during a code review.
Path: resources/js/layouts/AppLayout.vue
Line: 10

Comment:
**Existing Pages Lose Centering**

Removing these shared alignment classes moves existing AppLayout consumers such as Home and Profile from centered content to top-left-aligned content. CreateGrade adds replacement alignment in this PR, but those unchanged pages do not, causing a visible layout regression outside the new dashboard.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

</script>

<template>
<section class="grid grid-cols-4 grid-rows-3 w-full">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Grid Is Not Responsive

grid-cols-4 applies at every viewport width. On mobile, each domain card receives only one quarter of the screen while its header contains a long French title and a weight badge, making the dashboard cramped or prone to overflow. Responsive column classes would keep the cards readable.

Prompt To Fix With AI
This is a comment left during a code review.
Path: resources/js/pages/Dashboard.vue
Line: 18

Comment:
**Grid Is Not Responsive**

`grid-cols-4` applies at every viewport width. On mobile, each domain card receives only one quarter of the screen while its header contains a long French title and a weight badge, making the dashboard cramped or prone to overflow. Responsive column classes would keep the cards readable.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant