feat(responsable): improve loan supervision table
This commit is contained in:
@@ -9,8 +9,24 @@ class ResponsableService {
|
||||
return Map<String, dynamic>.from(reponse["data"] as Map);
|
||||
}
|
||||
|
||||
static Future<List<Map<String, dynamic>>> emprunts() =>
|
||||
_liste("/responsable/emprunts");
|
||||
static Future<List<Map<String, dynamic>>> emprunts({
|
||||
String? statut,
|
||||
int? annee,
|
||||
String? recherche,
|
||||
String tri = "dateEmprunt",
|
||||
String ordre = "desc",
|
||||
}) {
|
||||
final parametres = <String, String>{
|
||||
"tri": tri,
|
||||
"ordre": ordre,
|
||||
"statut": ?statut,
|
||||
if (annee != null) "annee": "$annee",
|
||||
if (recherche != null && recherche.trim().isNotEmpty)
|
||||
"q": recherche.trim(),
|
||||
};
|
||||
final query = Uri(queryParameters: parametres).query;
|
||||
return _liste("/responsable/emprunts?$query");
|
||||
}
|
||||
|
||||
static Future<List<Map<String, dynamic>>> ecarts() =>
|
||||
_liste("/responsable/ecarts");
|
||||
|
||||
Reference in New Issue
Block a user