add cartion filter and search
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user