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

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

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

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

Loading…
Cancel
Save