feat(auth): restore authenticated user profile
This commit is contained in:
@@ -10,7 +10,11 @@ import "../widgets/brand_corners.dart";
|
||||
/// Résultat de la restitution (RG17-RG20) : conforme (succès) ou non conforme
|
||||
/// (anomalie détectée + notification au responsable).
|
||||
class ResultatRetourScreen extends StatelessWidget {
|
||||
const ResultatRetourScreen({super.key, required this.emprunt, required this.anomalies});
|
||||
const ResultatRetourScreen({
|
||||
super.key,
|
||||
required this.emprunt,
|
||||
required this.anomalies,
|
||||
});
|
||||
|
||||
final EmpruntItem emprunt;
|
||||
final List<AnomalieRetour> anomalies;
|
||||
@@ -48,7 +52,7 @@ class ResultatRetourScreen extends StatelessWidget {
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: Column(
|
||||
children: [
|
||||
const EnsupTopBar(
|
||||
EnsupTopBar(
|
||||
brandText: "EME · Résultat du contrôle",
|
||||
campusTag: DemoIdentity.campusTag,
|
||||
),
|
||||
@@ -63,7 +67,10 @@ class ResultatRetourScreen extends StatelessWidget {
|
||||
),
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 28, vertical: 32),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 28,
|
||||
vertical: 32,
|
||||
),
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 560),
|
||||
child: Column(
|
||||
@@ -73,10 +80,15 @@ class ResultatRetourScreen extends StatelessWidget {
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: FilledButton.icon(
|
||||
onPressed: () => Navigator.of(context).popUntil(
|
||||
(route) => route.settings.name == "home",
|
||||
onPressed: () =>
|
||||
Navigator.of(context).popUntil(
|
||||
(route) =>
|
||||
route.settings.name == "home",
|
||||
),
|
||||
icon: const Icon(
|
||||
Icons.home_outlined,
|
||||
size: 18,
|
||||
),
|
||||
icon: const Icon(Icons.home_outlined, size: 18),
|
||||
label: Text(
|
||||
"Retour à l'accueil",
|
||||
style: GoogleFonts.darkerGrotesque(
|
||||
@@ -86,9 +98,13 @@ class ResultatRetourScreen extends StatelessWidget {
|
||||
),
|
||||
style: FilledButton.styleFrom(
|
||||
backgroundColor: EnsupColors.cyan,
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 16,
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
borderRadius: BorderRadius.circular(
|
||||
10,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -116,7 +132,9 @@ class ResultatRetourScreen extends StatelessWidget {
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(36),
|
||||
decoration: BoxDecoration(
|
||||
gradient: const LinearGradient(colors: [Color(0xFFF0FDF4), Color(0xFFECFDF5)]),
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xFFF0FDF4), Color(0xFFECFDF5)],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
border: Border.all(color: const Color(0xFFBBF7D0), width: 2),
|
||||
),
|
||||
@@ -127,7 +145,9 @@ class ResultatRetourScreen extends StatelessWidget {
|
||||
height: 72,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: LinearGradient(colors: [Color(0xFF16A34A), Color(0xFF22C55E)]),
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xFF16A34A), Color(0xFF22C55E)],
|
||||
),
|
||||
),
|
||||
child: const Icon(Icons.check, color: Colors.white, size: 36),
|
||||
),
|
||||
@@ -144,7 +164,10 @@ class ResultatRetourScreen extends StatelessWidget {
|
||||
Text(
|
||||
"L'emprunt a été clôturé et le matériel est de nouveau disponible.",
|
||||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.titilliumWeb(fontSize: 14, color: const Color(0xFF166534)),
|
||||
style: GoogleFonts.titilliumWeb(
|
||||
fontSize: 14,
|
||||
color: const Color(0xFF166534),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -164,12 +187,19 @@ class ResultatRetourScreen extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
color: EnsupColors.red.withValues(alpha: 0.06),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: EnsupColors.red.withValues(alpha: 0.2), width: 1.5),
|
||||
border: Border.all(
|
||||
color: EnsupColors.red.withValues(alpha: 0.2),
|
||||
width: 1.5,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Icon(Icons.warning_amber_rounded, color: EnsupColors.red, size: 24),
|
||||
const Icon(
|
||||
Icons.warning_amber_rounded,
|
||||
color: EnsupColors.red,
|
||||
size: 24,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
@@ -227,7 +257,10 @@ class ResultatRetourScreen extends StatelessWidget {
|
||||
anomalie.etatRetour,
|
||||
valeurCouleur: EnsupColors.red,
|
||||
),
|
||||
_drow("Matériel", "${emprunt.materiel.nom} · ${emprunt.materiel.reference}"),
|
||||
_drow(
|
||||
"Matériel",
|
||||
"${emprunt.materiel.nom} · ${emprunt.materiel.reference}",
|
||||
),
|
||||
_drow("Emprunteur", DemoIdentity.userName),
|
||||
_drow("Date détection", date),
|
||||
],
|
||||
@@ -237,7 +270,11 @@ class ResultatRetourScreen extends StatelessWidget {
|
||||
Text(
|
||||
"Le responsable matériel traitera cette anomalie. Vous pouvez retourner à l'accueil.",
|
||||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.titilliumWeb(fontSize: 13, color: EnsupColors.muted, height: 1.6),
|
||||
style: GoogleFonts.titilliumWeb(
|
||||
fontSize: 13,
|
||||
color: EnsupColors.muted,
|
||||
height: 1.6,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -249,7 +286,13 @@ class ResultatRetourScreen extends StatelessWidget {
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(cle, style: GoogleFonts.titilliumWeb(fontSize: 13, color: EnsupColors.muted)),
|
||||
Text(
|
||||
cle,
|
||||
style: GoogleFonts.titilliumWeb(
|
||||
fontSize: 13,
|
||||
color: EnsupColors.muted,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
Expanded(
|
||||
child: Text(
|
||||
|
||||
Reference in New Issue
Block a user