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 {
//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,7 +1294,8 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
print("=============== In App State =====================");
getEmployeeSubordinatesList = AppState().getemployeeSubordinatesList;
for (GetEmployeeSubordinatesList element in getEmployeeSubordinatesList) {
print(element.eMPLOYEEEMAILADDRESS);
if (element.eMPLOYEEEMAILADDRESS != null) {
if (element.eMPLOYEEEMAILADDRESS!.isNotEmpty) {
teamMembersList.add(
ChatUser(
id: int.parse(element.eMPLOYEENUMBER!),
@ -1310,11 +1313,15 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
),
);
}
}
}
} else {
getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates("", "", "");
AppState().setemployeeSubordinatesList = getEmployeeSubordinatesList;
for (GetEmployeeSubordinatesList element in getEmployeeSubordinatesList) {
print(element.eMPLOYEEEMAILADDRESS);
if (element.eMPLOYEEEMAILADDRESS != null) {
if (element.eMPLOYEEEMAILADDRESS!.isNotEmpty) {
teamMembersList.add(
ChatUser(
id: int.parse(element.eMPLOYEENUMBER!),
@ -1333,6 +1340,8 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
);
}
}
}
}
isLoading = false;
notifyListeners();
}

@ -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