Grades/dashboard - #156
Conversation
# 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 SummaryThis 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.
How to test manually
Confidence Score: 2/5The 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
|
| 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]
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
| 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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
| 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"> |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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.
Dashboard frontend, displaying grades with averages