feat: Livraison version 3.0.6

- Amélioration de la gestion des entités et des utilisateurs
- Mise à jour des modèles Amicale et Client avec champs supplémentaires
- Ajout du service de logging et amélioration du chargement UI
- Refactoring des formulaires utilisateur et amicale
- Intégration de file_picker et image_picker pour la gestion des fichiers
- Amélioration de la gestion des membres et de leur suppression
- Optimisation des performances de l'API
- Mise à jour de la documentation technique

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-08-08 20:33:54 +02:00
parent 599b9fcda0
commit 206c76c7db
69 changed files with 203569 additions and 174972 deletions

View File

@@ -70,6 +70,15 @@ class AmicaleModel extends HiveObject {
@HiveField(21)
final DateTime? updatedAt;
@HiveField(22)
final bool chkMdpManuel;
@HiveField(23)
final bool chkUsernameManuel;
@HiveField(24)
final String? logoBase64; // Logo en base64 (data:image/png;base64,...)
AmicaleModel({
required this.id,
required this.name,
@@ -93,6 +102,9 @@ class AmicaleModel extends HiveObject {
this.chkStripe = false,
this.createdAt,
this.updatedAt,
this.chkMdpManuel = false,
this.chkUsernameManuel = false,
this.logoBase64,
});
// Factory pour convertir depuis JSON (API)
@@ -123,6 +135,17 @@ class AmicaleModel extends HiveObject {
json['chk_active'] == 1 || json['chk_active'] == true;
final bool chkStripe =
json['chk_stripe'] == 1 || json['chk_stripe'] == true;
final bool chkMdpManuel =
json['chk_mdp_manuel'] == 1 || json['chk_mdp_manuel'] == true;
final bool chkUsernameManuel =
json['chk_username_manuel'] == 1 || json['chk_username_manuel'] == true;
// Traiter le logo si présent
String? logoBase64;
if (json['logo'] != null && json['logo'] is Map) {
final logoData = json['logo'] as Map<String, dynamic>;
logoBase64 = logoData['data_url'] as String?;
}
// Traiter les dates si présentes
DateTime? createdAt;
@@ -166,6 +189,9 @@ class AmicaleModel extends HiveObject {
chkStripe: chkStripe,
createdAt: createdAt,
updatedAt: updatedAt,
chkMdpManuel: chkMdpManuel,
chkUsernameManuel: chkUsernameManuel,
logoBase64: logoBase64,
);
}
@@ -194,6 +220,9 @@ class AmicaleModel extends HiveObject {
'chk_stripe': chkStripe ? 1 : 0,
'created_at': createdAt?.toIso8601String(),
'updated_at': updatedAt?.toIso8601String(),
'chk_mdp_manuel': chkMdpManuel ? 1 : 0,
'chk_username_manuel': chkUsernameManuel ? 1 : 0,
// Note: logoBase64 n'est pas envoyé via toJson (lecture seule depuis l'API)
};
}
@@ -220,6 +249,9 @@ class AmicaleModel extends HiveObject {
bool? chkStripe,
DateTime? createdAt,
DateTime? updatedAt,
bool? chkMdpManuel,
bool? chkUsernameManuel,
String? logoBase64,
}) {
return AmicaleModel(
id: id,
@@ -244,6 +276,9 @@ class AmicaleModel extends HiveObject {
chkStripe: chkStripe ?? this.chkStripe,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
chkMdpManuel: chkMdpManuel ?? this.chkMdpManuel,
chkUsernameManuel: chkUsernameManuel ?? this.chkUsernameManuel,
logoBase64: logoBase64 ?? this.logoBase64,
);
}
}

View File

@@ -39,13 +39,16 @@ class AmicaleModelAdapter extends TypeAdapter<AmicaleModel> {
chkStripe: fields[19] as bool,
createdAt: fields[20] as DateTime?,
updatedAt: fields[21] as DateTime?,
chkMdpManuel: fields[22] as bool,
chkUsernameManuel: fields[23] as bool,
logoBase64: fields[24] as String?,
);
}
@override
void write(BinaryWriter writer, AmicaleModel obj) {
writer
..writeByte(22)
..writeByte(25)
..writeByte(0)
..write(obj.id)
..writeByte(1)
@@ -89,7 +92,13 @@ class AmicaleModelAdapter extends TypeAdapter<AmicaleModel> {
..writeByte(20)
..write(obj.createdAt)
..writeByte(21)
..write(obj.updatedAt);
..write(obj.updatedAt)
..writeByte(22)
..write(obj.chkMdpManuel)
..writeByte(23)
..write(obj.chkUsernameManuel)
..writeByte(24)
..write(obj.logoBase64);
}
@override

View File

@@ -70,6 +70,12 @@ class ClientModel extends HiveObject {
@HiveField(21)
final DateTime? updatedAt;
@HiveField(22)
final bool? chkMdpManuel;
@HiveField(23)
final bool? chkUsernameManuel;
ClientModel({
required this.id,
required this.name,
@@ -93,6 +99,8 @@ class ClientModel extends HiveObject {
this.chkStripe,
this.createdAt,
this.updatedAt,
this.chkMdpManuel,
this.chkUsernameManuel,
});
// Factory pour convertir depuis JSON (API)
@@ -138,6 +146,8 @@ class ClientModel extends HiveObject {
chkStripe: json['chk_stripe'] == 1 || json['chk_stripe'] == true,
createdAt: json['created_at'] != null ? DateTime.parse(json['created_at']) : null,
updatedAt: json['updated_at'] != null ? DateTime.parse(json['updated_at']) : null,
chkMdpManuel: json['chk_mdp_manuel'] == 1 || json['chk_mdp_manuel'] == true,
chkUsernameManuel: json['chk_username_manuel'] == 1 || json['chk_username_manuel'] == true,
);
}
@@ -166,6 +176,8 @@ class ClientModel extends HiveObject {
'chk_stripe': chkStripe,
'created_at': createdAt?.toIso8601String(),
'updated_at': updatedAt?.toIso8601String(),
'chk_mdp_manuel': chkMdpManuel,
'chk_username_manuel': chkUsernameManuel,
};
}
@@ -192,6 +204,8 @@ class ClientModel extends HiveObject {
bool? chkStripe,
DateTime? createdAt,
DateTime? updatedAt,
bool? chkMdpManuel,
bool? chkUsernameManuel,
}) {
return ClientModel(
id: id,
@@ -216,6 +230,8 @@ class ClientModel extends HiveObject {
chkStripe: chkStripe ?? this.chkStripe,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
chkMdpManuel: chkMdpManuel ?? this.chkMdpManuel,
chkUsernameManuel: chkUsernameManuel ?? this.chkUsernameManuel,
);
}
}

View File

@@ -39,13 +39,15 @@ class ClientModelAdapter extends TypeAdapter<ClientModel> {
chkStripe: fields[19] as bool?,
createdAt: fields[20] as DateTime?,
updatedAt: fields[21] as DateTime?,
chkMdpManuel: fields[22] as bool?,
chkUsernameManuel: fields[23] as bool?,
);
}
@override
void write(BinaryWriter writer, ClientModel obj) {
writer
..writeByte(22)
..writeByte(24)
..writeByte(0)
..write(obj.id)
..writeByte(1)
@@ -89,7 +91,11 @@ class ClientModelAdapter extends TypeAdapter<ClientModel> {
..writeByte(20)
..write(obj.createdAt)
..writeByte(21)
..write(obj.updatedAt);
..write(obj.updatedAt)
..writeByte(22)
..write(obj.chkMdpManuel)
..writeByte(23)
..write(obj.chkUsernameManuel);
}
@override