fix: Récupérer l'opération active depuis la table operations

- Corrige l'erreur SQL 'Unknown column fk_operation in users'
- L'opération active est récupérée depuis operations.chk_active = 1
- Jointure avec users pour filtrer par entité de l'admin créateur
- Query: SELECT o.id FROM operations o INNER JOIN users u ON u.fk_entite = o.fk_entite WHERE u.id = ? AND o.chk_active = 1
This commit is contained in:
2026-01-26 16:57:08 +01:00
parent c24a3afe6a
commit 0687900564
3040 changed files with 77204 additions and 1578 deletions

View File

@@ -402,14 +402,14 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(vertical: 8),
color: Colors.green.withOpacity(0.2),
color: Color(AppKeys.typesPassages[1]!['couleur2'] as int).withOpacity(0.2),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.task_alt,
size: 16,
color: Colors.green,
color: Color(AppKeys.typesPassages[1]!['couleur2'] as int),
),
const SizedBox(width: 4),
_buildHeaderText('Effectués', 2, headerStyle),
@@ -436,14 +436,14 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(vertical: 8),
color: Colors.orange.withOpacity(0.2),
color: Color(AppKeys.typesPassages[2]!['couleur2'] as int).withOpacity(0.2),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.refresh,
size: 16,
color: Colors.orange,
color: Color(AppKeys.typesPassages[2]!['couleur2'] as int),
),
const SizedBox(width: 4),
_buildHeaderText('À finaliser', 4, headerStyle),
@@ -460,14 +460,14 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(vertical: 8),
color: Colors.red.withOpacity(0.2),
color: Color(AppKeys.typesPassages[3]!['couleur2'] as int).withOpacity(0.2),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.block,
size: 16,
color: Colors.red,
color: Color(AppKeys.typesPassages[3]!['couleur2'] as int),
),
const SizedBox(width: 4),
_buildHeaderText('Refusés', 5, headerStyle),
@@ -484,14 +484,14 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(vertical: 8),
color: Colors.lightBlue.withOpacity(0.2),
color: Color(AppKeys.typesPassages[4]!['couleur2'] as int).withOpacity(0.2),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.volunteer_activism,
size: 16,
color: Colors.lightBlue,
color: Color(AppKeys.typesPassages[4]!['couleur2'] as int),
),
const SizedBox(width: 4),
_buildHeaderText('Dons', 6, headerStyle),
@@ -509,14 +509,14 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(vertical: 8),
color: Colors.blue.withOpacity(0.2),
color: Color(AppKeys.typesPassages[5]!['couleur2'] as int).withOpacity(0.2),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.layers,
size: 16,
color: Colors.blue,
color: Color(AppKeys.typesPassages[5]!['couleur2'] as int),
),
const SizedBox(width: 4),
_buildHeaderText('Lots', 7, headerStyle),
@@ -533,14 +533,14 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(vertical: 8),
color: Colors.grey.withOpacity(0.2),
color: Color(AppKeys.typesPassages[6]!['couleur2'] as int).withOpacity(0.2),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.home_outlined,
size: 16,
color: Colors.grey,
color: Color(AppKeys.typesPassages[6]!['couleur2'] as int),
),
const SizedBox(width: 4),
_buildHeaderText('Vides', showLotType ? 8 : 7, headerStyle),
@@ -712,7 +712,7 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.green.withOpacity(0.2),
color: Color(AppKeys.typesPassages[1]!['couleur2'] as int),
alignment: Alignment.center,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -752,7 +752,7 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.orange.withOpacity(0.2),
color: Color(AppKeys.typesPassages[2]!['couleur2'] as int),
alignment: Alignment.center,
child: Text(
aFinaliserCount.toString(),
@@ -773,7 +773,7 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.red.withOpacity(0.2),
color: Color(AppKeys.typesPassages[3]!['couleur2'] as int),
alignment: Alignment.center,
child: Text(
refuseCount.toString(),
@@ -794,7 +794,7 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.lightBlue.withOpacity(0.2),
color: Color(AppKeys.typesPassages[4]!['couleur2'] as int),
alignment: Alignment.center,
child: Text(
donCount.toString(),
@@ -816,7 +816,7 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.blue.withOpacity(0.2),
color: Color(AppKeys.typesPassages[5]!['couleur2'] as int),
alignment: Alignment.center,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -846,7 +846,7 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.grey.withOpacity(0.2),
color: Color(AppKeys.typesPassages[6]!['couleur2'] as int),
alignment: Alignment.center,
child: Text(
videCount.toString(),
@@ -1074,7 +1074,7 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.green.withOpacity(0.1),
color: Color(AppKeys.typesPassages[1]!['couleur2'] as int).withOpacity(0.8),
alignment: Alignment.center,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -1109,7 +1109,7 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.orange.withOpacity(0.1),
color: Color(AppKeys.typesPassages[2]!['couleur2'] as int).withOpacity(0.8),
alignment: Alignment.center,
child: Text(
aFinaliserCount.toString(),
@@ -1130,7 +1130,7 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.red.withOpacity(0.1),
color: Color(AppKeys.typesPassages[3]!['couleur2'] as int).withOpacity(0.8),
alignment: Alignment.center,
child: Text(
refuseCount.toString(),
@@ -1150,7 +1150,7 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.lightBlue.withOpacity(0.1),
color: Color(AppKeys.typesPassages[4]!['couleur2'] as int).withOpacity(0.8),
alignment: Alignment.center,
child: Text(
donCount.toString(),
@@ -1171,7 +1171,7 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.blue.withOpacity(0.1),
color: Color(AppKeys.typesPassages[5]!['couleur2'] as int).withOpacity(0.8),
alignment: Alignment.center,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -1201,7 +1201,7 @@ class _MembersBoardPassagesState extends State<MembersBoardPassages> {
child: Container(
width: double.infinity,
height: double.infinity,
color: Colors.grey.withOpacity(0.1),
color: Color(AppKeys.typesPassages[6]!['couleur2'] as int).withOpacity(0.8),
alignment: Alignment.center,
child: Text(
videCount.toString(),