Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Cette PR implémente le ticket #64 en ajoutant la notion de gravité (severity) aux anomalies (Defect) et en améliorant l’affichage sur la page de détail d’un véhicule (statut + anomalies majeures confirmées mises en avant).
Changes:
- Ajout du champ
Defect.severity(TextChoices MAJOR/MINOR) + migration et mise à jour d’un fixture. - Exposition de
major_defectsdans leVehicleDetailViewpour afficher les anomalies majeures confirmées en haut de la page. - Affichage du statut du véhicule (badge) + colonne “Gravité” dans le tableau des anomalies, avec styles CSS associés.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| main/models.py | Ajoute l’énumération DefectSeverity et le champ severity sur Defect. |
| main/migrations/0016_defect_severity.py | Migration Django pour ajouter le champ severity. |
| main/views.py | Ajoute major_defects au contexte de la page détail véhicule. |
| main/templates/main/vehicle_detail.html | Affiche le badge de statut, un bloc “Anomalies connues”, et la gravité dans le tableau. |
| main/static/css/main.css | Ajoute le style du badge de statut (.status-tag + variantes). |
| main/fixtures/main/initial_data.json | Met à jour un défaut de fixture (status/comment) et renseigne severity. |
| main/admin.py | Ajoute severity aux champs affichés dans l’inline admin des défauts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <tr> | ||
| <td>{{ defect.comment }}</td> | ||
| <td>{{ defect.get_status_display }}</td> | ||
| <td>{{ defect.get_severity_display|default_if_none:"-"}}</td> |
Rowin
reviewed
Jun 23, 2026
Rowin
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
severityau modeledefect