feat(responsable): add material stock table
This commit is contained in:
@@ -31,8 +31,24 @@ class ResponsableService {
|
||||
static Future<List<Map<String, dynamic>>> ecarts() =>
|
||||
_liste("/responsable/ecarts");
|
||||
|
||||
static Future<List<Map<String, dynamic>>> materiels() =>
|
||||
_liste("/responsable/materiels");
|
||||
static Future<List<Map<String, dynamic>>> materiels({
|
||||
String? statut,
|
||||
int? categorieId,
|
||||
String? recherche,
|
||||
String tri = "nom",
|
||||
String ordre = "asc",
|
||||
}) {
|
||||
final parametres = <String, String>{
|
||||
"tri": tri,
|
||||
"ordre": ordre,
|
||||
"statut": ?statut,
|
||||
if (categorieId != null) "categorieId": "$categorieId",
|
||||
if (recherche != null && recherche.trim().isNotEmpty)
|
||||
"q": recherche.trim(),
|
||||
};
|
||||
final query = Uri(queryParameters: parametres).query;
|
||||
return _liste("/responsable/materiels?$query");
|
||||
}
|
||||
|
||||
static Future<List<Map<String, dynamic>>> anomalies() =>
|
||||
_liste("/responsable/anomalies");
|
||||
|
||||
Reference in New Issue
Block a user