add carton editor for mix carton

This commit is contained in:
tzw
2024-02-02 18:00:51 +06:30
parent 61f119c063
commit 891330a59e
18 changed files with 903 additions and 158 deletions

View File

@@ -95,6 +95,11 @@ const carton_from_shipments = "From shipments";
const carton_small_bag = "Small bag";
const carton_mix_box = "Mix box";
// carton Size
const standardCarton = "Standard carton size";
const customCarton = "Custom size";
const packageCartion = "Package";
//Mix types
const mix_delivery = "Mix Delivery";
const mix_pickup = "Mix Pickup";

View File

@@ -37,6 +37,7 @@ class Carton {
String? cartonSizeID;
String? cartonSizeName;
double cartonWeight;
bool isSelected;
int rate;
int weight;
@@ -158,7 +159,8 @@ class Carton {
this.mixBoxType,
this.mixCartons = const [],
this.mixCartonIDs = const [],
this.cartonWeight =0});
this.cartonWeight =0,
this.isSelected = false});
Map<String, dynamic> toMap() {
List _cargoTypes = cargoTypes.map((c) => c.toMap()).toList();

View File

@@ -80,4 +80,10 @@ class FcsShipment {
fcsShipment.port != this.port ||
fcsShipment.destination != this.destination;
}
@override
bool operator ==(Object other) => other is FcsShipment && other.id == id;
@override
int get hashCode => id.hashCode;
}