update carton filter and merge api for shipment
This commit is contained in:
@@ -17,6 +17,8 @@ import 'package:path/path.dart' as Path;
|
||||
class CartonModel extends BaseModel {
|
||||
final log = Logger('CartonModel');
|
||||
|
||||
var defaultShipment =FcsShipment(shipmentNumber: "All shipments", id: all);
|
||||
|
||||
PaginatorListener<Carton>? cartonsByFilter;
|
||||
PaginatorListener<Carton>? getBoxes;
|
||||
|
||||
@@ -56,7 +58,8 @@ class CartonModel extends BaseModel {
|
||||
_loadPaginationCartons();
|
||||
}
|
||||
|
||||
filterCarton(User? consignee, User? sender, String? status) async {
|
||||
filterCarton(FcsShipment? fcsShipment, User? consignee, User? sender,
|
||||
String? status) async {
|
||||
filterByStatus = status;
|
||||
|
||||
if (status == all_status) {
|
||||
@@ -77,6 +80,12 @@ class CartonModel extends BaseModel {
|
||||
filterBySender = sender;
|
||||
}
|
||||
|
||||
if (fcsShipment?.id == all) {
|
||||
shipment = null;
|
||||
} else {
|
||||
shipment = fcsShipment;
|
||||
}
|
||||
|
||||
loadPaginationCartons();
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user