Merge branch 'development_sikander' into 'master'

Development sikander

See merge request mirza.shafique/mohem_flutter_app!63
merge-requests/1/merge
Sikander Saleem 2 years ago
commit 0fdafcd7fc

@ -350,6 +350,12 @@
"itemType": "نوع العنصر", "itemType": "نوع العنصر",
"TurnNotificationsFor": "تفعيل الاشعارات", "TurnNotificationsFor": "تفعيل الاشعارات",
"worklistSettings": "اعدادات الاشعارات", "worklistSettings": "اعدادات الاشعارات",
"absenceType": "نوع الغياب",
"absenceCategory": "فئة الغياب",
"days": "أيام",
"hours": "ساعات",
"approvalStatus": "حالة القبول",
"absenceStatus": "حالة الغياب",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -350,6 +350,12 @@
"itemType": "Item Type", "itemType": "Item Type",
"TurnNotificationsFor": "Turn on notifications for", "TurnNotificationsFor": "Turn on notifications for",
"worklistSettings": "Worklist Settings", "worklistSettings": "Worklist Settings",
"absenceType": "Absence Type",
"absenceCategory": "Absence Category",
"days": "Days",
"hours": "Hours",
"approvalStatus": "Approval Status",
"absenceStatus": "Absence Status",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -0,0 +1,45 @@
import 'package:mohem_flutter_app/api/api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/consts.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/models/leave_balance/get_absence_attendance_types_list_model.dart';
import 'package:mohem_flutter_app/models/leave_balance/get_absence_dff_structure_list_model.dart';
import 'package:mohem_flutter_app/models/leave_balance/get_absence_transaction_list_model.dart';
class LeaveBalanceApiClient {
static final LeaveBalanceApiClient _instance = LeaveBalanceApiClient._internal();
LeaveBalanceApiClient._internal();
factory LeaveBalanceApiClient() => _instance;
Future<List<GetAbsenceTransactionList>> getAbsenceTransactions(int pSelectedResopID) async {
String url = "${ApiConsts.erpRest}GET_ABSENCE_TRANSACTIONS";
Map<String, dynamic> postParams = {"P_PAGE_LIMIT": 50, "P_PAGE_NUM": 1, "P_MENU_TYPE": "E", "P_SELECTED_RESP_ID": pSelectedResopID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.getAbsenceTransactionList ?? [];
}, url, postParams);
}
Future<List<GetAbsenceAttendanceTypesList>> getAbsenceAttendanceTypes() async {
String url = "${ApiConsts.erpRest}GET_ABSENCE_ATTENDANCE_TYPES";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.getAbsenceAttendanceTypesList ?? [];
}, url, postParams);
}
Future<List<GetAbsenceDffStructureList>> getAbsenceDffStructure(String pDescFlexContextCode, String pFunctionName, int pSelectedResopID) async {
String url = "${ApiConsts.erpRest}GET_ABSENCE_DFF_STRUCTURE";
Map<String, dynamic> postParams = {"P_DESC_FLEX_CONTEXT_CODE": pDescFlexContextCode, "P_FUNCTION_NAME": pFunctionName, "P_MENU_TYPE": "E", "P_SELECTED_RESP_ID": pSelectedResopID};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.getAbsenceDffStructureList ?? [];
}, url, postParams);
}
}

@ -5,6 +5,8 @@ import 'package:mohem_flutter_app/ui/attendance/vacation_rule_screen.dart';
import 'package:mohem_flutter_app/ui/bottom_sheets/attendence_details_bottom_sheet.dart'; import 'package:mohem_flutter_app/ui/bottom_sheets/attendence_details_bottom_sheet.dart';
import 'package:mohem_flutter_app/ui/landing/dashboard_screen.dart'; import 'package:mohem_flutter_app/ui/landing/dashboard_screen.dart';
import 'package:mohem_flutter_app/ui/landing/today_attendance_screen.dart'; import 'package:mohem_flutter_app/ui/landing/today_attendance_screen.dart';
import 'package:mohem_flutter_app/ui/leave_balance/add_leave_balance_screen.dart';
import 'package:mohem_flutter_app/ui/leave_balance/leave_balance_screen.dart';
import 'package:mohem_flutter_app/ui/login/forgot_password_screen.dart'; import 'package:mohem_flutter_app/ui/login/forgot_password_screen.dart';
import 'package:mohem_flutter_app/ui/login/login_screen.dart'; import 'package:mohem_flutter_app/ui/login/login_screen.dart';
import 'package:mohem_flutter_app/ui/login/new_password_screen.dart'; import 'package:mohem_flutter_app/ui/login/new_password_screen.dart';
@ -73,6 +75,10 @@ class AppRoutes {
static const String itemHistory = "/itemHistory"; static const String itemHistory = "/itemHistory";
static const String worklistSettings = "/worklistSettings"; static const String worklistSettings = "/worklistSettings";
// Leave Balance
static const String leaveBalance = "/leaveBalance";
static const String addLeaveBalance = "/addLeaveBalance";
static const String servicesMenuListScreen = "/servicesMenuListScreen"; static const String servicesMenuListScreen = "/servicesMenuListScreen";
static const String dynamicScreen = "/dynamicScreen"; static const String dynamicScreen = "/dynamicScreen";
static const String addDynamicInput = "/addDynamicInput"; static const String addDynamicInput = "/addDynamicInput";
@ -147,6 +153,11 @@ class AppRoutes {
itemHistory: (context) => ItemHistoryScreen(), itemHistory: (context) => ItemHistoryScreen(),
worklistSettings: (context) => WorklistSettings(), worklistSettings: (context) => WorklistSettings(),
// Leave Balance
leaveBalance: (context) => LeaveBalance(),
addLeaveBalance: (context) => AddLeaveBalanceScreen(),
servicesMenuListScreen: (context) => ServicesMenuListScreen(), servicesMenuListScreen: (context) => ServicesMenuListScreen(),
// workFromHome: (context) => WorkFromHomeScreen(), // workFromHome: (context) => WorkFromHomeScreen(),
// addWorkFromHome: (context) => AddWorkFromHomeScreen(), // addWorkFromHome: (context) => AddWorkFromHomeScreen(),

@ -365,6 +365,12 @@ class CodegenLoader extends AssetLoader{
"save": "حفظ", "save": "حفظ",
"TurnNotificationsFor": "تفعيل الاشعارات", "TurnNotificationsFor": "تفعيل الاشعارات",
"worklistSettings": "اعدادات الاشعارات", "worklistSettings": "اعدادات الاشعارات",
"absenceType": "نوع الغياب",
"absenceCategory": "فئة الغياب",
"days": "أيام",
"hours": "ساعات",
"approvalStatus": "حالة القبول",
"absenceStatus": "حالة الغياب",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",
@ -750,6 +756,12 @@ static const Map<String,dynamic> en_US = {
"save": "Save", "save": "Save",
"TurnNotificationsFor": "Turn on notifications for", "TurnNotificationsFor": "Turn on notifications for",
"worklistSettings": "Worklist Settings", "worklistSettings": "Worklist Settings",
"absenceType": "Absence Type",
"absenceCategory": "Absence Category",
"days": "Days",
"hours": "Hours",
"approvalStatus": "Approval Status",
"absenceStatus": "Absence Status",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -350,6 +350,12 @@ abstract class LocaleKeys {
static const save = 'save'; static const save = 'save';
static const TurnNotificationsFor = 'TurnNotificationsFor'; static const TurnNotificationsFor = 'TurnNotificationsFor';
static const worklistSettings = 'worklistSettings'; static const worklistSettings = 'worklistSettings';
static const absenceType = 'absenceType';
static const absenceCategory = 'absenceCategory';
static const days = 'days';
static const hours = 'hours';
static const approvalStatus = 'approvalStatus';
static const absenceStatus = 'absenceStatus';
static const profile_reset_password_label = 'profile.reset_password.label'; 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_username = 'profile.reset_password.username';
static const profile_reset_password_password = 'profile.reset_password.password'; static const profile_reset_password_password = 'profile.reset_password.password';

@ -1,7 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:logger/logger.dart'; import 'package:logger/logger.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart';
@ -61,7 +60,6 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Sizer( return Sizer(
builder: (context, orientation, deviceType) { builder: (context, orientation, deviceType) {
print(AppState().postParamsObject?.toJson());
var obj = AppState().postParamsObject; var obj = AppState().postParamsObject;
obj?.languageID = EasyLocalization.of(context)?.locale.languageCode == "ar" ? 1 : 2; obj?.languageID = EasyLocalization.of(context)?.locale.languageCode == "ar" ? 1 : 2;
AppState().setPostParamsModel(obj!); AppState().setPostParamsModel(obj!);

@ -33,6 +33,9 @@ import 'package:mohem_flutter_app/models/get_stamp_ms_notification_body_list_mod
import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_model.dart'; import 'package:mohem_flutter_app/models/get_stamp_ns_notification_body_list_model.dart';
import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart'; import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart';
import 'package:mohem_flutter_app/models/get_user_item_type_list.dart'; import 'package:mohem_flutter_app/models/get_user_item_type_list.dart';
import 'package:mohem_flutter_app/models/leave_balance/get_absence_attendance_types_list_model.dart';
import 'package:mohem_flutter_app/models/leave_balance/get_absence_dff_structure_list_model.dart';
import 'package:mohem_flutter_app/models/leave_balance/get_absence_transaction_list_model.dart';
import 'package:mohem_flutter_app/models/member_information_list_model.dart'; import 'package:mohem_flutter_app/models/member_information_list_model.dart';
import 'package:mohem_flutter_app/models/member_login_list_model.dart'; import 'package:mohem_flutter_app/models/member_login_list_model.dart';
import 'package:mohem_flutter_app/models/monthly_pay_slip/get_deductions_List_model.dart'; import 'package:mohem_flutter_app/models/monthly_pay_slip/get_deductions_List_model.dart';
@ -136,10 +139,10 @@ class GenericResponseModel {
String? employeeQR; String? employeeQR;
String? forgetPasswordTokenID; String? forgetPasswordTokenID;
List<String>? getAbsenceAttachmentsList; List<String>? getAbsenceAttachmentsList;
List<String>? getAbsenceAttendanceTypesList; List<GetAbsenceAttendanceTypesList>? getAbsenceAttendanceTypesList;
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotificationBodyList; List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotificationBodyList;
List<String>? getAbsenceDffStructureList; List<GetAbsenceDffStructureList>? getAbsenceDffStructureList;
List<String>? getAbsenceTransactionList; List<GetAbsenceTransactionList>? getAbsenceTransactionList;
List<GetAccrualBalancesList>? getAccrualBalancesList; List<GetAccrualBalancesList>? getAccrualBalancesList;
List<GetActionHistoryList>? getActionHistoryList; List<GetActionHistoryList>? getActionHistoryList;
List<GetAddressDffStructureList>? getAddressDffStructureList; List<GetAddressDffStructureList>? getAddressDffStructureList;
@ -644,13 +647,13 @@ class GenericResponseModel {
if (json['AddAttSuccessList'] != null) { if (json['AddAttSuccessList'] != null) {
addAttSuccessList = <AddAttSuccessList>[]; addAttSuccessList = <AddAttSuccessList>[];
json['AddAttSuccessList'].forEach((v) { json['AddAttSuccessList'].forEach((v) {
addAttSuccessList!.add(new AddAttSuccessList.fromJson(v)); addAttSuccessList!.add(AddAttSuccessList.fromJson(v));
}); });
} }
addAttachmentList = json['AddAttachment_List'] != null ? new AddAttachmentList.fromJson(json['AddAttachment_List']) : null; addAttachmentList = json['AddAttachment_List'] != null ? AddAttachmentList.fromJson(json['AddAttachment_List']) : null;
bCDomain = json['BC_Domain']; bCDomain = json['BC_Domain'];
bCLogo = json['BC_Logo']; bCLogo = json['BC_Logo'];
basicMemberInformation = json['BasicMemberInformation'] != null ? new BasicMemberInformationModel.fromJson(json['BasicMemberInformation']) : null; basicMemberInformation = json['BasicMemberInformation'] != null ? BasicMemberInformationModel.fromJson(json['BasicMemberInformation']) : null;
businessCardPrivilege = json['BusinessCardPrivilege']; businessCardPrivilege = json['BusinessCardPrivilege'];
calculateAbsenceDuration = json['CalculateAbsenceDuration']; calculateAbsenceDuration = json['CalculateAbsenceDuration'];
cancelHRTransactionLIst = json['CancelHRTransactionLIst']; cancelHRTransactionLIst = json['CancelHRTransactionLIst'];
@ -664,28 +667,46 @@ class GenericResponseModel {
if (json['CountryList'] != null) { if (json['CountryList'] != null) {
countryList = <GetCountriesListModel>[]; countryList = <GetCountriesListModel>[];
json['CountryList'].forEach((v) { json['CountryList'].forEach((v) {
countryList!.add(new GetCountriesListModel.fromJson(v)); countryList!.add(GetCountriesListModel.fromJson(v));
}); });
} }
createVacationRuleList = json['CreateVacationRuleList'] != null ? new CreateVacationRuleList.fromJson(json['CreateVacationRuleList']) : null; createVacationRuleList = json['CreateVacationRuleList'] != null ? CreateVacationRuleList.fromJson(json['CreateVacationRuleList']) : null;
deleteAttachmentList = json['DeleteAttachmentList']; deleteAttachmentList = json['DeleteAttachmentList'];
deleteVacationRuleList = json['DeleteVacationRuleList']; deleteVacationRuleList = json['DeleteVacationRuleList'];
disableSessionList = json['DisableSessionList']; disableSessionList = json['DisableSessionList'];
employeeQR = json['EmployeeQR']; employeeQR = json['EmployeeQR'];
forgetPasswordTokenID = json['ForgetPasswordTokenID']; forgetPasswordTokenID = json['ForgetPasswordTokenID'];
getAbsenceAttachmentsList = json['GetAbsenceAttachmentsList']; getAbsenceAttachmentsList = json['GetAbsenceAttachmentsList'];
getAbsenceAttendanceTypesList = json['GetAbsenceAttendanceTypesList'];
if (json['GetAbsenceAttendanceTypesList'] != null) {
getAbsenceAttendanceTypesList = <GetAbsenceAttendanceTypesList>[];
json['GetAbsenceAttendanceTypesList'].forEach((v) {
getAbsenceAttendanceTypesList!.add(GetAbsenceAttendanceTypesList.fromJson(v));
});
}
if (json['GetAbsenceCollectionNotificationBodyList'] != null) { if (json['GetAbsenceCollectionNotificationBodyList'] != null) {
getAbsenceCollectionNotificationBodyList = <GetAbsenceCollectionNotificationBodyList>[]; getAbsenceCollectionNotificationBodyList = <GetAbsenceCollectionNotificationBodyList>[];
json['GetAbsenceCollectionNotificationBodyList'].forEach((v) { json['GetAbsenceCollectionNotificationBodyList'].forEach((v) {
getAbsenceCollectionNotificationBodyList!.add(new GetAbsenceCollectionNotificationBodyList.fromJson(v)); getAbsenceCollectionNotificationBodyList!.add(GetAbsenceCollectionNotificationBodyList.fromJson(v));
});
}
if (json['GetAbsenceDffStructureList'] != null) {
getAbsenceDffStructureList = <GetAbsenceDffStructureList>[];
json['GetAbsenceDffStructureList'].forEach((v) {
getAbsenceDffStructureList!.add(GetAbsenceDffStructureList.fromJson(v));
});
}
if (json['GetAbsenceTransactionList'] != null) {
getAbsenceTransactionList = <GetAbsenceTransactionList>[];
json['GetAbsenceTransactionList'].forEach((v) {
getAbsenceTransactionList!.add(GetAbsenceTransactionList.fromJson(v));
}); });
} }
getAbsenceDffStructureList = json['GetAbsenceDffStructureList'];
getAbsenceTransactionList = json['GetAbsenceTransactionList'];
getAccrualBalancesList = json["GetAccrualBalancesList"] == null ? null : List<GetAccrualBalancesList>.from(json["GetAccrualBalancesList"].map((x) => GetAccrualBalancesList.fromJson(x))); getAccrualBalancesList = json["GetAccrualBalancesList"] == null ? null : List<GetAccrualBalancesList>.from(json["GetAccrualBalancesList"].map((x) => GetAccrualBalancesList.fromJson(x)));
if (json['GetActionHistoryList'] != null) { if (json['GetActionHistoryList'] != null) {
@ -698,7 +719,7 @@ class GenericResponseModel {
if (json['GetAddressDffStructureList'] != null) { if (json['GetAddressDffStructureList'] != null) {
getAddressDffStructureList = <GetAddressDffStructureList>[]; getAddressDffStructureList = <GetAddressDffStructureList>[];
json['GetAddressDffStructureList'].forEach((v) { json['GetAddressDffStructureList'].forEach((v) {
getAddressDffStructureList!.add(new GetAddressDffStructureList.fromJson(v)); getAddressDffStructureList!.add(GetAddressDffStructureList.fromJson(v));
}); });
} }
getAddressNotificationBodyList = json['GetAddressNotificationBodyList']; getAddressNotificationBodyList = json['GetAddressNotificationBodyList'];
@ -706,41 +727,41 @@ class GenericResponseModel {
if (json['GetApprovesList'] != null) { if (json['GetApprovesList'] != null) {
getApprovesList = <GetApprovesList>[]; getApprovesList = <GetApprovesList>[];
json['GetApprovesList'].forEach((v) { json['GetApprovesList'].forEach((v) {
getApprovesList!.add(new GetApprovesList.fromJson(v)); getApprovesList!.add(GetApprovesList.fromJson(v));
}); });
} }
if (json['GetAttachementList'] != null) { if (json['GetAttachementList'] != null) {
getAttachementList = <GetAttachementList>[]; getAttachementList = <GetAttachementList>[];
json['GetAttachementList'].forEach((v) { json['GetAttachementList'].forEach((v) {
getAttachementList!.add(new GetAttachementList.fromJson(v)); getAttachementList!.add(GetAttachementList.fromJson(v));
}); });
} }
getAttendanceTrackingList = json["GetAttendanceTrackingList"] == null ? null : GetAttendanceTracking.fromMap(json["GetAttendanceTrackingList"]); getAttendanceTrackingList = json["GetAttendanceTrackingList"] == null ? null : GetAttendanceTracking.fromMap(json["GetAttendanceTrackingList"]);
if (json['GetBasicDetColsStructureList'] != null) { if (json['GetBasicDetColsStructureList'] != null) {
getBasicDetColsStructureList = <GetBasicDetColsStructureList>[]; getBasicDetColsStructureList = <GetBasicDetColsStructureList>[];
json['GetBasicDetColsStructureList'].forEach((v) { json['GetBasicDetColsStructureList'].forEach((v) {
getBasicDetColsStructureList!.add(new GetBasicDetColsStructureList.fromJson(v)); getBasicDetColsStructureList!.add(GetBasicDetColsStructureList.fromJson(v));
}); });
} }
// getBasicDetDffStructureList = json['GetBasicDetDffStructureList']; // getBasicDetDffStructureList = json['GetBasicDetDffStructureList'];
if (json['GetBasicDetDffStructureList'] != null) { if (json['GetBasicDetDffStructureList'] != null) {
getBasicDetDffStructureList = <GetBasicDetDffStructureList>[]; getBasicDetDffStructureList = <GetBasicDetDffStructureList>[];
json['GetBasicDetDffStructureList'].forEach((v) { json['GetBasicDetDffStructureList'].forEach((v) {
getBasicDetDffStructureList!.add(new GetBasicDetDffStructureList.fromJson(v)); getBasicDetDffStructureList!.add(GetBasicDetDffStructureList.fromJson(v));
}); });
} }
if (json['GetContactDffStructureList'] != null) { if (json['GetContactDffStructureList'] != null) {
getContactDffStructureList = <GetContactDffStructureList>[]; getContactDffStructureList = <GetContactDffStructureList>[];
json['GetContactDffStructureList'].forEach((v) { json['GetContactDffStructureList'].forEach((v) {
getContactDffStructureList!.add(new GetContactDffStructureList.fromJson(v)); getContactDffStructureList!.add(GetContactDffStructureList.fromJson(v));
}); });
} }
if (json['GetBasicDetNtfBodyList'] != null) { if (json['GetBasicDetNtfBodyList'] != null) {
getBasicDetNtfBodyList = <GetBasicDetNtfBodyList>[]; getBasicDetNtfBodyList = <GetBasicDetNtfBodyList>[];
json['GetBasicDetNtfBodyList'].forEach((v) { json['GetBasicDetNtfBodyList'].forEach((v) {
getBasicDetNtfBodyList!.add(new GetBasicDetNtfBodyList.fromJson(v)); getBasicDetNtfBodyList!.add(GetBasicDetNtfBodyList.fromJson(v));
}); });
} }
@ -755,13 +776,13 @@ class GenericResponseModel {
if (json['GetContactDetailsList'] != null) { if (json['GetContactDetailsList'] != null) {
getContactDetailsList = <GetContactDetailsList>[]; getContactDetailsList = <GetContactDetailsList>[];
json['GetContactDetailsList'].forEach((v) { json['GetContactDetailsList'].forEach((v) {
getContactDetailsList!.add(new GetContactDetailsList.fromJson(v)); getContactDetailsList!.add(GetContactDetailsList.fromJson(v));
}); });
} }
if (json['GetContactColsStructureList'] != null) { if (json['GetContactColsStructureList'] != null) {
getContactColsStructureList = <GetContactColsStructureList>[]; getContactColsStructureList = <GetContactColsStructureList>[];
json['GetContactColsStructureList'].forEach((v) { json['GetContactColsStructureList'].forEach((v) {
getContactColsStructureList!.add(new GetContactColsStructureList.fromJson(v)); getContactColsStructureList!.add(GetContactColsStructureList.fromJson(v));
}); });
} }
getContactNotificationBodyList = json["GetContactNotificationBodyList"] == null ? null : GetContactNotificationBodyList.fromJson(json["GetContactNotificationBodyList"]); getContactNotificationBodyList = json["GetContactNotificationBodyList"] == null ? null : GetContactNotificationBodyList.fromJson(json["GetContactNotificationBodyList"]);
@ -769,21 +790,21 @@ class GenericResponseModel {
if (json['GetCountriesList'] != null) { if (json['GetCountriesList'] != null) {
getCountriesList = <GetCountriesListModel>[]; getCountriesList = <GetCountriesListModel>[];
json['GetCountriesList'].forEach((v) { json['GetCountriesList'].forEach((v) {
getCountriesList!.add(new GetCountriesListModel.fromJson(v)); getCountriesList!.add(GetCountriesListModel.fromJson(v));
}); });
} }
if (json['GetDayHoursTypeDetailsList'] != null) { if (json['GetDayHoursTypeDetailsList'] != null) {
getDayHoursTypeDetailsList = <GetDayHoursTypeDetailsList>[]; getDayHoursTypeDetailsList = <GetDayHoursTypeDetailsList>[];
json['GetDayHoursTypeDetailsList'].forEach((v) { json['GetDayHoursTypeDetailsList'].forEach((v) {
getDayHoursTypeDetailsList!.add(new GetDayHoursTypeDetailsList.fromJson(v)); getDayHoursTypeDetailsList!.add(GetDayHoursTypeDetailsList.fromJson(v));
}); });
} }
if (json['GetDeductionsList'] != null) { if (json['GetDeductionsList'] != null) {
getDeductionsList = <GetDeductionsList>[]; getDeductionsList = <GetDeductionsList>[];
json['GetDeductionsList'].forEach((v) { json['GetDeductionsList'].forEach((v) {
getDeductionsList!.add(new GetDeductionsList.fromJson(v)); getDeductionsList!.add(GetDeductionsList.fromJson(v));
}); });
} }
getDefaultValueList = json['GetDefaultValueList'] != null ? GetDefaultValueList.fromJson(json['GetDefaultValueList']) : null; getDefaultValueList = json['GetDefaultValueList'] != null ? GetDefaultValueList.fromJson(json['GetDefaultValueList']) : null;
@ -793,44 +814,44 @@ class GenericResponseModel {
if (json['GetEITDFFStructureList'] != null) { if (json['GetEITDFFStructureList'] != null) {
getEITDFFStructureList = <GetEITDFFStructureList>[]; getEITDFFStructureList = <GetEITDFFStructureList>[];
json['GetEITDFFStructureList'].forEach((v) { json['GetEITDFFStructureList'].forEach((v) {
getEITDFFStructureList!.add(new GetEITDFFStructureList.fromJson(v)); getEITDFFStructureList!.add(GetEITDFFStructureList.fromJson(v));
}); });
} }
if (json['GetEITTransactionList'] != null) { if (json['GetEITTransactionList'] != null) {
getEITTransactionList = <GetEITTransactionList>[]; getEITTransactionList = <GetEITTransactionList>[];
json['GetEITTransactionList'].forEach((v) { json['GetEITTransactionList'].forEach((v) {
getEITTransactionList!.add(new GetEITTransactionList.fromJson(v)); getEITTransactionList!.add(GetEITTransactionList.fromJson(v));
}); });
} }
if (json['GetEarningsList'] != null) { if (json['GetEarningsList'] != null) {
getEarningsList = <GetEarningsList>[]; getEarningsList = <GetEarningsList>[];
json['GetEarningsList'].forEach((v) { json['GetEarningsList'].forEach((v) {
getEarningsList!.add(new GetEarningsList.fromJson(v)); getEarningsList!.add(GetEarningsList.fromJson(v));
}); });
} }
if (json['GetEmployeeAddressList'] != null) { if (json['GetEmployeeAddressList'] != null) {
getEmployeeAddressList = <GetEmployeeAddressList>[]; getEmployeeAddressList = <GetEmployeeAddressList>[];
json['GetEmployeeAddressList'].forEach((v) { json['GetEmployeeAddressList'].forEach((v) {
getEmployeeAddressList!.add(new GetEmployeeAddressList.fromJson(v)); getEmployeeAddressList!.add(GetEmployeeAddressList.fromJson(v));
}); });
} }
if (json['GetEmployeeBasicDetailsList'] != null) { if (json['GetEmployeeBasicDetailsList'] != null) {
getEmployeeBasicDetailsList = <GetEmployeeBasicDetailsList>[]; getEmployeeBasicDetailsList = <GetEmployeeBasicDetailsList>[];
json['GetEmployeeBasicDetailsList'].forEach((v) { json['GetEmployeeBasicDetailsList'].forEach((v) {
getEmployeeBasicDetailsList!.add(new GetEmployeeBasicDetailsList.fromJson(v)); getEmployeeBasicDetailsList!.add(GetEmployeeBasicDetailsList.fromJson(v));
}); });
} }
if (json['GetEmployeeContactsList'] != null) { if (json['GetEmployeeContactsList'] != null) {
getEmployeeContactsList = <GetEmployeeContactsList>[]; getEmployeeContactsList = <GetEmployeeContactsList>[];
json['GetEmployeeContactsList'].forEach((v) { json['GetEmployeeContactsList'].forEach((v) {
getEmployeeContactsList!.add(new GetEmployeeContactsList.fromJson(v)); getEmployeeContactsList!.add(GetEmployeeContactsList.fromJson(v));
}); });
} }
if (json['GetEmployeePhonesList'] != null) { if (json['GetEmployeePhonesList'] != null) {
getEmployeePhonesList = <GetEmployeePhonesList>[]; getEmployeePhonesList = <GetEmployeePhonesList>[];
json['GetEmployeePhonesList'].forEach((v) { json['GetEmployeePhonesList'].forEach((v) {
getEmployeePhonesList!.add(new GetEmployeePhonesList.fromJson(v)); getEmployeePhonesList!.add(GetEmployeePhonesList.fromJson(v));
}); });
} }
if (json['GetEmployeeSubordinatesList'] != null) { if (json['GetEmployeeSubordinatesList'] != null) {
@ -844,12 +865,12 @@ class GenericResponseModel {
getHrCollectionNotificationBodyList = json['GetHrCollectionNotificationBodyList']; getHrCollectionNotificationBodyList = json['GetHrCollectionNotificationBodyList'];
getHrTransactionList = json['GetHrTransactionList']; getHrTransactionList = json['GetHrTransactionList'];
getItemCreationNtfBodyList = json['GetItemCreationNtfBodyList'] != null ? new GetItemCreationNtfBodyList.fromJson(json['GetItemCreationNtfBodyList']) : null; getItemCreationNtfBodyList = json['GetItemCreationNtfBodyList'] != null ? GetItemCreationNtfBodyList.fromJson(json['GetItemCreationNtfBodyList']) : null;
if (json['GetItemTypeNotificationsList'] != null) { if (json['GetItemTypeNotificationsList'] != null) {
getItemTypeNotificationsList = <GetItemTypeNotificationsList>[]; getItemTypeNotificationsList = <GetItemTypeNotificationsList>[];
json['GetItemTypeNotificationsList'].forEach((v) { json['GetItemTypeNotificationsList'].forEach((v) {
getItemTypeNotificationsList!.add(new GetItemTypeNotificationsList.fromJson(v)); getItemTypeNotificationsList!.add(GetItemTypeNotificationsList.fromJson(v));
}); });
} }
@ -859,14 +880,14 @@ class GenericResponseModel {
if (json['GetMoItemHistoryList'] != null) { if (json['GetMoItemHistoryList'] != null) {
getMoItemHistoryList = <GetMoItemHistoryList>[]; getMoItemHistoryList = <GetMoItemHistoryList>[];
json['GetMoItemHistoryList'].forEach((v) { json['GetMoItemHistoryList'].forEach((v) {
getMoItemHistoryList!.add(new GetMoItemHistoryList.fromJson(v)); getMoItemHistoryList!.add(GetMoItemHistoryList.fromJson(v));
}); });
} }
if (json['GetMoNotificationBodyList'] != null) { if (json['GetMoNotificationBodyList'] != null) {
getMoNotificationBodyList = <GetMoNotificationBodyList>[]; getMoNotificationBodyList = <GetMoNotificationBodyList>[];
json['GetMoNotificationBodyList'].forEach((v) { json['GetMoNotificationBodyList'].forEach((v) {
getMoNotificationBodyList!.add(new GetMoNotificationBodyList.fromJson(v)); getMoNotificationBodyList!.add(GetMoNotificationBodyList.fromJson(v));
}); });
} }
@ -900,14 +921,14 @@ class GenericResponseModel {
if (json['GetPaymentInformationList'] != null) { if (json['GetPaymentInformationList'] != null) {
getPaymentInformationList = <GetPaymentInformationList>[]; getPaymentInformationList = <GetPaymentInformationList>[];
json['GetPaymentInformationList'].forEach((v) { json['GetPaymentInformationList'].forEach((v) {
getPaymentInformationList!.add(new GetPaymentInformationList.fromJson(v)); getPaymentInformationList!.add(GetPaymentInformationList.fromJson(v));
}); });
} }
if (json['GetPayslipList'] != null) { if (json['GetPayslipList'] != null) {
getPayslipList = <GetPayslipList>[]; getPayslipList = <GetPayslipList>[];
json['GetPayslipList'].forEach((v) { json['GetPayslipList'].forEach((v) {
getPayslipList!.add(new GetPayslipList.fromJson(v)); getPayslipList!.add(GetPayslipList.fromJson(v));
}); });
} }
// getPendingReqDetailsList = json['GetPendingReqDetailsList']; // getPendingReqDetailsList = json['GetPendingReqDetailsList'];
@ -918,15 +939,15 @@ class GenericResponseModel {
if (json['GetPoItemHistoryList'] != null) { if (json['GetPoItemHistoryList'] != null) {
getPoItemHistoryList = <GetPoItemHistoryList>[]; getPoItemHistoryList = <GetPoItemHistoryList>[];
json['GetPoItemHistoryList'].forEach((v) { json['GetPoItemHistoryList'].forEach((v) {
getPoItemHistoryList!.add(new GetPoItemHistoryList.fromJson(v)); getPoItemHistoryList!.add(GetPoItemHistoryList.fromJson(v));
}); });
} }
getPoNotificationBodyList = json['GetPoNotificationBodyList'] != null ? new GetPoNotificationBodyList.fromJson(json['GetPoNotificationBodyList']) : null; getPoNotificationBodyList = json['GetPoNotificationBodyList'] != null ? GetPoNotificationBodyList.fromJson(json['GetPoNotificationBodyList']) : null;
getPrNotificationBodyList = json['GetPrNotificationBodyList']; getPrNotificationBodyList = json['GetPrNotificationBodyList'];
if (json['GetQuotationAnalysisList'] != null) { if (json['GetQuotationAnalysisList'] != null) {
getQuotationAnalysisList = <GetQuotationAnalysisList>[]; getQuotationAnalysisList = <GetQuotationAnalysisList>[];
json['GetQuotationAnalysisList'].forEach((v) { json['GetQuotationAnalysisList'].forEach((v) {
getQuotationAnalysisList!.add(new GetQuotationAnalysisList.fromJson(v)); getQuotationAnalysisList!.add(GetQuotationAnalysisList.fromJson(v));
}); });
} }
getRFCEmployeeListList = json['GetRFCEmployeeListList']; getRFCEmployeeListList = json['GetRFCEmployeeListList'];
@ -937,7 +958,7 @@ class GenericResponseModel {
if (json['GetScheduleShiftsDetailsList'] != null) { if (json['GetScheduleShiftsDetailsList'] != null) {
getScheduleShiftsDetailsList = <GetScheduleShiftsDetailsList>[]; getScheduleShiftsDetailsList = <GetScheduleShiftsDetailsList>[];
json['GetScheduleShiftsDetailsList'].forEach((v) { json['GetScheduleShiftsDetailsList'].forEach((v) {
getScheduleShiftsDetailsList!.add(new GetScheduleShiftsDetailsList.fromJson(v)); getScheduleShiftsDetailsList!.add(GetScheduleShiftsDetailsList.fromJson(v));
}); });
} }
getShiftTypesList = json['GetShiftTypesList']; getShiftTypesList = json['GetShiftTypesList'];
@ -945,13 +966,13 @@ class GenericResponseModel {
if (json['GetStampMsNotificationBodyList'] != null) { if (json['GetStampMsNotificationBodyList'] != null) {
getStampMsNotificationBodyList = <GetStampMsNotificationBodyList>[]; getStampMsNotificationBodyList = <GetStampMsNotificationBodyList>[];
json['GetStampMsNotificationBodyList'].forEach((v) { json['GetStampMsNotificationBodyList'].forEach((v) {
getStampMsNotificationBodyList!.add(new GetStampMsNotificationBodyList.fromJson(v)); getStampMsNotificationBodyList!.add(GetStampMsNotificationBodyList.fromJson(v));
}); });
} }
if (json['GetStampNsNotificationBodyList'] != null) { if (json['GetStampNsNotificationBodyList'] != null) {
getStampNsNotificationBodyList = <GetStampNsNotificationBodyList>[]; getStampNsNotificationBodyList = <GetStampNsNotificationBodyList>[];
json['GetStampNsNotificationBodyList'].forEach((v) { json['GetStampNsNotificationBodyList'].forEach((v) {
getStampNsNotificationBodyList!.add(new GetStampNsNotificationBodyList.fromJson(v)); getStampNsNotificationBodyList!.add(GetStampNsNotificationBodyList.fromJson(v));
}); });
} }
@ -968,7 +989,7 @@ class GenericResponseModel {
if (json['GetSummaryOfPaymentList'] != null) { if (json['GetSummaryOfPaymentList'] != null) {
getSummaryOfPaymentList = <GetSummaryOfPaymentList>[]; getSummaryOfPaymentList = <GetSummaryOfPaymentList>[];
json['GetSummaryOfPaymentList'].forEach((v) { json['GetSummaryOfPaymentList'].forEach((v) {
getSummaryOfPaymentList!.add(new GetSummaryOfPaymentList.fromJson(v)); getSummaryOfPaymentList!.add(GetSummaryOfPaymentList.fromJson(v));
}); });
} }
getSwipesList = json['GetSwipesList']; getSwipesList = json['GetSwipesList'];
@ -979,77 +1000,77 @@ class GenericResponseModel {
if (json['GetTimeCardSummaryList'] != null) { if (json['GetTimeCardSummaryList'] != null) {
getTimeCardSummaryList = <GetTimeCardSummaryList>[]; getTimeCardSummaryList = <GetTimeCardSummaryList>[];
json['GetTimeCardSummaryList'].forEach((v) { json['GetTimeCardSummaryList'].forEach((v) {
getTimeCardSummaryList!.add(new GetTimeCardSummaryList.fromJson(v)); getTimeCardSummaryList!.add(GetTimeCardSummaryList.fromJson(v));
}); });
} }
if (json['Mohemm_ITG_TicketsByEmployeeList'] != null) { if (json['Mohemm_ITG_TicketsByEmployeeList'] != null) {
getTicketsByEmployeeList = <GetTicketsByEmployeeList>[]; getTicketsByEmployeeList = <GetTicketsByEmployeeList>[];
json['Mohemm_ITG_TicketsByEmployeeList'].forEach((v) { json['Mohemm_ITG_TicketsByEmployeeList'].forEach((v) {
getTicketsByEmployeeList!.add(new GetTicketsByEmployeeList.fromJson(v)); getTicketsByEmployeeList!.add(GetTicketsByEmployeeList.fromJson(v));
}); });
} }
if (json['Mohemm_ITG_TicketDetailsList'] != null) { if (json['Mohemm_ITG_TicketDetailsList'] != null) {
getTicketDetailsByEmployee = <GetTicketDetailsByEmployee>[]; getTicketDetailsByEmployee = <GetTicketDetailsByEmployee>[];
json['Mohemm_ITG_TicketDetailsList'].forEach((v) { json['Mohemm_ITG_TicketDetailsList'].forEach((v) {
getTicketDetailsByEmployee!.add(new GetTicketDetailsByEmployee.fromJson(v)); getTicketDetailsByEmployee!.add(GetTicketDetailsByEmployee.fromJson(v));
}); });
} }
if (json['Mohemm_ITG_TicketTransactionsList'] != null) { if (json['Mohemm_ITG_TicketTransactionsList'] != null) {
getTicketTransactions = <GetTicketTransactions>[]; getTicketTransactions = <GetTicketTransactions>[];
json['Mohemm_ITG_TicketTransactionsList'].forEach((v) { json['Mohemm_ITG_TicketTransactionsList'].forEach((v) {
getTicketTransactions!.add(new GetTicketTransactions.fromJson(v)); getTicketTransactions!.add(GetTicketTransactions.fromJson(v));
}); });
} }
if (json['Mohemm_Itg_TicketTypesList'] != null) { if (json['Mohemm_Itg_TicketTypesList'] != null) {
getTicketTypes = <GetTicketTypes>[]; getTicketTypes = <GetTicketTypes>[];
json['Mohemm_Itg_TicketTypesList'].forEach((v) { json['Mohemm_Itg_TicketTypesList'].forEach((v) {
getTicketTypes!.add(new GetTicketTypes.fromJson(v)); getTicketTypes!.add(GetTicketTypes.fromJson(v));
}); });
} }
if (json['Mohemm_Itg_ProjectsList'] != null) { if (json['Mohemm_Itg_ProjectsList'] != null) {
getMowadhafhiProjects = <GetMowadhafhiProjects>[]; getMowadhafhiProjects = <GetMowadhafhiProjects>[];
json['Mohemm_Itg_ProjectsList'].forEach((v) { json['Mohemm_Itg_ProjectsList'].forEach((v) {
getMowadhafhiProjects!.add(new GetMowadhafhiProjects.fromJson(v)); getMowadhafhiProjects!.add(GetMowadhafhiProjects.fromJson(v));
}); });
} }
if (json['Mohemm_ITG_ProjectDepartmentsList'] != null) { if (json['Mohemm_ITG_ProjectDepartmentsList'] != null) {
getProjectDepartments = <GetProjectDepartments>[]; getProjectDepartments = <GetProjectDepartments>[];
json['Mohemm_ITG_ProjectDepartmentsList'].forEach((v) { json['Mohemm_ITG_ProjectDepartmentsList'].forEach((v) {
getProjectDepartments!.add(new GetProjectDepartments.fromJson(v)); getProjectDepartments!.add(GetProjectDepartments.fromJson(v));
}); });
} }
if (json['Mohemm_ITG_DepartmentSectionsList'] != null) { if (json['Mohemm_ITG_DepartmentSectionsList'] != null) {
getDepartmentSections = <GetDepartmentSections>[]; getDepartmentSections = <GetDepartmentSections>[];
json['Mohemm_ITG_DepartmentSectionsList'].forEach((v) { json['Mohemm_ITG_DepartmentSectionsList'].forEach((v) {
getDepartmentSections!.add(new GetDepartmentSections.fromJson(v)); getDepartmentSections!.add(GetDepartmentSections.fromJson(v));
}); });
} }
if (json['Mohemm_ITG_SectionTopicsList'] != null) { if (json['Mohemm_ITG_SectionTopicsList'] != null) {
getSectionTopics = <GetSectionTopics>[]; getSectionTopics = <GetSectionTopics>[];
json['Mohemm_ITG_SectionTopicsList'].forEach((v) { json['Mohemm_ITG_SectionTopicsList'].forEach((v) {
getSectionTopics!.add(new GetSectionTopics.fromJson(v)); getSectionTopics!.add(GetSectionTopics.fromJson(v));
}); });
} }
if (json['GetPendingReqFunctionsList'] != null) { if (json['GetPendingReqFunctionsList'] != null) {
getPendingTransactionsFunctions = <GetPendingTransactionsFunctions>[]; getPendingTransactionsFunctions = <GetPendingTransactionsFunctions>[];
json['GetPendingReqFunctionsList'].forEach((v) { json['GetPendingReqFunctionsList'].forEach((v) {
getPendingTransactionsFunctions!.add(new GetPendingTransactionsFunctions.fromJson(v)); getPendingTransactionsFunctions!.add(GetPendingTransactionsFunctions.fromJson(v));
}); });
} }
if (json['GetPendingReqDetailsList'] != null) { if (json['GetPendingReqDetailsList'] != null) {
getPendingTransactionsDetails = <GetPendingTransactionsDetails>[]; getPendingTransactionsDetails = <GetPendingTransactionsDetails>[];
json['GetPendingReqDetailsList'].forEach((v) { json['GetPendingReqDetailsList'].forEach((v) {
getPendingTransactionsDetails!.add(new GetPendingTransactionsDetails.fromJson(v)); getPendingTransactionsDetails!.add(GetPendingTransactionsDetails.fromJson(v));
}); });
} }
@ -1177,7 +1198,7 @@ class GenericResponseModel {
if (json['RespondAttributesList'] != null) { if (json['RespondAttributesList'] != null) {
respondAttributesList = <RespondAttributesList>[]; respondAttributesList = <RespondAttributesList>[];
json['RespondAttributesList'].forEach((v) { json['RespondAttributesList'].forEach((v) {
respondAttributesList!.add(new RespondAttributesList.fromJson(v)); respondAttributesList!.add(RespondAttributesList.fromJson(v));
}); });
} }
if (json['RespondRolesList'] != null) { if (json['RespondRolesList'] != null) {
@ -1192,25 +1213,25 @@ class GenericResponseModel {
sFHGetPoNotificationBodyList = json['SFH_GetPoNotificationBodyList']; sFHGetPoNotificationBodyList = json['SFH_GetPoNotificationBodyList'];
sFHGetPrNotificationBodyList = json['SFH_GetPrNotificationBodyList']; sFHGetPrNotificationBodyList = json['SFH_GetPrNotificationBodyList'];
startAbsenceApprovalProccess = json['StartAbsenceApprovalProccess']; startAbsenceApprovalProccess = json['StartAbsenceApprovalProccess'];
startAddressApprovalProcessList = json['StartAddressApprovalProcessList'] != null ? new StartAddressApprovalProcess.fromJson(json['StartAddressApprovalProcessList']) : null; startAddressApprovalProcessList = json['StartAddressApprovalProcessList'] != null ? StartAddressApprovalProcess.fromJson(json['StartAddressApprovalProcessList']) : null;
startBasicDetApprProcessList = json['StartBasicDetApprProcessList']; startBasicDetApprProcessList = json['StartBasicDetApprProcessList'];
startCeiApprovalProcess = json['StartCeiApprovalProcess']; startCeiApprovalProcess = json['StartCeiApprovalProcess'];
startContactApprovalProcessList = json['StartContactApprovalProcessList']; startContactApprovalProcessList = json['StartContactApprovalProcessList'];
startEitApprovalProcess = json['StartEitApprovalProcess'] != null ? new StartEitApprovalProcess.fromJson(json['StartEitApprovalProcess']) : null; startEitApprovalProcess = json['StartEitApprovalProcess'] != null ? StartEitApprovalProcess.fromJson(json['StartEitApprovalProcess']) : null;
startHrApprovalProcessList = json['StartHrApprovalProcessList']; startHrApprovalProcessList = json['StartHrApprovalProcessList'];
startPhonesApprovalProcessList = json['StartPhonesApprovalProcessList'] != null ? new StartPhoneApprovalProcess.fromJson(json['startPhonesApprovalProcessList']) : null; startPhonesApprovalProcessList = json['StartPhonesApprovalProcessList'] != null ? StartPhoneApprovalProcess.fromJson(json['startPhonesApprovalProcessList']) : null;
startSitApprovalProcess = json['StartSitApprovalProcess']; startSitApprovalProcess = json['StartSitApprovalProcess'];
startTermApprovalProcessList = json['StartTermApprovalProcessList']; startTermApprovalProcessList = json['StartTermApprovalProcessList'];
submitAddressTransactionList = json['SubmitAddressTransactionList'] != null ? new SubmitAddressTransaction.fromJson(json['SubmitAddressTransactionList']) : null; submitAddressTransactionList = json['SubmitAddressTransactionList'] != null ? SubmitAddressTransaction.fromJson(json['SubmitAddressTransactionList']) : null;
submitBasicDetTransactionList = json['SubmitBasicDetTransactionList'] != null ? new SubmitBasicDetailsTransactionList.fromJson(json['SubmitBasicDetTransactionList']) : null; submitBasicDetTransactionList = json['SubmitBasicDetTransactionList'] != null ? SubmitBasicDetailsTransactionList.fromJson(json['SubmitBasicDetTransactionList']) : null;
submitCEITransactionList = json['SubmitCEITransactionList']; submitCEITransactionList = json['SubmitCEITransactionList'];
submitCcpTransactionList = json['SubmitCcpTransactionList']; submitCcpTransactionList = json['SubmitCcpTransactionList'];
submitContactTransactionList = json['SubmitContactTransactionList'] != null ? new SubmitContactTransactionList.fromJson(json['SubmitContactTransactionList']) : null; submitContactTransactionList = json['SubmitContactTransactionList'] != null ? SubmitContactTransactionList.fromJson(json['SubmitContactTransactionList']) : null;
submitEITTransactionList = json['SubmitEITTransactionList'] != null ? new SubmitEITTransactionList.fromJson(json['SubmitEITTransactionList']) : null; submitEITTransactionList = json['SubmitEITTransactionList'] != null ? SubmitEITTransactionList.fromJson(json['SubmitEITTransactionList']) : null;
submitHrTransactionList = json['SubmitHrTransactionList']; submitHrTransactionList = json['SubmitHrTransactionList'];
submitPhonesTransactionList = json['SubmitPhonesTransactionList']; submitPhonesTransactionList = json['SubmitPhonesTransactionList'];
@ -1247,7 +1268,7 @@ class GenericResponseModel {
vHRIsVerificationCodeValid = json['VHR_IsVerificationCodeValid']; vHRIsVerificationCodeValid = json['VHR_IsVerificationCodeValid'];
validateAbsenceTransactionList = json['ValidateAbsenceTransactionList']; validateAbsenceTransactionList = json['ValidateAbsenceTransactionList'];
validateEITTransactionList = json['ValidateEITTransactionList'] != null ? new ValidateEITTransactionList.fromJson(json['ValidateEITTransactionList']) : null; validateEITTransactionList = json['ValidateEITTransactionList'] != null ? ValidateEITTransactionList.fromJson(json['ValidateEITTransactionList']) : null;
validatePhonesTransactionList = json['ValidatePhonesTransactionList']; validatePhonesTransactionList = json['ValidatePhonesTransactionList'];
if (json['VrItemTypesList'] != null) { if (json['VrItemTypesList'] != null) {
@ -1259,7 +1280,7 @@ class GenericResponseModel {
if (json['WFLookUpList'] != null) { if (json['WFLookUpList'] != null) {
wFLookUpList = <WFLookUpList>[]; wFLookUpList = <WFLookUpList>[];
json['WFLookUpList'].forEach((v) { json['WFLookUpList'].forEach((v) {
wFLookUpList!.add(new WFLookUpList.fromJson(v)); wFLookUpList!.add(WFLookUpList.fromJson(v));
}); });
} }
eLearningGETEMPLOYEEPROFILEList = json['eLearning_GET_EMPLOYEE_PROFILEList']; eLearningGETEMPLOYEEPROFILEList = json['eLearning_GET_EMPLOYEE_PROFILEList'];
@ -1272,7 +1293,7 @@ class GenericResponseModel {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>(); Map<String, dynamic> data = Map<String, dynamic>();
data['Date'] = this.date; data['Date'] = this.date;
data['LanguageID'] = this.languageID; data['LanguageID'] = this.languageID;
data['ServiceName'] = this.serviceName; data['ServiceName'] = this.serviceName;
@ -1334,14 +1355,22 @@ class GenericResponseModel {
data['EmployeeQR'] = this.employeeQR; data['EmployeeQR'] = this.employeeQR;
data['ForgetPasswordTokenID'] = this.forgetPasswordTokenID; data['ForgetPasswordTokenID'] = this.forgetPasswordTokenID;
data['GetAbsenceAttachmentsList'] = this.getAbsenceAttachmentsList; data['GetAbsenceAttachmentsList'] = this.getAbsenceAttachmentsList;
data['GetAbsenceAttendanceTypesList'] = this.getAbsenceAttendanceTypesList;
if (this.getAbsenceAttendanceTypesList != null) {
data['GetAbsenceAttendanceTypesList'] = this.getAbsenceAttendanceTypesList!.map((v) => v.toJson()).toList();
}
if (this.getAbsenceCollectionNotificationBodyList != null) { if (this.getAbsenceCollectionNotificationBodyList != null) {
data['GetAbsenceCollectionNotificationBodyList'] = this.getAbsenceCollectionNotificationBodyList!.map((v) => v.toJson()).toList(); data['GetAbsenceCollectionNotificationBodyList'] = this.getAbsenceCollectionNotificationBodyList!.map((v) => v.toJson()).toList();
} }
data['GetAbsenceDffStructureList'] = this.getAbsenceDffStructureList; if (this.getAbsenceDffStructureList != null) {
data['GetAbsenceTransactionList'] = this.getAbsenceTransactionList; data['GetAbsenceDffStructureList'] = this.getAbsenceDffStructureList!.map((v) => v.toJson()).toList();
}
if (this.getAbsenceTransactionList != null) {
data['GetAbsenceTransactionList'] = this.getAbsenceTransactionList!.map((v) => v.toJson()).toList();
}
data['GetAccrualBalancesList'] = this.getAccrualBalancesList; data['GetAccrualBalancesList'] = this.getAccrualBalancesList;
if (this.getActionHistoryList != null) { if (this.getActionHistoryList != null) {

@ -25,7 +25,7 @@ class GetUserItemTypesList {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); Map<String, dynamic> data = new Map<String, dynamic>();
data['FYA_ENABLED_FALG'] = this.fYAENABLEDFALG; data['FYA_ENABLED_FALG'] = this.fYAENABLEDFALG;
data['FYI_ENABLED_FLAG'] = this.fYIENABLEDFLAG; data['FYI_ENABLED_FLAG'] = this.fYIENABLEDFLAG;
data['ITEM_TYPE'] = this.iTEMTYPE; data['ITEM_TYPE'] = this.iTEMTYPE;

@ -0,0 +1,24 @@
class GetAbsenceAttendanceTypesList {
int? aBSENCEATTENDANCETYPEID;
String? aBSENCEATTENDANCETYPENAME;
String? dESCFLEXCONTEXTCODE;
String? hOURSORDAYS;
GetAbsenceAttendanceTypesList({this.aBSENCEATTENDANCETYPEID, this.aBSENCEATTENDANCETYPENAME, this.dESCFLEXCONTEXTCODE, this.hOURSORDAYS});
GetAbsenceAttendanceTypesList.fromJson(Map<String, dynamic> json) {
aBSENCEATTENDANCETYPEID = json['ABSENCE_ATTENDANCE_TYPE_ID'];
aBSENCEATTENDANCETYPENAME = json['ABSENCE_ATTENDANCE_TYPE_NAME'];
dESCFLEXCONTEXTCODE = json['DESC_FLEX_CONTEXT_CODE'];
hOURSORDAYS = json['HOURS_OR_DAYS'];
}
Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>();
data['ABSENCE_ATTENDANCE_TYPE_ID'] = this.aBSENCEATTENDANCETYPEID;
data['ABSENCE_ATTENDANCE_TYPE_NAME'] = this.aBSENCEATTENDANCETYPENAME;
data['DESC_FLEX_CONTEXT_CODE'] = this.dESCFLEXCONTEXTCODE;
data['HOURS_OR_DAYS'] = this.hOURSORDAYS;
return data;
}
}

@ -0,0 +1,193 @@
import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart';
class GetAbsenceDffStructureList {
String? aLPHANUMERICALLOWEDFLAG;
String? aPPLICATIONCOLUMNNAME;
String? cHILDSEGMENTSDV;
List<String>? cHILDSEGMENTSDVSplited;
String? cHILDSEGMENTSVS;
List<String>? cHILDSEGMENTSVSSplited;
String? dEFAULTTYPE;
String? dEFAULTVALUE;
String? dESCFLEXCONTEXTCODE;
String? dESCFLEXCONTEXTNAME;
String? dESCFLEXNAME;
String? dISPLAYFLAG;
String? eNABLEDFLAG;
ESERVICESDV? eSERVICESDV;
List<ESERVICESVS>? eSERVICESVS;
String? fLEXVALUESETNAME;
String? fORMATTYPE;
String? fORMATTYPEDSP;
bool? isEmptyOption;
String? lONGLISTFLAG;
int? mAXIMUMSIZE;
String? mAXIMUMVALUE;
String? mINIMUMVALUE;
String? mOBILEENABLED;
String? nUMBERPRECISION;
String? nUMERICMODEENABLEDFLAG;
String? pARENTSEGMENTSDV;
List<PARENTSEGMENTSDVSplited>? pARENTSEGMENTSDVSplited;
String? pARENTSEGMENTSVS;
List<PARENTSEGMENTSVSSplitedVS>? pARENTSEGMENTSVSSplitedVS;
String? rEADONLY;
String? rEQUIREDFLAG;
String? sEGMENTNAME;
String? sEGMENTPROMPT;
int? sEGMENTSEQNUM;
String? uPPERCASEONLYFLAG;
String? uSEDFLAG;
String? vALIDATIONTYPE;
String? vALIDATIONTYPEDSP;
GetAbsenceDffStructureList(
{this.aLPHANUMERICALLOWEDFLAG,
this.aPPLICATIONCOLUMNNAME,
this.cHILDSEGMENTSDV,
this.cHILDSEGMENTSDVSplited,
this.cHILDSEGMENTSVS,
this.cHILDSEGMENTSVSSplited,
this.dEFAULTTYPE,
this.dEFAULTVALUE,
this.dESCFLEXCONTEXTCODE,
this.dESCFLEXCONTEXTNAME,
this.dESCFLEXNAME,
this.dISPLAYFLAG,
this.eNABLEDFLAG,
this.eSERVICESDV,
this.eSERVICESVS,
this.fLEXVALUESETNAME,
this.fORMATTYPE,
this.fORMATTYPEDSP,
this.isEmptyOption,
this.lONGLISTFLAG,
this.mAXIMUMSIZE,
this.mAXIMUMVALUE,
this.mINIMUMVALUE,
this.mOBILEENABLED,
this.nUMBERPRECISION,
this.nUMERICMODEENABLEDFLAG,
this.pARENTSEGMENTSDV,
this.pARENTSEGMENTSDVSplited,
this.pARENTSEGMENTSVS,
this.pARENTSEGMENTSVSSplitedVS,
this.rEADONLY,
this.rEQUIREDFLAG,
this.sEGMENTNAME,
this.sEGMENTPROMPT,
this.sEGMENTSEQNUM,
this.uPPERCASEONLYFLAG,
this.uSEDFLAG,
this.vALIDATIONTYPE,
this.vALIDATIONTYPEDSP});
GetAbsenceDffStructureList.fromJson(Map<String, dynamic> json) {
aLPHANUMERICALLOWEDFLAG = json['ALPHANUMERIC_ALLOWED_FLAG'];
aPPLICATIONCOLUMNNAME = json['APPLICATION_COLUMN_NAME'];
cHILDSEGMENTSDV = json['CHILD_SEGMENTS_DV'];
cHILDSEGMENTSDVSplited = json['CHILD_SEGMENTS_DV_Splited'] == null ? <String>[] : json['CHILD_SEGMENTS_DV_Splited'].cast<String>();
cHILDSEGMENTSVS = json['CHILD_SEGMENTS_VS'];
cHILDSEGMENTSVSSplited = json['CHILD_SEGMENTS_VS_Splited']== null ? <String>[] : json['CHILD_SEGMENTS_VS_Splited'].cast<String>();
dEFAULTTYPE = json['DEFAULT_TYPE'];
dEFAULTVALUE = json['DEFAULT_VALUE'];
dESCFLEXCONTEXTCODE = json['DESC_FLEX_CONTEXT_CODE'];
dESCFLEXCONTEXTNAME = json['DESC_FLEX_CONTEXT_NAME'];
dESCFLEXNAME = json['DESC_FLEX_NAME'];
dISPLAYFLAG = json['DISPLAY_FLAG'];
eNABLEDFLAG = json['ENABLED_FLAG'];
eSERVICESDV = json['E_SERVICES_DV'] != null ? new ESERVICESDV.fromJson(json['E_SERVICES_DV']) : null;
if (json['E_SERVICES_VS'] != null) {
eSERVICESVS = <ESERVICESVS>[];
json['E_SERVICES_VS'].forEach((v) {
eSERVICESVS!.add(new ESERVICESVS.fromJson(v));
});
}
fLEXVALUESETNAME = json['FLEX_VALUE_SET_NAME'];
fORMATTYPE = json['FORMAT_TYPE'];
fORMATTYPEDSP = json['FORMAT_TYPE_DSP'];
isEmptyOption = json['IsEmptyOption'];
lONGLISTFLAG = json['LONGLIST_FLAG'];
mAXIMUMSIZE = json['MAXIMUM_SIZE'];
mAXIMUMVALUE = json['MAXIMUM_VALUE'];
mINIMUMVALUE = json['MINIMUM_VALUE'];
mOBILEENABLED = json['MOBILE_ENABLED'];
nUMBERPRECISION = json['NUMBER_PRECISION'];
nUMERICMODEENABLEDFLAG = json['NUMERIC_MODE_ENABLED_FLAG'];
pARENTSEGMENTSDV = json['PARENT_SEGMENTS_DV'];
if (json['PARENT_SEGMENTS_DV_Splited'] != null) {
pARENTSEGMENTSDVSplited = <PARENTSEGMENTSDVSplited>[];
json['PARENT_SEGMENTS_DV_Splited'].forEach((v) {
pARENTSEGMENTSDVSplited!.add(PARENTSEGMENTSDVSplited.fromJson(v));
});
}
pARENTSEGMENTSVS = json['PARENT_SEGMENTS_VS'];
if (json['PARENT_SEGMENTS_VS_SplitedVS'] != null) {
pARENTSEGMENTSVSSplitedVS = <PARENTSEGMENTSVSSplitedVS>[];
json['PARENT_SEGMENTS_VS_SplitedVS'].forEach((v) {
pARENTSEGMENTSVSSplitedVS!.add(new PARENTSEGMENTSVSSplitedVS.fromJson(v));
});
}
rEADONLY = json['READ_ONLY'];
rEQUIREDFLAG = json['REQUIRED_FLAG'];
sEGMENTNAME = json['SEGMENT_NAME'];
sEGMENTPROMPT = json['SEGMENT_PROMPT'];
sEGMENTSEQNUM = json['SEGMENT_SEQ_NUM'];
uPPERCASEONLYFLAG = json['UPPERCASE_ONLY_FLAG'];
uSEDFLAG = json['USED_FLAG'];
vALIDATIONTYPE = json['VALIDATION_TYPE'];
vALIDATIONTYPEDSP = json['VALIDATION_TYPE_DSP'];
}
Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>();
data['ALPHANUMERIC_ALLOWED_FLAG'] = this.aLPHANUMERICALLOWEDFLAG;
data['APPLICATION_COLUMN_NAME'] = this.aPPLICATIONCOLUMNNAME;
data['CHILD_SEGMENTS_DV'] = this.cHILDSEGMENTSDV;
data['CHILD_SEGMENTS_DV_Splited'] = this.cHILDSEGMENTSDVSplited;
data['CHILD_SEGMENTS_VS'] = this.cHILDSEGMENTSVS;
data['CHILD_SEGMENTS_VS_Splited'] = this.cHILDSEGMENTSVSSplited;
data['DEFAULT_TYPE'] = this.dEFAULTTYPE;
data['DEFAULT_VALUE'] = this.dEFAULTVALUE;
data['DESC_FLEX_CONTEXT_CODE'] = this.dESCFLEXCONTEXTCODE;
data['DESC_FLEX_CONTEXT_NAME'] = this.dESCFLEXCONTEXTNAME;
data['DESC_FLEX_NAME'] = this.dESCFLEXNAME;
data['DISPLAY_FLAG'] = this.dISPLAYFLAG;
data['ENABLED_FLAG'] = this.eNABLEDFLAG;
if (this.eSERVICESDV != null) {
data['E_SERVICES_DV'] = this.eSERVICESDV!.toJson();
}
if (this.eSERVICESVS != null) {
data['E_SERVICES_VS'] = this.eSERVICESVS!.map((v) => v.toJson()).toList();
}
data['FLEX_VALUE_SET_NAME'] = this.fLEXVALUESETNAME;
data['FORMAT_TYPE'] = this.fORMATTYPE;
data['FORMAT_TYPE_DSP'] = this.fORMATTYPEDSP;
data['IsEmptyOption'] = this.isEmptyOption;
data['LONGLIST_FLAG'] = this.lONGLISTFLAG;
data['MAXIMUM_SIZE'] = this.mAXIMUMSIZE;
data['MAXIMUM_VALUE'] = this.mAXIMUMVALUE;
data['MINIMUM_VALUE'] = this.mINIMUMVALUE;
data['MOBILE_ENABLED'] = this.mOBILEENABLED;
data['NUMBER_PRECISION'] = this.nUMBERPRECISION;
data['NUMERIC_MODE_ENABLED_FLAG'] = this.nUMERICMODEENABLEDFLAG;
data['PARENT_SEGMENTS_DV'] = this.pARENTSEGMENTSDV;
if (this.pARENTSEGMENTSDVSplited != null) {
data['PARENT_SEGMENTS_DV_Splited'] = this.pARENTSEGMENTSDVSplited!.map((v) => v.toJson()).toList();
}
data['PARENT_SEGMENTS_VS'] = this.pARENTSEGMENTSVS;
if (this.pARENTSEGMENTSVSSplitedVS != null) {
data['PARENT_SEGMENTS_VS_SplitedVS'] = this.pARENTSEGMENTSVSSplitedVS!.map((v) => v.toJson()).toList();
}
data['READ_ONLY'] = this.rEADONLY;
data['REQUIRED_FLAG'] = this.rEQUIREDFLAG;
data['SEGMENT_NAME'] = this.sEGMENTNAME;
data['SEGMENT_PROMPT'] = this.sEGMENTPROMPT;
data['SEGMENT_SEQ_NUM'] = this.sEGMENTSEQNUM;
data['UPPERCASE_ONLY_FLAG'] = this.uPPERCASEONLYFLAG;
data['USED_FLAG'] = this.uSEDFLAG;
data['VALIDATION_TYPE'] = this.vALIDATIONTYPE;
data['VALIDATION_TYPE_DSP'] = this.vALIDATIONTYPEDSP;
return data;
}
}

@ -0,0 +1,82 @@
class GetAbsenceTransactionList {
int? aBSENCEATTENDANCEID;
int? aBSENCEATTENDANCETYPEID;
String? aBSENCECATEGORY;
double? aBSENCEDAYS;
double? aBSENCEHOURS;
String? aBSENCESTATUS;
String? aBSENCETYPE;
String? aPPROVALSTATUS;
String? aTTACHMENTEXIST;
String? dELETEBUTTON;
String? eNDDATE;
int? fROMROWNUM;
int? nOOFROWS;
int? rOWNUM;
String? sTARTDATE;
int? tOROWNUM;
String? uPDATEBUTTON;
GetAbsenceTransactionList(
{this.aBSENCEATTENDANCEID,
this.aBSENCEATTENDANCETYPEID,
this.aBSENCECATEGORY,
this.aBSENCEDAYS,
this.aBSENCEHOURS,
this.aBSENCESTATUS,
this.aBSENCETYPE,
this.aPPROVALSTATUS,
this.aTTACHMENTEXIST,
this.dELETEBUTTON,
this.eNDDATE,
this.fROMROWNUM,
this.nOOFROWS,
this.rOWNUM,
this.sTARTDATE,
this.tOROWNUM,
this.uPDATEBUTTON});
GetAbsenceTransactionList.fromJson(Map<String, dynamic> json) {
print("json:$json");
print("type:ABSENCE_DAYS:${(json['ABSENCE_DAYS']).runtimeType}");
aBSENCEATTENDANCEID = json['ABSENCE_ATTENDANCE_ID'];
aBSENCEATTENDANCETYPEID = json['ABSENCE_ATTENDANCE_TYPE_ID'];
aBSENCECATEGORY = json['ABSENCE_CATEGORY'];
aBSENCEDAYS = double.parse(json['ABSENCE_DAYS'].toString() ?? "0.0");
aBSENCEHOURS = json['ABSENCE_HOURS'];
aBSENCESTATUS = json['ABSENCE_STATUS'];
aBSENCETYPE = json['ABSENCE_TYPE'];
aPPROVALSTATUS = json['APPROVAL_STATUS'];
aTTACHMENTEXIST = json['ATTACHMENT_EXIST'];
dELETEBUTTON = json['DELETE_BUTTON'];
eNDDATE = json['END_DATE'];
fROMROWNUM = json['FROM_ROW_NUM'];
nOOFROWS = json['NO_OF_ROWS'];
rOWNUM = json['ROW_NUM'];
sTARTDATE = json['START_DATE'];
tOROWNUM = json['TO_ROW_NUM'];
uPDATEBUTTON = json['UPDATE_BUTTON'];
}
Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>();
data['ABSENCE_ATTENDANCE_ID'] = this.aBSENCEATTENDANCEID;
data['ABSENCE_ATTENDANCE_TYPE_ID'] = this.aBSENCEATTENDANCETYPEID;
data['ABSENCE_CATEGORY'] = this.aBSENCECATEGORY;
data['ABSENCE_DAYS'] = this.aBSENCEDAYS;
data['ABSENCE_HOURS'] = this.aBSENCEHOURS;
data['ABSENCE_STATUS'] = this.aBSENCESTATUS;
data['ABSENCE_TYPE'] = this.aBSENCETYPE;
data['APPROVAL_STATUS'] = this.aPPROVALSTATUS;
data['ATTACHMENT_EXIST'] = this.aTTACHMENTEXIST;
data['DELETE_BUTTON'] = this.dELETEBUTTON;
data['END_DATE'] = this.eNDDATE;
data['FROM_ROW_NUM'] = this.fROMROWNUM;
data['NO_OF_ROWS'] = this.nOOFROWS;
data['ROW_NUM'] = this.rOWNUM;
data['START_DATE'] = this.sTARTDATE;
data['TO_ROW_NUM'] = this.tOROWNUM;
data['UPDATE_BUTTON'] = this.uPDATEBUTTON;
return data;
}
}

@ -41,7 +41,7 @@ class GetAttendanceTrackingList {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); Map<String, dynamic> data = new Map<String, dynamic>();
data['P_BREAK_HOURS'] = this.pBREAKHOURS; data['P_BREAK_HOURS'] = this.pBREAKHOURS;
data['P_LATE_IN_HOURS'] = this.pLATEINHOURS; data['P_LATE_IN_HOURS'] = this.pLATEINHOURS;
data['P_REMAINING_HOURS'] = this.pREMAININGHOURS; data['P_REMAINING_HOURS'] = this.pREMAININGHOURS;

@ -1,4 +1,3 @@
class GetEmployeeSubordinatesList { class GetEmployeeSubordinatesList {
String? aCTUALTERMINATIONDATE; String? aCTUALTERMINATIONDATE;
String? aSSIGNMENTENDDATE; String? aSSIGNMENTENDDATE;
@ -78,80 +77,80 @@ class GetEmployeeSubordinatesList {
GetEmployeeSubordinatesList( GetEmployeeSubordinatesList(
{this.aCTUALTERMINATIONDATE, {this.aCTUALTERMINATIONDATE,
this.aSSIGNMENTENDDATE, this.aSSIGNMENTENDDATE,
this.aSSIGNMENTID, this.aSSIGNMENTID,
this.aSSIGNMENTNUMBER, this.aSSIGNMENTNUMBER,
this.aSSIGNMENTSTARTDATE, this.aSSIGNMENTSTARTDATE,
this.aSSIGNMENTSTATUSTYPEID, this.aSSIGNMENTSTATUSTYPEID,
this.aSSIGNMENTTYPE, this.aSSIGNMENTTYPE,
this.bUSINESSGROUPID, this.bUSINESSGROUPID,
this.bUSINESSGROUPNAME, this.bUSINESSGROUPNAME,
this.cURRENTEMPLOYEEFLAG, this.cURRENTEMPLOYEEFLAG,
this.eMPLOYEEDISPLAYNAME, this.eMPLOYEEDISPLAYNAME,
this.eMPLOYEEEMAILADDRESS, this.eMPLOYEEEMAILADDRESS,
this.eMPLOYEEIMAGE, this.eMPLOYEEIMAGE,
this.eMPLOYEEMOBILENUMBER, this.eMPLOYEEMOBILENUMBER,
this.eMPLOYEENAME, this.eMPLOYEENAME,
this.eMPLOYEENUMBER, this.eMPLOYEENUMBER,
this.eMPLOYEEWORKNUMBER, this.eMPLOYEEWORKNUMBER,
this.eMPLOYMENTCATEGORY, this.eMPLOYMENTCATEGORY,
this.eMPLOYMENTCATEGORYMEANING, this.eMPLOYMENTCATEGORYMEANING,
this.fREQUENCY, this.fREQUENCY,
this.fREQUENCYMEANING, this.fREQUENCYMEANING,
this.fROMROWNUM, this.fROMROWNUM,
this.gRADEID, this.gRADEID,
this.gRADENAME, this.gRADENAME,
this.genderCode, this.genderCode,
this.genderMeaning, this.genderMeaning,
this.hIREDATE, this.hIREDATE,
this.isFavorite, this.isFavorite,
this.jOBID, this.jOBID,
this.jOBNAME, this.jOBNAME,
this.lOCATIONID, this.lOCATIONID,
this.lOCATIONNAME, this.lOCATIONNAME,
this.mANUALTIMECARDFLAG, this.mANUALTIMECARDFLAG,
this.mANUALTIMECARDMEANING, this.mANUALTIMECARDMEANING,
this.nATIONALITYCODE, this.nATIONALITYCODE,
this.nATIONALITYMEANING, this.nATIONALITYMEANING,
this.nATIONALIDENTIFIER, this.nATIONALIDENTIFIER,
this.nORMALHOURS, this.nORMALHOURS,
this.nOOFROWS, this.nOOFROWS,
this.nUMOFSUBORDINATES, this.nUMOFSUBORDINATES,
this.oRGANIZATIONID, this.oRGANIZATIONID,
this.oRGANIZATIONNAME, this.oRGANIZATIONNAME,
this.pAYROLLCODE, this.pAYROLLCODE,
this.pAYROLLID, this.pAYROLLID,
this.pAYROLLNAME, this.pAYROLLNAME,
this.pERSONID, this.pERSONID,
this.pERSONTYPE, this.pERSONTYPE,
this.pERSONTYPEID, this.pERSONTYPEID,
this.pERINFORMATIONCATEGORY, this.pERINFORMATIONCATEGORY,
this.pOSITIONID, this.pOSITIONID,
this.pOSITIONNAME, this.pOSITIONNAME,
this.pRIMARYFLAG, this.pRIMARYFLAG,
this.rOWNUM, this.rOWNUM,
this.sERVICEDAYS, this.sERVICEDAYS,
this.sERVICEMONTHS, this.sERVICEMONTHS,
this.sERVICEYEARS, this.sERVICEYEARS,
this.sUPERVISORASSIGNMENTID, this.sUPERVISORASSIGNMENTID,
this.sUPERVISORDISPLAYNAME, this.sUPERVISORDISPLAYNAME,
this.sUPERVISOREMAILADDRESS, this.sUPERVISOREMAILADDRESS,
this.sUPERVISORID, this.sUPERVISORID,
this.sUPERVISORMOBILENUMBER, this.sUPERVISORMOBILENUMBER,
this.sUPERVISORNAME, this.sUPERVISORNAME,
this.sUPERVISORNUMBER, this.sUPERVISORNUMBER,
this.sUPERVISORWORKNUMBER, this.sUPERVISORWORKNUMBER,
this.sWIPESEXEMPTEDFLAG, this.sWIPESEXEMPTEDFLAG,
this.sWIPESEXEMPTEDMEANING, this.sWIPESEXEMPTEDMEANING,
this.sYSTEMPERSONTYPE, this.sYSTEMPERSONTYPE,
this.tKEMAILADDRESS, this.tKEMAILADDRESS,
this.tKEMPLOYEEDISPLAYNAME, this.tKEMPLOYEEDISPLAYNAME,
this.tKEMPLOYEENAME, this.tKEMPLOYEENAME,
this.tKEMPLOYEENUMBER, this.tKEMPLOYEENUMBER,
this.tKPERSONID, this.tKPERSONID,
this.tOROWNUM, this.tOROWNUM,
this.uNITNUMBER, this.uNITNUMBER,
this.uSERSTATUS}); this.uSERSTATUS});
GetEmployeeSubordinatesList.fromJson(Map<String, dynamic> json) { GetEmployeeSubordinatesList.fromJson(Map<String, dynamic> json) {
aCTUALTERMINATIONDATE = json['ACTUAL_TERMINATION_DATE']; aCTUALTERMINATIONDATE = json['ACTUAL_TERMINATION_DATE'];
@ -232,7 +231,7 @@ class GetEmployeeSubordinatesList {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); Map<String, dynamic> data = new Map<String, dynamic>();
data['ACTUAL_TERMINATION_DATE'] = this.aCTUALTERMINATIONDATE; data['ACTUAL_TERMINATION_DATE'] = this.aCTUALTERMINATIONDATE;
data['ASSIGNMENT_END_DATE'] = this.aSSIGNMENTENDDATE; data['ASSIGNMENT_END_DATE'] = this.aSSIGNMENTENDDATE;
data['ASSIGNMENT_ID'] = this.aSSIGNMENTID; data['ASSIGNMENT_ID'] = this.aSSIGNMENTID;
@ -310,4 +309,4 @@ class GetEmployeeSubordinatesList {
data['USER_STATUS'] = this.uSERSTATUS; data['USER_STATUS'] = this.uSERSTATUS;
return data; return data;
} }
} }

@ -15,7 +15,7 @@ class UpdateItemTypeSuccessList {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); Map<String, dynamic> data = new Map<String, dynamic>();
data['ItemID'] = this.itemID; data['ItemID'] = this.itemID;
data['UpdateError'] = this.updateError; data['UpdateError'] = this.updateError;
data['UpdateSuccess'] = this.updateSuccess; data['UpdateSuccess'] = this.updateSuccess;

@ -12,7 +12,7 @@ class UpdateUserItemTypesList {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); Map<String, dynamic> data = new Map<String, dynamic>();
data['P_RETURN_MSG'] = this.pRETURNMSG; data['P_RETURN_MSG'] = this.pRETURNMSG;
data['P_RETURN_STATUS'] = this.pRETURNSTATUS; data['P_RETURN_STATUS'] = this.pRETURNSTATUS;
return data; return data;

@ -1,13 +1,9 @@
class UpdateUserTypesList { class UpdateUserTypesList {
int? itemID; int? itemID;
String? pFYAENABLEDFALG; String? pFYAENABLEDFALG;
String? pFYIENABLEDFALG; String? pFYIENABLEDFALG;
String? pITEMTYPE; String? pITEMTYPE;
UpdateUserTypesList({this.itemID, this.pFYAENABLEDFALG, this.pFYIENABLEDFALG, this.pITEMTYPE}); UpdateUserTypesList({this.itemID, this.pFYAENABLEDFALG, this.pFYIENABLEDFALG, this.pITEMTYPE});
UpdateUserTypesList.fromJson(Map<String, dynamic> json) { UpdateUserTypesList.fromJson(Map<String, dynamic> json) {
@ -18,11 +14,11 @@ class UpdateUserTypesList {
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); Map<String, dynamic> data = new Map<String, dynamic>();
data['ItemID'] = this.itemID; data['ItemID'] = this.itemID;
data['P_FYAENABLED_FALG'] = this.pFYAENABLEDFALG; data['P_FYAENABLED_FALG'] = this.pFYAENABLEDFALG;
data['P_FYIENABLED_FALG'] = this.pFYIENABLEDFALG; data['P_FYIENABLED_FALG'] = this.pFYIENABLEDFALG;
data['P_ITEM_TYPE'] = this.pITEMTYPE; data['P_ITEM_TYPE'] = this.pITEMTYPE;
return data; return data;
} }
} }

@ -1,23 +1,16 @@
import 'package:easy_localization/src/public_ext.dart'; import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:mohem_flutter_app/api/dashboard_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/date_uitl.dart'; import 'package:mohem_flutter_app/classes/date_uitl.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart'; import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_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/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/generic_response_model.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart'; import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart';
import 'package:mohem_flutter_app/widgets/location/Location.dart'; import 'package:mohem_flutter_app/widgets/mark_attendance_widget.dart';
import 'package:mohem_flutter_app/widgets/nfc/nfc_reader_sheet.dart';
import 'package:mohem_flutter_app/widgets/qr_scanner_dialog.dart';
import 'package:nfc_manager/nfc_manager.dart'; import 'package:nfc_manager/nfc_manager.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:wifi_iot/wifi_iot.dart'; import 'package:wifi_iot/wifi_iot.dart';
@ -183,62 +176,62 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
), ),
), //.expanded, ), //.expanded,
// MarkAttendanceWidget(model), MarkAttendanceWidget(model, topPadding: 24),
Container( // Container(
width: double.infinity, // width: double.infinity,
decoration: BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white), // decoration: BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white),
// margin: EdgeInsets.only(top: 187 - 31), // // margin: EdgeInsets.only(top: 187 - 31),
padding: EdgeInsets.only(left: 21, right: 21, top: 24, bottom: 24), // padding: EdgeInsets.only(left: 21, right: 21, top: 24, bottom: 24),
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, // mainAxisSize: MainAxisSize.min,
children: [ // children: [
LocaleKeys.markAttendance.tr().toSectionHeading(), // LocaleKeys.markAttendance.tr().toSectionHeading(),
LocaleKeys.selectMethodOfAttendance.tr().tr().toText11(color: Color(0xff535353)), // LocaleKeys.selectMethodOfAttendance.tr().tr().toText11(color: Color(0xff535353)),
24.height, // 24.height,
GridView( // GridView(
physics: const NeverScrollableScrollPhysics(), // physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true, // shrinkWrap: true,
padding: EdgeInsets.zero, // padding: EdgeInsets.zero,
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8), // gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8),
children: <Widget>[ // children: <Widget>[
if (isNfcEnabled) // if (isNfcEnabled)
attendanceMethod("NFC", "assets/images/nfc.svg", isNfcEnabled, () { // attendanceMethod("NFC", "assets/images/nfc.svg", isNfcEnabled, () {
if (isNfcLocationEnabled) { // if (isNfcLocationEnabled) {
Location.getCurrentLocation((LatLng? latlng) { // Location.getCurrentLocation((LatLng? latlng) {
performNfcAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? ""); // performNfcAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
}); // });
} else { // } else {
performNfcAttendance(model); // performNfcAttendance(model);
} // }
}), // }),
if (isWifiEnabled) // if (isWifiEnabled)
attendanceMethod("Wifi", "assets/images/wufu.svg", isWifiEnabled, () { // attendanceMethod("Wifi", "assets/images/wufu.svg", isWifiEnabled, () {
if (isWifiLocationEnabled) { // if (isWifiLocationEnabled) {
Location.getCurrentLocation((LatLng? latlng) { // Location.getCurrentLocation((LatLng? latlng) {
performWifiAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? ""); // performWifiAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
}); // });
} else { // } else {
performWifiAttendance(model); // performWifiAttendance(model);
} // }
// connectWifi(); // // connectWifi();
}), // }),
if (isQrEnabled) // if (isQrEnabled)
attendanceMethod("QR", "assets/images/ic_qr.svg", isQrEnabled, () async { // attendanceMethod("QR", "assets/images/ic_qr.svg", isQrEnabled, () async {
if (isQrLocationEnabled) { // if (isQrLocationEnabled) {
Location.getCurrentLocation((LatLng? latlng) { // Location.getCurrentLocation((LatLng? latlng) {
performQrCodeAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? ""); // performQrCodeAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
}); // });
} else { // } else {
performQrCodeAttendance(model); // performQrCodeAttendance(model);
} // }
// performQrCodeAttendance(model); // // performQrCodeAttendance(model);
}), // }),
], // ],
) // )
], // ],
), // ),
), // ),
// Positioned( // Positioned(
// top: 187 - 21, // top: 187 - 21,
// child: Container( // child: Container(
@ -269,59 +262,59 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
); );
} }
Future<void> performNfcAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async { // Future<void> performNfcAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
if (isNfcLocationEnabled) { // if (isNfcLocationEnabled) {
print("nfc location enabled"); // print("nfc location enabled");
} else { // } else {
print("nfc not location enabled"); // print("nfc not location enabled");
} // }
//
showNfcReader(context, onNcfScan: (String? nfcId) async { // showNfcReader(context, onNcfScan: (String? nfcId) async {
print(nfcId); // print(nfcId);
Utils.showLoading(context); // Utils.showLoading(context);
try { // try {
GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 2, nfcValue: nfcId ?? "", isGpsRequired: isNfcLocationEnabled, lat: lat, long: lng); // GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 2, nfcValue: nfcId ?? "", isGpsRequired: isNfcLocationEnabled, lat: lat, long: lng);
bool status = await model.fetchAttendanceTracking(context); // bool status = await model.fetchAttendanceTracking(context);
Utils.hideLoading(context); // Utils.hideLoading(context);
} catch (ex) { // } catch (ex) {
print(ex); // print(ex);
Utils.hideLoading(context); // Utils.hideLoading(context);
Utils.handleException(ex, context, (msg) { // Utils.handleException(ex, context, (msg) {
Utils.confirmDialog(context, msg); // Utils.confirmDialog(context, msg);
}); // });
} // }
}); // });
} // }
//
Future<void> performWifiAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async { // Future<void> performWifiAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
if (isWifiLocationEnabled) { // if (isWifiLocationEnabled) {
print("wifi location enabled"); // print("wifi location enabled");
} else { // } else {
print("wifi not location enabled"); // print("wifi not location enabled");
} // }
//
bool v = await WiFiForIoTPlugin.connect(AppState().mohemmWifiSSID ?? "", password: AppState().mohemmWifiPassword ?? "", joinOnce: true, security: NetworkSecurity.WPA, withInternet: false); // bool v = await WiFiForIoTPlugin.connect(AppState().mohemmWifiSSID ?? "", password: AppState().mohemmWifiPassword ?? "", joinOnce: true, security: NetworkSecurity.WPA, withInternet: false);
if (v) { // if (v) {
await WiFiForIoTPlugin.forceWifiUsage(true); // await WiFiForIoTPlugin.forceWifiUsage(true);
print("connected"); // print("connected");
Utils.showLoading(context); // Utils.showLoading(context);
try { // try {
GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 3, nfcValue: "", isGpsRequired: isWifiLocationEnabled, lat: lat, long: lng); // GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 3, nfcValue: "", isGpsRequired: isWifiLocationEnabled, lat: lat, long: lng);
bool status = await model.fetchAttendanceTracking(context); // bool status = await model.fetchAttendanceTracking(context);
Utils.hideLoading(context); // Utils.hideLoading(context);
await closeWifiRequest(); // await closeWifiRequest();
} catch (ex) { // } catch (ex) {
print(ex); // print(ex);
await closeWifiRequest(); // await closeWifiRequest();
Utils.hideLoading(context); // Utils.hideLoading(context);
Utils.handleException(ex, context, (msg) { // Utils.handleException(ex, context, (msg) {
Utils.confirmDialog(context, msg); // Utils.confirmDialog(context, msg);
}); // });
} // }
} else { // } else {
Utils.confirmDialog(context, LocaleKeys.comeNearHMGWifi.tr()); // Utils.confirmDialog(context, LocaleKeys.comeNearHMGWifi.tr());
} // }
} // }
Future<bool> closeWifiRequest() async { Future<bool> closeWifiRequest() async {
await WiFiForIoTPlugin.forceWifiUsage(false); await WiFiForIoTPlugin.forceWifiUsage(false);
@ -329,62 +322,62 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
return v; return v;
} }
Future<void> performQrCodeAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async { // Future<void> performQrCodeAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
var qrCodeValue = await Navigator.of(context).push( // var qrCodeValue = await Navigator.of(context).push(
MaterialPageRoute( // MaterialPageRoute(
builder: (context) => QrScannerDialog(), // builder: (context) => QrScannerDialog(),
), // ),
); // );
if (qrCodeValue != null) { // if (qrCodeValue != null) {
print("qrCode: " + qrCodeValue); // print("qrCode: " + qrCodeValue);
Utils.showLoading(context); // Utils.showLoading(context);
try { // try {
GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 1, isGpsRequired: isQrLocationEnabled, lat: lat, long: lng, QRValue: qrCodeValue); // GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 1, isGpsRequired: isQrLocationEnabled, lat: lat, long: lng, QRValue: qrCodeValue);
bool status = await model.fetchAttendanceTracking(context); // bool status = await model.fetchAttendanceTracking(context);
Utils.hideLoading(context); // Utils.hideLoading(context);
} catch (ex) { // } catch (ex) {
print(ex); // print(ex);
Utils.hideLoading(context); // Utils.hideLoading(context);
Utils.handleException(ex, context, (msg) { // Utils.handleException(ex, context, (msg) {
Utils.confirmDialog(context, msg); // Utils.confirmDialog(context, msg);
}); // });
} // }
} // }
} // }
//
Widget attendanceMethod(String title, String image, bool isEnabled, VoidCallback onPress) => Container( // Widget attendanceMethod(String title, String image, bool isEnabled, VoidCallback onPress) => Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15), // borderRadius: BorderRadius.circular(15),
gradient: const LinearGradient(transform: GradientRotation(.64), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [ // gradient: const LinearGradient(transform: GradientRotation(.64), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [
MyColors.gradiantEndColor, // MyColors.gradiantEndColor,
MyColors.gradiantStartColor, // MyColors.gradiantStartColor,
]), // ]),
), // ),
clipBehavior: Clip.antiAlias, // clipBehavior: Clip.antiAlias,
child: Stack( // child: Stack(
children: [ // children: [
Container( // Container(
padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14), // padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14),
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
SvgPicture.asset( // SvgPicture.asset(
image, // image,
color: Colors.white, // color: Colors.white,
).expanded, // ).expanded,
title.toText17(isBold: true, color: Colors.white), // title.toText17(isBold: true, color: Colors.white),
], // ],
), // ),
), // ),
if (!isEnabled) // if (!isEnabled)
Container( // Container(
width: double.infinity, // width: double.infinity,
height: double.infinity, // height: double.infinity,
color: Colors.grey.withOpacity(0.7), // color: Colors.grey.withOpacity(0.7),
) // )
], // ],
), // ),
).onPress(onPress); // ).onPress(onPress);
Widget commonStatusView(String title, String time) => Expanded( Widget commonStatusView(String title, String time) => Expanded(
child: Column(mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ child: Column(mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [

@ -46,8 +46,7 @@ class MenusWidget extends StatelessWidget {
) )
], ],
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6), ).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
).onPress(() async { ).onPress(() {
//await data.fetchWorkListCounter(context, showLoading: true);
Navigator.pushNamed(context, AppRoutes.workList); Navigator.pushNamed(context, AppRoutes.workList);
}), }),
data.isMissingSwipeLoading data.isMissingSwipeLoading
@ -102,7 +101,7 @@ class MenusWidget extends StatelessWidget {
], ],
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6), ).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
).onPress(() { ).onPress(() {
Navigator.pushNamed(context, AppRoutes.workList); Navigator.pushNamed(context, AppRoutes.leaveBalance);
}), }),
data.isLeaveTicketBalanceLoading data.isLeaveTicketBalanceLoading
? MenuShimmer().onPress(() { ? MenuShimmer().onPress(() {

@ -0,0 +1,502 @@
import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/api/leave_balance_api_client.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/leave_balance/get_absence_attendance_types_list_model.dart';
import 'package:mohem_flutter_app/models/leave_balance/get_absence_dff_structure_list_model.dart';
import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/bottom_sheet.dart';
import 'package:mohem_flutter_app/widgets/bottom_sheets/search_employee_bottom_sheet.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/dynamic_forms/dynamic_textfield_widget.dart';
class AddLeaveBalanceScreen extends StatefulWidget {
AddLeaveBalanceScreen({Key? key}) : super(key: key);
@override
_AddLeaveBalanceScreenState createState() {
return _AddLeaveBalanceScreenState();
}
}
class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
List<GetAbsenceDffStructureList> getabsenceDffStructureList = [];
List<GetAbsenceAttendanceTypesList> absenceList = [];
GetAbsenceAttendanceTypesList? selectedAbsenceType;
DateTime? startTime;
DateTime? endTime;
int totalDays = 0;
String comment = "";
ReplacementList? selectedReplacementEmployee;
@override
void initState() {
super.initState();
getAbsenceAttendanceTypes();
}
void getAbsenceAttendanceTypes() async {
try {
Utils.showLoading(context);
absenceList = await LeaveBalanceApiClient().getAbsenceAttendanceTypes();
Utils.hideLoading(context);
setState(() {});
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
void getAbsenceDffStructure(String flexCode) async {
try {
Utils.showLoading(context);
getabsenceDffStructureList.clear();
getabsenceDffStructureList = await LeaveBalanceApiClient().getAbsenceDffStructure(flexCode, "HR_LOA_SS", -999);
Utils.hideLoading(context);
setState(() {});
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBarWidget(
context,
title: LocaleKeys.leaveBalance.tr(),
),
body: Column(
children: [
ListView(
padding: const EdgeInsets.all(21),
children: [
PopupMenuButton(
child: DynamicTextFieldWidget(
LocaleKeys.absenceType.tr() + "*",
selectedAbsenceType == null ? LocaleKeys.selectTypeT.tr() : selectedAbsenceType!.aBSENCEATTENDANCETYPENAME!,
isEnable: false,
isPopup: true,
),
itemBuilder: (_) => <PopupMenuItem<int>>[
for (int i = 0; i < absenceList.length; i++) PopupMenuItem<int>(value: i, child: Text(absenceList[i].aBSENCEATTENDANCETYPENAME!)),
],
onSelected: (int popupIndex) {
if (selectedAbsenceType == absenceList[popupIndex]) {
return;
}
selectedAbsenceType = absenceList[popupIndex];
setState(() {});
getAbsenceDffStructure(selectedAbsenceType!.dESCFLEXCONTEXTCODE!);
},
),
12.height,
DynamicTextFieldWidget(
LocaleKeys.startDateT.tr() + "*",
startTime == null ? "Select date" : startTime.toString(),
suffixIconData: Icons.calendar_today,
isEnable: false,
onTap: () async {
var start = await _selectDate(context, startTime);
if (start != startTime) {
startTime = start;
setState(() {});
}
},
),
12.height,
DynamicTextFieldWidget(
LocaleKeys.endDateT.tr() + "*",
endTime == null ? "Select date" : endTime.toString(),
suffixIconData: Icons.calendar_today,
isEnable: false,
onTap: () async {
var end = await _selectDate(context, endTime);
if (end != endTime) {
endTime = end;
setState(() {});
}
},
),
12.height,
DynamicTextFieldWidget(
"Total Days",
"Days",
isInputTypeNum: true,
onChange: (input) {
totalDays = int.parse(input);
},
),
12.height,
DynamicTextFieldWidget(
LocaleKeys.selectEmployee.tr(),
selectedReplacementEmployee == null ? LocaleKeys.searchForEmployee.tr() : selectedReplacementEmployee!.employeeDisplayName ?? "",
isEnable: false,
onTap: () {
showMyBottomSheet(
context,
child: SearchEmployeeBottomSheet(
title: LocaleKeys.searchForEmployee.tr(),
apiMode: LocaleKeys.delegate.tr(),
onSelectEmployee: (_selectedEmployee) {
// Navigator.pop(context);
selectedReplacementEmployee = _selectedEmployee;
setState(() {});
},
),
);
},
),
12.height,
DynamicTextFieldWidget(
LocaleKeys.comments.tr(),
LocaleKeys.writeComment.tr(),
lines: 2,
onChange: (input) {
comment = input;
},
),
],
).expanded,
DefaultButton(
LocaleKeys.next.tr(),
(selectedAbsenceType == null || startTime == null || endTime == null) ? null : () {},
).insideContainer
],
),
);
}
// Widget parseDynamicFormatType(GetAbsenceDffStructureList model, int index) {
// if (model.dISPLAYFLAG != "N") {
// if (model.vALIDATIONTYPE == "N") {
// if (model.fORMATTYPE == "C") {
// return DynamicTextFieldWidget(
// (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
// model.eSERVICESDV?.pIDCOLUMNNAME ?? "",
// isReadOnly: model.rEADONLY == "Y",
// onChange: (text) {
// model.eSERVICESDV ??= ESERVICESDV();
// model.eSERVICESDV!.pIDCOLUMNNAME = text;
// },
// ).paddingOnly(bottom: 12);
// } else if (model.fORMATTYPE == "N") {
// return DynamicTextFieldWidget(
// (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
// model.eSERVICESDV?.pIDCOLUMNNAME ?? "",
// isReadOnly: model.rEADONLY == "Y",
// isInputTypeNum: true,
// onChange: (text) {
// model.eSERVICESDV ??= ESERVICESDV();
// model.eSERVICESDV!.pIDCOLUMNNAME = text;
// },
// ).paddingOnly(bottom: 12);
// } else if (model.fORMATTYPE == "X") {
// String displayText = model.eSERVICESDV?.pIDCOLUMNNAME ?? (getabsenceDffStructureList![index].fieldAnswer ?? "");
//
// if (getabsenceDffStructureList[index].isDefaultTypeIsCDPS) {
// if (displayText.contains(" 00:00:00")) {
// displayText = displayText.replaceAll(" 00:00:00", "");
// }
// if (displayText.contains("/")) {
// displayText = DateFormat('yyyy-MM-dd').format(DateFormat("yyyy/MM/dd").parse(displayText));
// }
// }
// return DynamicTextFieldWidget(
// (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
// displayText,
// suffixIconData: Icons.calendar_today,
// isEnable: false,
// onTap: () async {
// if ((getabsenceDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
// if (getabsenceDffStructureList![index].isDefaultTypeIsCDPS) {
// selectedDate = DateFormat("yyyy/MM/dd").parse(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
// } else {
// selectedDate = DateTime.parse(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
// }
// }
// DateTime date = await _selectDate(context);
// String dateString = date.toString().split(' ').first;
// // DateTime date1 = DateTime(date.year, date.month, date.day);
// // getabsenceDffStructureList![index].fieldAnswer = date.toString();
// ESERVICESDV eservicesdv;
// if (getabsenceDffStructureList![index].isDefaultTypeIsCDPS) {
// eservicesdv = ESERVICESDV(
// pIDCOLUMNNAME: formatDate(dateString),
// pRETURNMSG: "null",
// pRETURNSTATUS: getabsenceDffStructureList![index].dEFAULTVALUE,
// pVALUECOLUMNNAME: getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? reverseFormatStandardDate(formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
// } else {
// eservicesdv = ESERVICESDV(
// pIDCOLUMNNAME: dateString,
// pRETURNMSG: "null",
// pRETURNSTATUS: getabsenceDffStructureList![index].dEFAULTVALUE,
// pVALUECOLUMNNAME: getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? reverseFormatStandardDate(formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
// }
// getabsenceDffStructureList![index].eSERVICESDV = eservicesdv;
// setState(() {});
// if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
// await calGetValueSetValues(model);
// }
// if (model.cHILDSEGMENTSDVSplited?.isNotEmpty ?? false) {
// await getDefaultValues(model);
// }
// },
// ).paddingOnly(bottom: 12);
// } else if (model.fORMATTYPE == "Y") {
// String displayText = model.eSERVICESDV?.pIDCOLUMNNAME ?? (getabsenceDffStructureList![index].fieldAnswer ?? "");
// if (getabsenceDffStructureList![index].isDefaultTypeIsCDPS) {
// displayText = reverseFormatDate(displayText);
// // if (displayText.contains(" 00:00:00")) {
// // displayText = displayText.replaceAll(" 00:00:00", "");
// // }
// // if (!displayText.contains("-")) {
// // displayText = DateFormat('yyyy-MM-dd').format(DateFormat("yyyy/MM/dd").parse(displayText));
// // }
// }
// return DynamicTextFieldWidget(
// (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
// displayText,
// suffixIconData: Icons.calendar_today,
// isEnable: false,
// onTap: () async {
// if ((getabsenceDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
// if (getabsenceDffStructureList![index].isDefaultTypeIsCDPS) {
// String tempDate = getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!;
// if (tempDate.contains("00:00:00")) {
// tempDate = tempDate.replaceAll("00:00:00", '').trim();
// }
// if (tempDate.contains("/")) {
// selectedDate = DateFormat("yyyy/MM/dd").parse(tempDate);
// } else {
// selectedDate = DateFormat("yyyy-MM-dd").parse(tempDate);
// }
// } else {
// selectedDate = DateTime.parse(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
// }
// }
// DateTime date = await _selectDate(context);
// String dateString = date.toString().split(' ').first;
// // getabsenceDffStructureList![index].fieldAnswer = date.toString();
// ESERVICESDV eservicesdv;
// if (getabsenceDffStructureList![index].isDefaultTypeIsCDPS) {
// eservicesdv = ESERVICESDV(
// pIDCOLUMNNAME: formatDate(dateString),
// pRETURNMSG: "null",
// pRETURNSTATUS: getabsenceDffStructureList![index].dEFAULTVALUE,
// pVALUECOLUMNNAME: getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? reverseFormatStandardDate(formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
// } else {
// eservicesdv = ESERVICESDV(
// pIDCOLUMNNAME: dateString,
// pRETURNMSG: "null",
// pRETURNSTATUS: getabsenceDffStructureList![index].dEFAULTVALUE,
// pVALUECOLUMNNAME: getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? reverseFormatStandardDate(formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
// }
//
// getabsenceDffStructureList![index].eSERVICESDV = eservicesdv;
// setState(() {});
// if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
// await calGetValueSetValues(model);
// }
// if (model.cHILDSEGMENTSDVSplited?.isNotEmpty ?? false) {
// await getDefaultValues(model);
// }
// },
// ).paddingOnly(bottom: 12);
// }
// } else {
// return PopupMenuButton(
// child: DynamicTextFieldWidget(
// (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
// model.eSERVICESDV?.pVALUECOLUMNNAME ?? "",
// isEnable: false,
// isPopup: true,
// isInputTypeNum: true,
// isReadOnly: model.rEADONLY == "Y",
// ).paddingOnly(bottom: 12),
// itemBuilder: (_) => <PopupMenuItem<int>>[
// if (model.rEADONLY != "Y")
// for (int i = 0; i < model.eSERVICESVS!.length; i++) PopupMenuItem<int>(child: Text(model.eSERVICESVS![i].vALUECOLUMNNAME!), value: i),
// ],
// onSelected: (int popipIndex) async {
// ESERVICESDV eservicesdv = ESERVICESDV(
// pIDCOLUMNNAME: model.eSERVICESVS![popipIndex].iDCOLUMNNAME,
// pRETURNMSG: "null",
// pRETURNSTATUS: "null", //getabsenceDffStructureList![popipIndex].dEFAULTVALUE,
// pVALUECOLUMNNAME: model.eSERVICESVS![popipIndex].vALUECOLUMNNAME);
// getabsenceDffStructureList![index].eSERVICESDV = eservicesdv;
// setState(() {});
// if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
// await calGetValueSetValues(model);
// }
// if (model.cHILDSEGMENTSDVSplited?.isNotEmpty ?? false) {
// await getDefaultValues(model);
// }
// });
// }
// } else {
// return const SizedBox();
// }
// if (model.fORMATTYPE == "N") {
// if (model.eSERVICESVS?.isNotEmpty ?? false) {
// return PopupMenuButton(
// child: DynamicTextFieldWidget(
// (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
// model.eSERVICESDV?.pVALUECOLUMNNAME ?? "",
// isEnable: false,
// isPopup: true,
// isInputTypeNum: true,
// isReadOnly: model.rEADONLY == "Y",
// ).paddingOnly(bottom: 12),
// itemBuilder: (_) => <PopupMenuItem<int>>[
// if (model.rEADONLY != "Y")
// for (int i = 0; i < model.eSERVICESVS!.length; i++) PopupMenuItem<int>(value: i, child: Text(model.eSERVICESVS![i].vALUECOLUMNNAME!)),
// ],
// onSelected: (int popipIndex) async {
// ESERVICESDV eservicesdv =
// ESERVICESDV(pIDCOLUMNNAME: model.eSERVICESVS![popipIndex].iDCOLUMNNAME, pRETURNMSG: "null", pRETURNSTATUS: "null", pVALUECOLUMNNAME: model.eSERVICESVS![popipIndex].vALUECOLUMNNAME);
// getabsenceDffStructureList![index].eSERVICESDV = eservicesdv;
// setState(() {});
// if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
// await calGetValueSetValues(model);
// }
// if (model.cHILDSEGMENTSDVSplited?.isNotEmpty ?? false) {
// await getDefaultValues(model);
// }
// });
// }
//
// return DynamicTextFieldWidget(
// (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
// model.eSERVICESDV?.pIDCOLUMNNAME ?? "",
// isReadOnly: model.rEADONLY == "Y",
// onChange: (text) {
// model.fieldAnswer = text;
// },
// ).paddingOnly(bottom: 12);
// } else if (model.fORMATTYPE == "X" || model.fORMATTYPE == "Y") {
// String displayText = model.eSERVICESDV?.pIDCOLUMNNAME ?? (getabsenceDffStructureList![index].fieldAnswer ?? "");
// if (getabsenceDffStructureList![index].isDefaultTypeIsCDPS) {
// if (displayText.contains(" 00:00:00")) {
// displayText = displayText.replaceAll(" 00:00:00", "");
// }
// if (!displayText.contains("-")) {
// displayText = DateFormat('yyyy-MM-dd').format(DateFormat("yyyy/MM/dd").parse(displayText));
// }
// }
// return DynamicTextFieldWidget(
// (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
// displayText,
// suffixIconData: Icons.calendar_today,
// isEnable: false,
// onTap: () async {
// if ((getabsenceDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
// if (getabsenceDffStructureList![index].isDefaultTypeIsCDPS) {
// selectedDate = DateFormat("yyyy/MM/dd").parse(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
// } else {
// selectedDate = DateTime.parse(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
// }
// }
// DateTime date = await _selectDate(context);
// String dateString = date.toString().split(' ').first;
// getabsenceDffStructureList![index].fieldAnswer = date.toString();
// ESERVICESDV eservicesdv = ESERVICESDV(
// pIDCOLUMNNAME: dateString,
// pRETURNMSG: "null",
// pRETURNSTATUS: getabsenceDffStructureList![index].dEFAULTVALUE,
// pVALUECOLUMNNAME: getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? reverseFormatStandardDate(formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
// getabsenceDffStructureList![index].eSERVICESDV = eservicesdv;
// setState(() {});
// if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
// await calGetValueSetValues(model);
// }
// if (model.cHILDSEGMENTSDVSplited?.isNotEmpty ?? false) {
// await getDefaultValues(model);
// }
// },
// ).paddingOnly(bottom: 12);
// } else if (model.fORMATTYPE == "I") {
// return DynamicTextFieldWidget(
// (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
// model.eSERVICESDV?.pIDCOLUMNNAME ?? (getabsenceDffStructureList![index].fieldAnswer ?? ""),
// suffixIconData: Icons.access_time_filled_rounded,
// isEnable: false,
// onTap: () async {
// if ((getabsenceDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
// var timeString = getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.split(":");
// selectedDate = DateTime(0, 0, 0, int.parse(timeString[0]), int.parse(timeString[1]));
//
// //DateTime.parse(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
// }
// TimeOfDay _time = await _selectTime(context);
// DateTime tempTime = DateTime(0, 1, 1, _time.hour, _time.minute);
// String time = DateFormat('HH:mm').format(tempTime).trim();
//
// // DateTime date1 = DateTime(date.year, date.month, date.day);
// // getabsenceDffStructureList![index].fieldAnswer = date.toString();
// ESERVICESDV eservicesdv = ESERVICESDV(pIDCOLUMNNAME: time, pRETURNMSG: "null", pRETURNSTATUS: getabsenceDffStructureList![index].dEFAULTVALUE, pVALUECOLUMNNAME: time);
// getabsenceDffStructureList![index].eSERVICESDV = eservicesdv;
// setState(() {});
// // if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
// // await calGetValueSetValues(model);
// // }
// // if (model.cHILDSEGMENTSDVSplited?.isNotEmpty ?? false) {
// // await getDefaultValues(model);
// // }
// },
// ).paddingOnly(bottom: 12);
// }
//
// return Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
// children: [],
// ).objectContainerView();
// }
Future<DateTime> _selectDate(BuildContext context, DateTime? dateInput) async {
DateTime time = dateInput ?? DateTime.now();
if (Platform.isIOS) {
await showCupertinoModalPopup(
context: context,
builder: (cxt) => Container(
height: 250,
color: Colors.white,
child: CupertinoDatePicker(
backgroundColor: Colors.white,
mode: CupertinoDatePickerMode.date,
onDateTimeChanged: (value) {
if (value != dateInput) {
time = value;
}
},
initialDateTime: dateInput,
),
),
);
} else {
DateTime? picked =
await showDatePicker(context: context, initialDate: dateInput ?? DateTime.now(), initialEntryMode: DatePickerEntryMode.calendarOnly, firstDate: DateTime(2015, 8), lastDate: DateTime(2101));
if (picked != null && picked != dateInput) {
time = picked;
}
}
time = DateTime(time.year, time.month, time.day);
return time;
}
}

@ -0,0 +1,96 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/api/leave_balance_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/routes.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/leave_balance/get_absence_transaction_list_model.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart';
class LeaveBalance extends StatefulWidget {
LeaveBalance({Key? key}) : super(key: key);
@override
_LeaveBalanceState createState() {
return _LeaveBalanceState();
}
}
class _LeaveBalanceState extends State<LeaveBalance> {
List<GetAbsenceTransactionList>? absenceTransList;
@override
void initState() {
super.initState();
getAbsenceTransactions();
}
@override
void dispose() {
super.dispose();
}
void getAbsenceTransactions() async {
// try {
Utils.showLoading(context);
absenceTransList = await LeaveBalanceApiClient().getAbsenceTransactions(-999);
Utils.hideLoading(context);
setState(() {});
// } catch (ex) {
// Utils.hideLoading(context);
// Utils.handleException(ex, context, null);
// }
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBarWidget(
context,
title: LocaleKeys.leaveBalance.tr(),
),
body: absenceTransList == null
? const SizedBox()
: (absenceTransList!.isEmpty
? Utils.getNoDataWidget(context)
: ListView.separated(
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.all(21),
itemBuilder: (cxt, int index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
ItemDetailView(LocaleKeys.startDateT.tr(), absenceTransList![index].sTARTDATE ?? ""),
ItemDetailView(LocaleKeys.endDateT.tr(), absenceTransList![index].eNDDATE ?? ""),
ItemDetailView(LocaleKeys.absenceType.tr(), absenceTransList![index].aBSENCETYPE ?? ""),
ItemDetailView(LocaleKeys.absenceCategory.tr(), absenceTransList![index].aBSENCECATEGORY ?? ""),
ItemDetailView(LocaleKeys.days.tr(), absenceTransList![index].aBSENCEDAYS?.toString() ?? ""),
ItemDetailView(LocaleKeys.hours.tr(), absenceTransList![index].aBSENCEHOURS?.toString() ?? ""),
ItemDetailView(LocaleKeys.approvalStatus.tr(), absenceTransList![index].aPPROVALSTATUS ?? ""),
ItemDetailView(LocaleKeys.absenceStatus.tr(), absenceTransList![index].aBSENCESTATUS ?? ""),
],
).objectContainerView(),
separatorBuilder: (cxt, index) => 12.height,
itemCount: absenceTransList!.length)),
floatingActionButton: Container(
height: 54,
width: 54,
decoration: const BoxDecoration(
shape: BoxShape.circle,
gradient: LinearGradient(transform: GradientRotation(.83), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
]),
),
child: const Icon(Icons.add, color: Colors.white, size: 30),
).onPress(() {
Navigator.pushNamed(context, AppRoutes.addLeaveBalance);
}),
);
}
}

@ -447,7 +447,7 @@ class _ViewAttendanceState extends State<ViewAttendance> {
List<Meeting> _getDataSource() { List<Meeting> _getDataSource() {
final List<Meeting> meetings = <Meeting>[]; List<Meeting> meetings = <Meeting>[];
return meetings; return meetings;
} }
@ -545,7 +545,7 @@ class MeetingDataSource extends CalendarDataSource {
} }
Meeting _getMeetingData(int index) { Meeting _getMeetingData(int index) {
final dynamic meeting = appointments; dynamic meeting = appointments;
Meeting meetingData; Meeting meetingData;
if (meeting is Meeting) { if (meeting is Meeting) {
meetingData = meeting; meetingData = meeting;

@ -5,6 +5,7 @@ import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart'; import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/config/routes.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/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
@ -33,9 +34,11 @@ class _BasicDetailsState extends State<BasicDetails> {
String? emailAddress = ""; String? emailAddress = "";
String? employeeNo = ""; String? employeeNo = "";
int correctOrNew = 1; int correctOrNew = 1;
List<GetEmployeeBasicDetailsList> getEmployeeBasicDetailsList = []; List<GetEmployeeBasicDetailsList>? getEmployeeBasicDetailsList;
late MemberInformationListModel memberInformationList; late MemberInformationListModel memberInformationList;
GetMenuEntriesList menuEntries = GetMenuEntriesList(); GetMenuEntriesList menuEntries = GetMenuEntriesList();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -58,7 +61,6 @@ class _BasicDetailsState extends State<BasicDetails> {
} }
} }
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBarWidget( appBar: AppBarWidget(
@ -68,53 +70,43 @@ class _BasicDetailsState extends State<BasicDetails> {
backgroundColor: MyColors.backgroundColor, backgroundColor: MyColors.backgroundColor,
body: Column( body: Column(
children: [ children: [
Expanded( ListView(
child: Column( padding: const EdgeInsets.all(21),
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ getEmployeeBasicDetailsList == null
Container( ? const SizedBox().expanded
width: double.infinity, : (getEmployeeBasicDetailsList!.isEmpty
margin: EdgeInsets.only(top: 20, left: 21, right: 21, bottom: 20), ? Utils.getNoDataWidget(context).expanded
padding: EdgeInsets.only(left: 14, right: 14, top: 13, bottom: 5), : Column(
height: 300, crossAxisAlignment: CrossAxisAlignment.start,
decoration: BoxDecoration( children: getEmployeeBasicDetailsList!
boxShadow: [ .map((e) => Column(
BoxShadow( children: [
color: Colors.grey.withOpacity(0.5), e.dISPLAYFLAG == "Y"
spreadRadius: 5, ? Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
blurRadius: 26, "${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
offset: Offset(0, 3), "${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
), 12.height
], ])
color: Colors.white, : Container(),
borderRadius: BorderRadius.circular(10.0), ],
), ))
child: Column( .toList())
crossAxisAlignment: CrossAxisAlignment.start, .objectContainerView())
children: getEmployeeBasicDetailsList.map((e) => ],
Column( ).expanded,
children: [
e.dISPLAYFLAG == "Y" ? Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
"${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
"${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
SizedBox(height: 12,)
]): Container(),
],
)).toList()),
),
],
),
),
DefaultButton( DefaultButton(
LocaleKeys.update.tr(), LocaleKeys.update.tr(),
menuEntries.updateButton == 'Y' ? () async { menuEntries.updateButton == 'Y'
showAlertDialog(context);} ? () async {
: null).insideContainer, showAlertDialog(context);
}
: null)
.insideContainer,
], ],
)); ));
} }
void showAlertDialog(BuildContext context) { void showAlertDialog(BuildContext context) {
Widget cancelButton = TextButton( Widget cancelButton = TextButton(
child: Text(LocaleKeys.cancel.tr()), child: Text(LocaleKeys.cancel.tr()),

@ -4,7 +4,9 @@ import 'package:mohem_flutter_app/api/profile_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart'; import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/config/routes.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/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart'; import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart';
import 'package:mohem_flutter_app/models/get_employee_address_model.dart'; import 'package:mohem_flutter_app/models/get_employee_address_model.dart';
@ -13,9 +15,7 @@ import 'package:mohem_flutter_app/models/get_employee_phones_model.dart';
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
import 'package:mohem_flutter_app/ui/profile/dynamic_screens/dynamic_input_address_screen.dart'; import 'package:mohem_flutter_app/ui/profile/dynamic_screens/dynamic_input_address_screen.dart';
import 'package:mohem_flutter_app/ui/profile/phone_numbers.dart'; import 'package:mohem_flutter_app/ui/profile/phone_numbers.dart';
import 'package:mohem_flutter_app/ui/profile/profile_screen.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class ContactDetails extends StatefulWidget { class ContactDetails extends StatefulWidget {
@ -47,26 +47,12 @@ class _ContactDetailsState extends State<ContactDetails> {
menuEntriesPhone = menuData.where((GetMenuEntriesList e) => e.requestType == 'PHONE_NUMBERS').toList()[0]; menuEntriesPhone = menuData.where((GetMenuEntriesList e) => e.requestType == 'PHONE_NUMBERS').toList()[0];
menuEntriesAddress = menuData.where((GetMenuEntriesList e) => e.requestType == 'ADDRESS').toList()[0]; menuEntriesAddress = menuData.where((GetMenuEntriesList e) => e.requestType == 'ADDRESS').toList()[0];
getEmployeePhones(); getEmployeePhones();
setState(() {});
} }
void getEmployeePhones() async { void getEmployeePhones() async {
try { try {
Utils.showLoading(context); Utils.showLoading(context);
getEmployeePhonesList = await ProfileApiClient().getEmployeePhones(); getEmployeePhonesList = await ProfileApiClient().getEmployeePhones();
getEmployeeAddress();
Utils.hideLoading(context);
setState(() {});
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
void getEmployeeAddress() async {
try {
Utils.showLoading(context);
getEmployeeAddressList = await ProfileApiClient().getEmployeeAddress(); getEmployeeAddressList = await ProfileApiClient().getEmployeeAddress();
Utils.hideLoading(context); Utils.hideLoading(context);
setState(() {}); setState(() {});
@ -78,37 +64,18 @@ class _ContactDetailsState extends State<ContactDetails> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBarWidget( appBar: AppBarWidget(
context, context,
title: LocaleKeys.profile_contactDetails.tr(), title: LocaleKeys.profile_contactDetails.tr(),
), ),
backgroundColor: MyColors.backgroundColor, backgroundColor: MyColors.backgroundColor,
// bottomSheet: footer(), // bottomSheet: footer(),
body: SingleChildScrollView( body: ListView(
child: Column(children: [ padding: const EdgeInsets.all(21),
Container( children: [
width: double.infinity, if (getEmployeePhonesList.isNotEmpty)
margin: EdgeInsets.only( Stack(
top: 20, children: [
left: 26,
right: 26,
),
padding: EdgeInsets.all(15),
///height: 200,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 5,
blurRadius: 26,
offset: Offset(0, 3),
),
],
color: Colors.white,
borderRadius: BorderRadius.circular(10.0),
),
child: Stack(children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
@ -125,37 +92,33 @@ class _ContactDetailsState extends State<ContactDetails> {
: Container() : Container()
], ],
), ),
Column( ListView.separated(
crossAxisAlignment: CrossAxisAlignment.start, physics: NeverScrollableScrollPhysics(),
children: getEmployeePhonesList shrinkWrap: true,
.map((e) => Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ padding: EdgeInsets.zero,
"${e.pHONETYPEMEANING}".toText13(color: MyColors.lightGrayColor), itemBuilder: (cxt, index) => Column(
"${e.pHONENUMBER}".toText16(isBold: true, color: MyColors.blackColor), crossAxisAlignment: CrossAxisAlignment.start,
])) children: [
.toList()) "${getEmployeePhonesList[index].pHONETYPEMEANING}".toText13(color: MyColors.lightGrayColor),
])), ("${getEmployeePhonesList[index].pHONENUMBER}" ?? "").toText16(isBold: true, color: MyColors.blackColor),
Container( ],
width: double.infinity, ),
margin: EdgeInsets.only( separatorBuilder: (cxt, index) => 12.height,
top: 20, itemCount: getEmployeePhonesList.length),
left: 26, // Column(
right: 26, // crossAxisAlignment: CrossAxisAlignment.start,
), // children: getEmployeePhonesList
padding: EdgeInsets.all(15), // .map((e) => Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
// height: 400, // "${e.pHONETYPEMEANING}".toText13(color: MyColors.lightGrayColor),
decoration: BoxDecoration( // "${e.pHONENUMBER}".toText16(isBold: true, color: MyColors.blackColor),
boxShadow: [ // ]))
BoxShadow( // .toList())
color: Colors.grey.withOpacity(0.5), ],
spreadRadius: 5, ).objectContainerView(),
blurRadius: 26, 12.height,
offset: Offset(0, 3), if (getEmployeeAddressList.isNotEmpty)
), Stack(
], children: [
color: Colors.white,
borderRadius: BorderRadius.circular(10.0),
),
child: Stack(children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
@ -172,34 +135,31 @@ class _ContactDetailsState extends State<ContactDetails> {
: Container() : Container()
], ],
), ),
Column( ListView.separated(
crossAxisAlignment: CrossAxisAlignment.start, physics: NeverScrollableScrollPhysics(),
children: getEmployeeAddressList shrinkWrap: true,
.map((e) => Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ padding: EdgeInsets.zero,
"${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor), itemBuilder: (cxt, index) => Column(
"${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor), crossAxisAlignment: CrossAxisAlignment.start,
SizedBox( children: [
height: 20, "${getEmployeeAddressList[index].sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
), ("${getEmployeeAddressList[index].sEGMENTVALUEDSP}" ?? "").toText16(isBold: true, color: MyColors.blackColor),
])) ],
.toList()) ),
])) separatorBuilder: (cxt, index) => 12.height,
]))); itemCount: getEmployeeAddressList.length),
} // Column(
// crossAxisAlignment: CrossAxisAlignment.start,
Widget footer() { // children: getEmployeeAddressList
return Container( // .map((e) => Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
decoration: BoxDecoration( // "${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
// borderRadius: BorderRadius.circular(10), // "${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
color: MyColors.white, // ]))
boxShadow: [ // .toList())
BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 3), ],
).objectContainerView()
], ],
), ),
child: DefaultButton(LocaleKeys.update.tr(), () async {
// context.setLocale(const Locale("en", "US")); // to change Loacle
ProfileScreen();
}).insideContainer,
); );
} }

@ -19,8 +19,9 @@ import 'package:wifi_iot/wifi_iot.dart';
class MarkAttendanceWidget extends StatefulWidget { class MarkAttendanceWidget extends StatefulWidget {
DashboardProviderModel model; DashboardProviderModel model;
double topPadding;
MarkAttendanceWidget(this.model, {Key? key}) : super(key: key); MarkAttendanceWidget(this.model, {Key? key, this.topPadding = 0}) : super(key: key);
@override @override
_MarkAttendanceWidgetState createState() { _MarkAttendanceWidgetState createState() {
@ -70,9 +71,8 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: EdgeInsets.only(left: 21, right: 21, bottom: 21), padding: EdgeInsets.only(left: 21, right: 21, bottom: 21, top: widget.topPadding),
decoration: BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white), decoration: const BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white),
width: double.infinity, width: double.infinity,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -85,16 +85,16 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
padding: const EdgeInsets.only(bottom: 14, top: 21), padding: const EdgeInsets.only(bottom: 14, top: 21),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8), gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8),
children: <Widget>[ children: <Widget>[
if (isNfcEnabled) // if (isNfcEnabled)
attendanceMethod("NFC", "assets/images/nfc.svg", isNfcEnabled, () { attendanceMethod("NFC", "assets/images/nfc.svg", isNfcEnabled, () {
if (isNfcLocationEnabled) { if (isNfcLocationEnabled) {
Location.getCurrentLocation((LatLng? latlng) { Location.getCurrentLocation((LatLng? latlng) {
performNfcAttendance(widget.model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? ""); performNfcAttendance(widget.model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
}); });
} else { } else {
performNfcAttendance(widget.model); performNfcAttendance(widget.model);
} }
}), }),
if (isWifiEnabled) if (isWifiEnabled)
attendanceMethod("Wifi", "assets/images/wufu.svg", isWifiEnabled, () { attendanceMethod("Wifi", "assets/images/wufu.svg", isWifiEnabled, () {
if (isWifiLocationEnabled) { if (isWifiLocationEnabled) {
@ -180,8 +180,7 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
Future<bool> closeWifiRequest() async { Future<bool> closeWifiRequest() async {
await WiFiForIoTPlugin.forceWifiUsage(false); await WiFiForIoTPlugin.forceWifiUsage(false);
bool v = await WiFiForIoTPlugin.disconnect(); return await WiFiForIoTPlugin.disconnect();
return v;
} }
Future<void> performQrCodeAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async { Future<void> performQrCodeAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
@ -210,40 +209,30 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
Widget attendanceMethod(String title, String image, bool isEnabled, VoidCallback onPress) => Container( Widget attendanceMethod(String title, String image, bool isEnabled, VoidCallback onPress) => Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
gradient: const LinearGradient( color: isEnabled ? null : Colors.grey.withOpacity(.5),
transform: GradientRotation(.64), gradient: isEnabled
begin: Alignment.topRight, ? const LinearGradient(
end: Alignment.bottomLeft, transform: GradientRotation(.64),
colors: [ begin: Alignment.topRight,
MyColors.gradiantEndColor, end: Alignment.bottomLeft,
MyColors.gradiantStartColor, colors: [
], MyColors.gradiantEndColor,
), MyColors.gradiantStartColor,
],
)
: null,
), ),
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
child: Stack( padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( SvgPicture.asset(image, color: Colors.white).expanded,
padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14), title.toText17(isBold: true, color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: SvgPicture.asset(
image,
color: Colors.white,
)),
title.toText17(isBold: true, color: Colors.white),
],
),
),
if (!isEnabled)
Container(
width: double.infinity,
height: double.infinity,
color: Colors.grey.withOpacity(0.7),
)
], ],
), ),
).onPress(onPress); ).onPress(() {
if (!isEnabled) return;
onPress();
});
} }

Loading…
Cancel
Save