update carton filter and merge api for shipment
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const uploadPhotoLimit = 10;
|
||||
const shipmentCountForCartonFilter = 10;
|
||||
|
||||
const config_collection = "configs";
|
||||
const user_collection = "users";
|
||||
|
||||
@@ -7,7 +7,7 @@ class FcsShipment {
|
||||
String? shipmentNumber;
|
||||
DateTime? cutoffDate;
|
||||
String? shipmentTypeId;
|
||||
String? shipType;
|
||||
String? shipTypeName;
|
||||
DateTime? arrivalDate;
|
||||
DateTime? departureDate;
|
||||
String? consignee;
|
||||
@@ -21,7 +21,7 @@ class FcsShipment {
|
||||
this.shipmentNumber,
|
||||
this.cutoffDate,
|
||||
this.shipmentTypeId,
|
||||
this.shipType,
|
||||
this.shipTypeName,
|
||||
this.status,
|
||||
this.arrivalDate,
|
||||
this.departureDate,
|
||||
@@ -42,7 +42,7 @@ class FcsShipment {
|
||||
cutoffDate: _cutoffDate != null ? _cutoffDate.toDate() : null,
|
||||
arrivalDate: _arrivalDate != null ? _arrivalDate.toDate() : null,
|
||||
shipmentNumber: map['shipment_number'],
|
||||
shipType: map['shipment_type'],
|
||||
shipTypeName: map['shipment_type_name'],
|
||||
shipmentTypeId: map['shipment_type_id'] ?? "",
|
||||
status: map['status'],
|
||||
consignee: map['consignee'],
|
||||
@@ -53,10 +53,10 @@ class FcsShipment {
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
"id": id,
|
||||
'id': id,
|
||||
'shipment_number': shipmentNumber,
|
||||
'shipment_type_id': shipmentTypeId,
|
||||
'cutoff_date': cutoffDate?.toUtc().toIso8601String(),
|
||||
'shipment_type': shipType,
|
||||
'arrival_date': arrivalDate?.toUtc().toIso8601String(),
|
||||
'consignee': consignee,
|
||||
'port': port,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
class ShipmentType {
|
||||
String id;
|
||||
String desc;
|
||||
String name;
|
||||
|
||||
ShipmentType({required this.id, required this.desc});
|
||||
ShipmentType({required this.id, required this.name});
|
||||
|
||||
factory ShipmentType.fromMap(Map<String, dynamic> map, String id) {
|
||||
return ShipmentType(id: id, desc: map['desc'] ?? "");
|
||||
return ShipmentType(id: id, name: map['name'] ?? "");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user