update processing,customer and staff

This commit is contained in:
tzw
2021-10-11 17:09:47 +06:30
parent bfa6b8c2ed
commit 8df11b70a0
22 changed files with 158 additions and 59 deletions

View File

@@ -73,6 +73,8 @@ const privilege_invoice = "inv";
const privilege_processing = "pr";
const privilege_receiving = "rc";
const privilege_pickup = "pku";
const privilege_collect ="col";
const privilege_report ="rpt";
// Pickup types
const shipment_local_pickup = "Local pickup";

View File

@@ -91,7 +91,7 @@ class Package {
userName: map['user_name'],
phoneNumber: map['phone_number'],
remark: map['remark'],
desc: map['desc'],
desc: map['desc'] ?? "",
status: map['status'],
senderFCSID: map['sender_fcs_id'],
senderName: map['sender_name'],
@@ -134,11 +134,12 @@ class Package {
}
bool isChangedForEditProcessing(Package package) {
return package.trackingID != this.trackingID ||
package.fcsID != this.fcsID ||
return package.fcsID != this.fcsID ||
package.senderFCSID != this.senderFCSID ||
package.market != this.market ||
package.desc != this.desc ||
package.remark != this.remark;
package.remark != this.remark ||
package.photoUrls != this.photoUrls;
}
@override

View File

@@ -29,7 +29,7 @@ class DeliveryAddress {
city: map['city'],
state: map['state'],
phoneNumber: map['phone_number'],
isDefault: map['is_defalut'] ?? false,
isDefault: map['is_default'] ?? false,
);
}
@@ -46,6 +46,10 @@ class DeliveryAddress {
};
}
Map<String, dynamic> toMapForDefault() {
return {"id": id};
}
bool isChangedForEdit(DeliveryAddress deliveryAddress) {
return deliveryAddress.fullName != this.fullName ||
deliveryAddress.phoneNumber != this.phoneNumber ||

View File

@@ -45,6 +45,10 @@ class Privilege {
iconData = MaterialCommunityIcons.inbox_arrow_down;
} else if (this.id == privilege_pickup) {
iconData = SimpleLineIcons.direction;
} else if (this.id == privilege_collect) {
iconData = MaterialCommunityIcons.layers;
} else if (this.id == privilege_report) {
iconData = Feather.file_text;
} else {
iconData = MaterialCommunityIcons.account_question;
}