fix logout issue

This commit is contained in:
tzw
2024-02-23 17:05:51 +06:30
parent 421bcf0a11
commit 5496bae681
23 changed files with 144 additions and 84 deletions

View File

@@ -2,6 +2,7 @@ const uploadPhotoLimit = 10;
const config_collection = "configs";
const user_collection = "users";
const authCollection = "auths";
const invitations_collection = "invitations";
const privilege_collection = "privileges";
const markets_collection = "markets";
@@ -113,8 +114,8 @@ const carton_processing_status = "processing";
const carton_arrived_status = "arrived";
const carton_invoiced_status = "invoiced";
const carton_canceled_status = "canceled";
const all_status= "All stauts";
const all ="All";
const all_status = "All stauts";
const all = "All";
// shipment status
const shipment_pending_status = "pending";
@@ -141,6 +142,6 @@ const payment_canceled_status = "canceled";
const delivery_caton = "Delivery carton";
const pickup_carton = "Pick-up carton";
// bill
const billToSender ="Bill to sender";
const billToConsignee="Bill to consignee";
// bill
const billToSender = "Bill to sender";
const billToConsignee = "Bill to consignee";

View File

@@ -21,7 +21,6 @@ class User {
String? preferCurrency;
bool enablePinLogin;
String? pinDigit;
String? confirmPinDigit;
String get initial =>
name != null && name != "" ? name!.substring(0, 1) : "?";
@@ -60,21 +59,21 @@ class User {
bool get disabled => status != null && status == user_disabled_status;
String get share => "Your phone number:$phoneNumber";
User(
{this.id,
this.name,
this.phoneNumber,
this.fcsID,
this.status,
this.privileges = const [],
this.lastMessage,
this.lastMessageTime,
this.userUnseenCount = 0,
this.fcsUnseenCount = 0,
this.preferCurrency,
this.enablePinLogin = false,
this.pinDigit,
this.confirmPinDigit});
User({
this.id,
this.name,
this.phoneNumber,
this.fcsID,
this.status,
this.privileges = const [],
this.lastMessage,
this.lastMessageTime,
this.userUnseenCount = 0,
this.fcsUnseenCount = 0,
this.preferCurrency,
this.enablePinLogin = false,
this.pinDigit,
});
factory User.fromJson(Map<String, dynamic> json) {
return User(