style(frontend): harmonize student demo labels
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
/// Identité simulée utilisée tant que l'authentification Azure AD n'est pas branchée.
|
||||||
|
class DemoIdentity {
|
||||||
|
DemoIdentity._();
|
||||||
|
|
||||||
|
static const userName = "Lucas Martin";
|
||||||
|
static const userInitials = "LM";
|
||||||
|
static const userSubtitle = "Étudiant · B2 Informatique · Ensitech Cergy";
|
||||||
|
static const campusTag = "Saint-Christophe · Cergy";
|
||||||
|
static const loginCampusTag = "Ensitech · Cergy";
|
||||||
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
|
import "../demo_identity.dart";
|
||||||
|
|
||||||
/// Représentation d'un matériel affiché dans le catalogue et son détail
|
/// Représentation d'un matériel affiché dans le catalogue et son détail
|
||||||
/// (données statiques pour l'instant ; sera alimenté par l'API plus tard).
|
/// à partir des réponses API.
|
||||||
class MaterielItem {
|
class MaterielItem {
|
||||||
const MaterielItem({
|
const MaterielItem({
|
||||||
required this.id,
|
required this.id,
|
||||||
@@ -30,7 +31,9 @@ class MaterielItem {
|
|||||||
marque: json["marque"] as String,
|
marque: json["marque"] as String,
|
||||||
modele: json["modele"] as String,
|
modele: json["modele"] as String,
|
||||||
reference: json["reference"] as String,
|
reference: json["reference"] as String,
|
||||||
campus: campus == null ? "Saint-Christophe · Cergy" : "${campus["nom"]} · ${campus["ville"]}",
|
campus: campus == null
|
||||||
|
? DemoIdentity.campusTag
|
||||||
|
: "${campus["nom"]} · ${campus["ville"]}",
|
||||||
etatGeneral: json["etatGeneral"] as String,
|
etatGeneral: json["etatGeneral"] as String,
|
||||||
disponible: json["statut"] == "DISPONIBLE",
|
disponible: json["statut"] == "DISPONIBLE",
|
||||||
accessoires: accessoires == null ? const <String>[] : accessoires.cast<String>(),
|
accessoires: accessoires == null ? const <String>[] : accessoires.cast<String>(),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:google_fonts/google_fonts.dart";
|
import "package:google_fonts/google_fonts.dart";
|
||||||
|
import "../demo_identity.dart";
|
||||||
import "../theme/ensup_colors.dart";
|
import "../theme/ensup_colors.dart";
|
||||||
import "../models/materiel_item.dart";
|
import "../models/materiel_item.dart";
|
||||||
import "../services/materiel_service.dart";
|
import "../services/materiel_service.dart";
|
||||||
@@ -98,9 +99,9 @@ class _CatalogueScreenState extends State<CatalogueScreen> {
|
|||||||
children: [
|
children: [
|
||||||
EnsupTopBar(
|
EnsupTopBar(
|
||||||
brandText: "Catalogue matériel",
|
brandText: "Catalogue matériel",
|
||||||
campusTag: "Paris · Ensitech",
|
campusTag: DemoIdentity.campusTag,
|
||||||
userName: "Lucas Martin",
|
userName: DemoIdentity.userName,
|
||||||
userInitials: "LM",
|
userInitials: DemoIdentity.userInitials,
|
||||||
onBack: () => Navigator.of(context).pop(),
|
onBack: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:google_fonts/google_fonts.dart";
|
import "package:google_fonts/google_fonts.dart";
|
||||||
|
import "../demo_identity.dart";
|
||||||
import "../theme/ensup_colors.dart";
|
import "../theme/ensup_colors.dart";
|
||||||
import "../models/materiel_item.dart";
|
import "../models/materiel_item.dart";
|
||||||
import "../services/emprunt_service.dart";
|
import "../services/emprunt_service.dart";
|
||||||
@@ -122,9 +123,9 @@ class _ChecklistDepartScreenState extends State<ChecklistDepartScreen> {
|
|||||||
children: [
|
children: [
|
||||||
EnsupTopBar(
|
EnsupTopBar(
|
||||||
brandText: "Checklist de départ",
|
brandText: "Checklist de départ",
|
||||||
campusTag: "Paris · Ensitech",
|
campusTag: DemoIdentity.campusTag,
|
||||||
userName: "Lucas Martin",
|
userName: DemoIdentity.userName,
|
||||||
userInitials: "LM",
|
userInitials: DemoIdentity.userInitials,
|
||||||
onBack: () => Navigator.of(context).pop(),
|
onBack: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:google_fonts/google_fonts.dart";
|
import "package:google_fonts/google_fonts.dart";
|
||||||
|
import "../demo_identity.dart";
|
||||||
import "../theme/ensup_colors.dart";
|
import "../theme/ensup_colors.dart";
|
||||||
import "../models/emprunt_item.dart";
|
import "../models/emprunt_item.dart";
|
||||||
import "../models/anomalie_retour.dart";
|
import "../models/anomalie_retour.dart";
|
||||||
@@ -127,9 +128,9 @@ class _ChecklistRetourScreenState extends State<ChecklistRetourScreen> {
|
|||||||
children: [
|
children: [
|
||||||
EnsupTopBar(
|
EnsupTopBar(
|
||||||
brandText: "Checklist de retour",
|
brandText: "Checklist de retour",
|
||||||
campusTag: "Paris · Ensitech",
|
campusTag: DemoIdentity.campusTag,
|
||||||
userName: "Lucas Martin",
|
userName: DemoIdentity.userName,
|
||||||
userInitials: "LM",
|
userInitials: DemoIdentity.userInitials,
|
||||||
onBack: () => Navigator.of(context).pop(),
|
onBack: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:google_fonts/google_fonts.dart";
|
import "package:google_fonts/google_fonts.dart";
|
||||||
|
import "../demo_identity.dart";
|
||||||
import "../theme/ensup_colors.dart";
|
import "../theme/ensup_colors.dart";
|
||||||
import "../models/emprunt_response.dart";
|
import "../models/emprunt_response.dart";
|
||||||
import "../models/materiel_item.dart";
|
import "../models/materiel_item.dart";
|
||||||
@@ -49,7 +50,7 @@ class ConfirmationScreen extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
const EnsupTopBar(
|
const EnsupTopBar(
|
||||||
brandText: "EME · Confirmation",
|
brandText: "EME · Confirmation",
|
||||||
campusTag: "Paris · Ensitech",
|
campusTag: DemoIdentity.campusTag,
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
@@ -186,7 +187,7 @@ class ConfirmationScreen extends StatelessWidget {
|
|||||||
_rrow("Matériel", item.nom),
|
_rrow("Matériel", item.nom),
|
||||||
_rrow("Référence", item.reference),
|
_rrow("Référence", item.reference),
|
||||||
_rrow("N° emprunt", "#${emprunt.id}"),
|
_rrow("N° emprunt", "#${emprunt.id}"),
|
||||||
_rrow("Emprunteur", "Lucas Martin"),
|
_rrow("Emprunteur", DemoIdentity.userName),
|
||||||
_rrow("Date d'emprunt", date),
|
_rrow("Date d'emprunt", date),
|
||||||
_rrow("Heure", heure),
|
_rrow("Heure", heure),
|
||||||
_rrow("Campus", item.campus),
|
_rrow("Campus", item.campus),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:google_fonts/google_fonts.dart";
|
import "package:google_fonts/google_fonts.dart";
|
||||||
|
import "../demo_identity.dart";
|
||||||
import "../theme/ensup_colors.dart";
|
import "../theme/ensup_colors.dart";
|
||||||
import "../models/materiel_item.dart";
|
import "../models/materiel_item.dart";
|
||||||
import "../widgets/ensup_top_bar.dart";
|
import "../widgets/ensup_top_bar.dart";
|
||||||
@@ -47,9 +48,9 @@ class DetailScreen extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
EnsupTopBar(
|
EnsupTopBar(
|
||||||
brandText: "Détail matériel",
|
brandText: "Détail matériel",
|
||||||
campusTag: "Paris · Ensitech",
|
campusTag: DemoIdentity.campusTag,
|
||||||
userName: "Lucas Martin",
|
userName: DemoIdentity.userName,
|
||||||
userInitials: "LM",
|
userInitials: DemoIdentity.userInitials,
|
||||||
onBack: () => Navigator.of(context).pop(),
|
onBack: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:google_fonts/google_fonts.dart";
|
import "package:google_fonts/google_fonts.dart";
|
||||||
|
import "../demo_identity.dart";
|
||||||
import "../theme/ensup_colors.dart";
|
import "../theme/ensup_colors.dart";
|
||||||
import "../widgets/ensup_top_bar.dart";
|
import "../widgets/ensup_top_bar.dart";
|
||||||
import "../widgets/profile_card.dart";
|
import "../widgets/profile_card.dart";
|
||||||
@@ -38,9 +39,9 @@ class HomeScreen extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
EnsupTopBar(
|
EnsupTopBar(
|
||||||
campusTag: "Paris · Ensitech",
|
campusTag: DemoIdentity.campusTag,
|
||||||
userName: "Lucas Martin",
|
userName: DemoIdentity.userName,
|
||||||
userInitials: "LM",
|
userInitials: DemoIdentity.userInitials,
|
||||||
onBack: () => Navigator.of(context).pop(),
|
onBack: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -50,9 +51,9 @@ class HomeScreen extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const ProfileCard(
|
const ProfileCard(
|
||||||
name: "Lucas Martin",
|
name: DemoIdentity.userName,
|
||||||
subtitle: "Étudiant · BTS SIO 2ème année · Ensitech Paris",
|
subtitle: DemoIdentity.userSubtitle,
|
||||||
initials: "LM",
|
initials: DemoIdentity.userInitials,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
Text(
|
Text(
|
||||||
@@ -89,7 +90,9 @@ class HomeScreen extends StatelessWidget {
|
|||||||
"Restituer un matériel que vous avez emprunté",
|
"Restituer un matériel que vous avez emprunté",
|
||||||
color: EnsupColors.teal,
|
color: EnsupColors.teal,
|
||||||
onTap: () => Navigator.of(context).push(
|
onTap: () => Navigator.of(context).push(
|
||||||
MaterialPageRoute(builder: (_) => const RestitutionSelectScreen()),
|
MaterialPageRoute(
|
||||||
|
builder: (_) => const RestitutionSelectScreen(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:google_fonts/google_fonts.dart";
|
import "package:google_fonts/google_fonts.dart";
|
||||||
|
import "../demo_identity.dart";
|
||||||
import "../theme/ensup_colors.dart";
|
import "../theme/ensup_colors.dart";
|
||||||
import "../widgets/ensup_top_bar.dart";
|
import "../widgets/ensup_top_bar.dart";
|
||||||
import "../widgets/identification_option.dart";
|
import "../widgets/identification_option.dart";
|
||||||
@@ -46,7 +47,7 @@ class LoginScreen extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
const EnsupTopBar(
|
const EnsupTopBar(
|
||||||
brandText: "EME — Emprunt Matériel ENSUP",
|
brandText: "EME — Emprunt Matériel ENSUP",
|
||||||
campusTag: "Ensitech · Paris",
|
campusTag: DemoIdentity.loginCampusTag,
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:google_fonts/google_fonts.dart";
|
import "package:google_fonts/google_fonts.dart";
|
||||||
|
import "../demo_identity.dart";
|
||||||
import "../theme/ensup_colors.dart";
|
import "../theme/ensup_colors.dart";
|
||||||
import "../models/emprunt_item.dart";
|
import "../models/emprunt_item.dart";
|
||||||
import "../services/emprunt_service.dart";
|
import "../services/emprunt_service.dart";
|
||||||
@@ -83,9 +84,9 @@ class _RestitutionSelectScreenState extends State<RestitutionSelectScreen> {
|
|||||||
children: [
|
children: [
|
||||||
EnsupTopBar(
|
EnsupTopBar(
|
||||||
brandText: "Restitution",
|
brandText: "Restitution",
|
||||||
campusTag: "Paris · Ensitech",
|
campusTag: DemoIdentity.campusTag,
|
||||||
userName: "Lucas Martin",
|
userName: DemoIdentity.userName,
|
||||||
userInitials: "LM",
|
userInitials: DemoIdentity.userInitials,
|
||||||
onBack: () => Navigator.of(context).pop(),
|
onBack: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:google_fonts/google_fonts.dart";
|
import "package:google_fonts/google_fonts.dart";
|
||||||
|
import "../demo_identity.dart";
|
||||||
import "../theme/ensup_colors.dart";
|
import "../theme/ensup_colors.dart";
|
||||||
import "../models/emprunt_item.dart";
|
import "../models/emprunt_item.dart";
|
||||||
import "../models/anomalie_retour.dart";
|
import "../models/anomalie_retour.dart";
|
||||||
@@ -49,7 +50,7 @@ class ResultatRetourScreen extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
const EnsupTopBar(
|
const EnsupTopBar(
|
||||||
brandText: "EME · Résultat du contrôle",
|
brandText: "EME · Résultat du contrôle",
|
||||||
campusTag: "Paris · Ensitech",
|
campusTag: DemoIdentity.campusTag,
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
@@ -227,7 +228,7 @@ class ResultatRetourScreen extends StatelessWidget {
|
|||||||
valeurCouleur: EnsupColors.red,
|
valeurCouleur: EnsupColors.red,
|
||||||
),
|
),
|
||||||
_drow("Matériel", "${emprunt.materiel.nom} · ${emprunt.materiel.reference}"),
|
_drow("Matériel", "${emprunt.materiel.nom} · ${emprunt.materiel.reference}"),
|
||||||
_drow("Emprunteur", "Lucas Martin"),
|
_drow("Emprunteur", DemoIdentity.userName),
|
||||||
_drow("Date détection", date),
|
_drow("Date détection", date),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -252,6 +252,13 @@ En terminal interactif (VS Code), `migrate dev` fonctionne normalement (taper `y
|
|||||||
- Flux non conforme validé en réel : création emprunt -> restitution avec élément absent -> statut `RETOUR_NON_CONFORME` -> matériel retiré du catalogue disponible.
|
- Flux non conforme validé en réel : création emprunt -> restitution avec élément absent -> statut `RETOUR_NON_CONFORME` -> matériel retiré du catalogue disponible.
|
||||||
- Aucun correctif code nécessaire après ces tests ; backend `build` et `lint` restent verts.
|
- Aucun correctif code nécessaire après ces tests ; backend `build` et `lint` restent verts.
|
||||||
|
|
||||||
|
### Étape 32 — Polish V1 étudiant
|
||||||
|
- Branche dédiée `feat/v1-student-polish` créée après merge de `feat/student-flow-stabilization` dans `develop`.
|
||||||
|
- Identité simulée et campus MVP centralisés dans `lib/demo_identity.dart` tant que l'auth Azure AD n'est pas branchée.
|
||||||
|
- Libellés UI harmonisés sur le contexte réel du MVP : `Saint-Christophe · Cergy` / `Ensitech Cergy` au lieu de `Paris · Ensitech`.
|
||||||
|
- Commentaire obsolète du modèle `MaterielItem` corrigé : les données viennent maintenant de l'API.
|
||||||
|
- `TODO.md` mis à jour : les parcours emprunt et restitution étudiant sont maintenant branchés API.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
*Dernière mise à jour : 2026-07-08 — Parcours étudiant complet testé en réel avec SQL Server Docker.*
|
*Dernière mise à jour : 2026-07-08 — Parcours étudiant complet testé et libellés V1 harmonisés.*
|
||||||
|
|||||||
Reference in New Issue
Block a user