merge-requests/126/head
Aamir Muhammad 2 years ago
parent 35f814b74a
commit 4f780ad0aa

@ -3,8 +3,8 @@ import 'package:mohem_flutter_app/ui/marathon/widgets/question_card.dart';
class ApiConsts {
//static String baseUrl = "http://10.200.204.20:2801/"; // Local server
// static String baseUrl = "https://erptstapp.srca.org.sa"; // SRCA server
static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server
// static String baseUrl = "https://hmgwebservices.com"; // Live server
//static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server
static String baseUrl = "https://hmgwebservices.com"; // Live server
static String baseUrlServices = baseUrl + "/Services/"; // server
// static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server
static String utilitiesRest = baseUrlServices + "Utilities.svc/REST/";

@ -330,6 +330,8 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
user.userStatus = items.first["userStatus"];
}
}
notifyListeners();
}
@ -1292,45 +1294,52 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
print("=============== In App State =====================");
getEmployeeSubordinatesList = AppState().getemployeeSubordinatesList;
for (GetEmployeeSubordinatesList element in getEmployeeSubordinatesList) {
print(element.eMPLOYEEEMAILADDRESS);
teamMembersList.add(
ChatUser(
id: int.parse(element.eMPLOYEENUMBER!),
email: element.eMPLOYEEEMAILADDRESS,
userName: element.eMPLOYEEDISPLAYNAME,
phone: element.eMPLOYEEMOBILENUMBER,
userStatus: 0,
unreadMessageCount: 0,
isFav: false,
isTyping: false,
isImageLoading: false,
image: element.eMPLOYEEIMAGE ?? "",
isImageLoaded: true,
userLocalDownlaodedImage: await downloadImageLocal(element.eMPLOYEEIMAGE ?? "", element.eMPLOYEENUMBER!),
),
);
if (element.eMPLOYEEEMAILADDRESS != null) {
if (element.eMPLOYEEEMAILADDRESS!.isNotEmpty) {
teamMembersList.add(
ChatUser(
id: int.parse(element.eMPLOYEENUMBER!),
email: element.eMPLOYEEEMAILADDRESS,
userName: element.eMPLOYEEDISPLAYNAME,
phone: element.eMPLOYEEMOBILENUMBER,
userStatus: 0,
unreadMessageCount: 0,
isFav: false,
isTyping: false,
isImageLoading: false,
image: element.eMPLOYEEIMAGE ?? "",
isImageLoaded: true,
userLocalDownlaodedImage: await downloadImageLocal(element.eMPLOYEEIMAGE ?? "", element.eMPLOYEENUMBER!),
),
);
}
}
}
} else {
getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates("", "", "");
AppState().setemployeeSubordinatesList = getEmployeeSubordinatesList;
for (GetEmployeeSubordinatesList element in getEmployeeSubordinatesList) {
print(element.eMPLOYEEEMAILADDRESS);
teamMembersList.add(
ChatUser(
id: int.parse(element.eMPLOYEENUMBER!),
email: element.eMPLOYEEEMAILADDRESS,
userName: element.eMPLOYEEDISPLAYNAME,
phone: element.eMPLOYEEMOBILENUMBER,
userStatus: 0,
unreadMessageCount: 0,
isFav: false,
isTyping: false,
isImageLoading: false,
image: element.eMPLOYEEIMAGE ?? "",
isImageLoaded: true,
userLocalDownlaodedImage: await downloadImageLocal(element.eMPLOYEEIMAGE ?? "", element.eMPLOYEENUMBER!),
),
);
if (element.eMPLOYEEEMAILADDRESS != null) {
if (element.eMPLOYEEEMAILADDRESS!.isNotEmpty) {
teamMembersList.add(
ChatUser(
id: int.parse(element.eMPLOYEENUMBER!),
email: element.eMPLOYEEEMAILADDRESS,
userName: element.eMPLOYEEDISPLAYNAME,
phone: element.eMPLOYEEMOBILENUMBER,
userStatus: 0,
unreadMessageCount: 0,
isFav: false,
isTyping: false,
isImageLoading: false,
image: element.eMPLOYEEIMAGE ?? "",
isImageLoaded: true,
userLocalDownlaodedImage: await downloadImageLocal(element.eMPLOYEEIMAGE ?? "", element.eMPLOYEENUMBER!),
),
);
}
}
}
}
isLoading = false;

@ -128,16 +128,16 @@ class _MyTeamScreenState extends State<MyTeamScreen> {
],
),
).onPress(() {
print(jsonEncode(m.teamMembersList[index]));
// Navigator.pushNamed(
// context,
// AppRoutes.chatDetailed,
// arguments: ChatDetailedScreenParams(m.teamMembersList![index], true),
// ).then(
// (Object? value) {
// m.clearSelections();
// },
// );
// print(jsonEncode(m.teamMembersList[index]));
Navigator.pushNamed(
context,
AppRoutes.chatDetailed,
arguments: ChatDetailedScreenParams(m.teamMembersList![index], true),
).then(
(Object? value) {
m.clearSelections();
},
);
});
},
separatorBuilder: (BuildContext context, int index) => const Divider(color: MyColors.lightGreyE5Color).paddingOnly(left: 70),

Loading…
Cancel
Save