last update
This commit is contained in:
parent
9eafda610f
commit
c8fedd08e5
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:youmazgestion/Views/Dashboard.dart';
|
||||
import 'package:youmazgestion/Views/HandleProduct.dart';
|
||||
import 'package:youmazgestion/Views/RoleListPage.dart';
|
||||
import 'package:youmazgestion/Views/commandManagement.dart';
|
||||
@ -105,7 +106,7 @@ class CustomDrawer extends StatelessWidget {
|
||||
color: Colors.blue,
|
||||
permissionAction: 'view',
|
||||
permissionRoute: '/accueil',
|
||||
onTap: () => Get.to(const AccueilPage()),
|
||||
onTap: () => Get.to( DashboardPage()),
|
||||
),
|
||||
);
|
||||
|
||||
@ -228,11 +229,11 @@ class CustomDrawer extends StatelessWidget {
|
||||
List<Widget> rapportsItems = [
|
||||
await _buildDrawerItem(
|
||||
icon: Icons.bar_chart,
|
||||
title: "Bilan mensuel",
|
||||
title: "Bilan ",
|
||||
color: Colors.teal,
|
||||
permissionAction: 'read',
|
||||
permissionRoute: '/bilan',
|
||||
onTap: () => Get.to(const BilanMois()),
|
||||
onTap: () => Get.to( DashboardPage()),
|
||||
),
|
||||
await _buildDrawerItem(
|
||||
icon: Icons.history,
|
||||
|
||||
@ -1126,7 +1126,19 @@ Future<int> deletePointDeVente(int id) async {
|
||||
whereArgs: [id],
|
||||
);
|
||||
}
|
||||
|
||||
// Dans AppDatabase
|
||||
Future<Map<String, int>> getProductCountByCategory() async {
|
||||
final db = await database;
|
||||
final result = await db.rawQuery('''
|
||||
SELECT category, COUNT(*) as count
|
||||
FROM products
|
||||
GROUP BY category
|
||||
ORDER BY count DESC
|
||||
''');
|
||||
|
||||
return Map.fromEntries(result.map((e) =>
|
||||
MapEntry(e['category'] as String, e['count'] as int)));
|
||||
}
|
||||
Future<Map<String, dynamic>?> getPointDeVenteById(int id) async {
|
||||
final db = await database;
|
||||
final result = await db.query(
|
||||
|
||||
1151
lib/Views/Dashboard.dart
Normal file
1151
lib/Views/Dashboard.dart
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:youmazgestion/Services/stock_managementDatabase.dart';
|
||||
import 'package:youmazgestion/Views/Dashboard.dart';
|
||||
import 'package:youmazgestion/Views/mobilepage.dart';
|
||||
import 'package:youmazgestion/Views/particles.dart' show ParticleBackground;
|
||||
import 'package:youmazgestion/accueil.dart';
|
||||
@ -125,11 +126,10 @@ class _LoginPageState extends State<LoginPage> {
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const MainLayout()),
|
||||
);
|
||||
} else {
|
||||
// Redirection vers AccueilPage pour les autres rôles
|
||||
Navigator.pushReplacement(
|
||||
}else{
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const AccueilPage()),
|
||||
MaterialPageRoute(builder: (context) => DashboardPage()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
16
pubspec.lock
16
pubspec.lock
@ -241,6 +241,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.9.3+4"
|
||||
fl_chart:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fl_chart
|
||||
sha256: "5a74434cc83bf64346efb562f1a06eefaf1bcb530dc3d96a104f631a1eff8d79"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.65.0"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@ -1049,18 +1057,18 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: syncfusion_flutter_charts
|
||||
sha256: bdb7cc5814ceb187793cea587f4a5946afcffd96726b219cee79df8460f44b7b
|
||||
sha256: "0222ac9d8cb6c671f014effe9bd5c0aef35eadb16471355345ba87cc0ac007b3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "21.2.4"
|
||||
version: "20.4.54"
|
||||
syncfusion_flutter_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: syncfusion_flutter_core
|
||||
sha256: "8db8f55c77f56968681447d3837c10f27a9e861e238a898fda116c7531def979"
|
||||
sha256: "3979f0b1c5a97422cadae52d476c21fa3e0fb671ef51de6cae1d646d8b99fe1f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "21.2.10"
|
||||
version: "20.4.54"
|
||||
synchronized:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@ -50,7 +50,7 @@ dependencies:
|
||||
logging: ^1.2.0
|
||||
msix: ^3.7.0
|
||||
flutter_charts: ^0.5.1
|
||||
syncfusion_flutter_charts: ^21.2.4
|
||||
syncfusion_flutter_charts: ^20.4.48
|
||||
shelf: ^1.4.1
|
||||
shelf_router: ^1.1.4
|
||||
pdf: ^3.8.4
|
||||
@ -63,7 +63,7 @@ dependencies:
|
||||
shared_preferences: ^2.2.2
|
||||
excel: ^2.0.1
|
||||
mobile_scanner: ^5.0.0 # ou la version la plus récente
|
||||
|
||||
fl_chart: ^0.65.0 # Version la plus récente au moment de cette répons
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user