fix errors
This commit is contained in:
@@ -83,7 +83,7 @@ class FcsShipmentModel extends BaseModel {
|
||||
}
|
||||
|
||||
Future<void> loadMore() async {
|
||||
if (_shipped.ended && _selectedIndex == 1) return;
|
||||
if (_shipped.ended || _selectedIndex == 1) return;
|
||||
isLoading = true;
|
||||
notifyListeners();
|
||||
await _shipped.load(onFinished: () {
|
||||
@@ -132,6 +132,24 @@ class FcsShipmentModel extends BaseModel {
|
||||
return null;
|
||||
}
|
||||
|
||||
Future<List<FcsShipment>> getInvoiceFcsShipments() async {
|
||||
List<FcsShipment> fcsShipments = [];
|
||||
try {
|
||||
var snaps = await Firestore.instance
|
||||
.collection("/$fcs_shipment_collection")
|
||||
.where("pending_invoice_user_count", isGreaterThan: 0)
|
||||
.getDocuments(source: Source.server);
|
||||
fcsShipments = snaps.documents.map((documentSnapshot) {
|
||||
var fcs = FcsShipment.fromMap(
|
||||
documentSnapshot.data, documentSnapshot.documentID);
|
||||
return fcs;
|
||||
}).toList();
|
||||
} catch (e) {
|
||||
log.warning("Error!! $e");
|
||||
}
|
||||
return fcsShipments;
|
||||
}
|
||||
|
||||
void initUser(user) {
|
||||
super.initUser(user);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user