Browse Source

commit 24/07/2025

28062025_02
andrymodeste 5 months ago
parent
commit
ab398bddc6
  1. 1164
      lib/Views/commandManagement.dart
  2. 7
      lib/Views/historique.dart
  3. 2
      lib/Views/loginPage.dart
  4. 10
      lib/Views/newCommand.dart
  5. 16
      pubspec.lock

1164
lib/Views/commandManagement.dart

File diff suppressed because it is too large

7
lib/Views/historique.dart

@ -776,6 +776,13 @@ class _HistoriquePageState extends State<HistoriquePage> {
fontSize: 14,
),
),
Text(
'${commande.clientNom} ${commande.clientPrenom}',
style: const TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14,
),
),
Text(
DateFormat('dd/MM/yyyy').format(commande.dateCommande),
style: TextStyle(

2
lib/Views/loginPage.dart

@ -177,7 +177,7 @@ void _login() async {
// 6. Navigation immédiate
if (mounted) {
if (userCredentials['role'] == 'commercial') {
if (userCredentials['role'] == 'commercial' || userCredentials['role'] == 'caisse') {
Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (context) => const MainLayout()),

10
lib/Views/newCommand.dart

@ -1613,11 +1613,12 @@ void _showMobileFilters(BuildContext context) {
label: 'Email',
keyboardType: TextInputType.emailAddress,
validator: (value) {
if (value?.isEmpty ?? true) return 'Veuillez entrer un email';
if (!RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(value!)) {
return 'Email invalide';
if (value != null && value.isNotEmpty) {
if (!RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(value)) {
return 'Email invalide';
}
}
return null;
return null; // valide même si vide
},
onChanged: (value) async {
if (value.length >= 3) {
@ -3940,7 +3941,6 @@ Future<void> _submitOrder() async {
// Vérification informations client
if (_nomController.text.isEmpty ||
_prenomController.text.isEmpty ||
_emailController.text.isEmpty ||
_telephoneController.text.isEmpty ||
_adresseController.text.isEmpty) {
Get.snackbar(

16
pubspec.lock

@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: async
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
source: hosted
version: "2.13.0"
version: "2.12.0"
barcode:
dependency: transitive
description:
@ -181,10 +181,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
url: "https://pub.dev"
source: hosted
version: "1.3.3"
version: "1.3.2"
ffi:
dependency: transitive
description:
@ -516,10 +516,10 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
url: "https://pub.dev"
source: hosted
version: "10.0.9"
version: "10.0.8"
leak_tracker_flutter_testing:
dependency: transitive
description:
@ -1193,10 +1193,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
url: "https://pub.dev"
source: hosted
version: "15.0.0"
version: "14.3.1"
web:
dependency: transitive
description:

Loading…
Cancel
Save