feat: Implement optimistic UI for agent availability toggle, add email and phone visibility toggles, and improve the logout process with immediate socket disconnection and best-effort API calls.
This commit is contained in:
@@ -196,6 +196,38 @@ class AgentProfile {
|
||||
return tags;
|
||||
}
|
||||
|
||||
AgentProfile copyWith({bool? isAvailable}) {
|
||||
return AgentProfile(
|
||||
id: id,
|
||||
userId: userId,
|
||||
firstName: firstName,
|
||||
lastName: lastName,
|
||||
headline: headline,
|
||||
bio: bio,
|
||||
avatar: avatar,
|
||||
companyName: companyName,
|
||||
phone: phone,
|
||||
website: website,
|
||||
city: city,
|
||||
state: state,
|
||||
country: country,
|
||||
averageRating: averageRating,
|
||||
totalReviews: totalReviews,
|
||||
isVerified: isVerified,
|
||||
isFeatured: isFeatured,
|
||||
isActive: isActive,
|
||||
isAvailable: isAvailable ?? this.isAvailable,
|
||||
email: email,
|
||||
agentType: agentType,
|
||||
user: user,
|
||||
fieldValues: fieldValues,
|
||||
createdAt: createdAt,
|
||||
legacySpecializations: legacySpecializations,
|
||||
languages: languages,
|
||||
serviceAreas: serviceAreas,
|
||||
);
|
||||
}
|
||||
|
||||
factory AgentProfile.fromJson(Map<String, dynamic> json) {
|
||||
return AgentProfile(
|
||||
id: json['id'] as String,
|
||||
|
||||
Reference in New Issue
Block a user