Compare commits

...

11 Commits

Author SHA1 Message Date
Sultan khan 58465a819b Merge branch 'faiz_development_moe' into 'master'
Faiz development moe

See merge request Cloud_Solution/mohemm-flutter-moe!12
3 years ago
Faiz Hashmi 3215ae6757 Merge branch 'master' into faiz_development_moe
# Conflicts:
#	lib/generated/locale_keys.g.dart
3 years ago
Sultan khan cc2839c0ed Merge branch 'dev_mirza' into 'master'
Dev mirza

See merge request Cloud_Solution/mohemm-flutter-moe!10
3 years ago
mirza.shafique 46acc41995 Merge branch 'master' into dev_mirza
# Conflicts:
#	lib/generated/codegen_loader.g.dart
3 years ago
mirza.shafique 12bfd034c9 fixes 1.2 3 years ago
Sultan khan b073399ef4 MOE bug fixes 3 years ago
Faiz Hashmi dae1a3c6cb Few Changes 3 years ago
Faiz Hashmi c7a4f02434 Merge branch 'master' into faiz_development_moe 3 years ago
Faiz Hashmi 735d39aca0 RUNNING CHANGES 3 years ago
mirza.shafique 7bbcaaf89f click fixes 1.0 3 years ago
Sikander Saleem 472c62ca07 Merge branch 'moe-sikander' into 'master'
Moe sikander

See merge request Cloud_Solution/mohemm-flutter-moe!9
3 years ago

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@ -307,6 +307,7 @@
"actionBy": "الرد بواسطة",
"pending": "معلق",
"pendingTransactions": "المعاملات المعلقه",
"notices": "إشعارات",
"selectRequestType": "الرجاء اختيار نوع الطلب",
"dateFrom": "من تاريخ",
"dateTo": "الى تاريخ",
@ -525,5 +526,19 @@
"fakeLocation": ".لقد تتبعنا أنك تحاول استخدام موقع مزيف! يعتبر هذا مخالفة وقد تم إخطار الموارد البشرية",
"noWinner": "حزين! لم يفز أحد اليوم.",
"myTeam" : "فريقي",
"youCanPlayDemo": "لكن يمكنك لعب العرض"
"youCanPlayDemo": "لكن يمكنك لعب العرض",
"qualification": "مؤهلات",
"esteblishmentName": "اسم المؤسسة",
"gradeDescription": "وصف الصف",
"type": "يكتب",
"status": "حالة",
"leaveType": "نوع الإجازة",
"attendanceType": "نوع الحضور",
"help": "يساعد",
"dear": "عزيزي",
"assistant": "للحصول على المساعدة ، يمكنك تقديم الطلب على نظام سعيد أو الاتصال بمركز الاتصال الموحد على 8310200",
"employee_leaves_calender": "تقويم أوراق الموظفين",
"view_your_leave_information": "عرض معلومات إجازتك",
"view_details": "عرض التفاصيل",
"hierarchy": "تَسَلسُل"
}

@ -303,6 +303,7 @@
"topic": "Topic",
"actionBy": "Action By",
"pendingTransactions": "Pending Transactions",
"notices": "Notices",
"selectRequestType": "Please select request type",
"dateFrom": "Date From",
"dateTo": "Date To",
@ -425,7 +426,7 @@
"typeCurrentPasswordBelow": "Type Your Current password below",
"currentPassword": "Current password",
"concurrentReports": "Concurrent Reports",
"EnterNewAddressMoved" : "Enter a new address if you have moved",
"EnterNewAddressMoved": "Enter a new address if you have moved",
"CorrectAddress": "Correct or amend this address",
"SelectChangeWantToMake": "Select the type of change you want to make",
"profile": {
@ -470,7 +471,7 @@
"gameTime": "Game Time:",
"joinMarathon": "Join Marathon",
"joinDemoMarathon": "Join Demo Marathon",
"demo":"Demo",
"demo": "Demo",
"minutes": "Minutes",
"seconds": "Seconds",
"note": "Note:",
@ -518,12 +519,27 @@
"startingIn": "Starting in",
"youAreOutOfContest": "You are out of the contest.",
"winners": "WINNERS!!!",
"expireAfter":"Expires After",
"oneWeek":"1 Week",
"twoWeek":"2 Week",
"expireAfter": "Expires After",
"oneWeek": "1 Week",
"twoWeek": "2 Week",
"noUpcoming": "There is no upcoming",
"fakeLocation": "We traced out that you try to use a fake location! This is considered a violation, and HR has been notified.",
"noWinner": "Sad! No one won today.",
"myTeam" : "My Team",
"youCanPlayDemo": "But you can play demo"
"myTeam": "My Team",
"youCanPlayDemo": "But you can play demo",
"qualification": "Qualifications",
"esteblishmentName": "Establishment Name",
"gradeDescription": "Grade Description",
"type": "Type",
"status": "Status",
"leaveType": "Leave Type",
"attendanceType": "Attendance Type",
"help": "Help",
"dear": "Dear",
"assistant": "For assistance, you can submit the request on the Saeed system or call the unified call center on 8310200",
"employee_leaves_calender": "Employee Leaves Calender",
"view_your_leave_information": "View Your Leave Information",
"view_details": "View Details",
"hierarchy": "Hierarchy"
}

@ -90,7 +90,8 @@ class LoginApiClient {
AppState().postParamsObject?.pUserName = AppState().getUserName;
//TODO: employee id changed in SRCA instead of username
// AppState().postParamsObject?.pSelectedEmployeeNumber = AppState().getUserName;
AppState().postParamsObject?.pSelectedEmployeeNumber = responseData.memberInformationList!.first.aSSIGNMENTNUMBER;
//TODO: need to fix emp number
AppState().postParamsObject?.pSelectedEmployeeNumber = responseData.memberInformationList!.first.eMPLOYEENUMBER;
AppState().postParamsObject?.setPLegislationCode = responseData.basicMemberInformation!.pLEGISLATIONCODE;
AppState().postParamsObject?.setPayrollCodeStr = responseData.memberInformationList!.first.pAYROLLCODE;
AppState().setBusinessCardPrivilege = responseData.businessCardPrivilege ?? false;

@ -1,14 +1,13 @@
import 'dart:async';
import 'package:mohem_flutter_app/api/api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/consts.dart';
import 'package:mohem_flutter_app/models/employee_leaves_list.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/get_day_hours_type_details_list_model.dart';
import 'package:mohem_flutter_app/models/get_mobile_login_info_list_model.dart';
import 'package:mohem_flutter_app/models/get_schedule_shifts_details_list_model.dart';
import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart';
import 'package:mohem_flutter_app/api/api_client.dart';
class MonthlyAttendanceApiClient {
static final MonthlyAttendanceApiClient _instance = MonthlyAttendanceApiClient._internal();
@ -52,6 +51,24 @@ class MonthlyAttendanceApiClient {
}, url, postParams);
}
Future<List<EmployeeLeavesList>> getEmployeeLeaves(String startDate, String endDate) async {
// String url = "${ApiConsts.erpRest}GET_TIME_CARD_SUMMARY";
String url = "${ApiConsts.erpRest}GET_EMPLOYEE_LEAVES";
Map<String, dynamic> postParams = {
"P_MENU_TYPE": "E",
"P_SELECTED_RESP_ID": -999,
// "SearchMonth": month,
// "SearchYear": year,
"P_DATE_FROM_STR": startDate,
"P_DATE_TO_STR": endDate
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.getEmployeeLeavesList ?? [];
}, url, postParams);
}
Future<GetScheduleShiftsDetailsList?> getScheduleShiftsDetails(int pRTPID) async {
String url = "${ApiConsts.erpRest}GET_SCHEDULE_SHIFTS_DETAILS";
@ -66,5 +83,4 @@ class MonthlyAttendanceApiClient {
return (responseData.getScheduleShiftsDetailsList?.length ?? 0) > 0 ? responseData.getScheduleShiftsDetailsList!.first : null;
}, url, postParams);
}
}
}

@ -60,7 +60,7 @@ class MyRequestsApiClient {
}, url, postParams);
}
Future<SubmitCcpTransactionList?> getSubmitNewRequest(List<Map<String, dynamic>> list, {String? functionName}) async {
Future<GenericResponseModel> getSubmitNewRequest(List<Map<String, dynamic>> list, {String? functionName}) async {
String url = "${ApiConsts.erpRest}SUBMIT_CCP_TRANSACTION";
Map<String, dynamic> postParams = {
"P_MENU_TYPE": "E",
@ -72,7 +72,7 @@ class MyRequestsApiClient {
postParams["EITTransactionTBL"] = list;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.submitCcpTransactionList;
return responseData;
}, url, postParams);
}

@ -12,8 +12,10 @@ import 'package:mohem_flutter_app/models/get_employee_address_model.dart';
import 'package:mohem_flutter_app/models/get_employee_basic_details.model.dart';
import 'package:mohem_flutter_app/models/get_employee_contacts.model.dart';
import 'package:mohem_flutter_app/models/get_employee_phones_model.dart';
import 'package:mohem_flutter_app/models/hierarchy_lists.dart';
import 'package:mohem_flutter_app/models/performance.dart';
import 'package:mohem_flutter_app/models/profile/basic_details_dff_structure.dart';
import 'package:mohem_flutter_app/models/profile/employee_qualifications_list.dart';
import 'package:mohem_flutter_app/models/profile/get_contact_clos_structure_list.dart';
import 'package:mohem_flutter_app/models/profile/get_contact_details_list.dart';
import 'package:mohem_flutter_app/models/profile/get_countries_list_model.dart';
@ -58,6 +60,19 @@ class ProfileApiClient {
}, url, postParams);
}
Future<List<EmployeeQualificationsList>> getEmployeeQualifications() async {
String url = "${ApiConsts.erpRest}GET_EMPLOYEE_QUALIFICATIONS";
Map<String, dynamic> postParams = {
"P_MENU_TYPE": "E",
"P_SELECTED_RESP_ID": -999,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.getEmployeeQualificationsList ?? [];
}, url, postParams);
}
Future<List<GetEmployeePhonesList>> getEmployeePhones() async {
String url = "${ApiConsts.erpRest}GET_EMPLOYEE_PHONES";
Map<String, dynamic> postParams = {
@ -403,4 +418,19 @@ class ProfileApiClient {
return responseData.getPerformanceAppraisalList ?? [];
}, url, postParams);
}
Future<SupervisorHierarchyLists?> getHierarchy(String empNum) async {
String url = "${ApiConsts.erpRest}GET_SUPERVISOR_HIERARCHY";
Map<String, dynamic> postParams = {
"P_MENU_TYPE": "E",
"P_SELECTED_RESP_ID": -999
};
postParams.addAll(AppState().postParamsJson);
postParams["P_SELECTED_EMPLOYEE_NUMBER"] = empNum;
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.supervisorHierarchyLists;
}, url, postParams);
}
}

@ -149,12 +149,13 @@ class WorkListApiClient {
}, url, postParams);
}
Future<MemberInformationListModel> getUserInformation(int pSelectedResopID, String selectedEmployeeNumber) async {
Future<MemberInformationListModel> getUserInformation(int pSelectedResopID, String selectedEmployeeNumber, String noficationId) async {
String url = "${ApiConsts.erpRest}Get_Notification_UserInformation";
Map<String, dynamic> postParams = {
"P_SELECTED_RESP_ID": pSelectedResopID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
"P_NOTIFICATION_ID": noficationId,
};
postParams.addAll(AppState().postParamsJson);
if (selectedEmployeeNumber != null) postParams["P_SELECTED_EMPLOYEE_NUMBER"] = selectedEmployeeNumber;
@ -413,7 +414,7 @@ class WorkListApiClient {
"EmployeeNumber": employeeNumber,
"Comments": "",
"AdditionalFields": null,
"NewUserEMPId":newUserEMPId
"NewUserEMPId": newUserEMPId
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {

@ -6,8 +6,8 @@ class MyColors {
static const Color darkTextColor = Color(0xff2B353E);
static const Color normalTextColor = Color(0xff5A5A5A);
static const Color lightTextColor = Color(0xffBFBFBF);
static const Color gradiantStartColor = Color(0xff33c0a5);
static const Color gradiantEndColor = Color(0xff259db7);
static const Color gradiantStartColor = Color(0xff259db7);
static const Color gradiantEndColor = Color(0xff33c0a5);
static const Color textMixColor = Color(0xff2BB8A6);
static const Color backgroundColor = Color(0xffF8F8F8);
static const Color grey41Color = Color(0xff414141);
@ -30,7 +30,7 @@ class MyColors {
static const Color darkWhiteColor = Color(0xffE0E0E0);
static const Color redColor = Color(0xffD02127);
static const Color pinkColor = Color(0xffEBA9A9);
static const Color pinkDarkColor = Color(0xffe3797d);
static const Color pinkDarkColor = Color(0xffdb5b6a);
static const Color yellowColor = Color(0xffF4E31C);
static const Color orange = Color(0xFFCC9B14);
static const Color yellowFavColor = Color(0xffEAC321);
@ -41,6 +41,7 @@ class MyColors {
static const Color borderColor = Color(0xffE8E8E8);
static const Color borderE3Color = Color(0xffE3E3E3);
static const Color borderCEColor = Color(0xffCECECE);
//static const Color grey67Color = Color(0xff676767);
static const Color whiteColor = Color(0xFFEEEEEE);
static const Color greenColor = Color(0xff1FA269);
@ -55,7 +56,7 @@ class MyColors {
static const Color lightGreyColor = Color(0xffC7C7C7);
static const Color green69Color = Color(0xff1FA169);
static const Color redA3Color = Color(0xffCA3332);
static const Color green9CColor = Color(0xff259CB8);
static const Color green9CColor = Color(0xff259CB8);
static const Color green2DColor = Color(0xff32D892);
static const Color greyC4Color = Color(0xffC4C4C4);
static const Color grey35Color = Color(0xff535353);

@ -1,10 +1,151 @@
// import 'dart:io';
//
// import 'package:firebase_core/firebase_core.dart';
// import 'package:firebase_messaging/firebase_messaging.dart';
// import 'package:flutter/foundation.dart';
// import 'package:flutter_local_notifications/flutter_local_notifications.dart';
// import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
// import 'package:huawei_push/huawei_push.dart' as huawei_push;
// import 'package:mohem_flutter_app/app_state/app_state.dart';
// import 'package:mohem_flutter_app/classes/utils.dart';
// import 'package:permission_handler/permission_handler.dart';
//
// final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
//
// class AppNotifications {
// static final AppNotifications _instance = AppNotifications._internal();
//
// AppNotifications._internal();
//
// factory AppNotifications() => _instance;
//
// late HmsApiAvailability hmsApiAvailability;
//
// String _huaweiToken = '';
//
// Future<void> requestPermissions() async {
// if (Platform.isIOS) {
// await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(alert: true, badge: true, sound: true);
// } else if (Platform.isAndroid) {
// AndroidFlutterLocalNotificationsPlugin? androidImplementation = flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>();
// bool? granted = await androidImplementation?.requestPermission();
// if (granted == false) {
// if (kDebugMode) {
// print("-------------------- Permission Granted ------------------------");
// print(granted);
// }
// await Permission.notification.request();
// }
// }
// }
//
// void init(String? firebaseToken) async {
// hmsApiAvailability = HmsApiAvailability();
// await requestPermissions();
// AppState().setDeviceToken = firebaseToken;
// await Permission.notification.isDenied.then((bool value) {
// if (value) {
// Permission.notification.request();
// }
// });
// RemoteMessage? initialMessage = await FirebaseMessaging.instance.getInitialMessage();
//
// if (initialMessage != null) _handleMessage(initialMessage);
//
// FirebaseMessaging.onMessage.listen((RemoteMessage message) {
// if (message.notification != null) _handleMessage(message);
// });
//
// FirebaseMessaging.onMessageOpenedApp.listen(_handleOpenApp);
//
// FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
//
// FirebaseMessaging.instance.onTokenRefresh.listen((String token) {
// AppState().setDeviceToken = token;
// });
//
// if (Platform.isAndroid) {
// await hmsApiAvailability.isHMSAvailable().then((value) async {
// if (value == 0) {
// huawei_push.Push.enableLogger();
// var result = await huawei_push.Push.setAutoInitEnabled(true);
//
// huawei_push.Push.onNotificationOpenedApp.listen((message) {
// // newMessage(toFirebaseRemoteMessage(message));
// }, onError: (e) => print(e.toString()));
//
// huawei_push.Push.onMessageReceivedStream.listen((message) {
// // newMessage(toFirebaseRemoteMessage(message));
// }, onError: (e) => print(e.toString()));
// }
// }).catchError((err) {
// print(err);
// });
// }
// }
//
// void initHuaweiPush(Function loginCallback) {
// AppState().setIsHuawei = true;
// initTokenStream(loginCallback);
// huawei_push.Push.getToken("");
// }
//
// // HUAWEI PUSH TOKEN IMPLEMENTATION
// void _onTokenEvent(String event) {
// _huaweiToken = event;
// AppState().setHuaweiPushToken = _huaweiToken;
// debugPrint("HUAWEI PUSH TOKEN: $_huaweiToken");
// }
//
// void _onTokenError(Object error) {}
//
// Future<void> initTokenStream(Function loginCallback) async {
// huawei_push.Push.getTokenStream.listen(_onTokenEvent, onError: _onTokenError).onData((data) {
// AppState().setHuaweiPushToken = data;
// debugPrint("HUAWEI PUSH TOKEN: $data");
// loginCallback();
// });
// }
//
// void _handleMessage(RemoteMessage message) {
// Utils.saveStringFromPrefs("isAppOpendByChat", "false");
// }
//
// void _handleOpenApp(RemoteMessage message) {
// Utils.saveStringFromPrefs("isAppOpendByChat", "true");
// Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
// }
// }
//
// AndroidNotificationChannel channel = const AndroidNotificationChannel(
// "high_importance_channel",
// "High Importance Notifications",
// importance: Importance.high,
// );
//
// Future<dynamic> backgroundMessageHandler(RemoteMessage message) async {
// await Firebase.initializeApp();
// Utils.saveStringFromPrefs("isAppOpendByChat", "false");
// Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
// }
//************** NEW fILE *****************
import 'dart:io';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
// import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
import 'package:huawei_push/huawei_push.dart' as huawei_push;
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
@ -19,7 +160,7 @@ class AppNotifications {
factory AppNotifications() => _instance;
late HmsApiAvailability hmsApiAvailability;
// late HmsApiAvailability hmsApiAvailability;
String _huaweiToken = '';
@ -40,7 +181,10 @@ class AppNotifications {
}
void init(String? firebaseToken) async {
hmsApiAvailability = HmsApiAvailability();
// if (Platform.isAndroid) {
// hmsApiAvailability = HmsApiAvailability();
// }
await requestPermissions();
AppState().setDeviceToken = firebaseToken;
await Permission.notification.isDenied.then((bool value) {
@ -65,22 +209,22 @@ class AppNotifications {
});
if (Platform.isAndroid) {
await hmsApiAvailability.isHMSAvailable().then((value) async {
if (value == 0) {
huawei_push.Push.enableLogger();
var result = await huawei_push.Push.setAutoInitEnabled(true);
huawei_push.Push.onNotificationOpenedApp.listen((message) {
// newMessage(toFirebaseRemoteMessage(message));
}, onError: (e) => print(e.toString()));
huawei_push.Push.onMessageReceivedStream.listen((message) {
// newMessage(toFirebaseRemoteMessage(message));
}, onError: (e) => print(e.toString()));
}
}).catchError((err) {
print(err);
});
// await hmsApiAvailability.isHMSAvailable().then((value) async {
if (!(await Utils.isGoogleServicesAvailable())) {
huawei_push.Push.enableLogger();
var result = await huawei_push.Push.setAutoInitEnabled(true);
huawei_push.Push.onNotificationOpenedApp.listen((message) {
// newMessage(toFirebaseRemoteMessage(message));
}, onError: (e) => print(e.toString()));
huawei_push.Push.onMessageReceivedStream.listen((message) {
// newMessage(toFirebaseRemoteMessage(message));
}, onError: (e) => print(e.toString()));
}
// }).catchError((err) {
// print(err);
// });
}
}
@ -112,8 +256,10 @@ class AppNotifications {
}
void _handleOpenApp(RemoteMessage message) {
Utils.saveStringFromPrefs("isAppOpendByChat", "true");
Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
if (message.data.isNotEmpty && message.data["type"] == 'chat') {
Utils.saveStringFromPrefs("isAppOpendByChat", "true");
Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
}
}
}
@ -127,4 +273,7 @@ Future<dynamic> backgroundMessageHandler(RemoteMessage message) async {
await Firebase.initializeApp();
Utils.saveStringFromPrefs("isAppOpendByChat", "false");
Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
}
if (message.data.isNotEmpty && message.data["type"] == 'call') {
// ChatVoipCall().showCallkitIncoming(uuid: const Uuid().v4(), data: message);
}
}

@ -7,6 +7,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:google_api_availability/google_api_availability.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/config/routes.dart';
@ -398,4 +399,15 @@ class Utils {
print(err);
});
}
//HUAWEI DECISION MAKING
static Future<bool> isGoogleServicesAvailable() async {
GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability();
String status = availability.toString().split('.').last;
if (status == "success") {
return true;
}
return false;
}
}

@ -30,7 +30,7 @@ Map<String, dynamic> _env = {
"myProfile": false,
"itemsForSale": false,
"chat": false,
"monthlyAttendance": false,
"monthlyAttendance": true,
"vocationRules": false,
"canEdit": false,
};

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/ui/app_update_screen.dart';
import 'package:mohem_flutter_app/ui/attendance/add_vacation_rule_screen.dart';
import 'package:mohem_flutter_app/ui/attendance/moe_monthly_attendance_screen.dart';
import 'package:mohem_flutter_app/ui/attendance/monthly_attendance_screen.dart';
import 'package:mohem_flutter_app/ui/attendance/vacation_rule_screen.dart';
import 'package:mohem_flutter_app/ui/bottom_sheets/attendence_details_bottom_sheet.dart';
@ -45,6 +46,8 @@ import 'package:mohem_flutter_app/ui/profile/delete_family_member.dart';
import 'package:mohem_flutter_app/ui/profile/dynamic_screens/dynamic_input_address_screen.dart';
import 'package:mohem_flutter_app/ui/profile/dynamic_screens/dynamic_input_basic_details_screen.dart';
import 'package:mohem_flutter_app/ui/profile/family_members.dart';
import 'package:mohem_flutter_app/ui/profile/help_screen.dart';
import 'package:mohem_flutter_app/ui/profile/hierarchy_screen.dart';
import 'package:mohem_flutter_app/ui/profile/personal_info.dart';
import 'package:mohem_flutter_app/ui/profile/profile_screen.dart';
import 'package:mohem_flutter_app/ui/screens/announcements/announcement_details.dart';
@ -192,6 +195,8 @@ class AppRoutes {
static const String unsafeDeviceScreen = "/unsafeDeviceScreen";
static const String appUpdateScreen = "/appUpdateScreen";
static const String help = "/help";
static const String hierarchy = "/hierarchy";
static final Map<String, WidgetBuilder> routes = {
login: (BuildContext context) => LoginScreen(),
@ -226,7 +231,8 @@ class AppRoutes {
// addWorkFromHome: (BuildContext context) => AddWorkFromHomeScreen(),
profile: (BuildContext context) => ProfileScreen(),
//Attendance
monthlyAttendance: (BuildContext context) => MonthlyAttendanceScreen(),
// monthlyAttendance: (BuildContext context) => MonthlyAttendanceScreen(),
monthlyAttendance: (BuildContext context) => MoeMonthlyAttendanceScreen(),
vacationRule: (BuildContext context) => VacationRuleScreen(),
addVacationRule: (BuildContext context) => AddVacationRuleScreen(),
@ -303,5 +309,7 @@ class AppRoutes {
unsafeDeviceScreen: (BuildContext context) => const UnsafeDeviceScreen(),
appUpdateScreen: (BuildContext context) => const AppUpdateScreen(),
help: (BuildContext context) => HelpScreen(),
hierarchy: (BuildContext context) => HierarchyScreen(),
};
}

@ -114,6 +114,7 @@ extension EmailValidator on String {
Widget toText16({Color? color, bool isUnderLine = false, bool isBold = false, int? maxlines, double? height}) => Text(
this,
maxLines: maxlines,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: color ?? MyColors.darkTextColor,
fontSize: 16,

@ -541,7 +541,22 @@ class CodegenLoader extends AssetLoader{
"fakeLocation": ".لقد تتبعنا أنك تحاول استخدام موقع مزيف! يعتبر هذا مخالفة وقد تم إخطار الموارد البشرية",
"noWinner": "حزين! لم يفز أحد اليوم.",
"myTeam": "فريقي",
"youCanPlayDemo": "لكن يمكنك لعب العرض"
"youCanPlayDemo": "لكن يمكنك لعب العرض",
"qualification": "مؤهلات",
"esteblishmentName": "اسم المؤسسة",
"gradeDescription": "وصف الصف",
"type": "يكتب",
"status": "حالة",
"leaveType": "نوع الإجازة",
"attendanceType": "نوع الحضور",
"help": "يساعد",
"dear": "عزيزي",
"assistant": "للحصول على المساعدة ، يمكنك تقديم الطلب على نظام سعيد أو الاتصال بمركز الاتصال الموحد على 8310200",
"employee_leaves_calender": "تقويم أوراق الموظفين",
"view_your_leave_information": "عرض معلومات إجازتك",
"view_details": "عرض التفاصيل",
"create_absence_request": "إنشاء طلب الغياب",
"business_mission": "طلب مهمة العمل"
};
static const Map<String,dynamic> en_US = {
"mohemm": "Mohemm",
@ -1070,7 +1085,22 @@ static const Map<String,dynamic> en_US = {
"fakeLocation": "We traced out that you try to use a fake location! This is considered a violation, and HR has been notified.",
"noWinner": "Sad! No one won today.",
"myTeam": "My Team",
"youCanPlayDemo": "But you can play demo"
"youCanPlayDemo": "But you can play demo",
"qualification": "Qualifications",
"esteblishmentName": "Establishment Name",
"gradeDescription": "Grade Description",
"type": "Type",
"status": "Status",
"leaveType": "Leave Type",
"attendanceType": "Attendance Type",
"help": "Help",
"dear": "Dear",
"assistant": "For assistance, you can submit the request on the Saeed system or call the unified call center on 8310200",
"employee_leaves_calender": "Employee Leaves Calender",
"view_your_leave_information": "View Your Leave Information",
"view_details": "View Details",
"create_absence_request": "Create Absence Request",
"business_mission": "Business Mission Request"
};
static const Map<String, Map<String,dynamic>> mapLocales = {"ar_SA": ar_SA, "en_US": en_US};
}

@ -512,5 +512,22 @@ abstract class LocaleKeys {
static const noWinner = 'noWinner';
static const myTeam = 'myTeam';
static const youCanPlayDemo = 'youCanPlayDemo';
static const qualification = 'qualification';
static const esteblishmentName = 'esteblishmentName';
static const gradeDescription = 'gradeDescription';
static const type = 'type';
static const status = 'status';
static const leaveType = 'leaveType';
static const attendanceType = 'attendanceType';
static const help = 'help';
static const dear = 'dear';
static const assistant = 'assistant';
static const employee_leaves_calender = 'employee_leaves_calender';
static const view_your_leave_information = 'view_your_leave_information';
static const view_details = 'view_details';
static const notices = 'notices';
static const hierarchy = 'hierarchy';
static const create_absence_request = 'create_absence_request';
static const business_mission = 'business_mission';
}

@ -0,0 +1,45 @@
// To parse this JSON data, do
//
// final employeeLeavesList = employeeLeavesListFromJson(jsonString);
import 'dart:convert';
EmployeeLeavesList employeeLeavesListFromJson(String str) => EmployeeLeavesList.fromJson(json.decode(str));
String employeeLeavesListToJson(EmployeeLeavesList data) => json.encode(data.toJson());
class EmployeeLeavesList {
EmployeeLeavesList({
this.absenceAttendanceTypeName,
this.dateEnd,
this.dateStart,
this.eventDate,
this.holidayType,
this.leaveType,
});
String? absenceAttendanceTypeName;
String? dateEnd;
String? dateStart;
String? eventDate;
String? holidayType;
String? leaveType;
factory EmployeeLeavesList.fromJson(Map<String, dynamic> json) => EmployeeLeavesList(
absenceAttendanceTypeName: json["ABSENCE_ATTENDANCE_TYPE_NAME"],
dateEnd: json["DATE_END"],
dateStart: json["DATE_START"],
eventDate: json["EVENT_DATE"],
holidayType: json["HOLIDAY_TYPE"],
leaveType: json["LEAVE_TYPE"],
);
Map<String, dynamic> toJson() => {
"ABSENCE_ATTENDANCE_TYPE_NAME": absenceAttendanceTypeName,
"DATE_END": dateEnd,
"DATE_START": dateStart,
"EVENT_DATE": eventDate,
"HOLIDAY_TYPE": holidayType,
"LEAVE_TYPE": leaveType,
};
}

@ -8,6 +8,7 @@ import 'package:mohem_flutter_app/models/dashboard/get_open_notifications_list.d
import 'package:mohem_flutter_app/models/dashboard/list_menu.dart';
import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart';
import 'package:mohem_flutter_app/models/dashboard/mohemm_itg_pending_task_responseitem.dart';
import 'package:mohem_flutter_app/models/employee_leaves_list.dart';
import 'package:mohem_flutter_app/models/get_absence_collection_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_action_history_list_model.dart';
import 'package:mohem_flutter_app/models/get_approves_list_model.dart';
@ -35,6 +36,7 @@ import 'package:mohem_flutter_app/models/get_stamp_ms_notification_body_list_mod
import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart';
import 'package:mohem_flutter_app/models/get_user_item_type_list.dart';
import 'package:mohem_flutter_app/models/hierarchy_lists.dart';
import 'package:mohem_flutter_app/models/leave_balance/calculate_absence_duration_model.dart';
import 'package:mohem_flutter_app/models/leave_balance/cancel_hr_transaction_list_model.dart';
import 'package:mohem_flutter_app/models/leave_balance/get_absence_attendance_types_list_model.dart';
@ -73,6 +75,7 @@ import 'package:mohem_flutter_app/models/performance.dart';
import 'package:mohem_flutter_app/models/privilege_list_model.dart';
import 'package:mohem_flutter_app/models/profile/basic_details_cols_structions.dart';
import 'package:mohem_flutter_app/models/profile/basic_details_dff_structure.dart';
import 'package:mohem_flutter_app/models/profile/employee_qualifications_list.dart';
import 'package:mohem_flutter_app/models/profile/get_address_dff_structure_list.dart';
import 'package:mohem_flutter_app/models/profile/get_contact_clos_structure_list.dart';
import 'package:mohem_flutter_app/models/profile/get_contact_details_list.dart';
@ -196,6 +199,7 @@ class GenericResponseModel {
List<GetEmployeeBasicDetailsList>? getEmployeeBasicDetailsList;
List<GetEmployeeContactsList>? getEmployeeContactsList;
List<GetEmployeePhonesList>? getEmployeePhonesList;
List<EmployeeQualificationsList>? getEmployeeQualificationsList;
List<GetEmployeeSubordinatesList>? getEmployeeSubordinatesList;
List<String>? getFliexfieldStructureList;
List<String>? getHrCollectionNotificationBodyList;
@ -249,6 +253,7 @@ class GenericResponseModel {
List<GetTermDffStructureList>? getTermDffStructureList;
List<String>? getTermNotificationBodyList;
List<GetTimeCardSummaryList>? getTimeCardSummaryList;
List<EmployeeLeavesList>? getEmployeeLeavesList;
List<GetTicketsByEmployeeList>? getTicketsByEmployeeList;
List<GetTicketDetailsByEmployee>? getTicketDetailsByEmployee;
List<GetTicketTransactions>? getTicketTransactions;
@ -378,269 +383,274 @@ class GenericResponseModel {
String? ePharmacyGetItemOnHandList;
bool? isActiveCode;
bool? isSMSSent;
GenericResponseModel(
{this.date,
this.languageID,
this.serviceName,
this.time,
this.androidLink,
this.authenticationTokenID,
this.data,
this.dataw,
this.dietType,
this.dietTypeID,
this.errorCode,
this.errorEndUserMessage,
this.errorEndUserMessageN,
this.errorMessage,
this.errorType,
this.foodCategory,
this.iOSLink,
this.isAuthenticated,
this.mealOrderStatus,
this.mealType,
this.messageStatus,
this.numberOfResultRecords,
this.patientBlodType,
this.successMsg,
this.successMsgN,
this.vidaUpdatedResponse,
this.addAttSuccessList,
this.addAttachmentList,
this.bCDomain,
this.bCLogo,
this.basicMemberInformation,
this.businessCardPrivilege,
this.calculateAbsenceDuration,
this.cancelHRTransactionLIst,
this.chatEmployeeLoginList,
this.companyBadge,
this.companyImage,
this.companyImageDescription,
this.companyImageURL,
this.companyMainCompany,
this.countryList,
this.createVacationRuleList,
this.deleteAttachmentList,
this.deleteVacationRuleList,
this.disableSessionList,
this.employeeQR,
this.forgetPasswordTokenID,
this.getAbsenceAttachmentsList,
this.getAbsenceAttendanceTypesList,
this.getAbsenceCollectionNotificationBodyList,
this.getAbsenceDffStructureList,
this.getAbsenceTransactionList,
this.getAccrualBalancesList,
this.getActionHistoryList,
this.getAddressDffStructureList,
this.getAddressNotificationBodyList,
this.getApprovesList,
this.getAttachementList,
this.getAttendanceTrackingList,
this.getBasicDetColsStructureList,
this.getBasicDetDffStructureList,
this.getBasicDetNtfBodyList,
this.getCEICollectionNotificationBodyList,
this.getCEIDFFStructureList,
this.getCEITransactionList,
this.getCcpTransactionsList,
this.getCcpTransactionsListNew,
this.getConcurrentProgramsList,
this.getContactColsStructureList,
this.getContactDetailsList,
this.getContactDffStructureList,
this.getContactNotificationBodyList,
this.getCountriesList,
this.getDayHoursTypeDetailsList,
this.getDeductionsList,
this.getDefaultValueList,
this.getEITCollectionNotificationBodyList,
this.getEITDFFStructureList,
this.getEITTransactionList,
this.getEarningsList,
this.getEmployeeAddressList,
this.getEmployeeBasicDetailsList,
this.getEmployeeContactsList,
this.getEmployeePhonesList,
this.getEmployeeSubordinatesList,
this.getFliexfieldStructureList,
this.getHrCollectionNotificationBodyList,
this.getHrTransactionList,
this.getItemCreationNtfBodyList,
this.getItemTypeNotificationsList,
this.getItemTypesList,
this.getLookupValuesList,
this.getMenuEntriesList,
this.getMoItemHistoryList,
this.getMoNotificationBodyList,
this.getNotificationButtonsList,
this.getNotificationReassignModeList,
this.getObjectValuesList,
this.getOpenMissingSwipesList,
this.getOpenNotificationsList,
this.getOpenNotificationsNumList,
this.getOpenPeriodDatesList,
this.getOrganizationsSalariesList,
this.getPaymentInformationList,
this.getPayslipList,
this.getPerformanceAppraisalList,
this.getPhonesNotificationBodyList,
this.getPoItemHistoryList,
this.getPoNotificationBodyList,
this.getPrNotificationBodyList,
this.getQuotationAnalysisList,
this.getRFCEmployeeListList,
this.getRespondAttributeValueList,
this.getSITCollectionNotificationBodyList,
this.getSITDFFStructureList,
this.getSITTransactionList,
this.getScheduleShiftsDetailsList,
this.getShiftTypesList,
this.getStampMsNotificationBodyList,
this.getStampNsNotificationBodyList,
this.getSubordinatesAttdStatusList,
this.getSubordinatesLeavesList,
this.getSubordinatesLeavesTotalVacationsList,
this.getSummaryOfPaymentList,
this.getSwipesList,
this.getTermColsStructureList,
this.getTermDffStructureList,
this.getTermNotificationBodyList,
this.getTimeCardSummaryList,
this.getTicketsByEmployeeList,
this.getTicketDetailsByEmployee,
this.getTicketTransactions,
this.getTicketTypes,
this.getSectionTopics,
this.getMowadhafhiProjects,
this.getProjectDepartments,
this.getDepartmentSections,
this.getPendingTransactionsFunctions,
this.getPendingTransactionsDetails,
this.getConcurrentProgramsModel,
this.getCCPTransactionsModel,
this.getCCPOutputModel,
this.getCCPDFFStructureModel,
this.getUserItemTypesList,
this.getVacationRulesList,
this.getVaccinationOnHandList,
this.getVaccinationsList,
this.getValueSetValuesList,
this.getWorkList,
this.hRCertificateTemplate,
this.imgURLsList,
this.insertApInv,
this.insertBooked,
this.insertEmpSwipesList,
this.insertJournal,
this.insertOrders,
this.intPortalGetEmployeeList,
this.isDeviceTokenEmpty,
this.isPasswordExpired,
this.isRegisterAllowed,
this.isRequriedValueSetEmpty,
this.isUserSMSExcluded,
this.itemOnHand,
this.languageAvailable,
this.listSupplier,
this.listUserAgreement,
this.listEITStrucrure,
this.listItemImagesDetails,
this.listItemMaster,
this.listMedicineDetails,
this.listMenu,
this.listNewEmployees,
this.listRadScreen,
this.logInTokenID,
this.memberInformationList,
this.memberLoginList,
this.mohemmGetBusinessCardEnabledList,
this.mohemmGetFavoriteReplacementsList,
this.mohemmGetMobileDeviceInfobyEmpInfoList,
this.mohemmGetMobileLoginInfoList,
this.mohemmGetPatientIDList,
this.mohemmITGResponseItem,
this.mohemmIsChangeIsActiveBusinessCardEnable,
this.mohemmIsInsertBusinessCardEnable,
this.mohemmWifiPassword,
this.mohemmWifiSSID,
this.notificationAction,
this.notificationGetRespondAttributesList,
this.notificationRespondRolesList,
this.oracleOutPutNumber,
this.pASSWORDEXPIREDMSG,
this.pCOUNTRYCODE,
this.pCOUNTRYNAME,
this.pDESCFLEXCONTEXTCODE,
this.pDESCFLEXCONTEXTNAME,
this.pForm,
this.pINFORMATION,
this.pMBLID,
this.pNUMOFSUBORDINATES,
this.pOPENNTFNUMBER,
this.pQUESTION,
this.pSESSIONID,
this.pSchema,
this.pharmacyStockAddPharmacyStockList,
this.pharmacyStockGetOnHandList,
this.privilegeList,
this.processTransactions,
this.registerUserNameList,
this.replacementList,
this.respondAttributesList,
this.respondRolesList,
this.resubmitAbsenceTransactionList,
this.resubmitEITTransactionList,
this.resubmitHrTransactionList,
this.sFHGetPoNotificationBodyList,
this.sFHGetPrNotificationBodyList,
this.startAbsenceApprovalProccess,
this.startAddressApprovalProcessList,
this.startBasicDetApprProcessList,
this.startCeiApprovalProcess,
this.startContactApprovalProcessList,
this.startEitApprovalProcess,
this.startHrApprovalProcessList,
this.startPhonesApprovalProcessList,
this.startSitApprovalProcess,
this.startTermApprovalProcessList,
this.submitAddressTransactionList,
this.submitBasicDetTransactionList,
this.submitCEITransactionList,
this.submitCcpTransactionList,
this.submitContactTransactionList,
this.submitEITTransactionList,
this.submitHrTransactionList,
this.submitPhonesTransactionList,
this.submitSITTransactionList,
this.submitTermTransactionList,
this.subordinatesOnLeavesList,
this.sumbitAbsenceTransactionList,
this.tokenID,
this.updateAttachmentList,
this.updateEmployeeImageList,
this.updateItemTypeSuccessList,
this.updateUserItemTypesList,
this.updateVacationRuleList,
this.vHREmployeeLoginList,
this.vHRGetEmployeeDetailsList,
this.vHRGetManagersDetailsList,
this.vHRGetProjectByCodeList,
this.vHRIsVerificationCodeValid,
this.validateAbsenceTransactionList,
this.validateEITTransactionList,
this.validatePhonesTransactionList,
this.vrItemTypesList,
this.wFLookUpList,
this.eLearningGETEMPLOYEEPROFILEList,
this.eLearningLOGINList,
this.eLearningValidateLoginList,
this.eLearningValidate_LoginList,
this.ePharmacyGetItemOnHandList,
this.isActiveCode,
this.isSMSSent});
SupervisorHierarchyLists? supervisorHierarchyLists;
GenericResponseModel({
this.date,
this.languageID,
this.serviceName,
this.time,
this.androidLink,
this.authenticationTokenID,
this.data,
this.dataw,
this.dietType,
this.dietTypeID,
this.errorCode,
this.errorEndUserMessage,
this.errorEndUserMessageN,
this.errorMessage,
this.errorType,
this.foodCategory,
this.iOSLink,
this.isAuthenticated,
this.mealOrderStatus,
this.mealType,
this.messageStatus,
this.numberOfResultRecords,
this.patientBlodType,
this.successMsg,
this.successMsgN,
this.vidaUpdatedResponse,
this.addAttSuccessList,
this.addAttachmentList,
this.bCDomain,
this.bCLogo,
this.basicMemberInformation,
this.businessCardPrivilege,
this.calculateAbsenceDuration,
this.cancelHRTransactionLIst,
this.chatEmployeeLoginList,
this.companyBadge,
this.companyImage,
this.companyImageDescription,
this.companyImageURL,
this.companyMainCompany,
this.countryList,
this.createVacationRuleList,
this.deleteAttachmentList,
this.deleteVacationRuleList,
this.disableSessionList,
this.employeeQR,
this.forgetPasswordTokenID,
this.getAbsenceAttachmentsList,
this.getAbsenceAttendanceTypesList,
this.getAbsenceCollectionNotificationBodyList,
this.getAbsenceDffStructureList,
this.getAbsenceTransactionList,
this.getAccrualBalancesList,
this.getActionHistoryList,
this.getAddressDffStructureList,
this.getAddressNotificationBodyList,
this.getApprovesList,
this.getAttachementList,
this.getAttendanceTrackingList,
this.getBasicDetColsStructureList,
this.getBasicDetDffStructureList,
this.getBasicDetNtfBodyList,
this.getCEICollectionNotificationBodyList,
this.getCEIDFFStructureList,
this.getCEITransactionList,
this.getCcpTransactionsList,
this.getCcpTransactionsListNew,
this.getConcurrentProgramsList,
this.getContactColsStructureList,
this.getContactDetailsList,
this.getContactDffStructureList,
this.getContactNotificationBodyList,
this.getCountriesList,
this.getDayHoursTypeDetailsList,
this.getDeductionsList,
this.getDefaultValueList,
this.getEITCollectionNotificationBodyList,
this.getEITDFFStructureList,
this.getEITTransactionList,
this.getEarningsList,
this.getEmployeeAddressList,
this.getEmployeeBasicDetailsList,
this.getEmployeeContactsList,
this.getEmployeePhonesList,
this.getEmployeeQualificationsList,
this.getEmployeeSubordinatesList,
this.getFliexfieldStructureList,
this.getHrCollectionNotificationBodyList,
this.getHrTransactionList,
this.getItemCreationNtfBodyList,
this.getItemTypeNotificationsList,
this.getItemTypesList,
this.getLookupValuesList,
this.getMenuEntriesList,
this.getMoItemHistoryList,
this.getMoNotificationBodyList,
this.getNotificationButtonsList,
this.getNotificationReassignModeList,
this.getObjectValuesList,
this.getOpenMissingSwipesList,
this.getOpenNotificationsList,
this.getOpenNotificationsNumList,
this.getOpenPeriodDatesList,
this.getOrganizationsSalariesList,
this.getPaymentInformationList,
this.getPayslipList,
this.getPerformanceAppraisalList,
this.getPhonesNotificationBodyList,
this.getPoItemHistoryList,
this.getPoNotificationBodyList,
this.getPrNotificationBodyList,
this.getQuotationAnalysisList,
this.getRFCEmployeeListList,
this.getRespondAttributeValueList,
this.getSITCollectionNotificationBodyList,
this.getSITDFFStructureList,
this.getSITTransactionList,
this.getScheduleShiftsDetailsList,
this.getShiftTypesList,
this.getStampMsNotificationBodyList,
this.getStampNsNotificationBodyList,
this.getSubordinatesAttdStatusList,
this.getSubordinatesLeavesList,
this.getSubordinatesLeavesTotalVacationsList,
this.getSummaryOfPaymentList,
this.getSwipesList,
this.getTermColsStructureList,
this.getTermDffStructureList,
this.getTermNotificationBodyList,
this.getTimeCardSummaryList,
this.getEmployeeLeavesList,
this.getTicketsByEmployeeList,
this.getTicketDetailsByEmployee,
this.getTicketTransactions,
this.getTicketTypes,
this.getSectionTopics,
this.getMowadhafhiProjects,
this.getProjectDepartments,
this.getDepartmentSections,
this.getPendingTransactionsFunctions,
this.getPendingTransactionsDetails,
this.getConcurrentProgramsModel,
this.getCCPTransactionsModel,
this.getCCPOutputModel,
this.getCCPDFFStructureModel,
this.getUserItemTypesList,
this.getVacationRulesList,
this.getVaccinationOnHandList,
this.getVaccinationsList,
this.getValueSetValuesList,
this.getWorkList,
this.hRCertificateTemplate,
this.imgURLsList,
this.insertApInv,
this.insertBooked,
this.insertEmpSwipesList,
this.insertJournal,
this.insertOrders,
this.intPortalGetEmployeeList,
this.isDeviceTokenEmpty,
this.isPasswordExpired,
this.isRegisterAllowed,
this.isRequriedValueSetEmpty,
this.isUserSMSExcluded,
this.itemOnHand,
this.languageAvailable,
this.listSupplier,
this.listUserAgreement,
this.listEITStrucrure,
this.listItemImagesDetails,
this.listItemMaster,
this.listMedicineDetails,
this.listMenu,
this.listNewEmployees,
this.listRadScreen,
this.logInTokenID,
this.memberInformationList,
this.memberLoginList,
this.mohemmGetBusinessCardEnabledList,
this.mohemmGetFavoriteReplacementsList,
this.mohemmGetMobileDeviceInfobyEmpInfoList,
this.mohemmGetMobileLoginInfoList,
this.mohemmGetPatientIDList,
this.mohemmITGResponseItem,
this.mohemmIsChangeIsActiveBusinessCardEnable,
this.mohemmIsInsertBusinessCardEnable,
this.mohemmWifiPassword,
this.mohemmWifiSSID,
this.notificationAction,
this.notificationGetRespondAttributesList,
this.notificationRespondRolesList,
this.oracleOutPutNumber,
this.pASSWORDEXPIREDMSG,
this.pCOUNTRYCODE,
this.pCOUNTRYNAME,
this.pDESCFLEXCONTEXTCODE,
this.pDESCFLEXCONTEXTNAME,
this.pForm,
this.pINFORMATION,
this.pMBLID,
this.pNUMOFSUBORDINATES,
this.pOPENNTFNUMBER,
this.pQUESTION,
this.pSESSIONID,
this.pSchema,
this.pharmacyStockAddPharmacyStockList,
this.pharmacyStockGetOnHandList,
this.privilegeList,
this.processTransactions,
this.registerUserNameList,
this.replacementList,
this.respondAttributesList,
this.respondRolesList,
this.resubmitAbsenceTransactionList,
this.resubmitEITTransactionList,
this.resubmitHrTransactionList,
this.sFHGetPoNotificationBodyList,
this.sFHGetPrNotificationBodyList,
this.startAbsenceApprovalProccess,
this.startAddressApprovalProcessList,
this.startBasicDetApprProcessList,
this.startCeiApprovalProcess,
this.startContactApprovalProcessList,
this.startEitApprovalProcess,
this.startHrApprovalProcessList,
this.startPhonesApprovalProcessList,
this.startSitApprovalProcess,
this.startTermApprovalProcessList,
this.submitAddressTransactionList,
this.submitBasicDetTransactionList,
this.submitCEITransactionList,
this.submitCcpTransactionList,
this.submitContactTransactionList,
this.submitEITTransactionList,
this.submitHrTransactionList,
this.submitPhonesTransactionList,
this.submitSITTransactionList,
this.submitTermTransactionList,
this.subordinatesOnLeavesList,
this.sumbitAbsenceTransactionList,
this.tokenID,
this.updateAttachmentList,
this.updateEmployeeImageList,
this.updateItemTypeSuccessList,
this.updateUserItemTypesList,
this.updateVacationRuleList,
this.vHREmployeeLoginList,
this.vHRGetEmployeeDetailsList,
this.vHRGetManagersDetailsList,
this.vHRGetProjectByCodeList,
this.vHRIsVerificationCodeValid,
this.validateAbsenceTransactionList,
this.validateEITTransactionList,
this.validatePhonesTransactionList,
this.vrItemTypesList,
this.wFLookUpList,
this.eLearningGETEMPLOYEEPROFILEList,
this.eLearningLOGINList,
this.eLearningValidateLoginList,
this.eLearningValidate_LoginList,
this.ePharmacyGetItemOnHandList,
this.isActiveCode,
this.isSMSSent,
this.supervisorHierarchyLists,
});
GenericResponseModel.fromJson(Map<String, dynamic> json) {
date = json['Date'];
@ -889,6 +899,12 @@ class GenericResponseModel {
getEmployeePhonesList!.add(GetEmployeePhonesList.fromJson(v));
});
}
if (json['EmployeeQualificationsList'] != null) {
getEmployeeQualificationsList = <EmployeeQualificationsList>[];
json['EmployeeQualificationsList'].forEach((v) {
getEmployeeQualificationsList!.add(EmployeeQualificationsList.fromJson(v));
});
}
if (json['GetEmployeeSubordinatesList'] != null) {
getEmployeeSubordinatesList = <GetEmployeeSubordinatesList>[];
json['GetEmployeeSubordinatesList'].forEach((v) {
@ -1063,6 +1079,12 @@ class GenericResponseModel {
getTimeCardSummaryList!.add(GetTimeCardSummaryList.fromJson(v));
});
}
if (json['EmployeeLeavesList'] != null) {
getEmployeeLeavesList = <EmployeeLeavesList>[];
json['EmployeeLeavesList'].forEach((v) {
getEmployeeLeavesList!.add(EmployeeLeavesList.fromJson(v));
});
}
if (json['Mohemm_ITG_TicketsByEmployeeList'] != null) {
getTicketsByEmployeeList = <GetTicketsByEmployeeList>[];
@ -1291,7 +1313,7 @@ class GenericResponseModel {
if (json['RespondRolesList'] != null) {
respondRolesList = <String>[];
json['RespondRolesList'].forEach((v) {
// respondRolesList!.add(v);
// respondRolesList!.add(v);
});
}
resubmitAbsenceTransactionList = json['ResubmitAbsenceTransactionList'];
@ -1317,10 +1339,7 @@ class GenericResponseModel {
submitAddressTransactionList = json['SubmitAddressTransactionList'] != null ? SubmitAddressTransaction.fromJson(json['SubmitAddressTransactionList']) : null;
submitBasicDetTransactionList = json['SubmitBasicDetTransactionList'] != null ? SubmitBasicDetailsTransactionList.fromJson(json['SubmitBasicDetTransactionList']) : null;
submitCEITransactionList = json['SubmitCEITransactionList'];
submitCcpTransactionList = json['SubmitCcpTransactionList'] != null
? new SubmitCcpTransactionList.fromJson(
json['SubmitCcpTransactionList'])
: null;
submitCcpTransactionList = json['SubmitCcpTransactionList'] != null ? new SubmitCcpTransactionList.fromJson(json['SubmitCcpTransactionList']) : null;
submitContactTransactionList = json['SubmitContactTransactionList'] != null ? SubmitContactTransactionList.fromJson(json['SubmitContactTransactionList']) : null;
submitEITTransactionList = json['SubmitEITTransactionList'] != null ? SubmitEITTransactionList.fromJson(json['SubmitEITTransactionList']) : null;
@ -1380,6 +1399,8 @@ class GenericResponseModel {
ePharmacyGetItemOnHandList = json['ePharmacy_GetItemOnHandList'];
isActiveCode = json['isActiveCode'];
isSMSSent = json['isSMSSent'];
supervisorHierarchyLists= json["SupervisorHierarchyLists"] == null ? null : SupervisorHierarchyLists.fromJson(json["SupervisorHierarchyLists"]);
}
Map<String, dynamic> toJson() {
@ -1541,6 +1562,9 @@ class GenericResponseModel {
if (this.getEmployeePhonesList != null) {
data['GetEmployeePhonesList'] = this.getEmployeePhonesList!.map((v) => v.toJson()).toList();
}
if (this.getEmployeeQualificationsList != null) {
data['EmployeeQualificationsList'] = this.getEmployeeQualificationsList!.map((v) => v.toJson()).toList();
}
if (this.getEmployeeSubordinatesList != null) {
data['GetEmployeeSubordinatesList'] = this.getEmployeeSubordinatesList!.map((v) => v.toJson()).toList();
}
@ -1651,6 +1675,10 @@ class GenericResponseModel {
if (this.getTimeCardSummaryList != null) {
data['GetTimeCardSummaryList'] = this.getTimeCardSummaryList!.map((v) => v.toJson()).toList();
}
if (this.getEmployeeLeavesList != null) {
data['EmployeeLeavesList'] = this.getEmployeeLeavesList!.map((v) => v.toJson()).toList();
}
data['GetUserItemTypesList'] = this.getUserItemTypesList;
if (this.getVacationRulesList != null) {
data['GetVacationRulesList'] = this.getVacationRulesList!.map((v) => v.toJson()).toList();
@ -1776,8 +1804,7 @@ class GenericResponseModel {
data['SubmitCEITransactionList'] = this.submitCEITransactionList;
if (this.submitCcpTransactionList != null) {
data['SubmitCcpTransactionList'] =
this.submitCcpTransactionList!.toJson();
data['SubmitCcpTransactionList'] = this.submitCcpTransactionList!.toJson();
}
data['SubmitContactTransactionList'] = this.submitContactTransactionList;
@ -1839,6 +1866,7 @@ class GenericResponseModel {
data['ePharmacy_GetItemOnHandList'] = this.ePharmacyGetItemOnHandList;
data['isActiveCode'] = this.isActiveCode;
data['isSMSSent'] = this.isSMSSent;
data["SupervisorHierarchyLists"]= supervisorHierarchyLists?.toJson();
return data;
}
}

@ -0,0 +1,71 @@
class SupervisorHierarchyLists {
SupervisorHierarchyLists({
this.subordinateHierarchyList,
this.supervisorHierarchyList,
});
List<HierarchyList>? subordinateHierarchyList;
List<HierarchyList>? supervisorHierarchyList;
factory SupervisorHierarchyLists.fromJson(Map<String, dynamic> json) => SupervisorHierarchyLists(
subordinateHierarchyList: json["SubordinateHierarchyList"] == null ? [] : List<HierarchyList>.from(json["SubordinateHierarchyList"]!.map((x) => HierarchyList.fromJson(x))),
supervisorHierarchyList: json["SupervisorHierarchyList"] == null ? [] : List<HierarchyList>.from(json["SupervisorHierarchyList"]!.map((x) => HierarchyList.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"SubordinateHierarchyList": subordinateHierarchyList == null ? [] : List<dynamic>.from(subordinateHierarchyList!.map((x) => x.toJson())),
"SupervisorHierarchyList": supervisorHierarchyList == null ? [] : List<dynamic>.from(supervisorHierarchyList!.map((x) => x.toJson())),
};
}
class HierarchyList {
HierarchyList({
this.employeeEmailAddress,
this.employeeImage,
this.employeeMobileNumber,
this.employeeName,
this.employeeNumber,
this.employeeWorkNumber,
this.lvl,
this.numOfSubordinates,
this.organizationName,
this.positionName,
});
String? employeeEmailAddress;
dynamic employeeImage;
String? employeeMobileNumber;
String? employeeName;
String? employeeNumber;
String? employeeWorkNumber;
int? lvl;
int? numOfSubordinates;
String? organizationName;
String? positionName;
factory HierarchyList.fromJson(Map<String, dynamic> json) => HierarchyList(
employeeEmailAddress: json["EMPLOYEE_EMAIL_ADDRESS"],
employeeImage: json["EMPLOYEE_IMAGE"],
employeeMobileNumber: json["EMPLOYEE_MOBILE_NUMBER"],
employeeName: json["EMPLOYEE_NAME"],
employeeNumber: json["EMPLOYEE_NUMBER"],
employeeWorkNumber: json["EMPLOYEE_WORK_NUMBER"],
lvl: json["LVL"],
numOfSubordinates: json["NUM_OF_SUBORDINATES"],
organizationName: json["ORGANIZATION_NAME"],
positionName: json["POSITION_NAME"],
);
Map<String, dynamic> toJson() => {
"EMPLOYEE_EMAIL_ADDRESS": employeeEmailAddress,
"EMPLOYEE_IMAGE": employeeImage,
"EMPLOYEE_MOBILE_NUMBER": employeeMobileNumber,
"EMPLOYEE_NAME": employeeName,
"EMPLOYEE_NUMBER": employeeNumber,
"EMPLOYEE_WORK_NUMBER": employeeWorkNumber,
"LVL": lvl,
"NUM_OF_SUBORDINATES": numOfSubordinates,
"ORGANIZATION_NAME": organizationName,
"POSITION_NAME": positionName,
};
}

@ -0,0 +1,41 @@
// To parse this JSON data, do
//
// final employeeQualificationsList = employeeQualificationsListFromJson(jsonString);
import 'dart:convert';
EmployeeQualificationsList employeeQualificationsListFromJson(String str) => EmployeeQualificationsList.fromJson(json.decode(str));
String employeeQualificationsListToJson(EmployeeQualificationsList data) => json.encode(data.toJson());
class EmployeeQualificationsList {
EmployeeQualificationsList({
this.establishment,
this.grade,
this.gradeDescription,
this.qualificationType,
this.status,
});
String? establishment;
String? grade;
String? gradeDescription;
String? qualificationType;
String? status;
factory EmployeeQualificationsList.fromJson(Map<String, dynamic> json) => EmployeeQualificationsList(
establishment: json["ESTABLISHMENT"],
grade: json["GRADE"],
gradeDescription: json["GRADE_DESCRIPTION"],
qualificationType: json["QUALIFICATION_TYPE"],
status: json["STATUS"],
);
Map<String, dynamic> toJson() => {
"ESTABLISHMENT": establishment,
"GRADE": grade,
"GRADE_DESCRIPTION": gradeDescription,
"QUALIFICATION_TYPE": qualificationType,
"STATUS": status,
};
}

@ -49,8 +49,10 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
List<GetAccrualBalancesList>? accrualList;
GetAccrualBalancesList? leaveBalanceAccrual;
GetAccrualBalancesList? oldLeaveBalanceAccrual;
double get leaveBalance => leaveBalanceAccrual?.accrualNetEntitlement ?? 0;
double? get leaveBalance => ((leaveBalanceAccrual?.accrualNetEntitlement! ?? 0) + (oldLeaveBalanceAccrual?.accrualNetEntitlement! ??0));
GetAccrualBalancesList? businessTripAccrual;
@ -107,6 +109,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
isLeaveTicketBalanceLoading = true;
accrualList = null;
leaveBalanceAccrual = null;
oldLeaveBalanceAccrual = null;
businessTripAccrual = null;
ticketBalance = 0;
@ -117,10 +120,10 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
getOffersList = [];
drawerMenuItemList = [
DrawerMenuItem("assets/images/drawer/my_profile.svg", LocaleKeys.myProfile.tr(), AppRoutes.profile),
DrawerMenuItem("assets/images/drawer/profile_icon.png", LocaleKeys.myProfile.tr(), AppRoutes.profile),
// DrawerMenuItem("assets/images/drawer/performance_evaluation.svg", LocaleKeys.performanceEvaluation.tr(), AppRoutes.performanceEvaluation),
// DrawerMenuItem("assets/images/drawer/mowadhafi.svg", LocaleKeys.mowadhafhi.tr(), AppRoutes.mowadhafhi),
// DrawerMenuItem("assets/images/drawer/pending_trasactions.svg", LocaleKeys.pendingTransactions.tr(), AppRoutes.pendingTransactions),
DrawerMenuItem("assets/images/drawer/notices.png", LocaleKeys.notices.tr(), AppRoutes.pendingTransactions),
// // DrawerMenuItem("assets/images/drawer/drawer_marathon.svg", LocaleKeys.brainMarathon.tr(), AppRoutes.marathonIntroScreen),
// DrawerMenuItem("assets/images/drawer/change_password.svg", LocaleKeys.changePassword.tr(), AppRoutes.changePassword),
//
@ -209,6 +212,8 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
accrualList = await DashboardApiClient().getAccrualBalances(DateFormat("MM/dd/yyyy", "en_US").format(date));
isLeaveTicketBalanceLoading = false;
leaveBalanceAccrual = accrualList!.singleWhere((element) => element.accuralPlanName == 'Annual Vacation Accrual' || element.accuralPlanName == "خطة استحقاق الاجازة الاعتيادية", orElse: null);
oldLeaveBalanceAccrual = accrualList!.singleWhere((element) => element.accuralPlanName == 'Old Leave Balance' || element.accuralPlanName == "خطة فصل الارصدة 1439", orElse: null);
businessTripAccrual = accrualList!.singleWhere((element) => element.accuralPlanName == 'Business Trip Accrual' || element.accuralPlanName == "خطة استحقاق الإنتدابات", orElse: null);
ticketBalance = (accrualList![1].accrualNetEntitlement ?? 0.0) + (accrualList![2].accrualNetEntitlement ?? 0.0) + (accrualList![3].accrualNetEntitlement ?? 0.0);
notifyListeners();
@ -232,7 +237,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
myRequest = menu;
} else if (menu.menuType == "M") {
AppState().setempStatusIsManager = true;
drawerMenuItemList.add(DrawerMenuItem("assets/images/drawer/my_team.svg", LocaleKeys.myTeamMembers.tr(), AppRoutes.myTeam));
drawerMenuItemList.add(DrawerMenuItem("assets/images/drawer/my_team_icon.png", LocaleKeys.myTeamMembers.tr(), AppRoutes.myTeam));
}
}
isMyRequestLoading = false;

@ -0,0 +1,358 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:intl/intl.dart';
import 'package:mohem_flutter_app/api/monthly_attendance_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/date_uitl.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/employee_leaves_list.dart';
import 'package:mohem_flutter_app/models/get_day_hours_type_details_list_model.dart';
import 'package:mohem_flutter_app/models/get_schedule_shifts_details_list_model.dart';
import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart';
import 'package:month_picker_dialog_2/month_picker_dialog_2.dart';
import 'package:pie_chart/pie_chart.dart';
import 'package:sizer/sizer.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart';
enum LeaveType { ABSENCE, BUSINESS_TRIP, HOLIDAY, NORMAL }
class MoeMonthlyAttendanceScreen extends StatefulWidget {
@override
State<MoeMonthlyAttendanceScreen> createState() => _MoeMonthlyAttendanceScreenState();
}
class _MoeMonthlyAttendanceScreenState extends State<MoeMonthlyAttendanceScreen> {
DateTime currentDate = DateTime.now();
int searchYear = DateTime.now().year;
final CalendarController _calendarController = CalendarController();
List<EmployeeLeavesList> employeeLeavesList = [];
@override
void initState() {
super.initState();
getLeavesData(currentDate);
// callTimeCardAndHourDetails(date.day, searchMonth, searchYear);
}
void getLeavesData(DateTime date) async {
try {
Utils.showLoading(context);
String startDate = '${date.year}-${date.month}-${date.day}';
int lastday = DateTime(date.year, date.month + 1, 0).day;
String endDate = '${date.year}-${date.month}-$lastday';
employeeLeavesList = await MonthlyAttendanceApiClient().getEmployeeLeaves(startDate, endDate);
Utils.hideLoading(context);
_calendarController.displayDate = date;
setState(() {});
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBarWidget(
context,
// title: LocaleKeys.mowadhafhiRequest.tr(),
title: "",
// showHomeButton: true,
),
body: ListView(
scrollDirection: Axis.vertical,
children: [
Column(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.attendance.tr().toText24(isBold: true, color: MyColors.grey3AColor),
Row(
children: [
"${DateFormat("MMMM-yyyy").format(currentDate)}".toText16(color: MyColors.greyACColor),
const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.greyACColor),
],
).onPress(() async {
showMonthPicker(
context: context,
//locale: EasyLocalization.of(context)?.locale,
initialDate: currentDate,
firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(),
confirmText: Text(LocaleKeys.confirm.tr()),
cancelText: Text(LocaleKeys.cancel.tr()),
).then((selectedDate) {
if (selectedDate != null) {
getLeavesData(selectedDate);
setState(() {
currentDate = selectedDate;
});
}
});
}),
18.height,
AspectRatio(aspectRatio: 304 / 244, child: calendarWidget()),
12.height,
SizedBox(
width: double.infinity,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
showColorItem("Absence", MyColors.pinkDarkColor),
showColorItem("Business Trip", MyColors.gradiantStartColor),
showColorItem("Holiday", MyColors.gradiantEndColor),
],
),
),
],
).paddingOnly(left: 21, right: 21, top: 21),
],
),
],
),
);
}
Widget showColorItem(String title, Color color) {
return Row(
children: [
Container(
width: 20,
height: 20,
color: color,
).circle(2000),
8.width,
title.toText12()
],
);
}
Widget calendarWidget() {
return SfCalendar(
view: CalendarView.month,
showDatePickerButton: false,
controller: _calendarController,
backgroundColor: Colors.white,
headerHeight: 0,
viewNavigationMode: ViewNavigationMode.none,
todayHighlightColor: MyColors.grey3AColor,
showNavigationArrow: false,
showCurrentTimeIndicator: false,
showWeekNumber: false,
cellBorderColor: Colors.white,
onTap: (v) {
dynamic index = v.date?.day;
if (index != null) {
index = index - 1;
}
EmployeeLeavesList leaves = employeeLeavesList[index];
if (leaves.leaveType != LeaveType.NORMAL.name) {
showModalBottomSheet(
context: context,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(25.0),
topRight: Radius.circular(25.0),
)),
isScrollControlled: true,
backgroundColor: MyColors.white,
builder: (_) {
return DraggableScrollableSheet(
maxChildSize: 0.75,
expand: false,
initialChildSize: 0.75,
builder: (_, controller) {
return Column(
children: [
Container(
width: 49,
height: 7,
margin: const EdgeInsets.symmetric(vertical: 10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
color: MyColors.darkGreyColor,
),
),
16.height,
Container(
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 40),
margin: const EdgeInsets.only(left: 20, right: 20),
decoration: BoxDecoration(
border: Border.all(
color: Colors.black,
),
borderRadius: BorderRadius.circular(12)),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
DateUtil.getWeekDay(DateUtil.convertStringToDateTime(leaves.eventDate ?? "").weekday).toString().toText14(),
DateUtil.convertStringToDateTime(leaves.eventDate ?? "").day.toString().toText20(),
DateUtil.getMonth(DateUtil.convertStringToDateTime(leaves.eventDate ?? "").month).toString().toText14(),
DateUtil.convertStringToDateTime(leaves.eventDate ?? "").year.toString().toText14(),
],
),
),
6.height,
showText(LocaleKeys.leaveType.tr(), leaves.leaveType.toString()),
// if (leaves.absenceAttendanceTypeName.toString().isNotEmpty)
// const Divider(
// color: MyColors.borderCEColor,
// ),
// if (leaves.absenceAttendanceTypeName.toString().isNotEmpty) showText(LocaleKeys.attendanceType.tr(), leaves.absenceAttendanceTypeName.toString()),
const Divider(
color: MyColors.borderCEColor,
),
showText(LocaleKeys.startDateT.tr(), leaves.dateStart.toString()),
const Divider(
color: MyColors.borderCEColor,
),
showText(LocaleKeys.endDate.tr(), leaves.dateEnd.toString()),
],
);
},
);
},
);
}
},
selectionDecoration: BoxDecoration(
border: Border.all(color: MyColors.white, width: 1),
shape: BoxShape.circle,
),
dataSource: MeetingDataSource(_getDataSource()),
// onTap: calendarTapped,
monthViewSettings: const MonthViewSettings(
dayFormat: 'EEE',
showTrailingAndLeadingDates: false,
showAgenda: false,
),
viewHeaderStyle: const ViewHeaderStyle(
dayTextStyle: TextStyle(color: MyColors.grey3AColor, fontSize: 13, fontWeight: FontWeight.w600),
),
monthCellBuilder: (build, details) {
LeaveType leaveType = LeaveType.NORMAL;
for (int i = 0; i < employeeLeavesList.length; i++) {
if (details.date.day == DateUtil.convertSimpleStringDateToDateddMMyyyy(employeeLeavesList[i].eventDate ?? "").day) {
if (employeeLeavesList[i].leaveType == LeaveType.ABSENCE.name) {
leaveType = LeaveType.ABSENCE;
} else if (employeeLeavesList[i].leaveType == LeaveType.BUSINESS_TRIP.name) {
leaveType = LeaveType.BUSINESS_TRIP;
} else if (employeeLeavesList[i].leaveType == LeaveType.HOLIDAY.name) {
leaveType = LeaveType.HOLIDAY;
}
}
}
return Container(
margin: const EdgeInsets.all(4),
decoration: BoxDecoration(
color: leaveType == LeaveType.ABSENCE
? MyColors.pinkDarkColor
: leaveType == LeaveType.BUSINESS_TRIP
? MyColors.gradiantStartColor
: leaveType == LeaveType.HOLIDAY
? MyColors.gradiantEndColor
: MyColors.white,
shape: BoxShape.circle,
border: Border.all(
color: leaveType == LeaveType.ABSENCE
? MyColors.pinkDarkColor
: leaveType == LeaveType.BUSINESS_TRIP
? MyColors.gradiantStartColor
: leaveType == LeaveType.HOLIDAY
? MyColors.gradiantEndColor
: MyColors.black,
width: 2,
),
),
alignment: Alignment.center,
child: Text(
"${details.date.day}",
style: TextStyle(fontSize: 13, fontWeight: FontWeight.w500, color: leaveType == LeaveType.NORMAL ? MyColors.black : MyColors.white),
),
);
},
);
}
List<Meeting> _getDataSource() {
List<Meeting> meetings = <Meeting>[];
return meetings;
}
Widget showText(String title, String value) {
return Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
value.toText18(color: MyColors.gradiantEndColor, isBold: true),
title.toText14(color: MyColors.greyACColor, isBold: false),
],
),
);
}
}
class MeetingDataSource extends CalendarDataSource {
MeetingDataSource(List<Meeting> source) {
appointments = source;
}
@override
DateTime getStartTime(int index) {
return _getMeetingData(index).from;
}
@override
DateTime getEndTime(int index) {
return _getMeetingData(index).to;
}
@override
String getSubject(int index) {
return _getMeetingData(index).eventName;
}
@override
Color getColor(int index) {
return _getMeetingData(index).background;
}
@override
bool isAllDay(int index) {
return _getMeetingData(index).isAllDay;
}
Meeting _getMeetingData(int index) {
dynamic meeting = appointments;
Meeting meetingData;
if (meeting is Meeting) {
meetingData = meeting;
}
return meeting;
}
}
class Meeting {
Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay);
String eventName;
DateTime from;
DateTime to;
Color background;
bool isAllDay;
}

@ -17,7 +17,6 @@ import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/main.dart';
import 'package:mohem_flutter_app/models/offers_and_discounts/get_offers_list.dart';
import 'package:mohem_flutter_app/provider/chat_provider_model.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
@ -210,10 +209,11 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
body: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Builder(builder: (BuildContext context) {
return Row(
mainAxisSize: MainAxisSize.min,
// mainAxisSize: MainAxisSize.min,
children: [
Image.memory(
Utils.dataFromBase64String(
@ -230,11 +230,6 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
height: 34,
fit: BoxFit.cover,
).circle(50),
// CircularAvatar(
// width: 34,
// height: 34,
// url: "https://cdn4.iconfinder.com/data/icons/professions-2-2/151/89-512.png",
// ),
8.width,
SvgPicture.asset("assets/images/side_nav.svg"),
],
@ -242,7 +237,8 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
_scaffoldState.currentState!.openDrawer();
});
}),
Image.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 28).expanded,
Image.asset("assets/images/drawer/moe_logo_full.png", width: 130, height: 45),
SizedBox(width: 65),
// SvgPicture.asset(
// "assets/images/announcements.svg",
// matchTextDirection: true,
@ -393,6 +389,51 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
),
],
).paddingOnly(left: 21, right: 21, top: 7, bottom: 21),
if (env.monthlyAttendance)
InkWell(
child: Container(
width: double.infinity,
padding: EdgeInsets.all(12),
margin: EdgeInsets.symmetric(horizontal: 21),
decoration: const BoxDecoration(
color: MyColors.gradiantStartColor,
borderRadius: BorderRadius.all(Radius.circular(12)),
),
child: Row(
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.employee_leaves_calender.tr().toText18(isBold: true, color: Colors.white),
2.height,
LocaleKeys.view_your_leave_information.tr().toText12(color: Colors.white),
8.height,
Container(
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.4),
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
padding: EdgeInsets.all(8),
child: LocaleKeys.view_details.tr().toText14(color: Colors.white),
),
],
),
),
const Icon(
Icons.calendar_month,
color: Colors.white,
size: 80,
),
],
),
),
onTap: () {
Navigator.pushNamed(context, AppRoutes.monthlyAttendance);
},
),
21.height,
Visibility(
visible: env.offersDiscount,
child: Column(
@ -652,5 +693,3 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
Navigator.pushNamed(context, AppRoutes.offersAndDiscountsDetails, arguments: getOffersDetailList);
}
}

@ -51,9 +51,9 @@ class _AppDrawerState extends State<AppDrawer> {
child: Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Image.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 24),
// Image.asset("assets/images/logos/main_mohemm_logo.png", width: 134, height: 24),
const Icon(Icons.clear).onPress(() => Navigator.pop(context)),
],
).paddingOnly(left: 4, right: 14),
@ -124,26 +124,33 @@ class _AppDrawerState extends State<AppDrawer> {
// if (AppState().businessCardPrivilege)
// menuItem("assets/images/drawer/view_business_card.svg", LocaleKeys.viewBusinessCard.tr(), "", closeDrawer: false, onPress: () => showMDialog(context, child: BusinessCardDialog())),
//
menuItem("assets/images/drawer/help.png", LocaleKeys.help.tr(), "", closeDrawer: true, onPress: () {
Navigator.pushNamed(context, AppRoutes.help);
}),
menuItem("assets/images/drawer/hierarchy.png", LocaleKeys.hierarchy.tr(), "", closeDrawer: true, onPress: () {
Navigator.pushNamed(context, AppRoutes.hierarchy);
}),
menuItem("assets/images/drawer/logout.svg", LocaleKeys.logout.tr(), "", color: MyColors.redA3Color, closeDrawer: false, onPress: performLogout),
// menuItem("assets/images/drawer/logout.svg", LocaleKeys.logout.tr(), "", color: MyColors.redA3Color, closeDrawer: false, onPress: () {Navigator.pushNamed(context, AppRoutes.survey,);
],
).expanded,
const Divider(
height: 1,
thickness: 1,
color: MyColors.lightGreyEFColor,
),
// const Divider(
// height: 1,
// thickness: 1,
// color: MyColors.lightGreyEFColor,
// ),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
RichText(
text: TextSpan(text: LocaleKeys.poweredBy.tr() + " ", style: const TextStyle(color: MyColors.grey98Color, fontSize: 14, letterSpacing: -0.56, fontWeight: FontWeight.w600), children: [
TextSpan(
text: LocaleKeys.cloudSolutions.tr(),
style: const TextStyle(color: MyColors.grey3AColor, fontSize: 14, letterSpacing: -0.56, fontWeight: FontWeight.w600),
),
]),
).expanded,
Image.asset("assets/images/logos/bn_cloud_soloution.jpg", width: 40, height: 40)
// RichText(
// text: TextSpan(text: LocaleKeys.poweredBy.tr() + " ", style: const TextStyle(color: MyColors.grey98Color, fontSize: 14, letterSpacing: -0.56, fontWeight: FontWeight.w600), children: [
// TextSpan(
// text: LocaleKeys.cloudSolutions.tr(),
// style: const TextStyle(color: MyColors.grey3AColor, fontSize: 14, letterSpacing: -0.56, fontWeight: FontWeight.w600),
// ),
// ]),
// ).expanded,
Image.asset("assets/images/drawer/moe_logo.png", width: 60, height: 60)
],
).paddingOnly(left: 21, right: 21, top: 21)
],
@ -154,7 +161,8 @@ class _AppDrawerState extends State<AppDrawer> {
Widget menuItem(String icon, String title, String routeName, {Color? color, bool closeDrawer = true, VoidCallback? onPress}) {
return Row(
children: [
SvgPicture.asset(icon, height: 20, width: 20),
if (icon.contains("png")) Image.asset(icon, height: 20, width: 20),
if (icon.contains("svg")) SvgPicture.asset(icon, height: 20, width: 20),
9.width,
title.toText14(color: color, textAlign: AppState().isArabic(context) ? TextAlign.right : null).expanded,
],

@ -99,7 +99,7 @@ class MenusWidget extends StatelessWidget {
Row(
children: [
Expanded(
child: data.leaveBalance.toStringAsFixed(2).toText16(color: Colors.white, isBold: true, maxlines: 1),
child: (data.leaveBalance)!.toStringAsFixed(0).toText16(color: Colors.white, isBold: true, maxlines: 1),
),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
],
@ -126,7 +126,7 @@ class MenusWidget extends StatelessWidget {
Row(
children: [
Expanded(
child: data.businessTrip.toStringAsFixed(2).toText16(color: Colors.white, isBold: true, maxlines: 1),
child: data.businessTrip.toStringAsFixed(0).toText16(color: Colors.white, isBold: true, maxlines: 1),
),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)),
],
@ -134,7 +134,10 @@ class MenusWidget extends StatelessWidget {
],
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
).onPress(() {
Navigator.pushNamed(context, AppRoutes.leaveBalance);
//Navigator.pushNamed(context, AppRoutes.leaveBalance);
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(LocaleKeys.business_mission.tr(), "XXX_HR_EIT_BUSINESS_MISSION_SS"));
}),
if (env.dashboard.ticketBalance)
data.isLeaveTicketBalanceLoading

@ -80,7 +80,7 @@ class ServicesWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText11(isBold: true),
child: data.homeMenus![parentIndex].menuEntiesList[index].prompt!.toText10(isBold: true),
),
RotatedBox(quarterTurns: AppState().isArabic(context) ? 2 : 4, child: SvgPicture.asset("assets/images/arrow_next.svg").paddingOnly(bottom: 4)),
],
@ -225,6 +225,7 @@ class ServicesWidget extends StatelessWidget {
}
List<GetMenuEntriesList> menuList = pro.getMenuEntriesList?.where((element) => element.parentMenuName == menuEntry.menuName && (element.menuEntryType == "FUNCTION")).toList() ?? [];
menuEntry.icon = "";
menuList = [];
if (menuList.isEmpty) {
if (menuEntry.requestType == "EIT") {
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(menuEntry.prompt!, menuEntry.functionName!));
@ -278,5 +279,3 @@ class ServicesWidget extends StatelessWidget {
);
}
}

@ -236,27 +236,27 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
},
),
12.height,
DynamicTextFieldWidget(
LocaleKeys.selectEmployee.tr(),
selectedReplacementEmployee == null ? LocaleKeys.searchForEmployee.tr() : selectedReplacementEmployee!.employeeDisplayName ?? "",
isEnable: false,
onTap: () {
showMyBottomSheet(
context,
callBackFunc: () {},
child: SearchEmployeeBottomSheet(
title: LocaleKeys.searchForEmployee.tr(),
apiMode: LocaleKeys.delegate.tr(),
fromChat: false,
onSelectEmployee: (_selectedEmployee) {
// Navigator.pop(context);
selectedReplacementEmployee = _selectedEmployee;
setState(() {});
},
),
);
},
),
// DynamicTextFieldWidget(
// LocaleKeys.selectEmployee.tr(),
// selectedReplacementEmployee == null ? LocaleKeys.searchForEmployee.tr() : selectedReplacementEmployee!.employeeDisplayName ?? "",
// isEnable: false,
// onTap: () {
// showMyBottomSheet(
// context,
// callBackFunc: () {},
// child: SearchEmployeeBottomSheet(
// title: LocaleKeys.searchForEmployee.tr(),
// apiMode: LocaleKeys.delegate.tr(),
// fromChat: false,
// onSelectEmployee: (_selectedEmployee) {
// // Navigator.pop(context);
// selectedReplacementEmployee = _selectedEmployee;
// setState(() {});
// },
// ),
// );
// },
// ),
12.height,
DynamicTextFieldWidget(
LocaleKeys.comments.tr(),

@ -8,6 +8,7 @@ import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/leave_balance/get_absence_transaction_list_model.dart';
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/balances_dashboard_widget.dart';
import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart';
@ -117,7 +118,9 @@ class _LeaveBalanceState extends State<LeaveBalance> {
),
child: const Icon(Icons.add, color: Colors.white, size: 30),
).onPress(() {
Navigator.pushNamed(context, AppRoutes.addLeaveBalance, arguments: employeeId);
//Navigator.pushNamed(context, AppRoutes.addLeaveBalance, arguments: employeeId);
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(LocaleKeys.create_absence_request.tr(), "XXX_HR_EIT_LOA_CREATE_SS"));
}),
);
}

@ -142,7 +142,7 @@ class _LoginScreenState extends State<LoginScreen> {
Future<void> checkPrefs() async {
String username = await Utils.getStringFromPrefs(SharedPrefsConsts.username);
if (!username.isNotEmpty) { // for test purpose i added !
if (username.isNotEmpty) { // for test purpose i added !
String password = await Utils.getStringFromPrefs(SharedPrefsConsts.password);
// String firebaseToken = await Utils.getStringFromPrefs(SharedPrefsConsts.firebaseToken);
// print("firebaseToken:$firebaseToken");
@ -152,6 +152,7 @@ class _LoginScreenState extends State<LoginScreen> {
}
}
void performLogin() async {
Utils.showLoading(context);
try {
@ -185,10 +186,16 @@ class _LoginScreenState extends State<LoginScreen> {
@override
Widget build(BuildContext context) {
username.text = "1002528733";
password.text = "moe123456";
if (isAppOpenBySystem == null) {
isAppOpenBySystem = (ModalRoute.of(context)!.settings.arguments ?? true) as bool;
if (!kReleaseMode) {
username.text = "1100313582";
// username.text = "1100313582";
// password.text = "moe123456";
username.text = "1024056812";
password.text = "moe123456";
// 1) Normal user :
@ -223,24 +230,24 @@ class _LoginScreenState extends State<LoginScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(child: SizedBox()),
Row(
children: [
LocaleKeys.english.tr().toText14(color: AppState().isArabic(context) ? null : MyColors.textMixColor).onPress(() {
context.setLocale(const Locale("en", "US"));
}),
Container(
width: 1,
color: MyColors.darkWhiteColor,
height: 16,
margin: const EdgeInsets.only(left: 10, right: 10),
),
LocaleKeys.arabic.tr().toText14(color: !AppState().isArabic(context) ? null : MyColors.textMixColor).onPress(() {
context.setLocale(const Locale("ar", "SA"));
}),
],
),
Image.asset("assets/images/drawer/moe_logo.png", width: 60, height: 60),
Row(children: [
LocaleKeys.english.tr().toText14(color: AppState().isArabic(context) ? null : MyColors.textMixColor).onPress(() {
context.setLocale(const Locale("en", "US"));
}),
Container(
width: 1,
color: MyColors.darkWhiteColor,
height: 16,
margin: const EdgeInsets.only(left: 10, right: 10),
),
LocaleKeys.arabic.tr().toText14(color: !AppState().isArabic(context) ? null : MyColors.textMixColor).onPress(() {
context.setLocale(const Locale("ar", "SA"));
}),
],)
],
),
Expanded(

@ -21,10 +21,7 @@ import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/basic_member_information_model.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/get_mobile_login_info_list_model.dart';
import 'package:mohem_flutter_app/ui/dialogs/id/business_card_dialog.dart';
import 'package:mohem_flutter_app/ui/dialogs/id/employee_digital_id_dialog.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/dialogs/dialogs.dart';
// WhatsApp 4
// SMS 1
@ -63,29 +60,54 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
String empName = mobileLoginInfoListModel!.employeeName!;
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
title: (mobileLoginInfoListModel?.businessCardPrivilege ?? false)
? LocaleKeys.viewBusinessCard.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
showMDialog(context, child: BusinessCardDialog());
})
: Container(),
actions: [
Center(
child: LocaleKeys.employeeDigitalID.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
showMDialog(context, child: EmployeeDigitialIdDialog());
})),
21.width
],
),
// appBar: AppBar(
//
// backgroundColor: Colors.transparent,
// automaticallyImplyLeading: false,
// title: (mobileLoginInfoListModel?.businessCardPrivilege ?? false)
// ? LocaleKeys.viewBusinessCard.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
// showMDialog(context, child: BusinessCardDialog());
// })
// : Container(),
// actions: [
// Center(
// child: LocaleKeys.employeeDigitalID.tr().toText12(color: MyColors.textMixColor, isUnderLine: true).onPress(() {
// showMDialog(context, child: EmployeeDigitialIdDialog());
// })),
// 21.width
// ],
// ),
body: Column(
children: [
ListView(
padding: const EdgeInsets.all(21),
physics: const BouncingScrollPhysics(),
children: [
//12.height,
12.height,
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset("assets/images/drawer/moe_logo.png", width: 60, height: 60),
Row(
children: [
LocaleKeys.english.tr().toText14(color: AppState().isArabic(context) ? null : MyColors.textMixColor).onPress(() {
context.setLocale(const Locale("en", "US"));
}),
Container(
width: 1,
color: MyColors.darkWhiteColor,
height: 16,
margin: const EdgeInsets.only(left: 10, right: 10),
),
LocaleKeys.arabic.tr().toText14(color: !AppState().isArabic(context) ? null : MyColors.textMixColor).onPress(() {
context.setLocale(const Locale("ar", "SA"));
}),
],
)
],
),
12.height,
if (true)
Column(
mainAxisSize: MainAxisSize.min,
@ -290,7 +312,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
width: 38,
color: isDisable ? MyColors.darkTextColor.withOpacity(0.7) : null,
),
_title.toText16(height: 20/16)
_title.toText16(height: 20 / 16, maxlines: 2),
],
),
),

@ -14,7 +14,6 @@ import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/env.dart';
import 'package:mohem_flutter_app/config/routes.dart';
import 'package:mohem_flutter_app/dialogs/otp_dialog.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/basic_member_information_model.dart';
@ -573,7 +572,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
width: 38,
color: isDisable ? MyColors.darkTextColor.withOpacity(0.7) : null,
),
_title.toText16(height: 20 / 16)
_title.toText16(height: 20 / 16, maxlines: 2)
],
),
),

@ -12,6 +12,7 @@ import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart';
import 'package:mohem_flutter_app/models/get_employee_basic_details.model.dart';
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/profile/employee_qualifications_list.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/ui/profile/dynamic_screens/dynamic_input_basic_details_screen.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
@ -35,6 +36,7 @@ class _BasicDetailsState extends State<BasicDetails> {
String? employeeNo = "";
int correctOrNew = 1;
List<GetEmployeeBasicDetailsList>? getEmployeeBasicDetailsList;
List<EmployeeQualificationsList>? getEmployeeQualificationsList;
late MemberInformationListModel memberInformationList;
GetMenuEntriesList menuEntries = GetMenuEntriesList();
@ -60,6 +62,7 @@ class _BasicDetailsState extends State<BasicDetails> {
try {
Utils.showLoading(context);
getEmployeeBasicDetailsList = await ProfileApiClient().getEmployeeBasicDetails();
getEmployeeQualificationsList = await ProfileApiClient().getEmployeeQualifications();
Utils.hideLoading(context);
setState(() {});
} catch (ex) {
@ -85,22 +88,58 @@ class _BasicDetailsState extends State<BasicDetails> {
? const SizedBox()
: (getEmployeeBasicDetailsList!.isEmpty
? Utils.getNoDataWidget(context)
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: getEmployeeBasicDetailsList!
.map((e) => Column(
children: [
e.dISPLAYFLAG == "Y"
? Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
"${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
"${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
12.height
])
: Container(),
],
: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
LocaleKeys.profile_basicDetails.tr().toText20(isBold: true),
14.height,
...getEmployeeBasicDetailsList!
.map((e) => Column(
children: [
e.dISPLAYFLAG == "Y"
? Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
"${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
"${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
12.height
])
: Container(),
],
))
.toList()
]).objectContainerView()),
20.height,
getEmployeeQualificationsList == null
? const SizedBox()
: ((getEmployeeQualificationsList!.isEmpty && getEmployeeBasicDetailsList!.isEmpty)
? Utils.getNoDataWidget(context)
: getEmployeeQualificationsList!.isEmpty
? Container()
: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
LocaleKeys.qualification.tr().toText20(isBold: true),
14.height,
...getEmployeeQualificationsList!
.map((e) => SizedBox(
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.esteblishmentName.tr().toText13(color: MyColors.lightGrayColor),
"${e.establishment}".toText16(isBold: true, color: MyColors.blackColor),
12.height,
LocaleKeys.grade.tr().toText13(color: MyColors.lightGrayColor),
"${e.grade}".toText16(isBold: true, color: MyColors.blackColor),
12.height,
LocaleKeys.gradeDescription.tr().toText13(color: MyColors.lightGrayColor),
"${e.gradeDescription}".toText16(isBold: true, color: MyColors.blackColor),
12.height,
LocaleKeys.type.tr().toText13(color: MyColors.lightGrayColor),
"${e.qualificationType}".toText16(isBold: true, color: MyColors.blackColor),
12.height,
LocaleKeys.status.tr().toText13(color: MyColors.lightGrayColor),
"${e.status}".toText16(isBold: true, color: MyColors.blackColor),
],
),
))
.toList())
.objectContainerView())
.toList()
]).objectContainerView())
],
),
),
@ -131,7 +170,7 @@ class _BasicDetailsState extends State<BasicDetails> {
);
StatefulBuilder alert = StatefulBuilder(builder: (context, setState) {
return AlertDialog(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10.0))),
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10.0))),
title: Text(LocaleKeys.confirm.tr()),
content: Builder(builder: (context) {
// Get available height and width of the build area of this widget. Make a choice depending on the size.
@ -143,7 +182,7 @@ class _BasicDetailsState extends State<BasicDetails> {
LocaleKeys.selectType.tr(),
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
Divider(),
const Divider(),
Column(
children: [
ListTile(

@ -0,0 +1,34 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
class HelpScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBarWidget(
context,
title: LocaleKeys.help.tr(),
),
backgroundColor: MyColors.backgroundColor,
body: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
(LocaleKeys.dear.tr() + " " + AppState().memberInformationList!.eMPLOYEENAME!).toText18(isBold: true),
12.height,
LocaleKeys.assistant.tr().toText14(),
],
),
),
);
}
}

@ -0,0 +1,298 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/api/profile_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/hierarchy_lists.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:url_launcher/url_launcher.dart';
class HierarchyScreen extends StatefulWidget {
@override
State<HierarchyScreen> createState() => _HierarchyScreenState();
}
class _HierarchyScreenState extends State<HierarchyScreen> {
SupervisorHierarchyLists? hierarchyList;
@override
void initState() {
super.initState();
getData("221142");
}
void getData(String selectedId) async {
Utils.showLoading(context);
try {
hierarchyList = await ProfileApiClient().getHierarchy(selectedId);
hierarchyList!.supervisorHierarchyList!.removeWhere((element) => element.lvl == 1);
hierarchyList!.supervisorHierarchyList = hierarchyList!.supervisorHierarchyList!.reversed.toList();
// hierarchyList!.subordinateHierarchyList!.clear();
setState(() {});
Utils.hideLoading(context);
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBarWidget(
context,
title: LocaleKeys.profile_personalInformation.tr(),
),
backgroundColor: MyColors.backgroundColor,
body: hierarchyList == null
? const Center(child: SizedBox())
: SizedBox(
height: double.infinity,
width: double.infinity,
child: SingleChildScrollView(
child: Column(
children: [
ListView.builder(
itemBuilder: (BuildContext context, int index) {
return Row(
children: [
SizedBox(
height: 78 + 12,
child: Stack(
children: [
Align(
alignment: (index == 0) ? Alignment.bottomCenter : Alignment.topCenter,
child: SizedBox(
// height: index == 0
// ? 40 + 6
// : (index == hierarchyList!.supervisorHierarchyList!.length - 1)
// ? 40 + 6
// : 78 + 6,
height: index == 0
? 40 + 6
: (index == hierarchyList!.supervisorHierarchyList!.length - 1)
? 40 + 6
: 78 + 6 + 6,
child: Container(
height: double.infinity,
color: Colors.black,
width: 2,
),
),
),
],
),
),
const SizedBox(
width: 16,
child: Divider(
color: Colors.black,
thickness: 2,
),
),
Expanded(
child: Container(
width: double.infinity,
padding: const EdgeInsets.all(12),
margin: const EdgeInsets.only(top: 12),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.all(Radius.circular(12)),
border: Border.all(color: MyColors.lightGreyEDColor, width: 1),
),
child: Row(
children: [
hierarchyList?.supervisorHierarchyList![index].employeeImage == null
? SvgPicture.asset(
"assets/images/user.svg",
height: 52,
width: 52,
)
: CircleAvatar(
radius: 52 / 2,
backgroundImage: MemoryImage(Utils.dataFromBase64String(hierarchyList?.supervisorHierarchyList![index].employeeImage)),
backgroundColor: Colors.black,
),
12.width,
Expanded(
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
hierarchyList!.supervisorHierarchyList![index].employeeName.toString().toText14(isBold: true, maxlines: 1),
hierarchyList!.supervisorHierarchyList![index].positionName.toString().toText12(isBold: false, maxLine: 1),
],
),
),
IconButton(
onPressed: () {
launch("tel://${hierarchyList!.supervisorHierarchyList![index].employeeMobileNumber}");
},
icon: Icon(
Icons.phone,
color: MyColors.gradiantEndColor,
),
),
],
),
),
],
),
),
),
],
);
},
itemCount: hierarchyList?.supervisorHierarchyList?.length ?? 0,
padding: const EdgeInsets.only(left: 12, right: 12, top: 12),
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
),
ListView.builder(
itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: (hierarchyList!.subordinateHierarchyList![index].numOfSubordinates == 0)
? null
: () {
getData(hierarchyList!.subordinateHierarchyList![index].employeeNumber.toString());
},
child: Padding(
padding: EdgeInsets.only(
left: AppState().isArabic(context)
? 0
: index == 0
? 28
: 58,
right: !AppState().isArabic(context)
? 0
: index == 0
? 28
: 58),
child: Row(
children: [
SizedBox(
height: 78 + 12,
child: Stack(
children: [
Align(
alignment: (index == 0) ? Alignment.topCenter : Alignment.topCenter,
child: SizedBox(
height: index == 0
? 40 + 6
: (index == hierarchyList!.subordinateHierarchyList!.length - 1)
? 40 + 6
: 78 + 6 + 6,
child: Container(
height: double.infinity,
color: Colors.black,
width: 2,
),
),
),
],
),
),
const SizedBox(
width: 18,
child: Divider(
color: Colors.black,
thickness: 2,
),
),
Expanded(
child: Container(
width: double.infinity,
padding: const EdgeInsets.all(12),
margin: const EdgeInsets.only(top: 12),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.all(Radius.circular(12)),
border: Border.all(color: MyColors.lightGreyEDColor, width: 1),
),
child: Row(
children: [
hierarchyList?.subordinateHierarchyList![index].employeeImage == null
? SvgPicture.asset(
"assets/images/user.svg",
height: 52,
width: 52,
)
: CircleAvatar(
radius: 52 / 2,
backgroundImage: MemoryImage(Utils.dataFromBase64String(hierarchyList?.subordinateHierarchyList![index].employeeImage)),
backgroundColor: Colors.black,
),
12.width,
Expanded(
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
hierarchyList!.subordinateHierarchyList![index].employeeName.toString().toText14(isBold: true, maxlines: 1),
hierarchyList!.subordinateHierarchyList![index].positionName.toString().toText12(isBold: false, maxLine: 1),
],
),
),
8.width,
Column(
children: [
InkWell(
onTap: () {
launch("tel://${hierarchyList!.subordinateHierarchyList![index].employeeMobileNumber}");
},
child: const Padding(
padding: EdgeInsets.only(bottom: 10),
child: Icon(
Icons.phone,
color: MyColors.gradiantEndColor,
),
),
),
if (hierarchyList!.subordinateHierarchyList![index].numOfSubordinates != 0)
Container(
decoration: const BoxDecoration(
color: MyColors.gradiantEndColor,
borderRadius: BorderRadius.all(Radius.circular(12)),
),
width: 18,
height: 18,
alignment: Alignment.center,
child: hierarchyList!.subordinateHierarchyList![index].numOfSubordinates.toString().toTextAuto(isBold: true, color: Colors.white, fontSize: 10),
),
],
),
],
),
),
],
),
),
),
],
),
),
);
},
itemCount: hierarchyList?.subordinateHierarchyList?.length ?? 0,
padding: const EdgeInsets.only(left: 12, right: 12, bottom: 12),
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
),
],
),
),
),
);
}
}

@ -46,7 +46,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
backgroundColor: const Color(0xffefefef),
body: Stack(
children: [
memberInformationList!.eMPLOYEEIMAGE != null
memberInformationList.eMPLOYEEIMAGE != null
? Container(
height: 300,
margin: const EdgeInsets.only(top: 50),

@ -54,7 +54,6 @@ class _MyRequestsState extends State<MyRequests> {
}
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBarWidget(
context,
title: LocaleKeys.concurrentReports.tr(),
@ -81,6 +80,7 @@ class _MyRequestsState extends State<MyRequests> {
],
onSelected: (int popupIndex) {
selectedConcurrentProgramList = getConcurrentProgramsList[popupIndex];
requestModel!.functionName = getConcurrentProgramsList[popupIndex].cONCURRENTPROGRAMNAME;
getCCPTransactions(selectedConcurrentProgramList?.cONCURRENTPROGRAMNAME);
setState(() {});
}),
@ -164,8 +164,10 @@ class _MyRequestsState extends State<MyRequests> {
}
void openNewRequest() async {
await Navigator.pushNamed(context, AppRoutes.newRequest, arguments: NewRequestModel(groupID: requestModel!.groupID)).then((value) {
// getOpenTickets();
await Navigator.pushNamed(context, AppRoutes.newRequest, arguments: NewRequestModel(groupID: requestModel!.groupID, functionName: requestModel!.functionName)).then((value) {
if (value != null && value == "refresh") {
getCCPTransactions(requestModel!.functionName);
}
});
}

@ -11,6 +11,7 @@ import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/dyanmic_forms/validate_eit_transaction_model.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart';
import 'package:mohem_flutter_app/models/my_requests/get_ccp_transactions_model.dart';
import 'package:mohem_flutter_app/models/my_requests/get_ccp_transations_list_model.dart';
@ -79,7 +80,7 @@ class _NewRequestState extends State<NewRequest> {
isEnable: false,
isPopup: true,
isInputTypeNum: true,
isReadOnly:getConcurrentProgramsList.isEmpty? true:false,
isReadOnly: getConcurrentProgramsList.isEmpty ? true : false,
).paddingOnly(bottom: 12),
itemBuilder: (_) => <PopupMenuItem<int>>[
for (int i = 0; i < getConcurrentProgramsList.length; i++) PopupMenuItem<int>(child: Text(getConcurrentProgramsList[i].uSERCONCURRENTPROGRAMNAME!), value: i),
@ -142,11 +143,13 @@ class _NewRequestState extends State<NewRequest> {
return ValidateEitTransactionModel(dATEVALUE: dateVal, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: numberVal, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: vatcherVal.toString()).toJson();
}).toList();
Utils.showLoading(context);
submitCcpTransactionList = await MyRequestsApiClient().getSubmitNewRequest(values, functionName: requestModel?.functionName ?? "HMG_EMP_BUS_TRIP_SET_SS");
getCCPTransactionsList = await MyRequestsApiClient().getCcpTransactions(values, functionName: requestModel?.functionName ?? "HMG_EMP_BUS_TRIP_SET_SS");
GenericResponseModel responseData = await MyRequestsApiClient().getSubmitNewRequest(values, functionName: requestModel?.functionName ?? "HMG_EMP_BUS_TRIP_SET_SS");
Utils.hideLoading(context);
Navigator.pushNamed(context, AppRoutes.myRequests, arguments: requestModel);
setState(() {});
if (responseData.messageStatus == 1) {
Navigator.pop(context, "refresh");
} else {
Utils.showToast(responseData.errorEndUserMessage ?? "");
}
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);

@ -127,7 +127,7 @@ class SelectedItemSheet extends StatelessWidget {
if (favoriteReplacements != null) empID = favoriteReplacements!.userName;
if (replacementList != null) empID = replacementList!.userName;
try {
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, empID!);
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, empID!, notificationID.toString());
if (actionHistoryList != null) empID = actionHistoryList!.eMPLOYEEIMAGE = memberInformationListModel!.eMPLOYEEIMAGE ?? AppState().getBase64ImageEmp;
if (favoriteReplacements != null) empID = favoriteReplacements!.employeeImage = memberInformationListModel!.eMPLOYEEIMAGE ?? AppState().getBase64ImageEmp;
if (replacementList != null) empID = replacementList!.employeeImage = memberInformationListModel!.eMPLOYEEIMAGE ?? AppState().getBase64ImageEmp;
@ -140,7 +140,8 @@ class SelectedItemSheet extends StatelessWidget {
Future<void> performNetworkCall(BuildContext context, {String? email, String? userId}) async {
Utils.showLoading(context);
try {
await WorkListApiClient().submitComment(comment: comment, email: email, userId: userId, notificationId: notificationID, apiMode: apiMode, approverIndex: actionHistoryList != null ? actionHistoryList!.sEQUENCE : null);
await WorkListApiClient().submitComment(
comment: comment, email: email, userId: userId, notificationId: notificationID, apiMode: apiMode, approverIndex: actionHistoryList != null ? actionHistoryList!.sEQUENCE : null);
Utils.hideLoading(context);
// Navigator.pop(context);
// Navigator.pop(context);

@ -753,7 +753,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++;
memberInformationListModel = null;
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!);
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!, workListData!.nOTIFICATIONID.toString());
apiCallCount--;
if (apiCallCount == 0) {
Utils.hideLoading(context);

@ -93,7 +93,7 @@ class ActionsFragment extends StatelessWidget {
],
),
10.height,
getActionDuration(index).toText11(maxLine: 1, color: const Color(0xff1FA269))
// getActionDuration(index).toText11(maxLine: 1, color: const Color(0xff1FA269))
],
),
)

@ -45,8 +45,8 @@ class BalancesDashboardWidget extends StatefulWidget {
class _BalancesDashboardWidgetState extends State<BalancesDashboardWidget> {
List<PieChartModel> chartModelList = [];
late DateTime accrualDateTime;
GetAccrualBalancesList? leaveBalanceAccrual;
List<GetAccrualBalancesList>? ticketBalanceAccrualList;
List<GetAccrualBalancesList>? leaveBalanceAccrual =[];
List<GetAccrualBalancesList>? ticketBalanceAccrualList =[];
@override
void initState() {
@ -66,17 +66,20 @@ class _BalancesDashboardWidgetState extends State<BalancesDashboardWidget> {
List<GetAccrualBalancesList> accrualList = await DashboardApiClient().getAccrualBalances(DateFormat("MM/dd/yyyy", "en_US").format(accrualDateTime), empID: widget.selectedEmp);
if (accrualList.isNotEmpty) {
if (widget.isLeaveBalance) {
leaveBalanceAccrual = accrualList[0];
leaveBalanceAccrual = accrualList;
chartModelList = [
PieChartModel(LocaleKeys.currentBalance.tr(), leaveBalanceAccrual?.accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""),
PieChartModel(LocaleKeys.usedBalance.tr(), leaveBalanceAccrual?.accrualUsedEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""),
PieChartModel(LocaleKeys.currentBalance.tr(), ((leaveBalanceAccrual![0]?.accrualNetEntitlement! ?? 0)! + (leaveBalanceAccrual![1]?.accrualNetEntitlement! ??0)!).toDouble() , MyColors.textMixColor, titleAppend: ""),
PieChartModel(LocaleKeys.usedBalance.tr(), ((leaveBalanceAccrual![0]?.accrualUsedEntitlement! ?? 0)! + (leaveBalanceAccrual![1]?.accrualUsedEntitlement! ??0)!).toDouble() , MyColors.backgroundBlackColor, titleAppend: ""),
];
} else {
}
else if(accrualList.isNotEmpty){
chartModelList = [
PieChartModel(LocaleKeys.adult.tr(), accrualList[1].accrualNetEntitlement?.toDouble() ?? 0, MyColors.textMixColor, titleAppend: ""),
PieChartModel(LocaleKeys.child.tr(), accrualList[2].accrualNetEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""),
PieChartModel(LocaleKeys.infants.tr(), accrualList[3].accrualNetEntitlement?.toDouble() ?? 0, MyColors.pinkColor, titleAppend: ""),
];
}
}
if (showLoading) Utils.hideLoading(context);
@ -89,15 +92,15 @@ class _BalancesDashboardWidgetState extends State<BalancesDashboardWidget> {
@override
Widget build(BuildContext context) {
if (leaveBalanceAccrual == null && widget.isLeaveBalance) {
leaveBalanceAccrual = Provider.of<DashboardProviderModel>(context, listen: false).leaveBalanceAccrual;
chartModelList = [
PieChartModel(LocaleKeys.currentBalance.tr(), leaveBalanceAccrual?.accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""),
PieChartModel(LocaleKeys.usedBalance.tr(), leaveBalanceAccrual?.accrualUsedEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""),
];
}
if (ticketBalanceAccrualList == null && !widget.isLeaveBalance) {
// if (leaveBalanceAccrual == null && widget.isLeaveBalance) {
// leaveBalanceAccrual = Provider.of<DashboardProviderModel>(context, listen: false).leaveBalanceAccrual;
// chartModelList = [
// PieChartModel(LocaleKeys.currentBalance.tr(), leaveBalanceAccrual?.accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""),
// PieChartModel(LocaleKeys.usedBalance.tr(), leaveBalanceAccrual?.accrualUsedEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""),
// ];
// }
if (ticketBalanceAccrualList!.isEmpty && !widget.isLeaveBalance) {
ticketBalanceAccrualList = Provider.of<DashboardProviderModel>(context, listen: false).accrualList ?? [];
if (ticketBalanceAccrualList!.isNotEmpty) {
chartModelList = [
@ -130,7 +133,7 @@ class _BalancesDashboardWidgetState extends State<BalancesDashboardWidget> {
],
),
8.height,
Row(
(leaveBalanceAccrual!.isNotEmpty || ticketBalanceAccrualList!.isNotEmpty) ? Row(
children: [
ListView.separated(
shrinkWrap: true,
@ -144,7 +147,7 @@ class _BalancesDashboardWidgetState extends State<BalancesDashboardWidget> {
.expanded,
getChart(chartModelList)
],
)
) :const Center(child:CircularProgressIndicator(backgroundColor:MyColors.gradiantStartColor,))
],
).paddingOnly(top: 19, bottom: 11, right: 6, left: 14).objectContainerView(disablePadding: true, radius: 10);
}

@ -64,7 +64,7 @@ dependencies:
wifi_iot: ^0.3.18
flutter_html: ^3.0.0-alpha.6
# flutter_barcode_scanner: ^2.0.0
qr_code_scanner: ^1.0.0
qr_code_scanner: ^1.0.1
# qr_flutter: ^4.0.0
url_launcher: ^6.0.15
share: 2.0.4
@ -86,7 +86,8 @@ dependencies:
swipe_to: ^1.0.2
flutter_webrtc: ^0.9.16
camera: ^0.10.3
flutter_local_notifications: any
flutter_local_notifications: 10.0.0
google_api_availability: ^3.0.1
#firebase_analytics: any
#Chat Voice Message Recoding & Play

Loading…
Cancel
Save