Worklist (ITG sikp, Delegats and HR multiple requests)

merge-requests/1/merge
devmirza121 3 years ago
parent 3fce58b379
commit a03eb8b11a

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

@ -67,7 +67,6 @@
"whatsapp": "واتس اب",
"reject": "يرفض",
"approve": "يوافق",
"attendanceDetails": "تفاصيل الحضور",
"cancel": "إلغاء",
"requestedItems": "العناصر المطلوبة",
"request": "طلب",
@ -212,6 +211,7 @@
"myAttendance": "حضوري",
"workOnBreak": "العمل على استراحة",
"next": "التالي",
"mobile": "التليفون المحمول",
"profile": {
"reset_password": {
"label": "Reset Password",

@ -211,6 +211,7 @@
"myAttendance": "My Attendance",
"workOnBreak": "Work On Break",
"next": "Next",
"mobile": "Mobile",
"profile": {
"reset_password": {
"label": "Reset Password",

@ -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,149 @@ 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}) async {
String url = "${ApiConsts.erpRest}NOTIFICATION_ACTIONS";
Map<String, dynamic> postParams = {
"P_COMMENTS": comment,
"P_ACTION_MODE": "DELEGATE",
"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);
}
}

@ -27,7 +27,6 @@ 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 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://uat.hmgwebservices.com"; // UAT server
// static String baseUrl = "https://hmgwebservices.com"; // Live server
static String baseUrlServices = baseUrl + "/Services/"; // server
// static String baseUrlServices = "https://api.cssynapses.com/tangheem/"; // Live server
static String utilitiesRest = baseUrlServices + "Utilities.svc/REST/";

@ -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),
);

@ -68,6 +68,7 @@ class CodegenLoader extends AssetLoader{
"confirm": "تؤكد",
"passwordChangedSuccessfully": "تم تغيير الرقم السري بنجاح",
"itemsForSale": "سلع للبيع",
"attendanceDetails": "تفاصيل الحضور",
"doNotUseRecentPassword": "لا تستخدم كلمة مرور حديثة",
"atLeastOneLowercase": "حرف صغير واحد على الأقل",
"atLeastOneUppercase": "حرف كبير واحد على الأقل",
@ -223,6 +224,9 @@ class CodegenLoader extends AssetLoader{
"requestDetails": "طلب تفاصيل",
"approvalLevel": "مستوى الموافقة",
"requesterDetails": "تفاصيل مقدم الطلب",
"myAttendance": "حضوري",
"workOnBreak": "العمل على استراحة",
"next": "التالي",
"profile": {
"reset_password": {
"label": "Reset Password",
@ -324,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",
@ -465,6 +470,9 @@ static const Map<String,dynamic> en_US = {
"requestDetails": "Request Details",
"approvalLevel": "Approval Level",
"requesterDetails": "Requester Details",
"myAttendance": "My Attendance",
"workOnBreak": "Work On Break",
"next": "Next",
"profile": {
"reset_password": {
"label": "Reset Password",

@ -68,12 +68,151 @@ abstract class LocaleKeys {
static const whatsapp = 'whatsapp';
static const reject = 'reject';
static const approve = 'approve';
static const cancel = 'cancel';
static const requestedItems = 'requestedItems';
static const request = 'request';
static const actions = 'actions';
static const delegate = 'delegate';
static const request_info = 'request_info';
static const attachments = 'attachments';
static const info = 'info';
static const employeeNumber = 'employeeNumber';
static const assignmentNumber = 'assignmentNumber';
static const employeeName = 'employeeName';
static const scheduleDate = 'scheduleDate';
static const shiftType = 'shiftType';
static const shift = 'shift';
static const breakText = 'breakText';
static const actualSwipeStart = 'actualSwipeStart';
static const actualSwipeEnd = 'actualSwipeEnd';
static const approvedSwipeStart = 'approvedSwipeStart';
static const approvedSwipeStartReason = 'approvedSwipeStartReason';
static const approvedSwipeEnd = 'approvedSwipeEnd';
static const approvedSwipeEndReason = 'approvedSwipeEndReason';
static const from = 'from';
static const to = 'to';
static const sent = 'sent';
static const closed = 'closed';
static const id = 'id';
static const responder = 'responder';
static const jobTitle = 'jobTitle';
static const grade = 'grade';
static const jobCategory = 'jobCategory';
static const category = 'category';
static const employeeEmailAddress = 'employeeEmailAddress';
static const payrollBranch = 'payrollBranch';
static const yourChangeHasBeenSavedSuccessfully = 'yourChangeHasBeenSavedSuccessfully';
static const code = 'code';
static const unit = 'unit';
static const quantity = 'quantity';
static const dateRequired = 'dateRequired';
static const lineStatus = 'lineStatus';
static const statusDate = 'statusDate';
static const transactionType = 'transactionType';
static const operatingUnit = 'operatingUnit';
static const organizationCode = 'organizationCode';
static const organization = 'organization';
static const fromSubInventory = 'fromSubInventory';
static const fromLocator = 'fromLocator';
static const toSubInventory = 'toSubInventory';
static const toLocator = 'toLocator';
static const shipToLocator = 'shipToLocator';
static const itemHistory = 'itemHistory';
static const mfg = 'mfg';
static const lineType = 'lineType';
static const price = 'price';
static const lineAmount = 'lineAmount';
static const lineDiscount = 'lineDiscount';
static const needByDate = 'needByDate';
static const promisedDate = 'promisedDate';
static const deliverToLocation = 'deliverToLocation';
static const requisitionNumber = 'requisitionNumber';
static const requester = 'requester';
static const quotationAnalysis = 'quotationAnalysis';
static const subject = 'subject';
static const description = 'description';
static const supplier = 'supplier';
static const site = 'site';
static const buyer = 'buyer';
static const preparer = 'preparer';
static const creationDate = 'creationDate';
static const shipToLocation = 'shipToLocation';
static const quotationNumber = 'quotationNumber';
static const quotationDate = 'quotationDate';
static const paymentTerms = 'paymentTerms';
static const currency = 'currency';
static const grossAmount = 'grossAmount';
static const discountAmount = 'discountAmount';
static const customDuty = 'customDuty';
static const shipHandle = 'shipHandle';
static const otherCharges = 'otherCharges';
static const totalPOAmountWithVAT = 'totalPOAmountWithVAT';
static const totalPOAmountInWords = 'totalPOAmountInWords';
static const requestNumber = 'requestNumber';
static const uom = 'uom';
static const operatingCode = 'operatingCode';
static const poNumber = 'poNumber';
static const revision = 'revision';
static const quantityOrdered = 'quantityOrdered';
static const quantityReceived = 'quantityReceived';
static const bonusQuantity = 'bonusQuantity';
static const purchasePrice = 'purchasePrice';
static const discountPer = 'discountPer';
static const balanceQuantity = 'balanceQuantity';
static const netPrice = 'netPrice';
static const closureStatus = 'closureStatus';
static const quotationNetPrice = 'quotationNetPrice';
static const quotationUOM = 'quotationUOM';
static const quotationQty = 'quotationQty';
static const itemCode = 'itemCode';
static const vendorName = 'vendorName';
static const quotationMFGPartNumber = 'quotationMFGPartNumber';
static const quotationDeliveryDate = 'quotationDeliveryDate';
static const quotationBonusQuantity = 'quotationBonusQuantity';
static const quotationLineTotal = 'quotationLineTotal';
static const rfqUOM = 'rfqUOM';
static const rfqQty = 'rfqQty';
static const rfqNumber = 'rfqNumber';
static const msg = 'msg';
static const msg_named = 'msg_named';
static const clickMe = 'clickMe';
static const human = 'human';
static const resources = 'resources';
static const details = 'details';
static const noDataAvailable = 'noDataAvailable';
static const productName = 'productName';
static const productDescription = 'productDescription';
static const unitPrice = 'unitPrice';
static const manufacturerName = 'manufacturerName';
static const manufacturerPartName = 'manufacturerPartName';
static const supplierName = 'supplierName';
static const supplierContact = 'supplierContact';
static const chargeToPatient = 'chargeToPatient';
static const justification = 'justification';
static const itemDescription = 'itemDescription';
static const groupCode = 'groupCode';
static const primaryUOM = 'primaryUOM';
static const subgroupDescription = 'subgroupDescription';
static const subgroupCode = 'subgroupCode';
static const groupDescription = 'groupDescription';
static const templateName = 'templateName';
static const itemCreationStatus = 'itemCreationStatus';
static const standardizationApprovalStatus = 'standardizationApprovalStatus';
static const standardizationApprovalRejectionReason = 'standardizationApprovalRejectionReason';
static const analyzedBy = 'analyzedBy';
static const approvedDate = 'approvedDate';
static const itemType = 'itemType';
static const relatedTo = 'relatedTo';
static const requestDate = 'requestDate';
static const analyzedDate = 'analyzedDate';
static const urgent = 'urgent';
static const requestDetails = 'requestDetails';
static const approvalLevel = 'approvalLevel';
static const requesterDetails = 'requesterDetails';
static const myAttendance = 'myAttendance';
static const workOnBreak = 'workOnBreak';
static const next = 'next';
static const mobile = 'mobile';
static const profile_reset_password_label = 'profile.reset_password.label';
static const profile_reset_password_username = 'profile.reset_password.username';
static const profile_reset_password_password = 'profile.reset_password.password';

@ -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_item_creation_ntf_body_list_model.dart';
@ -17,6 +17,11 @@ import 'package:mohem_flutter_app/models/member_login_list_model.dart';
import 'package:mohem_flutter_app/models/notification_action_model.dart';
import 'package:mohem_flutter_app/models/notification_get_respond_attributes_list_model.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';
@ -104,12 +109,12 @@ class GenericResponseModel {
List<String>? getContactColsStructureList;
List<String>? getContactDetailsList;
List<String>? getContactDffStructureList;
List<String>? getContactNotificationBodyList;
GetContactNotificationBodyList? getContactNotificationBodyList;
List<String>? getCountriesList;
List<String>? getDayHoursTypeDetailsList;
List<String>? getDeductionsList;
List<String>? getDefaultValueList;
List<String>? getEITCollectionNotificationBodyList;
List<GetEitCollectionNotificationBodyList>? getEITCollectionNotificationBodyList;
List<GetEITDFFStructureList>? getEITDFFStructureList;
List<GetEITTransactionList>? getEITTransactionList;
List<String>? getEarningsList;
@ -141,7 +146,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;
@ -198,7 +203,7 @@ class GenericResponseModel {
List<MemberInformationListModel>? memberInformationList;
MemberLoginListModel? memberLoginList;
String? mohemmGetBusinessCardEnabledList;
List? mohemmGetFavoriteReplacementsList;
List<GetFavoriteReplacements>? mohemmGetFavoriteReplacementsList;
String? mohemmGetMobileDeviceInfobyEmpInfoList;
List<GetMobileLoginInfoListModel>? mohemmGetMobileLoginInfoList;
String? mohemmGetPatientIDList;
@ -229,7 +234,7 @@ class GenericResponseModel {
List<PrivilegeListModel>? privilegeList;
String? processTransactions;
String? registerUserNameList;
String? replacementList;
List<ReplacementList>? replacementList;
String? respondAttributesList;
String? respondRolesList;
String? resubmitAbsenceTransactionList;
@ -637,12 +642,14 @@ 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'];
getDayHoursTypeDetailsList = json['GetDayHoursTypeDetailsList'];
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) {
@ -704,7 +711,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) {
@ -802,7 +809,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>[];
@ -857,7 +866,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,
};
}

@ -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)
],

@ -130,6 +130,8 @@ class _LoginScreenState extends State<LoginScreen> {
password.text = "Abcd@1234";
// username.text = "15444";
// username.text = "287742";
// password.text = "509@Shafiq";
return Scaffold(
body: Column(
children: [

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

@ -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,91 @@ 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;
List<GetActionHistoryList>? actionHistoryList;
DelegateSheet({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,
@ -40,78 +117,216 @@ class DelegateSheet extends StatelessWidget {
"Delegate".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 +353,134 @@ 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",
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",
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",
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,
),
)
],
),
);

@ -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;
int? notificationID;
GetActionHistoryList? actionHistoryList;
GetFavoriteReplacements? favoriteReplacements;
ReplacementList? replacementList;
SelectedItemSheet(this.title);
SelectedItemSheet(this.title, {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;
},
),
],
),
@ -95,8 +86,24 @@ class SelectedItemSheet extends StatelessWidget {
Expanded(
child: DefaultButton(
"Submit",
() {
() async {
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;
}
Utils.showLoading(context);
await WorkListApiClient().submitComment(comment: comment, email: email, userId: userId, notificationId: notificationID);
Utils.hideLoading(context);
Navigator.pop(context);
Navigator.pop(context);
Navigator.pop(context, "delegate_reload");
},
colors: [
Color(0xff32D892),
@ -111,7 +118,7 @@ class SelectedItemSheet extends StatelessWidget {
);
}
Widget showItem(String name) {
Widget showItem(String? name, bool? isFav) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
@ -130,19 +137,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(

@ -33,6 +33,11 @@ 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';
class WorkListDetailScreen extends StatefulWidget {
WorkListDetailScreen({Key? key}) : super(key: key);
@ -55,10 +60,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 +97,22 @@ 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 +204,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 +221,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
poLinesList: getPoNotificationBody?.pOLines ?? [],
itemCreationLines: getItemCreationNtfBody?.itemCreationLines ?? [],
),
ActionsFragment(actionHistoryList),
ActionsFragment(workListData!.nOTIFICATIONID, actionHistoryList),
AttachmentsFragment(getAttachmentList),
],
).expanded,

@ -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) {
@ -100,7 +101,7 @@ class ActionsFragment 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(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);
}
}

@ -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,9 +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) {
@ -28,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,9 @@ dependencies:
syncfusion_flutter_calendar: ^19.4.48
flutter_calendar_carousel: ^2.1.0
pie_chart: ^5.1.0
open_file: ^3.2.1

Loading…
Cancel
Save