Merge branch 'development_mirza' into 'master'

Development mirza

See merge request mirza.shafique/mohem_flutter_app!28
merge-requests/1/merge
Sikander Saleem 3 years ago
commit f0a88b56ca

@ -1,40 +1,41 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mohem_flutter_app">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.NFC"/>
<application
<uses-permission android:name="android.permission.NFC" />
<application
android:icon="@mipmap/ic_launcher"
android:label="Mohemm"
android:icon="@mipmap/ic_launcher">
android:networkSecurityConfig="@xml/network_security_config">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
</network-security-config>

@ -231,6 +231,7 @@
"myAttendance": "حضوري",
"workOnBreak": "العمل على استراحة",
"next": "التالي",
"mobile": "التليفون المحمول",
"completingYear": "نحن نقدر لك لاستكمال خدمة",
"year": "سنة",
"month": "شهر",

@ -224,7 +224,6 @@
"relatedTo": "Related To",
"requestDate": "Request Date",
"analyzedDate": "Analyzed Date",
"approvedCheckIn": "Approved Check In",
"urgent": "Urgent",
"requestDetails": "Request Details",
"approvalLevel": "Approval Level",
@ -232,6 +231,7 @@
"myAttendance": "My Attendance",
"workOnBreak": "Work On Break",
"next": "Next",
"mobile": "Mobile",
"year": "Year",
"month": "Month",
"day": "Day",

@ -104,7 +104,7 @@ class DashboardApiClient {
"QRValue": "",
"PointType": pointType, // NFC=2, Wifi = 3, QR= 1,
"NFCValue": nfcValue,
"WifiValue": "",
"WifiValue": pointType == 3 ? "100" : "",
"IsGpsRequired": isGpsRequired
};
postParams.addAll(AppState().postParamsJson);

@ -20,8 +20,17 @@ import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_mod
import 'package:mohem_flutter_app/models/itg_forms_models/itg_request_model.dart';
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/notification_get_respond_attributes_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_phones_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
import '../../models/worklist/hr/eit_otification_body_model.dart';
import '../../models/worklist/get_favorite_replacements_model.dart';
import '../../models/worklist/hr/get_basic_det_ntf_body_list_model.dart';
import '../../models/worklist/hr/get_contact_notification_body_list_model.dart';
import '../../models/worklist/hr/get_phones_notification_body_list_model.dart';
import '../../models/worklist/hr/get_phones_notification_body_list_model.dart';
class WorkListApiClient {
static final WorkListApiClient _instance = WorkListApiClient._internal();
@ -168,20 +177,20 @@ class WorkListApiClient {
}, url, postParams);
}
Future<List<GetAbsenceCollectionNotificationBodyList>> getAbsenceNotificationBody(int pNotificationID, int pTransactionID) async {
String url = "${ApiConsts.erpRest}GET_ABSENCE_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": pNotificationID,
"P_TRANSACTION_ID": pTransactionID,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getAbsenceCollectionNotificationBodyList ?? [];
}, url, postParams);
}
// Future<List<GetAbsenceCollectionNotificationBodyList>> getAbsenceNotificationBody(int pNotificationID, int pTransactionID) async {
// String url = "${ApiConsts.erpRest}GET_ABSENCE_NOTIFICATION_BODY";
// Map<String, dynamic> postParams = {
// "P_NOTIFICATION_ID": pNotificationID,
// "P_TRANSACTION_ID": pTransactionID,
// "P_PAGE_LIMIT": 100,
// "P_PAGE_NUM": 1,
// };
// postParams.addAll(AppState().postParamsJson);
// return await ApiClient().postJsonForObject((json) {
// GenericResponseModel responseData = GenericResponseModel.fromJson(json);
// return responseData.getAbsenceCollectionNotificationBodyList ?? [];
// }, url, postParams);
// }
Future<GenericResponseModel> postNotificationActions(Map<String, dynamic> postParams) async {
String url = "${ApiConsts.erpRest}NOTIFICATION_ACTIONS";
@ -295,4 +304,148 @@ class WorkListApiClient {
return responseData.itgRequest;
}, url, postParams);
}
//HR Detail Screen Requests
Future<List<GetEitCollectionNotificationBodyList>?> GetEitNotificationBody(int? notificationId) async {
String url = "${ApiConsts.erpRest}GET_EIT_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": notificationId,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getEITCollectionNotificationBodyList;
}, url, postParams);
}
Future<List<GetPhonesNotificationBodyList>?> getPhonesNotificationBodyList(int? notificationId) async {
String url = "${ApiConsts.erpRest}GET_PHONES_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": notificationId,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getPhonesNotificationBodyList;
}, url, postParams);
}
Future<List<GetBasicDetNtfBodyList>?> getBasicDetNtfBodyList(int? notificationId) async {
String url = "${ApiConsts.erpRest}GET_BASIC_DET_NTF_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": notificationId,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getBasicDetNtfBodyList;
}, url, postParams);
}
Future<List<GetAbsenceCollectionNotificationBodyList>?> getAbsenceNotificationBody(int? notificationId) async {
String url = "${ApiConsts.erpRest}GET_ABSENCE_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": notificationId,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getAbsenceCollectionNotificationBodyList;
}, url, postParams);
}
Future<GetContactNotificationBodyList?> getContactNotificationBodyList(int? notificationId) async {
String url = "${ApiConsts.erpRest}GET_CONTACT_NOTIFICATION_BODY";
Map<String, dynamic> postParams = {
"P_NOTIFICATION_ID": notificationId,
"P_PAGE_LIMIT": 100,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.getContactNotificationBodyList;
}, url, postParams);
}
Future<List<GetFavoriteReplacements>?> getFavoriteReplacementWithoutImage() async {
String url = "${ApiConsts.erpRest}Mohemm_GetFavoriteReplacementsWithoutImage";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.mohemmGetFavoriteReplacementsList;
}, url, postParams);
}
Future<List<GetFavoriteReplacements>?> getFavoriteReplacementWithImage(String selectedFavLetter) async {
String url = "${ApiConsts.erpRest}Mohemm_GetFavoriteReplacements";
Map<String, dynamic> postParams = {"ItgFilter": selectedFavLetter};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.mohemmGetFavoriteReplacementsList;
}, url, postParams);
}
Future<GenericResponseModel> changeFavoriteReplacements({required String email, required String employeName, required String image, required String userName, bool isFav = false}) async {
String url = "${ApiConsts.erpRest}Mohemm_ChangeFavoriteReplacements";
Map<String, dynamic> postParamsObj = {
"EMAIL_ADDRESS": email,
"EMPLOYEE_DISPLAY_NAME": employeName,
"EMPLOYEE_IMAGE": image,
"IsFavorite": isFav,
"USER_NAME": userName,
};
Map<String, dynamic> postParams = {
"Mohemm_ChangeReplacementsInputList": [postParamsObj],
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
}
Future<List<ReplacementList>?> searchUserByInput({String userId = "", String userName = "", String email = ""}) async {
String url = "${ApiConsts.erpRest}GET_REPLACEMENT_LIST";
Map<String, dynamic> postParams = {
"P_SEARCH_USER_NAME": userId,
"P_SEARCH_EMPLOYEE_DISPLAY_NAME": userName,
"P_SEARCH_EMAIL_ADDRESS": email,
"P_PAGE_LIMIT": 50,
"P_PAGE_NUM": 1,
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData.replacementList;
}, url, postParams);
}
Future<GenericResponseModel> submitComment({String? comment, String? email, String? userId, int? notificationId, required String apiMode}) async {
String url = "${ApiConsts.erpRest}NOTIFICATION_ACTIONS";
Map<String, dynamic> postParams = {
"P_COMMENTS": comment,
"P_ACTION_MODE": apiMode,
"P_EMAIL_ADDRESS": email,
"P_FORWARD_TO_USER_NAME": userId,
"P_NOTIFICATION_ID": notificationId,
"P_APPROVER_INDEX": null,
"RespondAttributeList": []
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
return responseData;
}, url, postParams);
}
}

@ -29,6 +29,19 @@ class AppState {
String? get getForgetPasswordTokenID => forgetPasswordTokenID;
//Wifi info
String? mohemmWifiSSID;
set setMohemmWifiSSID(v) => mohemmWifiSSID = mohemmWifiSSID;
String? get getMohemmWifiSSID => mohemmWifiSSID;
String? mohemmWifiPassword;
set setMohemmWifiPassword(v) => mohemmWifiPassword = v;
String? get getMohemmWifiPassword => mohemmWifiPassword;
PostParamsModel? _postParams;
PostParamsModel? get postParamsObject => _postParams;

@ -27,7 +27,7 @@ class MyColors {
static const Color white = Color(0xffffffff);
static const Color green = Color(0xffffffff);
static const Color borderColor = Color(0xffE8E8E8);
// static const Color grey67Color = Color(0xff676767);
//static const Color grey67Color = Color(0xff676767);
static const Color whiteColor = Color(0xFFEEEEEE);
static const Color greenColor = Color(0xff1FA269);
static const Color lightGreenColor = Color(0xff2AB2AB);

@ -1,7 +1,7 @@
class ApiConsts {
//static String baseUrl = "http://10.200.204.20:2801/"; // Local server
static String baseUrl = "https://uat.hmgwebservices.com"; // UAT server
//static String baseUrl = "https://hmgwebservices.com"; // Live server
// static String baseUrl = "https://hmgwebservices.com"; // Live server
static String baseUrlServices = baseUrl + "/Services/"; // server
// static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server
static String utilitiesRest = baseUrlServices + "Utilities.svc/REST/";
@ -20,4 +20,6 @@ class SharedPrefsConsts {
static String memberInformation = "memberInformation";
static String welcomeVideoUrl = "welcomeVideoUrl";
static String doNotShowWelcomeVideo = "doNotShowWelcomeVideo";
static String mohemmWifiSSID = "mohemmWifiSSID";
static String mohemmWifiPassword = "mohemmWifiPassword";
}

@ -54,8 +54,9 @@ extension EmailValidator on String {
style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 14, letterSpacing: -0.48, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText16({Color? color, bool isBold = false}) => Text(
Widget toText16({Color? color, bool isBold = false,int? maxlines}) => Text(
this,
maxLines: maxlines,
style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 16, letterSpacing: -0.64, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
@ -63,19 +64,15 @@ extension EmailValidator on String {
this,
style: TextStyle(color: color ?? MyColors.darkTextColor, fontSize: 17, letterSpacing: -0.68, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText20({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(fontSize: 20, fontWeight: isBold ? FontWeight.bold : FontWeight.w600, color: color ?? MyColors.darkTextColor, letterSpacing: -0.4),
);
Widget toText22({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(height: 1, color: color ?? MyColors.darkTextColor, fontSize: 22, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText24({Color? color, bool isBold = false, bool considerHeight = true}) => Text(
Widget toText24({Color? color, bool isBold = false}) => Text(
this,
style: TextStyle(height: considerHeight ? 23 / 24 : null, color: color ?? MyColors.darkTextColor, fontSize: 24, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
style: TextStyle(height: 23 / 24, color: color ?? MyColors.darkTextColor, fontSize: 24, letterSpacing: -1.44, fontWeight: isBold ? FontWeight.bold : FontWeight.w600),
);
Widget toText32({Color? color, bool isBold = false}) => Text(

@ -69,29 +69,6 @@ class CodegenLoader extends AssetLoader{
"passwordChangedSuccessfully": "تم تغيير الرقم السري بنجاح",
"itemsForSale": "سلع للبيع",
"attendanceDetails": "تفاصيل الحضور",
"order": "الطلبات",
"earlyOut": "الخروج مبكرا",
"shortage": "ساعات التقصير",
"excess": "Excess",
"lateIn": "القدوم المتاخر",
"approvedCheckOut": "وقت الخروج",
"approvedCheckIn": "وقت الدخول",
"actualCheckOut": "وقت الخروج",
"actualCheckIn": "وقت الدخول",
"present": "حضور",
"pres": "حضور",
"shiftTime": "وقت التناوب",
"absent": "غياب",
"attendance": "الحضور",
"scheduleDays": "ايام العمل",
"offDays": "ايام الراحه",
"nonAnalyzed": "لايوجد تحليل",
"shortageHour": "ساعات التقصير",
"stats": "الحاله",
"completed": "تم اكمال",
"msg": "Hello {} in the {} world ",
"msg_named": "{} are written in the {lang} language",
"clickMe": "Click me",
"doNotUseRecentPassword": "لا تستخدم كلمة مرور حديثة",
"atLeastOneLowercase": "حرف صغير واحد على الأقل",
"atLeastOneUppercase": "حرف كبير واحد على الأقل",
@ -211,6 +188,9 @@ class CodegenLoader extends AssetLoader{
"rfqUOM": "RFQ UOM",
"rfqQty": "RFQ الكمية",
"rfqNumber": "رقم RFQ",
"msg": "Hello {} in the {} world ",
"msg_named": "{} are written in the {lang} language",
"clickMe": "Click me",
"human": "بشري",
"resources": "موارد",
"details": "تفاصيل",
@ -247,31 +227,12 @@ class CodegenLoader extends AssetLoader{
"myAttendance": "حضوري",
"workOnBreak": "العمل على استراحة",
"next": "التالي",
"completingYear": "نحن نقدر لك لاستكمال خدمة",
"year": "سنة",
"month": "شهر",
"day": "يوم",
"address": "العنوان",
"phoneNumber": "رقم الجوال",
"businessGroup": "مجموعة العمل",
"Payroll": "الراتب",
"civilIdentityNumber": "رقم الهويه",
"dateOfBirth": "تاريخ الميلاد",
"maritalStatus ": "الحالة الاجتماعية",
"fullName": "الأسم الكامل",
"remove": "حذف",
"profile": {
"reset_password": {
"label": "Reset Password",
"username": "Username",
"password": "password"
},
"profileCompletionPer": "استكمال الملف الشخصي",
"completeProfile": "الملف الشخصي الكامل",
"personalInformation": "معلومات شخصية",
"basicDetails": "تفاصيل أساسية",
"contactDetails": "بيانات التواصل",
"familyDetails": "تفاصيل عائلية"
}
},
"clicked": {
"zero": "You clicked {} times!",
@ -340,7 +301,7 @@ static const Map<String,dynamic> en_US = {
"setTheNewPassword": "Set the new password",
"typeYourNewPasswordBelow": "Type your new password below",
"confirmPassword": "Confirm Password",
"update": "update",
"update": "Update",
"title": "Title",
"home": "Home",
"mySalary": "My Salary",
@ -353,27 +314,6 @@ static const Map<String,dynamic> en_US = {
"confirm": "Confirm",
"passwordChangedSuccessfully": "Password changed successfully",
"itemsForSale": "Items for Sale",
"attendanceDetails": "Attendance Details",
"order": "order",
"earlyOut": "Early Out",
"shortage": "Shortage",
"excess": "Excess",
"lateIn": "Late In",
"approvedCheckOut": "Approved Check Out",
"approvedCheckIn": "Approved Check In",
"actualCheckOut": "Actual Check Out",
"actualCheckIn": "Actual Check In",
"present": "PRESENT 11",
"pres": "present",
"shiftTime": "Shift Time",
"absent": "ABSENT 10",
"attendance": "Attendance",
"scheduleDays": "Schedule\nDays",
"offDays": "Off\nDays",
"nonAnalyzed": "Non\nAnalyzed",
"shortageHour": "Shortage\nHour",
"stats": "Stats",
"completed": "Completed",
"doNotUseRecentPassword": "Do not use recent password",
"atLeastOneLowercase": "At least one lowercase",
"atLeastOneUppercase": "At least one uppercase",
@ -388,6 +328,7 @@ static const Map<String,dynamic> en_US = {
"whatsapp": "Whatsapp",
"reject": "Reject",
"approve": "Approve",
"attendanceDetails": "Attendence Details",
"cancel": "Cancel",
"requestedItems": "Requested Items",
"request": "Request",
@ -532,31 +473,12 @@ static const Map<String,dynamic> en_US = {
"myAttendance": "My Attendance",
"workOnBreak": "Work On Break",
"next": "Next",
"year": "Year",
"month": "Month",
"day": "Day",
"completingYear": "We appreciate you for completing the service of",
"address": "Address",
"phoneNumber": "Phone Number",
"businessGroup": "Business",
"Payroll": "Payroll",
"civilIdentityNumber": "Civil Identity Number",
"dateOfBirth": "Date of Birth",
"maritalStatus ": "Marital Status ",
"fullName": "Full Name",
"remove": "remove",
"profile": {
"reset_password": {
"label": "Reset Password",
"username": "Username",
"password": "password"
},
"profileCompletionPer": "Profile Completion",
"completeProfile": "Complete Profile",
"personalInformation": "Personal Information",
"basicDetails": "Basic Details",
"contactDetails": "Contact Details",
"familyDetails": "Family Members"
}
},
"clicked": {
"zero": "You clicked {} times!",

@ -1,7 +1,7 @@
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_attachement_list_model.dart';
import 'package:mohem_flutter_app/models/get_basic_det_ntf_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_basic_det_ntf_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart';
import 'package:mohem_flutter_app/models/get_eit_transaction_list_model.dart';
import 'package:mohem_flutter_app/models/get_day_hours_type_details_list_model.dart';
@ -27,6 +27,11 @@ import 'package:mohem_flutter_app/models/profile/basic_details_cols_structions.d
import 'package:mohem_flutter_app/models/profile/basic_details_dff_structure.dart';
import 'package:mohem_flutter_app/models/profile/phone_number_types_modek.dart';
import 'package:mohem_flutter_app/models/subordinates_on_leaves_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/eit_otification_body_model.dart';
import 'package:mohem_flutter_app/models/worklist/get_favorite_replacements_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_contact_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/hr/get_phones_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
import 'basic_member_information_model.dart';
@ -114,12 +119,12 @@ class GenericResponseModel {
List<String>? getContactColsStructureList;
List<String>? getContactDetailsList;
List<String>? getContactDffStructureList;
List<String>? getContactNotificationBodyList;
GetContactNotificationBodyList? getContactNotificationBodyList;
List<String>? getCountriesList;
List<GetDayHoursTypeDetailsList>? getDayHoursTypeDetailsList;
List<String>? getDeductionsList;
List<String>? getDefaultValueList;
List<String>? getEITCollectionNotificationBodyList;
List<GetEitCollectionNotificationBodyList>? getEITCollectionNotificationBodyList;
List<GetEITDFFStructureList>? getEITDFFStructureList;
List<GetEITTransactionList>? getEITTransactionList;
List<String>? getEarningsList;
@ -151,7 +156,7 @@ class GenericResponseModel {
List<String>? getPendingReqDetailsList;
List<String>? getPendingReqFunctionsList;
List<String>? getPerformanceAppraisalList;
List<String>? getPhonesNotificationBodyList;
List<GetPhonesNotificationBodyList>? getPhonesNotificationBodyList;
List<GetPoItemHistoryList>? getPoItemHistoryList;
GetPoNotificationBodyList? getPoNotificationBodyList;
List<String>? getPrNotificationBodyList;
@ -208,7 +213,7 @@ class GenericResponseModel {
List<MemberInformationListModel>? memberInformationList;
MemberLoginListModel? memberLoginList;
String? mohemmGetBusinessCardEnabledList;
List? mohemmGetFavoriteReplacementsList;
List<GetFavoriteReplacements>? mohemmGetFavoriteReplacementsList;
String? mohemmGetMobileDeviceInfobyEmpInfoList;
List<GetMobileLoginInfoListModel>? mohemmGetMobileLoginInfoList;
String? mohemmGetPatientIDList;
@ -239,7 +244,7 @@ class GenericResponseModel {
List<PrivilegeListModel>? privilegeList;
String? processTransactions;
String? registerUserNameList;
String? replacementList;
List<ReplacementList>? replacementList;
String? respondAttributesList;
String? respondRolesList;
String? resubmitAbsenceTransactionList;
@ -657,7 +662,7 @@ class GenericResponseModel {
getContactColsStructureList = json['GetContactColsStructureList'];
getContactDetailsList = json['GetContactDetailsList'];
getContactDffStructureList = json['GetContactDffStructureList'];
getContactNotificationBodyList = json['GetContactNotificationBodyList'];
getContactNotificationBodyList= json["GetContactNotificationBodyList"] == null ? null : GetContactNotificationBodyList.fromJson(json["GetContactNotificationBodyList"]);
getCountriesList = json['GetCountriesList'];
if (json['GetDayHoursTypeDetailsList'] != null) {
getDayHoursTypeDetailsList = <GetDayHoursTypeDetailsList>[];
@ -667,7 +672,9 @@ class GenericResponseModel {
}
getDeductionsList = json['GetDeductionsList'];
getDefaultValueList = json['GetDefaultValueList'];
getEITCollectionNotificationBodyList = json['GetEITCollectionNotificationBodyList'];
getEITCollectionNotificationBodyList = json["GetEITCollectionNotificationBodyList"] == null
? null
: List<GetEitCollectionNotificationBodyList>.from(json["GetEITCollectionNotificationBodyList"].map((x) => GetEitCollectionNotificationBodyList.fromJson(x)));
if (json['GetEITDFFStructureList'] != null) {
getEITDFFStructureList = <GetEITDFFStructureList>[];
json['GetEITDFFStructureList'].forEach((v) {
@ -754,7 +761,7 @@ class GenericResponseModel {
getPendingReqDetailsList = json['GetPendingReqDetailsList'];
getPendingReqFunctionsList = json['GetPendingReqFunctionsList'];
getPerformanceAppraisalList = json['GetPerformanceAppraisalList'];
getPhonesNotificationBodyList = json['GetPhonesNotificationBodyList'];
getPhonesNotificationBodyList= json["GetPhonesNotificationBodyList"] == null ? null : List<GetPhonesNotificationBodyList>.from(json["GetPhonesNotificationBodyList"].map((x) => GetPhonesNotificationBodyList.fromJson(x)));
if (json['GetPoItemHistoryList'] != null) {
getPoItemHistoryList = <GetPoItemHistoryList>[];
json['GetPoItemHistoryList'].forEach((v) {
@ -869,7 +876,9 @@ class GenericResponseModel {
}
memberLoginList = json['MemberLoginList'] != null ? MemberLoginListModel.fromJson(json['MemberLoginList']) : null;
mohemmGetBusinessCardEnabledList = json['Mohemm_GetBusinessCardEnabledList'];
mohemmGetFavoriteReplacementsList = json['Mohemm_GetFavoriteReplacementsList'];
mohemmGetFavoriteReplacementsList =
json["Mohemm_GetFavoriteReplacementsList"] == null ? null : List<GetFavoriteReplacements>.from(json["Mohemm_GetFavoriteReplacementsList"].map((x) => GetFavoriteReplacements.fromJson(x)));
mohemmGetMobileDeviceInfobyEmpInfoList = json['Mohemm_GetMobileDeviceInfobyEmpInfoList'];
if (json['Mohemm_GetMobileLoginInfoList'] != null) {
mohemmGetMobileLoginInfoList = <GetMobileLoginInfoListModel>[];
@ -924,7 +933,7 @@ class GenericResponseModel {
processTransactions = json['ProcessTransactions'];
registerUserNameList = json['RegisterUserNameList'];
replacementList = json['ReplacementList'];
replacementList = json["ReplacementList"] == null ? null : List<ReplacementList>.from(json["ReplacementList"].map((x) => ReplacementList.fromJson(x)));
respondAttributesList = json['RespondAttributesList'];
respondRolesList = json['RespondRolesList'];
resubmitAbsenceTransactionList = json['ResubmitAbsenceTransactionList'];

@ -1,14 +1,14 @@
class GetAbsenceCollectionNotificationBodyList {
List<CollectionNotification>? collectionNotification;
List<CollectionNotificationAbsence>? collectionNotification;
GetAbsenceCollectionNotificationBodyList({this.collectionNotification});
GetAbsenceCollectionNotificationBodyList.fromJson(Map<String, dynamic> json) {
if (json['Collection_Notification'] != null) {
collectionNotification = <CollectionNotification>[];
collectionNotification = <CollectionNotificationAbsence>[];
json['Collection_Notification'].forEach((v) {
collectionNotification!.add(new CollectionNotification.fromJson(v));
collectionNotification!.add(new CollectionNotificationAbsence.fromJson(v));
});
}
}
@ -23,7 +23,7 @@ class GetAbsenceCollectionNotificationBodyList {
}
}
class CollectionNotification {
class CollectionNotificationAbsence {
String? aCTION;
String? aPPLICATIONCOLUMNNAME;
String? dATATYPE;
@ -40,7 +40,7 @@ class CollectionNotification {
int? tRANSACTIONNUMBER;
String? vARCHAR2VALUE;
CollectionNotification(
CollectionNotificationAbsence(
{this.aCTION,
this.aPPLICATIONCOLUMNNAME,
this.dATATYPE,
@ -57,7 +57,7 @@ class CollectionNotification {
this.tRANSACTIONNUMBER,
this.vARCHAR2VALUE});
CollectionNotification.fromJson(Map<String, dynamic> json) {
CollectionNotificationAbsence.fromJson(Map<String, dynamic> json) {
aCTION = json['ACTION'];
aPPLICATIONCOLUMNNAME = json['APPLICATION_COLUMN_NAME'];
dATATYPE = json['DATATYPE'];

@ -0,0 +1,37 @@
// To parse this JSON data, do
//
// final getFavoriteReplacements = getFavoriteReplacementsFromJson(jsonString);
import 'dart:convert';
GetFavoriteReplacements getFavoriteReplacementsFromJson(String str) => GetFavoriteReplacements.fromJson(json.decode(str));
String getFavoriteReplacementsToJson(GetFavoriteReplacements data) => json.encode(data.toJson());
class GetFavoriteReplacements {
GetFavoriteReplacements({
this.userName,
this.employeeDisplayName,
this.emailAddress,
this.employeeImage,
});
final String? userName;
final String? employeeDisplayName;
final String? emailAddress;
final String? employeeImage;
factory GetFavoriteReplacements.fromJson(Map<String, dynamic> json) => GetFavoriteReplacements(
userName: json["USER_NAME"] == null ? null : json["USER_NAME"],
employeeDisplayName: json["EMPLOYEE_DISPLAY_NAME"] == null ? null : json["EMPLOYEE_DISPLAY_NAME"],
emailAddress: json["EMAIL_ADDRESS"] == null ? null : json["EMAIL_ADDRESS"],
employeeImage: json["EMPLOYEE_IMAGE"] == null ? null : json["EMPLOYEE_IMAGE"],
);
Map<String, dynamic> toJson() => {
"USER_NAME": userName == null ? null : userName,
"EMPLOYEE_DISPLAY_NAME": employeeDisplayName == null ? null : employeeDisplayName,
"EMAIL_ADDRESS": emailAddress == null ? null : emailAddress,
"EMPLOYEE_IMAGE": employeeImage,
};
}

@ -0,0 +1,91 @@
class GetEitCollectionNotificationBodyList {
GetEitCollectionNotificationBodyList({
this.collectionNotification,
});
final List<CollectionNotificationEit>? collectionNotification;
factory GetEitCollectionNotificationBodyList.fromJson(Map<String, dynamic> json) => GetEitCollectionNotificationBodyList(
collectionNotification: json["Collection_Notification"] == null ? null : List<CollectionNotificationEit>.from(json["Collection_Notification"].map((x) => CollectionNotificationEit.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"Collection_Notification": collectionNotification == null ? null : List<dynamic>.from(collectionNotification!.map((x) => x.toJson())),
};
}
class CollectionNotificationEit {
CollectionNotificationEit({
this.action,
this.applicationColumnName,
this.datatype,
this.dateValue,
this.descFlexContextCode,
this.descFlexName,
this.displayFlag,
this.extraInfoId,
this.numberValue,
this.prevSegmentValueDsp,
this.segmentName,
this.segmentPrompt,
this.segmentSeqNum,
this.segmentValueDsp,
this.transactionNumber,
this.varchar2Value,
});
final String? action;
final String? applicationColumnName;
final String? datatype;
final String? dateValue;
final String? descFlexContextCode;
final String? descFlexName;
final String? displayFlag;
final int? extraInfoId;
final int? numberValue;
final String? prevSegmentValueDsp;
final String? segmentName;
final String? segmentPrompt;
final int? segmentSeqNum;
final String? segmentValueDsp;
final int? transactionNumber;
final String? varchar2Value;
factory CollectionNotificationEit.fromJson(Map<String, dynamic> json) => CollectionNotificationEit(
action: json["ACTION"] == null ? null : json["ACTION"],
applicationColumnName: json["APPLICATION_COLUMN_NAME"] == null ? null : json["APPLICATION_COLUMN_NAME"],
datatype: json["DATATYPE"] == null ? null : json["DATATYPE"],
dateValue: json["DATE_VALUE"] == null ? null : json["DATE_VALUE"],
descFlexContextCode: json["DESC_FLEX_CONTEXT_CODE"] == null ? null : json["DESC_FLEX_CONTEXT_CODE"],
descFlexName: json["DESC_FLEX_NAME"] == null ? null : json["DESC_FLEX_NAME"],
displayFlag: json["DISPLAY_FLAG"] == null ? null : json["DISPLAY_FLAG"],
extraInfoId: json["EXTRA_INFO_ID"] == null ? null : json["EXTRA_INFO_ID"],
numberValue: json["NUMBER_VALUE"] == null ? null : json["NUMBER_VALUE"],
prevSegmentValueDsp: json["PREV_SEGMENT_VALUE_DSP"] == null ? null : json["PREV_SEGMENT_VALUE_DSP"],
segmentName: json["SEGMENT_NAME"] == null ? null : json["SEGMENT_NAME"],
segmentPrompt: json["SEGMENT_PROMPT"] == null ? null : json["SEGMENT_PROMPT"],
segmentSeqNum: json["SEGMENT_SEQ_NUM"] == null ? null : json["SEGMENT_SEQ_NUM"],
segmentValueDsp: json["SEGMENT_VALUE_DSP"] == null ? null : json["SEGMENT_VALUE_DSP"],
transactionNumber: json["TRANSACTION_NUMBER"] == null ? null : json["TRANSACTION_NUMBER"],
varchar2Value: json["VARCHAR2_VALUE"] == null ? null : json["VARCHAR2_VALUE"],
);
Map<String, dynamic> toJson() => {
"ACTION": action == null ? null : action,
"APPLICATION_COLUMN_NAME": applicationColumnName == null ? null : applicationColumnName,
"DATATYPE": datatype == null ? null : datatype,
"DATE_VALUE": dateValue == null ? null : dateValue,
"DESC_FLEX_CONTEXT_CODE": descFlexContextCode == null ? null : descFlexContextCode,
"DESC_FLEX_NAME": descFlexName == null ? null : descFlexName,
"DISPLAY_FLAG": displayFlag == null ? null : displayFlag,
"EXTRA_INFO_ID": extraInfoId == null ? null : extraInfoId,
"NUMBER_VALUE": numberValue == null ? null : numberValue,
"PREV_SEGMENT_VALUE_DSP": prevSegmentValueDsp == null ? null : prevSegmentValueDsp,
"SEGMENT_NAME": segmentName == null ? null : segmentName,
"SEGMENT_PROMPT": segmentPrompt == null ? null : segmentPrompt,
"SEGMENT_SEQ_NUM": segmentSeqNum == null ? null : segmentSeqNum,
"SEGMENT_VALUE_DSP": segmentValueDsp == null ? null : segmentValueDsp,
"TRANSACTION_NUMBER": transactionNumber == null ? null : transactionNumber,
"VARCHAR2_VALUE": varchar2Value == null ? null : varchar2Value,
};
}

@ -0,0 +1,87 @@
class GetAbsenceCollectionNotificationBodyList {
GetAbsenceCollectionNotificationBodyList({
this.collectionNotification,
});
final List<CollectionNotification>? collectionNotification;
factory GetAbsenceCollectionNotificationBodyList.fromJson(Map<String, dynamic> json) => GetAbsenceCollectionNotificationBodyList(
collectionNotification: json["Collection_Notification"] == null ? null : List<CollectionNotification>.from(json["Collection_Notification"].map((x) => CollectionNotification.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"Collection_Notification": collectionNotification == null ? null : List<dynamic>.from(collectionNotification!.map((x) => x.toJson())),
};
}
class CollectionNotification {
CollectionNotification({
this.action,
this.applicationColumnName,
this.datatype,
this.dateValue,
this.descFlexContextCode,
this.descFlexName,
this.displayFlag,
this.numberValue,
this.prevSegmentValueDsp,
this.segmentName,
this.segmentPrompt,
this.segmentSeqNum,
this.segmentValueDsp,
this.transactionNumber,
this.varchar2Value,
});
final String? action;
final String? applicationColumnName;
final String? datatype;
final String? dateValue;
final String? descFlexContextCode;
final String? descFlexName;
final String? displayFlag;
final int? numberValue;
final String? prevSegmentValueDsp;
final String? segmentName;
final String? segmentPrompt;
final int? segmentSeqNum;
final String? segmentValueDsp;
final int? transactionNumber;
final String? varchar2Value;
factory CollectionNotification.fromJson(Map<String, dynamic> json) => CollectionNotification(
action: json["ACTION"] == null ? null : json["ACTION"],
applicationColumnName: json["APPLICATION_COLUMN_NAME"] == null ? null :json["APPLICATION_COLUMN_NAME"],
datatype: json["DATATYPE"] == null ? null : json["DATATYPE"],
dateValue: json["DATE_VALUE"] == null ? null : json["DATE_VALUE"],
descFlexContextCode: json["DESC_FLEX_CONTEXT_CODE"] == null ? null : json["DESC_FLEX_CONTEXT_CODE"],
descFlexName: json["DESC_FLEX_NAME"] == null ? null : json["DESC_FLEX_NAME"],
displayFlag: json["DISPLAY_FLAG"] == null ? null : json["DISPLAY_FLAG"],
numberValue: json["NUMBER_VALUE"] == null ? null : json["NUMBER_VALUE"],
prevSegmentValueDsp: json["PREV_SEGMENT_VALUE_DSP"] == null ? null : json["PREV_SEGMENT_VALUE_DSP"],
segmentName: json["SEGMENT_NAME"] == null ? null : json["SEGMENT_NAME"],
segmentPrompt: json["SEGMENT_PROMPT"] == null ? null : json["SEGMENT_PROMPT"],
segmentSeqNum: json["SEGMENT_SEQ_NUM"] == null ? null : json["SEGMENT_SEQ_NUM"],
segmentValueDsp: json["SEGMENT_VALUE_DSP"] == null ? null : json["SEGMENT_VALUE_DSP"],
transactionNumber: json["TRANSACTION_NUMBER"] == null ? null : json["TRANSACTION_NUMBER"],
varchar2Value: json["VARCHAR2_VALUE"] == null ? null : json["VARCHAR2_VALUE"],
);
Map<String, dynamic> toJson() => {
"ACTION": action == null ? null : action,
"APPLICATION_COLUMN_NAME": applicationColumnName == null ? null : applicationColumnName,
"DATATYPE": datatype == null ? null :datatype,
"DATE_VALUE": dateValue == null ? null : dateValue,
"DESC_FLEX_CONTEXT_CODE": descFlexContextCode == null ? null : descFlexContextCode,
"DESC_FLEX_NAME": descFlexName == null ? null : descFlexName,
"DISPLAY_FLAG": displayFlag == null ? null : displayFlag,
"NUMBER_VALUE": numberValue == null ? null : numberValue,
"PREV_SEGMENT_VALUE_DSP": prevSegmentValueDsp == null ? null : prevSegmentValueDsp,
"SEGMENT_NAME": segmentName == null ? null : segmentName,
"SEGMENT_PROMPT": segmentPrompt == null ? null : segmentPrompt,
"SEGMENT_SEQ_NUM": segmentSeqNum == null ? null : segmentSeqNum,
"SEGMENT_VALUE_DSP": segmentValueDsp == null ? null : segmentValueDsp,
"TRANSACTION_NUMBER": transactionNumber == null ? null : transactionNumber,
"VARCHAR2_VALUE": varchar2Value == null ? null : varchar2Value,
};
}

@ -0,0 +1,44 @@
class GetContactNotificationBodyList {
GetContactNotificationBodyList({
this.contactNotificationBody,
});
final List<ContactNotificationBody>? contactNotificationBody;
factory GetContactNotificationBodyList.fromJson(Map<String, dynamic> json) => GetContactNotificationBodyList(
contactNotificationBody: json["ContactNotificationBody"] == null ? null : List<ContactNotificationBody>.from(json["ContactNotificationBody"].map((x) => ContactNotificationBody.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"ContactNotificationBody": contactNotificationBody == null ? null : List<dynamic>.from(contactNotificationBody!.map((x) => x.toJson())),
};
}
class ContactNotificationBody {
ContactNotificationBody({
this.prevSegmentValueDsp,
this.segmentPrompt,
this.segmentValueDsp,
this.updatedFlag,
});
final String? prevSegmentValueDsp;
final String? segmentPrompt;
final String? segmentValueDsp;
final String? updatedFlag;
factory ContactNotificationBody.fromJson(Map<String, dynamic> json) => ContactNotificationBody(
prevSegmentValueDsp: json["PREV_SEGMENT_VALUE_DSP"] == null ? null : json["PREV_SEGMENT_VALUE_DSP"],
segmentPrompt: json["SEGMENT_PROMPT"] == null ? null : json["SEGMENT_PROMPT"],
segmentValueDsp: json["SEGMENT_VALUE_DSP"] == null ? null : json["SEGMENT_VALUE_DSP"],
updatedFlag: json["UPDATED_FLAG"] == null ? null : json["UPDATED_FLAG"],
);
Map<String, dynamic> toJson() => {
"PREV_SEGMENT_VALUE_DSP": prevSegmentValueDsp == null ? null : prevSegmentValueDsp,
"SEGMENT_PROMPT": segmentPrompt == null ? null : segmentPrompt,
"SEGMENT_VALUE_DSP": segmentValueDsp == null ? null : segmentValueDsp,
"UPDATED_FLAG": updatedFlag == null ? null : updatedFlag,
};
}

@ -0,0 +1,27 @@
class GetPhonesNotificationBodyList {
GetPhonesNotificationBodyList({
this.currentPhoneNumber,
this.phoneType,
this.phoneTypeMeaning,
this.proposedPhoneNumber,
});
final String? currentPhoneNumber;
final String? phoneType;
final String? phoneTypeMeaning;
final String? proposedPhoneNumber;
factory GetPhonesNotificationBodyList.fromJson(Map<String, dynamic> json) => GetPhonesNotificationBodyList(
currentPhoneNumber: json["CURRENT_PHONE_NUMBER"] == null ? null : json["CURRENT_PHONE_NUMBER"],
phoneType: json["PHONE_TYPE"] == null ? null : json["PHONE_TYPE"],
phoneTypeMeaning: json["PHONE_TYPE_MEANING"] == null ? null : json["PHONE_TYPE_MEANING"],
proposedPhoneNumber: json["PROPOSED_PHONE_NUMBER"] == null ? null : json["PROPOSED_PHONE_NUMBER"],
);
Map<String, dynamic> toJson() => {
"CURRENT_PHONE_NUMBER": currentPhoneNumber == null ? null : currentPhoneNumber,
"PHONE_TYPE": phoneType == null ? null : phoneType,
"PHONE_TYPE_MEANING": phoneTypeMeaning == null ? null : phoneTypeMeaning,
"PROPOSED_PHONE_NUMBER": proposedPhoneNumber == null ? null : proposedPhoneNumber,
};
}

@ -0,0 +1,57 @@
// To parse this JSON data, do
//
// final replacementList = replacementListFromJson(jsonString);
import 'dart:convert';
ReplacementList replacementListFromJson(String str) => ReplacementList.fromJson(json.decode(str));
String replacementListToJson(ReplacementList data) => json.encode(data.toJson());
class ReplacementList {
ReplacementList({
this.emailAddress,
this.employeeDisplayName,
this.employeeImage,
this.fromRowNum,
this.isFavorite,
this.noOfRows,
this.rowNum,
this.toRowNum,
this.userName,
});
final String? emailAddress;
final String? employeeDisplayName;
final String? employeeImage;
final int? fromRowNum;
bool? isFavorite;
final int? noOfRows;
final int? rowNum;
final int? toRowNum;
final String? userName;
factory ReplacementList.fromJson(Map<String, dynamic> json) => ReplacementList(
emailAddress: json["EMAIL_ADDRESS"] == null ? null : json["EMAIL_ADDRESS"],
employeeDisplayName: json["EMPLOYEE_DISPLAY_NAME"] == null ? null : json["EMPLOYEE_DISPLAY_NAME"],
employeeImage: json["EMPLOYEE_IMAGE"] == null ? null : json["EMPLOYEE_IMAGE"],
fromRowNum: json["FROM_ROW_NUM"] == null ? null : json["FROM_ROW_NUM"],
isFavorite: json["IsFavorite"] == null ? null : json["IsFavorite"],
noOfRows: json["NO_OF_ROWS"] == null ? null : json["NO_OF_ROWS"],
rowNum: json["ROW_NUM"] == null ? null : json["ROW_NUM"],
toRowNum: json["TO_ROW_NUM"] == null ? null : json["TO_ROW_NUM"],
userName: json["USER_NAME"] == null ? null : json["USER_NAME"],
);
Map<String, dynamic> toJson() => {
"EMAIL_ADDRESS": emailAddress == null ? null : emailAddress,
"EMPLOYEE_DISPLAY_NAME": employeeDisplayName == null ? null : employeeDisplayName,
"EMPLOYEE_IMAGE": employeeImage == null ? null : employeeImage,
"FROM_ROW_NUM": fromRowNum == null ? null : fromRowNum,
"IsFavorite": isFavorite == null ? null : isFavorite,
"NO_OF_ROWS": noOfRows == null ? null : noOfRows,
"ROW_NUM": rowNum == null ? null : rowNum,
"TO_ROW_NUM": toRowNum == null ? null : toRowNum,
"USER_NAME": userName == null ? null : userName,
};
}

@ -17,6 +17,7 @@ import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart';
import 'package:mohem_flutter_app/widgets/nfc/nfc_reader_sheet.dart';
import 'package:nfc_manager/nfc_manager.dart';
import 'package:provider/provider.dart';
import 'package:wifi_iot/wifi_iot.dart';
import '../../provider/dashboard_provider_model.dart';
import '../../widgets/location/Location.dart';
@ -198,7 +199,16 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
performNfcAttendance(model);
}
}),
attendanceMethod("Wifi", "assets/images/wufu.svg", isWifiEnabled, () {}),
attendanceMethod("Wifi", "assets/images/wufu.svg", isWifiEnabled, () {
if (isWifiLocationEnabled) {
Location.getCurrentLocation((LatLng? latlng) {
performWifiAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
});
} else {
performWifiAttendance(model);
}
// connectWifi();
}),
],
)
],
@ -257,6 +267,41 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
});
}
Future<void> performWifiAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
if (isWifiLocationEnabled) {
print("wifi location enabled");
} else {
print("wifi not location enabled");
}
bool v = await WiFiForIoTPlugin.connect(AppState().mohemmWifiSSID ?? "", password: AppState().mohemmWifiPassword ?? "", joinOnce: true, security: NetworkSecurity.WPA, withInternet: false);
if (v) {
await WiFiForIoTPlugin.forceWifiUsage(true);
print("connected");
Utils.showLoading(context);
try {
GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 3, nfcValue: "", isGpsRequired: isWifiLocationEnabled, lat: lat, long: lng);
bool status = await model.fetchAttendanceTracking(context);
Utils.hideLoading(context);
await closeWifiRequest();
} catch (ex) {
print(ex);
await closeWifiRequest();
Utils.hideLoading(context);
Utils.handleException(ex, context, (msg) {
Utils.confirmDialog(context, msg);
});
}
} else {
Utils.confirmDialog(context, "Please come near to HMG wifi");
}
}
Future<bool> closeWifiRequest() async {
await WiFiForIoTPlugin.forceWifiUsage(false);
bool v = await WiFiForIoTPlugin.disconnect();
return v;
}
Widget attendanceMethod(String title, String image, bool isEnabled, VoidCallback onPress) => Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),

@ -39,7 +39,7 @@ class MenusWidget extends StatelessWidget {
Row(
children: [
Expanded(
child: data.workListCounter.toString().toText16(color: Colors.white, isBold: true),
child: data.workListCounter.toString().toText16(color: Colors.white, isBold: true,maxlines: 1),
),
SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)
],
@ -67,7 +67,7 @@ class MenusWidget extends StatelessWidget {
Row(
children: [
Expanded(
child: data.missingSwipeCounter.toString().toText16(color: Colors.white, isBold: true),
child: data.missingSwipeCounter.toString().toText16(color: Colors.white, isBold: true,maxlines: 1),
),
SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)
],
@ -94,7 +94,7 @@ class MenusWidget extends StatelessWidget {
Row(
children: [
Expanded(
child: data.leaveBalance.toString().toText16(color: Colors.white, isBold: true),
child: data.leaveBalance.toString().toText16(color: Colors.white, isBold: true,maxlines: 1),
),
SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)
],
@ -121,7 +121,7 @@ class MenusWidget extends StatelessWidget {
Row(
children: [
Expanded(
child: data.ticketBalance.toString().toText16(color: Colors.white, isBold: true),
child: data.ticketBalance.toString().toText16(color: Colors.white, isBold: true,maxlines: 1),
),
SvgPicture.asset("assets/images/arrow_next.svg", color: Colors.white)
],

@ -23,6 +23,7 @@ import 'package:mohem_flutter_app/models/member_login_list_model.dart';
import 'package:mohem_flutter_app/models/privilege_list_model.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/input_widget.dart';
import 'package:shared_preferences/shared_preferences.dart';
class LoginScreen extends StatefulWidget {
LoginScreen({Key? key}) : super(key: key);
@ -70,6 +71,7 @@ class _LoginScreenState extends State<LoginScreen> {
String? firebaseToken;
GetMobileLoginInfoListModel? loginInfo;
Future<void> checkFirebaseToken() async {
try {
Utils.showLoading(context);
@ -108,6 +110,10 @@ class _LoginScreenState extends State<LoginScreen> {
if (_autoLogin) {
AppState().setMemberInformationListModel = (await MemberInformationListModel.getFromPrefs()).first;
AppState().setPrivilegeListModel = await PrivilegeListModel.getFromPrefs();
String mohemmWifiSSID = await Utils.getStringFromPrefs(SharedPrefsConsts.mohemmWifiSSID);
String mohemmWifiPassword = await Utils.getStringFromPrefs(SharedPrefsConsts.mohemmWifiPassword);
AppState().mohemmWifiSSID = mohemmWifiSSID;
AppState().mohemmWifiPassword = mohemmWifiPassword;
}
Utils.hideLoading(context);
if (_autoLogin) {
@ -126,10 +132,11 @@ class _LoginScreenState extends State<LoginScreen> {
@override
Widget build(BuildContext context) {
username.text = "15153";
// username.text = "15153";
password.text = "Abcd@1234";
// username.text = "15444";
// password.text = "w123456@";
username.text = "15444";
return Scaffold(
body: Column(
children: [

@ -118,9 +118,9 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
shrinkWrap: true,
children: [
getButton(3),
getButton(4),
getButton(2),
getButton(1),
getButton(4),
],
)
],
@ -226,7 +226,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
} else {
try {
Utils.showLoading(context);
if (_flag == 2 || _flag == 3) {
if (_flag == 4 || _flag == 3) {
bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics();
if (authenticateWithFaceAndTouchID) {
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.dashboard, (Route<dynamic> route) => false);
@ -308,11 +308,11 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
Widget getButton(int flag) {
switch (flag) {
case 4:
case 2:
return _loginOptionButton(LocaleKeys.verifyThroughWhatsapp.tr(), 'assets/images/login/verify_whatsapp.svg', flag, null);
case 1:
return _loginOptionButton(LocaleKeys.verifyThroughSMS.tr(), 'assets/images/login/verify_sms.svg', flag, null);
case 2:
case 4:
return _loginOptionButton(LocaleKeys.verifyThroughFingerprint.tr(), 'assets/images/login/verify_thumb.svg', flag, BiometricType.fingerprint.index);
case 3:
return _loginOptionButton(LocaleKeys.verifyThroughFace.tr(), 'assets/images/login/verify_face.svg', flag, BiometricType.face.index);

@ -140,9 +140,9 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
shrinkWrap: true,
children: [
getButton(3),
getButton(4),
getButton(2),
getButton(1),
getButton(4),
],
)
],
@ -648,7 +648,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
} else {
try {
Utils.showLoading(context);
if (_flag == 2 || _flag == 3) {
if (_flag == 4 || _flag == 3) {
bool authenticateWithFaceAndTouchID = await loginWithFaceIDAndBiometrics();
if (!authenticateWithFaceAndTouchID) {
return;
@ -686,8 +686,12 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
print(element.serviceName.toString() + " " + element.previlege.toString()); // Check availability
});
PrivilegeListModel.saveToPrefs(genericResponseModel.privilegeList ?? []);
AppState().mohemmWifiSSID = genericResponseModel.mohemmWifiSSID;
AppState().mohemmWifiPassword = genericResponseModel.mohemmWifiPassword;
Utils.saveStringFromPrefs(SharedPrefsConsts.username, AppState().getUserName!);
Utils.saveStringFromPrefs(SharedPrefsConsts.password, AppState().password!);
Utils.saveStringFromPrefs(SharedPrefsConsts.mohemmWifiSSID, genericResponseModel.mohemmWifiSSID!);
Utils.saveStringFromPrefs(SharedPrefsConsts.mohemmWifiPassword, genericResponseModel.mohemmWifiPassword!);
}
Utils.hideLoading(context);
Navigator.pop(context);
@ -695,7 +699,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
} catch (ex) {
print(ex);
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
Utils.handleException(ex, context, null);
}
},
() => {
@ -705,7 +709,7 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
} catch (ex) {
print(ex);
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
Utils.handleException(ex, context, null);
}
}
},
@ -735,11 +739,11 @@ class _VerifyLoginScreenState extends State<VerifyLoginScreen> {
Widget getButton(int flag) {
switch (flag) {
case 4:
case 2:
return _loginOptionButton(LocaleKeys.verifyThroughWhatsapp.tr(), 'assets/images/login/verify_whatsapp.svg', flag, null);
case 1:
return _loginOptionButton(LocaleKeys.verifyThroughSMS.tr(), 'assets/images/login/verify_sms.svg', flag, null);
case 2:
case 4:
return _loginOptionButton(LocaleKeys.verifyThroughFingerprint.tr(), 'assets/images/login/verify_thumb.svg', flag, BiometricType.fingerprint.index);
case 3:
return _loginOptionButton(LocaleKeys.verifyThroughFace.tr(), 'assets/images/login/verify_face.svg', flag, BiometricType.face.index);

@ -209,14 +209,15 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
myFab("Skip", "assets/images/skip.svg").onPress(() {
// if (AppState().workList!.length - 1 > AppState().workListIndex!) {
// AppState().setWorkListIndex = AppState().workListIndex! + 1;
// workListData = null;
// showFabOptions = false;
// getDataFromState();
// } else if (AppState().workList!.length - 1 == AppState().workListIndex!) {
// Navigator.pop(context);
// }
if (AppState().requestAllList!.length - 1 > AppState().itgWorkListIndex!) {
AppState().itgWorkListIndex = AppState().itgWorkListIndex! + 1;
requestDetails = null;
itgRequest = null;
showFabOptions = false;
getDataFromState();
} else if (AppState().requestAllList!.length - 1 == AppState().itgWorkListIndex!) {
Navigator.pop(context);
}
}),
12.height,
...viewApiButtonsList(allowedActionList),

@ -101,7 +101,7 @@ class ApprovalLevelfragment extends StatelessWidget {
}).expanded,
Container(width: 1, height: 30, color: MyColors.lightGreyEFColor),
LocaleKeys.delegate.tr().toText12(color: MyColors.gradiantEndColor).center.paddingOnly(top: 6, bottom: 6).onPress(() {
showMyBottomSheet(context, child: DelegateSheet());
// showMyBottomSheet(context, child: DelegateSheet());
}).expanded,
],
),

@ -1,7 +1,14 @@
import 'dart:collection';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/api/worklist/worklist_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart';
import 'package:mohem_flutter_app/ui/work_list/sheets/search_options_sheet.dart';
import 'package:mohem_flutter_app/ui/work_list/sheets/selected_item_sheet.dart';
import 'package:mohem_flutter_app/widgets/bottom_sheet.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
@ -10,21 +17,92 @@ import 'package:mohem_flutter_app/widgets/input_widget.dart';
import 'package:mohem_flutter_app/widgets/radio/show_radio.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
class DelegateSheet extends StatelessWidget {
import '../../../models/generic_response_model.dart';
import '../../../models/get_action_history_list_model.dart';
import '../../../models/worklist/get_favorite_replacements_model.dart';
class DelegateSheet extends StatefulWidget {
int? notificationID;
String title,apiMode;
List<GetActionHistoryList>? actionHistoryList;
DelegateSheet({required this.title,required this.apiMode,this.notificationID, this.actionHistoryList});
@override
State<DelegateSheet> createState() => _DelegateSheetState();
}
class _DelegateSheetState extends State<DelegateSheet> {
TextEditingController username = TextEditingController();
bool isNeedEnableTextField = false;
String? selectedFavLetter;
String selectedType = "Workflow";
String inputRes = "";
List<String>? favLetters;
List<GetFavoriteReplacements>? favUsersList;
List<ReplacementList>? replacementList;
Future fetchFavLetters({bool isNeedLoading = true}) async {
favLetters = [];
if (isNeedLoading) Utils.showLoading(context);
List<GetFavoriteReplacements>? favList = await WorkListApiClient().getFavoriteReplacementWithoutImage();
List<String> result = [];
favList!.forEach((element) {
result.add(element.employeeDisplayName![0]);
});
favLetters = LinkedHashSet<String>.from(result).toList();
if (isNeedLoading) Utils.hideLoading(context);
setState(() {
favLetters!.sort((a, b) {
return a.toLowerCase().compareTo(b.toLowerCase());
});
});
return null;
}
Future fetchFavUsersList({bool isNeedLoading = true}) async {
if (isNeedLoading) Utils.showLoading(context);
favUsersList = await WorkListApiClient().getFavoriteReplacementWithImage(selectedFavLetter ?? "");
if (isNeedLoading) Utils.hideLoading(context);
setState(() {});
return null;
}
fetchChangeFav({required String email, required String employeName, required String image, required String userName, bool isFav = false, bool isNeedToRefresh = false}) async {
Utils.showLoading(context);
favLetters = null;
selectedFavLetter = null;
GenericResponseModel model = await WorkListApiClient().changeFavoriteReplacements(
email: email,
employeName: employeName,
image: image,
userName: userName,
isFav: isFav,
);
if (isNeedToRefresh) {
await fetchFavLetters(isNeedLoading: false);
if (favLetters != null) await fetchFavUsersList(isNeedLoading: false);
}
Utils.hideLoading(context);
setState(() {});
}
Future fetchUserByInput({bool isNeedLoading = true}) async {
if (isNeedLoading) Utils.showLoading(context);
replacementList = await WorkListApiClient().searchUserByInput(
userId: selectedType == "Employee ID" ? inputRes : "",
userName: selectedType == "Employee Name" ? inputRes : "",
email: selectedType == "Employee Email" ? inputRes : "",
);
if (isNeedLoading) Utils.hideLoading(context);
setState(() {});
return null;
}
@override
Widget build(BuildContext context) {
List<String> related = [
"Amjad Khan",
"Munahi Nasser",
];
List<String> favorites = [
"Amjad Khan",
"Muhammad Ahmed",
"Majid Ali",
"Faris Mahmoud",
];
return Container(
width: double.infinity,
height: MediaQuery.of(context).size.height - 80,
@ -37,81 +115,219 @@ class DelegateSheet extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Delegate".toText24(),
widget.title.toText24(),
24.height,
"Search".toText16(),
12.height,
Row(
20.height,
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
flex: 2,
child: ShowRadio(
title: "Name", value: "Name", groupValue: "Name"),
),
Expanded(
flex: 3,
child: ShowRadio(
title: "User Name",
value: "User Name",
groupValue: "Name"),
Container(
padding: EdgeInsets.only(left: 8, right: 4, top: 6, bottom: 6),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.transparent,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: Row(
children: [
Expanded(
child: InputWidget(
"Search By " + selectedType,
"",
username,
isEnableBorder: false,
horizontalPadding: 4,
verticalPadding: 3,
isInputTypeNum: selectedType == "Employee ID" ? true : false,
isEnable: isNeedEnableTextField,
onChange: (v) {
inputRes = v;
},
),
),
Container(
height: 24,
width: 1,
color: Color(0xffE5E5E5),
),
Container(
padding: EdgeInsets.all(8),
child: Row(
children: [
Text(
selectedType,
style: const TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
),
4.width,
Icon(
Icons.keyboard_arrow_down,
color: Colors.black,
size: 16,
),
],
),
).onPress(() {
showMyBottomSheet(
context,
child: SearchOptionsSheet(
selectedType,
onSelection: (String value) {
selectedType = value;
if (value == "Workflow") {
setState(() {
isNeedEnableTextField = false;
selectedFavLetter = null;
favLetters = null;
favUsersList = null;
});
} else if (value == "Favorites") {
isNeedEnableTextField = false;
fetchFavLetters();
} else {
setState(() {
isNeedEnableTextField = true;
selectedFavLetter = null;
favLetters = null;
favUsersList = null;
});
}
},
),
);
}),
],
),
),
if (isNeedEnableTextField)
FlatButton(
onPressed: () {
fetchUserByInput();
},
child: Text(
"Search",
style: TextStyle(
color: Colors.blue,
decoration: TextDecoration.underline,
),
),
)
],
),
if (!isNeedEnableTextField) 12.height,
Row(
children: [
Expanded(
flex: 2,
child: ShowRadio(
title: "Email",
value: "Email",
groupValue: "Name"),
child: Container(
width: double.infinity,
child: selectedFavLetter == null && favLetters != null
? Container(
width: double.infinity,
alignment: Alignment.center,
child: "Please select letter to see Fav results".toText12(),
)
: favUsersList != null
? ListView.separated(
itemBuilder: (context, index) {
return showFavUserItem(favUsersList![index]);
},
separatorBuilder: (context, index) {
return Container(
color: MyColors.borderColor,
width: double.infinity,
height: 1,
margin: EdgeInsets.only(top: 8, bottom: 8),
).onPress(() {});
},
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: favUsersList!.length,
padding: EdgeInsets.only(top: 8, bottom: 8),
)
: isNeedEnableTextField && replacementList == null
? Container(
width: double.infinity,
alignment: Alignment.center,
child: "Search User".toText12(),
)
: isNeedEnableTextField && replacementList!.length == 0
? Container(
width: double.infinity,
alignment: Alignment.center,
child: "No Data Found".toText12(),
)
: isNeedEnableTextField
? ListView.separated(
itemBuilder: (context, index) {
return showInputUserItem(replacementList![index]);
},
separatorBuilder: (context, index) {
return Container(
color: MyColors.borderColor,
width: double.infinity,
height: 1,
margin: EdgeInsets.only(top: 8, bottom: 8),
);
},
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: replacementList!.length,
padding: EdgeInsets.only(top: 8, bottom: 8),
)
: ListView.separated(
itemBuilder: (context, index) {
return showItem(widget.actionHistoryList![index]);
},
separatorBuilder: (context, index) {
return Container(
color: MyColors.borderColor,
width: double.infinity,
height: 1,
margin: EdgeInsets.only(top: 8, bottom: 8),
);
},
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: widget.actionHistoryList!.length,
padding: EdgeInsets.only(top: 8, bottom: 8),
),
),
),
if (favLetters != null)
Container(
width: 30,
// color: Colors.red,
child: ListView.separated(
itemBuilder: (context, index) {
return Container(
padding: EdgeInsets.all(8),
alignment: Alignment.center,
child: favLetters![index].toText14(color: selectedFavLetter == favLetters![index] ? MyColors.gradiantStartColor : Colors.black),
).onPress(() {
selectedFavLetter = favLetters![index].toUpperCase();
fetchFavUsersList();
});
},
separatorBuilder: (context, index) {
return SizedBox(
height: 0,
);
},
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: favLetters!.length,
),
),
],
),
20.height,
InputWidget(
"Search By Username",
"",
username,
isBackgroundEnable: true,
),
24.height,
"Related".toText16(),
12.height,
ListView.separated(
itemBuilder: (context, index) {
return showItem(context, related[index]);
},
separatorBuilder: (context, index) {
return Container(
color: MyColors.borderColor,
width: double.infinity,
height: 1,
margin: EdgeInsets.only(top: 8, bottom: 8),
);
},
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: related.length,
padding: EdgeInsets.only(top: 8, bottom: 8),
),
24.height,
"Favorites".toText16(),
12.height,
ListView.separated(
itemBuilder: (context, index) {
return showItem(context, favorites[index],
isEnabled: true);
},
separatorBuilder: (context, index) {
return Container(
color: MyColors.borderColor,
width: double.infinity,
height: 1,
margin: EdgeInsets.only(top: 8, bottom: 8),
);
},
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: favorites.length,
padding: EdgeInsets.only(top: 8, bottom: 8),
),
],
),
),
@ -138,26 +354,137 @@ class DelegateSheet extends StatelessWidget {
);
}
Widget showItem(BuildContext context, String name, {bool isEnabled = false}) {
Widget showItem(GetActionHistoryList actionHistory) {
return InkWell(
onTap: () {
showMyBottomSheet(context, child: SelectedItemSheet("Delegate"));
showMyBottomSheet(context,
child: SelectedItemSheet(
"Comment",
apiMode: widget.apiMode,
actionHistoryList: actionHistory,
notificationID: widget.notificationID,
));
},
child: Row(
children: [
CircularAvatar(
url: actionHistory.eMPLOYEEIMAGE ?? "",
height: 30,
width: 30,
isImageBase64: true,
),
16.width,
Expanded(
child: name.toText12(),
child: (actionHistory.nAME ?? "").toText12(),
),
Icon(
Icons.star,
size: 16,
color: isEnabled ? MyColors.yellowColor : MyColors.borderColor,
IconButton(
onPressed: () {
actionHistory.isFavorite = true;
fetchChangeFav(
email: actionHistory.eMAILADDRESS ?? "",
employeName: actionHistory.nAME ?? "",
image: actionHistory.eMPLOYEEIMAGE ?? "",
userName: actionHistory.uSERNAME ?? "",
isFav: true,
);
},
icon: Icon(
Icons.star,
size: 16,
color: (actionHistory.isFavorite ?? false) ? MyColors.yellowColor : MyColors.borderColor,
),
)
],
),
);
}
Widget showFavUserItem(GetFavoriteReplacements actionHistory) {
return InkWell(
onTap: () {
showMyBottomSheet(context,
child: SelectedItemSheet(
"Comment",
apiMode: widget.apiMode,
favoriteReplacements: actionHistory,
notificationID: widget.notificationID,
));
},
child: Row(
children: [
CircularAvatar(
url: actionHistory.employeeImage ?? "",
height: 30,
width: 30,
isImageBase64: true,
),
16.width,
Expanded(
child: (actionHistory.employeeDisplayName ?? "").toText12(),
),
IconButton(
onPressed: () {
fetchChangeFav(
email: actionHistory.emailAddress ?? "",
employeName: actionHistory.employeeDisplayName ?? "",
image: actionHistory.employeeImage ?? "",
userName: actionHistory.userName ?? "",
isFav: false,
isNeedToRefresh: true,
);
},
icon: Icon(
Icons.star,
size: 16,
color: MyColors.yellowColor,
),
)
],
),
);
}
Widget showInputUserItem(ReplacementList actionHistory) {
return InkWell(
onTap: () {
showMyBottomSheet(context,
child: SelectedItemSheet(
"Comment",
apiMode: widget.apiMode,
replacementList: actionHistory,
notificationID: widget.notificationID,
));
},
child: Row(
children: [
CircularAvatar(
url: actionHistory.employeeImage ?? "",
height: 30,
width: 30,
isImageBase64: true,
),
16.width,
Expanded(
child: (actionHistory.employeeDisplayName ?? "").toText12(),
),
IconButton(
onPressed: () {
actionHistory.isFavorite = !(actionHistory.isFavorite ?? false);
fetchChangeFav(
email: actionHistory.emailAddress ?? "",
employeName: actionHistory.employeeDisplayName ?? "",
image: actionHistory.employeeImage ?? "",
userName: actionHistory.userName ?? "",
isFav: false,
isNeedToRefresh: false,
);
},
icon: Icon(
Icons.star,
size: 16,
color: (actionHistory.isFavorite ?? false) ? MyColors.yellowColor : MyColors.borderColor,
),
)
],
),
);

@ -141,7 +141,7 @@ class RequestMoreInfoSheet extends StatelessWidget {
Widget showItem(BuildContext context, String name, {bool isEnabled = false}) {
return InkWell(
onTap: () {
showMyBottomSheet(context, child: SelectedItemSheet("Request more info"));
// showMyBottomSheet(context, child: SelectedItemSheet("Request more info"));
},
child: Row(
children: [

@ -0,0 +1,65 @@
import 'package:flutter/material.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 '../../../classes/colors.dart';
import '../../../widgets/radio/show_radio.dart';
class SearchOptionsSheet extends StatelessWidget {
String selectedType;
Function(String) onSelection;
SearchOptionsSheet(this.selectedType, {required this.onSelection});
List<String> searchOptions = [
"Workflow",
"Favorites",
"Employee ID",
"Employee Email",
"Employee Name",
];
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
padding: EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Search By".toText16(),
12.height,
ListView.separated(
itemBuilder: (context, index) {
return Container(
width: double.infinity,
padding: EdgeInsets.only(top: 12, bottom: 12),
child: ShowRadio(
title: searchOptions[index],
value: searchOptions[index],
groupValue: selectedType,
selectedColor: MyColors.gradiantStartColor,
),
).onPress(() {
onSelection(searchOptions[index]);
Navigator.pop(context);
});
},
separatorBuilder: (context, index) {
return Container(
width: double.infinity,
height: 1,
color: Color(0xffE3E3E3),
);
},
itemCount: searchOptions.length,
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
)
],
),
);
}
}

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/api/worklist/worklist_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
@ -8,12 +9,23 @@ import 'package:mohem_flutter_app/widgets/input_widget.dart';
import 'package:mohem_flutter_app/widgets/radio/show_radio.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import '../../../app_state/app_state.dart';
import '../../../classes/utils.dart';
import '../../../models/get_action_history_list_model.dart';
import '../../../models/worklist/get_favorite_replacements_model.dart';
import '../../../models/worklist/replacement_list_model.dart';
class SelectedItemSheet extends StatelessWidget {
String title;
String title, apiMode;
int? notificationID;
GetActionHistoryList? actionHistoryList;
GetFavoriteReplacements? favoriteReplacements;
ReplacementList? replacementList;
SelectedItemSheet(this.title);
SelectedItemSheet(this.title, {required this.apiMode, this.notificationID, this.actionHistoryList, this.favoriteReplacements, this.replacementList});
TextEditingController username = TextEditingController();
String comment = "";
@override
Widget build(BuildContext context) {
@ -31,40 +43,19 @@ class SelectedItemSheet extends StatelessWidget {
children: [
title.toText24(),
24.height,
"Search".toText16(),
if (actionHistoryList != null) showItem(actionHistoryList!.nAME, actionHistoryList!.isFavorite),
if (favoriteReplacements != null) showItem(favoriteReplacements!.employeeDisplayName, true),
if (replacementList != null) showItem(replacementList!.employeeDisplayName, replacementList!.isFavorite),
12.height,
Row(
children: [
Expanded(
flex: 2,
child: ShowRadio(
title: "Name", value: "Name", groupValue: "Name"),
),
Expanded(
flex: 3,
child: ShowRadio(
title: "User Name",
value: "User Name",
groupValue: "Name"),
),
Expanded(
flex: 2,
child: ShowRadio(
title: "Email",
value: "Email",
groupValue: "Name"),
),
],
),
20.height,
showItem("name"),
20.height,
InputWidget(
"Enter a note",
"This is simple note",
username,
isBackgroundEnable: true,
lines: 5,
onChange: (v) {
comment = v;
},
),
],
),
@ -96,7 +87,18 @@ class SelectedItemSheet extends StatelessWidget {
child: DefaultButton(
"Submit",
() {
Navigator.pop(context);
String? email = "", userId = "";
if (actionHistoryList != null) {
email = actionHistoryList!.eMAILADDRESS;
userId = actionHistoryList!.uSERNAME;
} else if (favoriteReplacements != null) {
email = favoriteReplacements!.emailAddress;
userId = favoriteReplacements!.userName;
} else {
email = replacementList!.emailAddress;
userId = replacementList!.userName;
}
performNetworkCall(context, email: email ?? "", userId: userId ?? "");
},
colors: [
Color(0xff32D892),
@ -111,7 +113,21 @@ class SelectedItemSheet extends StatelessWidget {
);
}
Widget showItem(String name) {
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);
Utils.hideLoading(context);
Navigator.pop(context);
Navigator.pop(context);
Navigator.pop(context, "delegate_reload");
}catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
Widget showItem(String? name, bool? isFav) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
@ -130,19 +146,12 @@ class SelectedItemSheet extends StatelessWidget {
),
16.width,
Expanded(
child: name.toText12(),
child: (name ?? "").toText12(),
),
Container(
decoration: BoxDecoration(
color: MyColors.redColor,
borderRadius: BorderRadius.all(Radius.circular(100)),
),
padding: EdgeInsets.all(3),
child: Icon(
Icons.star,
size: 12,
color: Colors.white,
),
Icon(
Icons.star,
size: 12,
color: (isFav ?? false) ? MyColors.yellowColor : MyColors.borderColor,
),
],
),

@ -229,24 +229,28 @@ class _WorkListScreenState extends State<WorkListScreen> {
onTap: () async {
AppState().setItgWorkListIndex = index;
var shouldReloadData = await Navigator.pushNamed(context, AppRoutes.itgDetail);
// if (shouldReloadData != null) {
// workList!.remove(data);
// AppState().setWorkList = workList;
// if (data.iTEMTYPE == "ITG") {
//
//
// } else {
// providerData.getOpenNotificationsList?.forEach((element) {
// if (element.itemType == data.iTEMTYPE) {
// element.openNtfNumber = element.openNtfNumber! - 1;
// }
// });
// providerData.workListCounter = providerData.workListCounter - 1;
// providerData.notify();
// }
// calculateCounter();
// if (mounted) setState(() {});
// }
if (shouldReloadData != null) {
if (shouldReloadData.toString() == "delegate_reload") {
calculateCounter();
getWorkList();
}
// workList!.remove(data);
// AppState().setWorkList = workList;
// if (data.iTEMTYPE == "ITG") {
//
//
// } else {
// providerData.getOpenNotificationsList?.forEach((element) {
// if (element.itemType == data.iTEMTYPE) {
// element.openNtfNumber = element.openNtfNumber! - 1;
// }
// });
// providerData.workListCounter = providerData.workListCounter - 1;
// providerData.notify();
// }
// calculateCounter();
// if (mounted) setState(() {});
}
},
child: Container(
width: double.infinity,
@ -309,20 +313,25 @@ class _WorkListScreenState extends State<WorkListScreen> {
var data = workList![index];
var shouldReloadData = await Navigator.pushNamed(context, AppRoutes.workListDetail, arguments: workData);
if (shouldReloadData != null) {
workList!.remove(data);
AppState().setWorkList = workList;
if (data.iTEMTYPE == "ITG") {
if (shouldReloadData.toString() == "delegate_reload") {
calculateCounter();
getWorkList();
} else {
providerData.getOpenNotificationsList?.forEach((element) {
if (element.itemType == data.iTEMTYPE) {
element.openNtfNumber = element.openNtfNumber! - 1;
}
});
providerData.workListCounter = providerData.workListCounter - 1;
providerData.notify();
workList!.remove(data);
AppState().setWorkList = workList;
if (data.iTEMTYPE == "ITG") {
} else {
providerData.getOpenNotificationsList?.forEach((element) {
if (element.itemType == data.iTEMTYPE) {
element.openNtfNumber = element.openNtfNumber! - 1;
}
});
providerData.workListCounter = providerData.workListCounter - 1;
providerData.notify();
}
calculateCounter();
if (mounted) setState(() {});
}
calculateCounter();
if (mounted) setState(() {});
}
},
child: Container(

@ -24,6 +24,7 @@ import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_mod
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/notification_get_respond_attributes_list_model.dart';
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
import 'package:mohem_flutter_app/ui/work_list/sheets/delegate_sheet.dart';
import 'package:mohem_flutter_app/ui/work_list/worklist_fragments/actions_fragment.dart';
import 'package:mohem_flutter_app/ui/work_list/worklist_fragments/attachments_fragment.dart';
import 'package:mohem_flutter_app/ui/work_list/worklist_fragments/detail_fragment.dart';
@ -33,6 +34,13 @@ import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/dialogs/accept_reject_input_dialog.dart';
import '../../models/worklist/hr/eit_otification_body_model.dart';
import '../../models/worklist/hr/get_basic_det_ntf_body_list_model.dart';
import '../../models/worklist/hr/get_contact_notification_body_list_model.dart';
import '../../models/worklist/hr/get_phones_notification_body_list_model.dart';
import '../../widgets/bottom_sheet.dart';
import '../../widgets/dialogs/confirm_dialog.dart';
class WorkListDetailScreen extends StatefulWidget {
WorkListDetailScreen({Key? key}) : super(key: key);
@ -55,10 +63,16 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
List<GetStampMsNotificationBodyList> getStampMsNotifications = [];
List<GetStampNsNotificationBodyList> getStampNsNotifications = [];
List<GetMoNotificationBodyList> getMoNotificationBodyList = [];
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotifications;
List<NotificationGetRespondAttributesList> getNotificationRespondAttributes = [];
NotificationGetRespondAttributesList? notificationNoteInput;
//HR Details Screen Requests
List<GetEitCollectionNotificationBodyList>? getEitCollectionNotificationBodyList = [];
List<GetPhonesNotificationBodyList>? getPhonesNotificationBodyList = [];
List<GetBasicDetNtfBodyList>? getBasicDetNtfBodyList = [];
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotificationBodyList = [];
GetContactNotificationBodyList? getContactNotificationBodyList;
GenericResponseModel? getBasicNTFBody;
GenericResponseModel? getICBody;
GenericResponseModel? subordinatesLeavesModel;
@ -86,9 +100,21 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!);
}
if (workListData!.iTEMTYPE == "HRSSA") {
getBasicNTFBody = await WorkListApiClient().getBasicDetNTFBody(workListData!.nOTIFICATIONID!, -999);
getAbsenceCollectionNotifications = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID!, -999);
subordinatesLeavesModel = await WorkListApiClient().getSubordinatesLeaves("", "");
if (workListData!.rEQUESTTYPE == "EIT") {
getEitCollectionNotificationBodyList = await WorkListApiClient().GetEitNotificationBody(workListData!.nOTIFICATIONID);
} else if (workListData!.rEQUESTTYPE == "PHONE_NUMBERS") {
getPhonesNotificationBodyList = await WorkListApiClient().getPhonesNotificationBodyList(workListData!.nOTIFICATIONID);
} else if (workListData!.rEQUESTTYPE == "BASIC_DETAILS") {
getBasicDetNtfBodyList = await WorkListApiClient().getBasicDetNtfBodyList(workListData!.nOTIFICATIONID);
} else if (workListData!.rEQUESTTYPE == "ABSENCE") {
getAbsenceCollectionNotificationBodyList = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID);
} else if (workListData!.rEQUESTTYPE == "CONTACT") {
getContactNotificationBodyList = await WorkListApiClient().getContactNotificationBodyList(workListData!.nOTIFICATIONID);
}
// getBasicNTFBody = await WorkListApiClient().getBasicDetNTFBody(workListData!.nOTIFICATIONID!, -999);
// getAbsenceCollectionNotifications = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID!, -999);
// subordinatesLeavesModel = await WorkListApiClient().getSubordinatesLeaves("", "");
}
if (workListData!.iTEMTYPE == "STAMP") {
if (workListData!.rEQUESTTYPE == "STAMP_MS") {
@ -180,11 +206,16 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
},
children: [
InfoFragment(
poHeaderList: getPoNotificationBody?.pOHeader ?? [],
workListData: workListData,
getAbsenceCollectionNotifications: getAbsenceCollectionNotifications,
itemCreationHeader: getItemCreationNtfBody?.itemCreationHeader ?? [],
getStampMsNotifications: getStampMsNotifications),
poHeaderList: getPoNotificationBody?.pOHeader ?? [],
workListData: workListData,
itemCreationHeader: getItemCreationNtfBody?.itemCreationHeader ?? [],
getStampMsNotifications: getStampMsNotifications,
getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList,
getPhonesNotificationBodyList: getPhonesNotificationBodyList,
getBasicDetNtfBodyList: getBasicDetNtfBodyList,
getAbsenceCollectionNotificationBodyList: getAbsenceCollectionNotificationBodyList,
getContactNotificationBodyList: getContactNotificationBodyList,
),
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP")
? DetailFragment(workListData, memberInformationListModel)
: RequestFragment(
@ -192,7 +223,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
poLinesList: getPoNotificationBody?.pOLines ?? [],
itemCreationLines: getItemCreationNtfBody?.itemCreationLines ?? [],
),
ActionsFragment(actionHistoryList),
ActionsFragment(workListData!.nOTIFICATIONID, actionHistoryList),
AttachmentsFragment(getAttachmentList),
],
).expanded,
@ -330,19 +361,59 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
switch (notificationButton.bUTTONACTION) {
case "DELEGATE":
// do something
showMyBottomSheet(context, child: DelegateSheet(title: "Delegate", apiMode: "DELEGATE", notificationID: workListData!.nOTIFICATIONID, actionHistoryList: actionHistoryList));
break;
case "REQUEST_INFO":
// do something else
showMyBottomSheet(context, child: DelegateSheet(title: "Request Info", apiMode: "REQUEST_INFO", notificationID: workListData!.nOTIFICATIONID, actionHistoryList: actionHistoryList));
break;
case "RFC":
// do something else
break;
case "UPDATE_ACTION":
// do something else
case "APPROVE_AND_FORWARD":
// do something else
showMyBottomSheet(context,
child: DelegateSheet(title: "Approve and Forward", apiMode: "APPROVE_AND_FORWARD", notificationID: workListData!.nOTIFICATIONID, actionHistoryList: actionHistoryList));
break;
case "FORWARD":
// do something else
showMyBottomSheet(context, child: DelegateSheet(title: "Forward", apiMode: "FORWARD", notificationID: workListData!.nOTIFICATIONID, actionHistoryList: actionHistoryList));
break;
case "REJECT":
// do something else
performNetworkCall(context, email: "", userId: "");
break;
case "RETURNED":
// do something else
Navigator.pop(context);
break;
}
}
Future<void> performNetworkCall(BuildContext context, {String? email, String? userId}) async {
showDialog(
context: context,
builder: (cxt) => ConfirmDialog(
message: "Are you sure want to reject?",
okTitle: "Reject",
onTap: () async {
Navigator.pop(cxt);
Utils.showLoading(context);
try {
await WorkListApiClient().submitComment(comment: "", email: email, userId: userId, notificationId: workListData!.nOTIFICATIONID, apiMode: "REJECT");
Utils.hideLoading(context);
Navigator.pop(context, "delegate_reload");
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
},
),
);
}
Widget myTab(String title, int index) {
bool isSelected = (index == tabIndex);
return Column(

@ -13,9 +13,10 @@ import 'package:mohem_flutter_app/widgets/bottom_sheet.dart';
import 'package:mohem_flutter_app/widgets/circular_avatar.dart';
class ActionsFragment extends StatelessWidget {
int? notificationID;
List<GetActionHistoryList> actionHistoryList;
ActionsFragment(this.actionHistoryList, {Key? key}) : super(key: key);
ActionsFragment(this.notificationID, this.actionHistoryList, {Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
@ -96,11 +97,11 @@ class ActionsFragment extends StatelessWidget {
Row(
children: [
LocaleKeys.request_info.tr().toText12(color: MyColors.grey67Color).center.paddingOnly(top: 6, bottom: 6).onPress(() {
showMyBottomSheet(context, child: RequestMoreInfoSheet());
showMyBottomSheet(context, child: DelegateSheet(title: "Request Info", apiMode: "REQUEST_INFO", notificationID: notificationID, actionHistoryList: actionHistoryList));
}).expanded,
Container(width: 1, height: 30, color: MyColors.lightGreyEFColor),
LocaleKeys.delegate.tr().toText12(color: MyColors.gradiantEndColor).center.paddingOnly(top: 6, bottom: 6).onPress(() {
showMyBottomSheet(context, child: DelegateSheet());
showMyBottomSheet(context, child: DelegateSheet(title: "Delegate", apiMode: "DELEGATE", notificationID: notificationID, actionHistoryList: actionHistoryList));
}).expanded,
],
),

@ -1,9 +1,15 @@
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.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/models/get_attachement_list_model.dart';
import 'package:open_file/open_file.dart';
import 'package:path_provider/path_provider.dart';
class AttachmentsFragment extends StatelessWidget {
final List<GetAttachementList> getAttachmentList;
@ -21,7 +27,11 @@ class AttachmentsFragment extends StatelessWidget {
12.width,
(getAttachmentList[index].fILENAME?.capitalizeFirstofEach ?? "").toText16().expanded,
],
).objectContainerView().onPress(() {});
).objectContainerView().onPress(() async {
print("calling");
String path = await _createFileFromString(getAttachmentList[index].fILEDATA ?? "", getAttachmentList[index].fILECONTENTTYPE ?? "");
OpenFile.open(path);
});
},
separatorBuilder: (BuildContext context, int index) => 12.height,
).paddingAll(21);
@ -51,4 +61,13 @@ class AttachmentsFragment extends StatelessWidget {
}
return icon;
}
Future<String> _createFileFromString(String encodedStr, String ext) async {
Uint8List bytes = base64.decode(encodedStr);
String dir = (await getApplicationDocumentsDirectory()).path;
File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext);
await file.writeAsBytes(bytes);
// print(file.path);
return file.path;
}
}

@ -14,21 +14,35 @@ import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_mod
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart';
import '../../../models/worklist/hr/eit_otification_body_model.dart';
import '../../../models/worklist/hr/get_basic_det_ntf_body_list_model.dart';
import '../../../models/worklist/hr/get_contact_notification_body_list_model.dart';
import '../../../models/worklist/hr/get_phones_notification_body_list_model.dart';
class InfoFragment extends StatelessWidget {
WorkListResponseModel? workListData;
List<POHeader> poHeaderList;
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotifications;
List<GetStampMsNotificationBodyList>? getStampMsNotifications;
List<GetStampNsNotificationBodyList>? getStampNsNotifications;
List<ItemCreationHeader> itemCreationHeader;
List<GetEitCollectionNotificationBodyList>? getEitCollectionNotificationBodyList;
List<GetPhonesNotificationBodyList>? getPhonesNotificationBodyList;
List<GetBasicDetNtfBodyList>? getBasicDetNtfBodyList;
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotificationBodyList;
GetContactNotificationBodyList? getContactNotificationBodyList;
InfoFragment(
{this.workListData,
this.poHeaderList = const <POHeader>[],
this.itemCreationHeader = const <ItemCreationHeader>[],
this.getAbsenceCollectionNotifications,
this.getStampMsNotifications,
this.getStampNsNotifications});
InfoFragment({
this.workListData,
this.poHeaderList = const <POHeader>[],
this.itemCreationHeader = const <ItemCreationHeader>[],
this.getStampMsNotifications,
this.getStampNsNotifications,
this.getEitCollectionNotificationBodyList,
this.getPhonesNotificationBodyList,
this.getBasicDetNtfBodyList,
this.getAbsenceCollectionNotificationBodyList,
this.getContactNotificationBodyList,
});
@override
Widget build(BuildContext context) {
@ -47,11 +61,15 @@ class InfoFragment extends StatelessWidget {
ItemDetailView(LocaleKeys.subject.tr(), workListData!.sUBJECT ?? ""),
],
).objectContainerView(),
if ((getAbsenceCollectionNotifications?.length ?? 0) > 0) getAbsenceCollectionNotificationsListView(getAbsenceCollectionNotifications ?? []).objectContainerView(title: "Absence Notifications"),
if (getStampMsNotifications?.isNotEmpty ?? false) getStampMsNotificationsListView(getStampMsNotifications ?? []).objectContainerView(title: "Stamp Notifications"),
if (getStampNsNotifications?.isNotEmpty ?? false) getStampNsNotificationsListView(getStampNsNotifications ?? []).objectContainerView(title: "Stamp Notifications"),
if (poHeaderList.isNotEmpty) getPoNotificationsListView(),
if (itemCreationHeader.isNotEmpty) getItemCreationHeaderView()
if (itemCreationHeader.isNotEmpty) getItemCreationHeaderView(),
if (getEitCollectionNotificationBodyList?.isNotEmpty ?? false) getEitNotificationsListView(getEitCollectionNotificationBodyList ?? []),
if (getPhonesNotificationBodyList?.isNotEmpty ?? false) getPhonesNotificationBodyListWidget(getPhonesNotificationBodyList ?? []).objectContainerView(title: "Mobile Numbers"),
if (getBasicDetNtfBodyList?.isNotEmpty ?? false) getBasicDetNtfBodyListWidget(getBasicDetNtfBodyList ?? []).objectContainerView(title: "Basic Information"),
if (getAbsenceCollectionNotificationBodyList?.isNotEmpty ?? false) getAbsenceCollectionNotificationBodyListWidget(getAbsenceCollectionNotificationBodyList ?? []),
if (getContactNotificationBodyList != null) getContactNotificationBodyListWidget(getContactNotificationBodyList ?? GetContactNotificationBodyList()).objectContainerView(),
];
return Container(
width: double.infinity,
@ -102,15 +120,15 @@ class InfoFragment extends StatelessWidget {
itemCount: poHeaderList.length);
}
Widget getAbsenceCollectionNotificationsListView(List<GetAbsenceCollectionNotificationBodyList> list) {
List<CollectionNotification> dataList = list.isEmpty ? [] : (list.first.collectionNotification ?? []);
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => ItemDetailView(dataList[index].sEGMENTPROMPT!, dataList[index].sEGMENTVALUEDSP!),
separatorBuilder: (cxt, index) => 4.height,
itemCount: dataList.length);
}
// Widget getAbsenceCollectionNotificationsListView(List<GetAbsenceCollectionNotificationBodyList> list) {
// List<CollectionNotificationAbsence> dataList = list.isEmpty ? [] : (list.first.collectionNotification ?? []);
// return ListView.separated(
// shrinkWrap: true,
// physics: const NeverScrollableScrollPhysics(),
// itemBuilder: (cxt, index) => ItemDetailView(dataList[index].sEGMENTPROMPT!, dataList[index].sEGMENTVALUEDSP!),
// separatorBuilder: (cxt, index) => 4.height,
// itemCount: dataList.length);
// }
Widget getStampMsNotificationsListView(List<GetStampMsNotificationBodyList> list) {
return ListView.separated(
@ -169,7 +187,7 @@ class InfoFragment extends StatelessWidget {
ItemDetailView(LocaleKeys.approvedDate.tr(), itemCreationHeader[index].aPPROVEDDATE?.toString() ?? ""),
ItemDetailView(LocaleKeys.itemType.tr(), itemCreationHeader[index].iTEMTYPE?.toString() ?? ""),
ItemDetailView(LocaleKeys.relatedTo.tr(), itemCreationHeader[index].rELATEDTO?.toString() ?? ""),
ItemDetailView(LocaleKeys.requestDate.tr(), DateUtil.formatDateToDate(DateUtil.convertStringToDate(itemCreationHeader[index].rEQUESTDATE.toString()), false) ?? ""),
ItemDetailView(LocaleKeys.requestDate.tr(), DateUtil.formatDateToDate(DateUtil.convertStringToDate(itemCreationHeader[index].rEQUESTDATE.toString()), false)),
ItemDetailView(LocaleKeys.analyzedDate.tr(), itemCreationHeader[index].aNALYZEDDATE?.toString() ?? ""),
ItemDetailView(LocaleKeys.urgent.tr(), itemCreationHeader[index].uRGENTFLAGDISP?.toString() ?? ""),
],
@ -177,4 +195,70 @@ class InfoFragment extends StatelessWidget {
separatorBuilder: (cxt, index) => 18.height,
itemCount: itemCreationHeader.length);
}
//HR multiple type requests
Widget getEitNotificationsListView(List<GetEitCollectionNotificationBodyList> list) {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) {
List<CollectionNotificationEit> dataList = list.isEmpty ? [] : (list[index].collectionNotification ?? []);
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => dataList[index].displayFlag == "Y" ? ItemDetailView(dataList[index].segmentPrompt!, dataList[index].segmentValueDsp!) : Container(),
separatorBuilder: (cxt, index) => dataList[index].displayFlag == "Y" ? 4.height : 0.height,
itemCount: dataList.length)
.objectContainerView();
},
separatorBuilder: (cxt, index) => 12.height,
itemCount: list.length,
);
}
Widget getPhonesNotificationBodyListWidget(List<GetPhonesNotificationBodyList> list) {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => ItemDetailView(LocaleKeys.subject.tr(), list[index].proposedPhoneNumber ?? ""),
separatorBuilder: (cxt, index) => 4.height,
itemCount: list.length);
}
Widget getBasicDetNtfBodyListWidget(List<GetBasicDetNtfBodyList> list) {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => ItemDetailView(list[index].segmentPrompt!, list[index].segmentValueDsp!),
separatorBuilder: (cxt, index) => 4.height,
itemCount: list.length);
}
Widget getAbsenceCollectionNotificationBodyListWidget(List<GetAbsenceCollectionNotificationBodyList> list) {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) {
List<CollectionNotificationAbsence> dataList = list.isEmpty ? [] : (list[index].collectionNotification ?? []);
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => dataList[index].dISPLAYFLAG == "Y" ? ItemDetailView(dataList[index].sEGMENTPROMPT!, dataList[index].sEGMENTVALUEDSP!) : Container(),
separatorBuilder: (cxt, index) => dataList[index].dISPLAYFLAG == "Y" ? 4.height : 0.height,
itemCount: dataList.length)
.objectContainerView();
},
separatorBuilder: (cxt, index) => 12.height,
itemCount: list.length,
);
}
Widget getContactNotificationBodyListWidget(GetContactNotificationBodyList data) {
return ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (cxt, index) => ItemDetailView(data.contactNotificationBody![index].segmentPrompt!, data.contactNotificationBody![index].segmentValueDsp!),
separatorBuilder: (cxt, index) => 4.height,
itemCount: data.contactNotificationBody!.length);
}
}

@ -21,7 +21,7 @@ AppBar AppBarWidget(BuildContext context, {required String title, bool showHomeB
child: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor),
),
4.width,
title.toText24(color: MyColors.darkTextColor, isBold: true, considerHeight: false).expanded,
title.toText24(color: MyColors.darkTextColor, isBold: true).expanded,
],
),
centerTitle: false,

@ -12,21 +12,38 @@ class InputWidget extends StatelessWidget {
final bool isInputTypeNum;
final bool isObscureText;
final bool isBackgroundEnable;
final bool isEnableBorder;
final double verticalPadding;
final double horizontalPadding;
final Function(String)? onChange;
InputWidget(this.labelText, this.hintText, this.controller,
{this.isObscureText = false, this.suffixTap, this.isEnable = true, this.hasSelection = false, this.lines = 1, this.onChange, this.isInputTypeNum = false, this.isBackgroundEnable = false});
InputWidget(
this.labelText,
this.hintText,
this.controller, {
this.isObscureText = false,
this.suffixTap,
this.isEnable = true,
this.hasSelection = false,
this.isEnableBorder = true,
this.lines = 1,
this.onChange,
this.isInputTypeNum = false,
this.isBackgroundEnable = false,
this.verticalPadding = 15,
this.horizontalPadding = 16,
});
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
padding: EdgeInsets.only(left: horizontalPadding, right: horizontalPadding, bottom: verticalPadding, top: verticalPadding),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: isBackgroundEnable ? Color(0xffF7F7F7) : Colors.white,
border: Border.all(
color: Color(0xffefefef),
color: isEnableBorder ? Color(0xffefefef) : Colors.transparent,
width: 1,
),
),

@ -6,8 +6,14 @@ import 'package:mohem_flutter_app/extensions/int_extensions.dart';
class ShowRadio extends StatelessWidget {
String title, value, groupValue;
Color selectedColor;
ShowRadio({required this.title, required this.value, required this.groupValue});
ShowRadio({
required this.title,
required this.value,
required this.groupValue,
this.selectedColor = Colors.black,
});
@override
Widget build(BuildContext context) {
@ -27,7 +33,7 @@ class ShowRadio extends StatelessWidget {
width: double.infinity,
height: double.infinity,
decoration: BoxDecoration(
color: value == groupValue ? Colors.black : Colors.transparent,
color: value == groupValue ? selectedColor : Colors.transparent,
borderRadius: BorderRadius.all(Radius.circular(100)),
),
),

@ -62,6 +62,11 @@ dependencies:
geolocator: any
# flutter_compass: ^0.6.1
google_maps_flutter_web: ^0.3.2
open_file: ^3.2.1
wifi_iot: ^0.3.16
dev_dependencies:

Loading…
Cancel
Save