add cartion filter and search

This commit is contained in:
tzw
2024-02-07 17:26:29 +06:30
parent 2d4cdb9620
commit caf20f4e67
39 changed files with 1274 additions and 1181 deletions

View File

@@ -153,4 +153,22 @@ class FcsShipmentModel extends BaseModel {
Future<String> report(FcsShipment fcsShipment) {
return Services.instance.fcsShipmentService.report(fcsShipment);
}
Future<List<FcsShipment>> getAllShipments() async {
List<FcsShipment> fcsShipments = [];
try {
var snaps = await FirebaseFirestore.instance
.collection("/$fcs_shipment_collection")
.where("is_deleted", isEqualTo: false)
.get(const GetOptions(source: Source.server));
fcsShipments = snaps.docs.map((documentSnapshot) {
var fcs =
FcsShipment.fromMap(documentSnapshot.data(), documentSnapshot.id);
return fcs;
}).toList();
} catch (e) {
log.warning("Error!! $e");
}
return fcsShipments;
}
}