mmmh
This commit is contained in:
@@ -112,7 +112,7 @@ class OperationsRepository {
|
||||
}
|
||||
|
||||
// --- RECUPERO PAGINATO CON FILTRI E JOIN ---
|
||||
Future<List<OperationModel>> fetchOperations({
|
||||
/* Future<List<OperationModel>> fetchOperations({
|
||||
required String companyId,
|
||||
String? storeId,
|
||||
String? staffId,
|
||||
@@ -172,9 +172,9 @@ class OperationsRepository {
|
||||
} catch (e) {
|
||||
throw Exception('$e');
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
Stream<List<OperationModel>> watchStoreOperations({
|
||||
Stream<List<Map<String, dynamic>>> watchStoreOperations({
|
||||
required String storeId,
|
||||
required int limit,
|
||||
}) {
|
||||
@@ -183,11 +183,7 @@ class OperationsRepository {
|
||||
.stream(primaryKey: ['id'])
|
||||
.eq('store_id', storeId)
|
||||
.order('created_at', ascending: false)
|
||||
.limit(limit)
|
||||
.map(
|
||||
(listOfMaps) =>
|
||||
listOfMaps.map((map) => OperationModel.fromMap(map)).toList(),
|
||||
);
|
||||
.limit(limit);
|
||||
}
|
||||
|
||||
// --- SALVATAGGIO COMPLETO (PRIMA PADRE, POI FIGLI) ---
|
||||
|
||||
Reference in New Issue
Block a user