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": "نوع العنصر",
"TurnNotificationsFor": "تفعيل الاشعارات",
"worklistSettings": "اعدادات الاشعارات",
"absenceType": "نوع الغياب",
"absenceCategory": "فئة الغياب",
"days": "أيام",
"hours": "ساعات",
"approvalStatus": "حالة القبول",
"absenceStatus": "حالة الغياب",
"profile": {
"reset_password": {
"label": "Reset Password",

@ -350,6 +350,12 @@
"itemType": "Item Type",
"TurnNotificationsFor": "Turn on notifications for",
"worklistSettings": "Worklist Settings",
"absenceType": "Absence Type",
"absenceCategory": "Absence Category",
"days": "Days",
"hours": "Hours",
"approvalStatus": "Approval Status",
"absenceStatus": "Absence Status",
"profile": {
"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/landing/dashboard_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/login_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 worklistSettings = "/worklistSettings";
// Leave Balance
static const String leaveBalance = "/leaveBalance";
static const String addLeaveBalance = "/addLeaveBalance";
static const String servicesMenuListScreen = "/servicesMenuListScreen";
static const String dynamicScreen = "/dynamicScreen";
static const String addDynamicInput = "/addDynamicInput";
@ -147,6 +153,11 @@ class AppRoutes {
itemHistory: (context) => ItemHistoryScreen(),
worklistSettings: (context) => WorklistSettings(),
// Leave Balance
leaveBalance: (context) => LeaveBalance(),
addLeaveBalance: (context) => AddLeaveBalanceScreen(),
servicesMenuListScreen: (context) => ServicesMenuListScreen(),
// workFromHome: (context) => WorkFromHomeScreen(),
// addWorkFromHome: (context) => AddWorkFromHomeScreen(),

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

@ -350,6 +350,12 @@ abstract class LocaleKeys {
static const save = 'save';
static const TurnNotificationsFor = 'TurnNotificationsFor';
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_username = 'profile.reset_password.username';
static const profile_reset_password_password = 'profile.reset_password.password';

@ -1,7 +1,6 @@
import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:logger/logger.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
@ -61,7 +60,6 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return Sizer(
builder: (context, orientation, deviceType) {
print(AppState().postParamsObject?.toJson());
var obj = AppState().postParamsObject;
obj?.languageID = EasyLocalization.of(context)?.locale.languageCode == "ar" ? 1 : 2;
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_time_card_summary_list_model.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_login_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? forgetPasswordTokenID;
List<String>? getAbsenceAttachmentsList;
List<String>? getAbsenceAttendanceTypesList;
List<GetAbsenceAttendanceTypesList>? getAbsenceAttendanceTypesList;
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotificationBodyList;
List<String>? getAbsenceDffStructureList;
List<String>? getAbsenceTransactionList;
List<GetAbsenceDffStructureList>? getAbsenceDffStructureList;
List<GetAbsenceTransactionList>? getAbsenceTransactionList;
List<GetAccrualBalancesList>? getAccrualBalancesList;
List<GetActionHistoryList>? getActionHistoryList;
List<GetAddressDffStructureList>? getAddressDffStructureList;
@ -644,13 +647,13 @@ class GenericResponseModel {
if (json['AddAttSuccessList'] != null) {
addAttSuccessList = <AddAttSuccessList>[];
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'];
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'];
calculateAbsenceDuration = json['CalculateAbsenceDuration'];
cancelHRTransactionLIst = json['CancelHRTransactionLIst'];
@ -664,28 +667,46 @@ class GenericResponseModel {
if (json['CountryList'] != null) {
countryList = <GetCountriesListModel>[];
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'];
deleteVacationRuleList = json['DeleteVacationRuleList'];
disableSessionList = json['DisableSessionList'];
employeeQR = json['EmployeeQR'];
forgetPasswordTokenID = json['ForgetPasswordTokenID'];
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) {
getAbsenceCollectionNotificationBodyList = <GetAbsenceCollectionNotificationBodyList>[];
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)));
if (json['GetActionHistoryList'] != null) {
@ -698,7 +719,7 @@ class GenericResponseModel {
if (json['GetAddressDffStructureList'] != null) {
getAddressDffStructureList = <GetAddressDffStructureList>[];
json['GetAddressDffStructureList'].forEach((v) {
getAddressDffStructureList!.add(new GetAddressDffStructureList.fromJson(v));
getAddressDffStructureList!.add(GetAddressDffStructureList.fromJson(v));
});
}
getAddressNotificationBodyList = json['GetAddressNotificationBodyList'];
@ -706,41 +727,41 @@ class GenericResponseModel {
if (json['GetApprovesList'] != null) {
getApprovesList = <GetApprovesList>[];
json['GetApprovesList'].forEach((v) {
getApprovesList!.add(new GetApprovesList.fromJson(v));
getApprovesList!.add(GetApprovesList.fromJson(v));
});
}
if (json['GetAttachementList'] != null) {
getAttachementList = <GetAttachementList>[];
json['GetAttachementList'].forEach((v) {
getAttachementList!.add(new GetAttachementList.fromJson(v));
getAttachementList!.add(GetAttachementList.fromJson(v));
});
}
getAttendanceTrackingList = json["GetAttendanceTrackingList"] == null ? null : GetAttendanceTracking.fromMap(json["GetAttendanceTrackingList"]);
if (json['GetBasicDetColsStructureList'] != null) {
getBasicDetColsStructureList = <GetBasicDetColsStructureList>[];
json['GetBasicDetColsStructureList'].forEach((v) {
getBasicDetColsStructureList!.add(new GetBasicDetColsStructureList.fromJson(v));
getBasicDetColsStructureList!.add(GetBasicDetColsStructureList.fromJson(v));
});
}
// getBasicDetDffStructureList = json['GetBasicDetDffStructureList'];
if (json['GetBasicDetDffStructureList'] != null) {
getBasicDetDffStructureList = <GetBasicDetDffStructureList>[];
json['GetBasicDetDffStructureList'].forEach((v) {
getBasicDetDffStructureList!.add(new GetBasicDetDffStructureList.fromJson(v));
getBasicDetDffStructureList!.add(GetBasicDetDffStructureList.fromJson(v));
});
}
if (json['GetContactDffStructureList'] != null) {
getContactDffStructureList = <GetContactDffStructureList>[];
json['GetContactDffStructureList'].forEach((v) {
getContactDffStructureList!.add(new GetContactDffStructureList.fromJson(v));
getContactDffStructureList!.add(GetContactDffStructureList.fromJson(v));
});
}
if (json['GetBasicDetNtfBodyList'] != null) {
getBasicDetNtfBodyList = <GetBasicDetNtfBodyList>[];
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) {
getContactDetailsList = <GetContactDetailsList>[];
json['GetContactDetailsList'].forEach((v) {
getContactDetailsList!.add(new GetContactDetailsList.fromJson(v));
getContactDetailsList!.add(GetContactDetailsList.fromJson(v));
});
}
if (json['GetContactColsStructureList'] != null) {
getContactColsStructureList = <GetContactColsStructureList>[];
json['GetContactColsStructureList'].forEach((v) {
getContactColsStructureList!.add(new GetContactColsStructureList.fromJson(v));
getContactColsStructureList!.add(GetContactColsStructureList.fromJson(v));
});
}
getContactNotificationBodyList = json["GetContactNotificationBodyList"] == null ? null : GetContactNotificationBodyList.fromJson(json["GetContactNotificationBodyList"]);
@ -769,21 +790,21 @@ class GenericResponseModel {
if (json['GetCountriesList'] != null) {
getCountriesList = <GetCountriesListModel>[];
json['GetCountriesList'].forEach((v) {
getCountriesList!.add(new GetCountriesListModel.fromJson(v));
getCountriesList!.add(GetCountriesListModel.fromJson(v));
});
}
if (json['GetDayHoursTypeDetailsList'] != null) {
getDayHoursTypeDetailsList = <GetDayHoursTypeDetailsList>[];
json['GetDayHoursTypeDetailsList'].forEach((v) {
getDayHoursTypeDetailsList!.add(new GetDayHoursTypeDetailsList.fromJson(v));
getDayHoursTypeDetailsList!.add(GetDayHoursTypeDetailsList.fromJson(v));
});
}
if (json['GetDeductionsList'] != null) {
getDeductionsList = <GetDeductionsList>[];
json['GetDeductionsList'].forEach((v) {
getDeductionsList!.add(new GetDeductionsList.fromJson(v));
getDeductionsList!.add(GetDeductionsList.fromJson(v));
});
}
getDefaultValueList = json['GetDefaultValueList'] != null ? GetDefaultValueList.fromJson(json['GetDefaultValueList']) : null;
@ -793,44 +814,44 @@ class GenericResponseModel {
if (json['GetEITDFFStructureList'] != null) {
getEITDFFStructureList = <GetEITDFFStructureList>[];
json['GetEITDFFStructureList'].forEach((v) {
getEITDFFStructureList!.add(new GetEITDFFStructureList.fromJson(v));
getEITDFFStructureList!.add(GetEITDFFStructureList.fromJson(v));
});
}
if (json['GetEITTransactionList'] != null) {
getEITTransactionList = <GetEITTransactionList>[];
json['GetEITTransactionList'].forEach((v) {
getEITTransactionList!.add(new GetEITTransactionList.fromJson(v));
getEITTransactionList!.add(GetEITTransactionList.fromJson(v));
});
}
if (json['GetEarningsList'] != null) {
getEarningsList = <GetEarningsList>[];
json['GetEarningsList'].forEach((v) {
getEarningsList!.add(new GetEarningsList.fromJson(v));
getEarningsList!.add(GetEarningsList.fromJson(v));
});
}
if (json['GetEmployeeAddressList'] != null) {
getEmployeeAddressList = <GetEmployeeAddressList>[];
json['GetEmployeeAddressList'].forEach((v) {
getEmployeeAddressList!.add(new GetEmployeeAddressList.fromJson(v));
getEmployeeAddressList!.add(GetEmployeeAddressList.fromJson(v));
});
}
if (json['GetEmployeeBasicDetailsList'] != null) {
getEmployeeBasicDetailsList = <GetEmployeeBasicDetailsList>[];
json['GetEmployeeBasicDetailsList'].forEach((v) {
getEmployeeBasicDetailsList!.add(new GetEmployeeBasicDetailsList.fromJson(v));
getEmployeeBasicDetailsList!.add(GetEmployeeBasicDetailsList.fromJson(v));
});
}
if (json['GetEmployeeContactsList'] != null) {
getEmployeeContactsList = <GetEmployeeContactsList>[];
json['GetEmployeeContactsList'].forEach((v) {
getEmployeeContactsList!.add(new GetEmployeeContactsList.fromJson(v));
getEmployeeContactsList!.add(GetEmployeeContactsList.fromJson(v));
});
}
if (json['GetEmployeePhonesList'] != null) {
getEmployeePhonesList = <GetEmployeePhonesList>[];
json['GetEmployeePhonesList'].forEach((v) {
getEmployeePhonesList!.add(new GetEmployeePhonesList.fromJson(v));
getEmployeePhonesList!.add(GetEmployeePhonesList.fromJson(v));
});
}
if (json['GetEmployeeSubordinatesList'] != null) {
@ -844,12 +865,12 @@ class GenericResponseModel {
getHrCollectionNotificationBodyList = json['GetHrCollectionNotificationBodyList'];
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) {
getItemTypeNotificationsList = <GetItemTypeNotificationsList>[];
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) {
getMoItemHistoryList = <GetMoItemHistoryList>[];
json['GetMoItemHistoryList'].forEach((v) {
getMoItemHistoryList!.add(new GetMoItemHistoryList.fromJson(v));
getMoItemHistoryList!.add(GetMoItemHistoryList.fromJson(v));
});
}
if (json['GetMoNotificationBodyList'] != null) {
getMoNotificationBodyList = <GetMoNotificationBodyList>[];
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) {
getPaymentInformationList = <GetPaymentInformationList>[];
json['GetPaymentInformationList'].forEach((v) {
getPaymentInformationList!.add(new GetPaymentInformationList.fromJson(v));
getPaymentInformationList!.add(GetPaymentInformationList.fromJson(v));
});
}
if (json['GetPayslipList'] != null) {
getPayslipList = <GetPayslipList>[];
json['GetPayslipList'].forEach((v) {
getPayslipList!.add(new GetPayslipList.fromJson(v));
getPayslipList!.add(GetPayslipList.fromJson(v));
});
}
// getPendingReqDetailsList = json['GetPendingReqDetailsList'];
@ -918,15 +939,15 @@ class GenericResponseModel {
if (json['GetPoItemHistoryList'] != null) {
getPoItemHistoryList = <GetPoItemHistoryList>[];
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'];
if (json['GetQuotationAnalysisList'] != null) {
getQuotationAnalysisList = <GetQuotationAnalysisList>[];
json['GetQuotationAnalysisList'].forEach((v) {
getQuotationAnalysisList!.add(new GetQuotationAnalysisList.fromJson(v));
getQuotationAnalysisList!.add(GetQuotationAnalysisList.fromJson(v));
});
}
getRFCEmployeeListList = json['GetRFCEmployeeListList'];
@ -937,7 +958,7 @@ class GenericResponseModel {
if (json['GetScheduleShiftsDetailsList'] != null) {
getScheduleShiftsDetailsList = <GetScheduleShiftsDetailsList>[];
json['GetScheduleShiftsDetailsList'].forEach((v) {
getScheduleShiftsDetailsList!.add(new GetScheduleShiftsDetailsList.fromJson(v));
getScheduleShiftsDetailsList!.add(GetScheduleShiftsDetailsList.fromJson(v));
});
}
getShiftTypesList = json['GetShiftTypesList'];
@ -945,13 +966,13 @@ class GenericResponseModel {
if (json['GetStampMsNotificationBodyList'] != null) {
getStampMsNotificationBodyList = <GetStampMsNotificationBodyList>[];
json['GetStampMsNotificationBodyList'].forEach((v) {
getStampMsNotificationBodyList!.add(new GetStampMsNotificationBodyList.fromJson(v));
getStampMsNotificationBodyList!.add(GetStampMsNotificationBodyList.fromJson(v));
});
}
if (json['GetStampNsNotificationBodyList'] != null) {
getStampNsNotificationBodyList = <GetStampNsNotificationBodyList>[];
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) {
getSummaryOfPaymentList = <GetSummaryOfPaymentList>[];
json['GetSummaryOfPaymentList'].forEach((v) {
getSummaryOfPaymentList!.add(new GetSummaryOfPaymentList.fromJson(v));
getSummaryOfPaymentList!.add(GetSummaryOfPaymentList.fromJson(v));
});
}
getSwipesList = json['GetSwipesList'];
@ -979,77 +1000,77 @@ class GenericResponseModel {
if (json['GetTimeCardSummaryList'] != null) {
getTimeCardSummaryList = <GetTimeCardSummaryList>[];
json['GetTimeCardSummaryList'].forEach((v) {
getTimeCardSummaryList!.add(new GetTimeCardSummaryList.fromJson(v));
getTimeCardSummaryList!.add(GetTimeCardSummaryList.fromJson(v));
});
}
if (json['Mohemm_ITG_TicketsByEmployeeList'] != null) {
getTicketsByEmployeeList = <GetTicketsByEmployeeList>[];
json['Mohemm_ITG_TicketsByEmployeeList'].forEach((v) {
getTicketsByEmployeeList!.add(new GetTicketsByEmployeeList.fromJson(v));
getTicketsByEmployeeList!.add(GetTicketsByEmployeeList.fromJson(v));
});
}
if (json['Mohemm_ITG_TicketDetailsList'] != null) {
getTicketDetailsByEmployee = <GetTicketDetailsByEmployee>[];
json['Mohemm_ITG_TicketDetailsList'].forEach((v) {
getTicketDetailsByEmployee!.add(new GetTicketDetailsByEmployee.fromJson(v));
getTicketDetailsByEmployee!.add(GetTicketDetailsByEmployee.fromJson(v));
});
}
if (json['Mohemm_ITG_TicketTransactionsList'] != null) {
getTicketTransactions = <GetTicketTransactions>[];
json['Mohemm_ITG_TicketTransactionsList'].forEach((v) {
getTicketTransactions!.add(new GetTicketTransactions.fromJson(v));
getTicketTransactions!.add(GetTicketTransactions.fromJson(v));
});
}
if (json['Mohemm_Itg_TicketTypesList'] != null) {
getTicketTypes = <GetTicketTypes>[];
json['Mohemm_Itg_TicketTypesList'].forEach((v) {
getTicketTypes!.add(new GetTicketTypes.fromJson(v));
getTicketTypes!.add(GetTicketTypes.fromJson(v));
});
}
if (json['Mohemm_Itg_ProjectsList'] != null) {
getMowadhafhiProjects = <GetMowadhafhiProjects>[];
json['Mohemm_Itg_ProjectsList'].forEach((v) {
getMowadhafhiProjects!.add(new GetMowadhafhiProjects.fromJson(v));
getMowadhafhiProjects!.add(GetMowadhafhiProjects.fromJson(v));
});
}
if (json['Mohemm_ITG_ProjectDepartmentsList'] != null) {
getProjectDepartments = <GetProjectDepartments>[];
json['Mohemm_ITG_ProjectDepartmentsList'].forEach((v) {
getProjectDepartments!.add(new GetProjectDepartments.fromJson(v));
getProjectDepartments!.add(GetProjectDepartments.fromJson(v));
});
}
if (json['Mohemm_ITG_DepartmentSectionsList'] != null) {
getDepartmentSections = <GetDepartmentSections>[];
json['Mohemm_ITG_DepartmentSectionsList'].forEach((v) {
getDepartmentSections!.add(new GetDepartmentSections.fromJson(v));
getDepartmentSections!.add(GetDepartmentSections.fromJson(v));
});
}
if (json['Mohemm_ITG_SectionTopicsList'] != null) {
getSectionTopics = <GetSectionTopics>[];
json['Mohemm_ITG_SectionTopicsList'].forEach((v) {
getSectionTopics!.add(new GetSectionTopics.fromJson(v));
getSectionTopics!.add(GetSectionTopics.fromJson(v));
});
}
if (json['GetPendingReqFunctionsList'] != null) {
getPendingTransactionsFunctions = <GetPendingTransactionsFunctions>[];
json['GetPendingReqFunctionsList'].forEach((v) {
getPendingTransactionsFunctions!.add(new GetPendingTransactionsFunctions.fromJson(v));
getPendingTransactionsFunctions!.add(GetPendingTransactionsFunctions.fromJson(v));
});
}
if (json['GetPendingReqDetailsList'] != null) {
getPendingTransactionsDetails = <GetPendingTransactionsDetails>[];
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) {
respondAttributesList = <RespondAttributesList>[];
json['RespondAttributesList'].forEach((v) {
respondAttributesList!.add(new RespondAttributesList.fromJson(v));
respondAttributesList!.add(RespondAttributesList.fromJson(v));
});
}
if (json['RespondRolesList'] != null) {
@ -1192,25 +1213,25 @@ class GenericResponseModel {
sFHGetPoNotificationBodyList = json['SFH_GetPoNotificationBodyList'];
sFHGetPrNotificationBodyList = json['SFH_GetPrNotificationBodyList'];
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'];
startCeiApprovalProcess = json['StartCeiApprovalProcess'];
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'];
startPhonesApprovalProcessList = json['StartPhonesApprovalProcessList'] != null ? new StartPhoneApprovalProcess.fromJson(json['startPhonesApprovalProcessList']) : null;
startPhonesApprovalProcessList = json['StartPhonesApprovalProcessList'] != null ? StartPhoneApprovalProcess.fromJson(json['startPhonesApprovalProcessList']) : null;
startSitApprovalProcess = json['StartSitApprovalProcess'];
startTermApprovalProcessList = json['StartTermApprovalProcessList'];
submitAddressTransactionList = json['SubmitAddressTransactionList'] != null ? new SubmitAddressTransaction.fromJson(json['SubmitAddressTransactionList']) : null;
submitBasicDetTransactionList = json['SubmitBasicDetTransactionList'] != null ? new SubmitBasicDetailsTransactionList.fromJson(json['SubmitBasicDetTransactionList']) : null;
submitAddressTransactionList = json['SubmitAddressTransactionList'] != null ? SubmitAddressTransaction.fromJson(json['SubmitAddressTransactionList']) : null;
submitBasicDetTransactionList = json['SubmitBasicDetTransactionList'] != null ? SubmitBasicDetailsTransactionList.fromJson(json['SubmitBasicDetTransactionList']) : null;
submitCEITransactionList = json['SubmitCEITransactionList'];
submitCcpTransactionList = json['SubmitCcpTransactionList'];
submitContactTransactionList = json['SubmitContactTransactionList'] != null ? new SubmitContactTransactionList.fromJson(json['SubmitContactTransactionList']) : null;
submitEITTransactionList = json['SubmitEITTransactionList'] != null ? new SubmitEITTransactionList.fromJson(json['SubmitEITTransactionList']) : null;
submitContactTransactionList = json['SubmitContactTransactionList'] != null ? SubmitContactTransactionList.fromJson(json['SubmitContactTransactionList']) : null;
submitEITTransactionList = json['SubmitEITTransactionList'] != null ? SubmitEITTransactionList.fromJson(json['SubmitEITTransactionList']) : null;
submitHrTransactionList = json['SubmitHrTransactionList'];
submitPhonesTransactionList = json['SubmitPhonesTransactionList'];
@ -1247,7 +1268,7 @@ class GenericResponseModel {
vHRIsVerificationCodeValid = json['VHR_IsVerificationCodeValid'];
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'];
if (json['VrItemTypesList'] != null) {
@ -1259,7 +1280,7 @@ class GenericResponseModel {
if (json['WFLookUpList'] != null) {
wFLookUpList = <WFLookUpList>[];
json['WFLookUpList'].forEach((v) {
wFLookUpList!.add(new WFLookUpList.fromJson(v));
wFLookUpList!.add(WFLookUpList.fromJson(v));
});
}
eLearningGETEMPLOYEEPROFILEList = json['eLearning_GET_EMPLOYEE_PROFILEList'];
@ -1272,7 +1293,7 @@ class GenericResponseModel {
}
Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>();
Map<String, dynamic> data = Map<String, dynamic>();
data['Date'] = this.date;
data['LanguageID'] = this.languageID;
data['ServiceName'] = this.serviceName;
@ -1334,14 +1355,22 @@ class GenericResponseModel {
data['EmployeeQR'] = this.employeeQR;
data['ForgetPasswordTokenID'] = this.forgetPasswordTokenID;
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) {
data['GetAbsenceCollectionNotificationBodyList'] = this.getAbsenceCollectionNotificationBodyList!.map((v) => v.toJson()).toList();
}
data['GetAbsenceDffStructureList'] = this.getAbsenceDffStructureList;
data['GetAbsenceTransactionList'] = this.getAbsenceTransactionList;
if (this.getAbsenceDffStructureList != null) {
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;
if (this.getActionHistoryList != null) {

@ -25,7 +25,7 @@ class GetUserItemTypesList {
}
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['FYI_ENABLED_FLAG'] = this.fYIENABLEDFLAG;
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() {
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_LATE_IN_HOURS'] = this.pLATEINHOURS;
data['P_REMAINING_HOURS'] = this.pREMAININGHOURS;

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

@ -15,7 +15,7 @@ class UpdateItemTypeSuccessList {
}
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['UpdateError'] = this.updateError;
data['UpdateSuccess'] = this.updateSuccess;

@ -12,7 +12,7 @@ class UpdateUserItemTypesList {
}
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_STATUS'] = this.pRETURNSTATUS;
return data;

@ -1,13 +1,9 @@
class UpdateUserTypesList {
int? itemID;
String? pFYAENABLEDFALG;
String? pFYIENABLEDFALG;
String? pITEMTYPE;
UpdateUserTypesList({this.itemID, this.pFYAENABLEDFALG, this.pFYIENABLEDFALG, this.pITEMTYPE});
UpdateUserTypesList.fromJson(Map<String, dynamic> json) {
@ -18,7 +14,7 @@ class UpdateUserTypesList {
}
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['P_FYAENABLED_FALG'] = this.pFYAENABLEDFALG;
data['P_FYIENABLED_FALG'] = this.pFYIENABLEDFALG;

@ -1,23 +1,16 @@
import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.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/classes/colors.dart';
import 'package:mohem_flutter_app/classes/date_uitl.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/generic_response_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/location/Location.dart';
import 'package:mohem_flutter_app/widgets/nfc/nfc_reader_sheet.dart';
import 'package:mohem_flutter_app/widgets/qr_scanner_dialog.dart';
import 'package:mohem_flutter_app/widgets/mark_attendance_widget.dart';
import 'package:nfc_manager/nfc_manager.dart';
import 'package:provider/provider.dart';
import 'package:wifi_iot/wifi_iot.dart';
@ -183,62 +176,62 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
),
), //.expanded,
// MarkAttendanceWidget(model),
Container(
width: double.infinity,
decoration: BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white),
// margin: EdgeInsets.only(top: 187 - 31),
padding: EdgeInsets.only(left: 21, right: 21, top: 24, bottom: 24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
LocaleKeys.markAttendance.tr().toSectionHeading(),
LocaleKeys.selectMethodOfAttendance.tr().tr().toText11(color: Color(0xff535353)),
24.height,
GridView(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.zero,
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8),
children: <Widget>[
if (isNfcEnabled)
attendanceMethod("NFC", "assets/images/nfc.svg", isNfcEnabled, () {
if (isNfcLocationEnabled) {
Location.getCurrentLocation((LatLng? latlng) {
performNfcAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
});
} else {
performNfcAttendance(model);
}
}),
if (isWifiEnabled)
attendanceMethod("Wifi", "assets/images/wufu.svg", isWifiEnabled, () {
if (isWifiLocationEnabled) {
Location.getCurrentLocation((LatLng? latlng) {
performWifiAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
});
} else {
performWifiAttendance(model);
}
// connectWifi();
}),
if (isQrEnabled)
attendanceMethod("QR", "assets/images/ic_qr.svg", isQrEnabled, () async {
if (isQrLocationEnabled) {
Location.getCurrentLocation((LatLng? latlng) {
performQrCodeAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
});
} else {
performQrCodeAttendance(model);
}
// performQrCodeAttendance(model);
}),
],
)
],
),
),
MarkAttendanceWidget(model, topPadding: 24),
// Container(
// width: double.infinity,
// decoration: BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white),
// // margin: EdgeInsets.only(top: 187 - 31),
// padding: EdgeInsets.only(left: 21, right: 21, top: 24, bottom: 24),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
// children: [
// LocaleKeys.markAttendance.tr().toSectionHeading(),
// LocaleKeys.selectMethodOfAttendance.tr().tr().toText11(color: Color(0xff535353)),
// 24.height,
// GridView(
// physics: const NeverScrollableScrollPhysics(),
// shrinkWrap: true,
// padding: EdgeInsets.zero,
// gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8),
// children: <Widget>[
// if (isNfcEnabled)
// attendanceMethod("NFC", "assets/images/nfc.svg", isNfcEnabled, () {
// if (isNfcLocationEnabled) {
// Location.getCurrentLocation((LatLng? latlng) {
// performNfcAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
// });
// } else {
// performNfcAttendance(model);
// }
// }),
// if (isWifiEnabled)
// attendanceMethod("Wifi", "assets/images/wufu.svg", isWifiEnabled, () {
// if (isWifiLocationEnabled) {
// Location.getCurrentLocation((LatLng? latlng) {
// performWifiAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
// });
// } else {
// performWifiAttendance(model);
// }
// // connectWifi();
// }),
// if (isQrEnabled)
// attendanceMethod("QR", "assets/images/ic_qr.svg", isQrEnabled, () async {
// if (isQrLocationEnabled) {
// Location.getCurrentLocation((LatLng? latlng) {
// performQrCodeAttendance(model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
// });
// } else {
// performQrCodeAttendance(model);
// }
// // performQrCodeAttendance(model);
// }),
// ],
// )
// ],
// ),
// ),
// Positioned(
// top: 187 - 21,
// child: Container(
@ -269,59 +262,59 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
);
}
Future<void> performNfcAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
if (isNfcLocationEnabled) {
print("nfc location enabled");
} else {
print("nfc not location enabled");
}
showNfcReader(context, onNcfScan: (String? nfcId) async {
print(nfcId);
Utils.showLoading(context);
try {
GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 2, nfcValue: nfcId ?? "", isGpsRequired: isNfcLocationEnabled, lat: lat, long: lng);
bool status = await model.fetchAttendanceTracking(context);
Utils.hideLoading(context);
} catch (ex) {
print(ex);
Utils.hideLoading(context);
Utils.handleException(ex, context, (msg) {
Utils.confirmDialog(context, msg);
});
}
});
}
Future<void> performWifiAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
if (isWifiLocationEnabled) {
print("wifi location enabled");
} else {
print("wifi not location enabled");
}
bool v = await WiFiForIoTPlugin.connect(AppState().mohemmWifiSSID ?? "", password: AppState().mohemmWifiPassword ?? "", joinOnce: true, security: NetworkSecurity.WPA, withInternet: false);
if (v) {
await WiFiForIoTPlugin.forceWifiUsage(true);
print("connected");
Utils.showLoading(context);
try {
GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 3, nfcValue: "", isGpsRequired: isWifiLocationEnabled, lat: lat, long: lng);
bool status = await model.fetchAttendanceTracking(context);
Utils.hideLoading(context);
await closeWifiRequest();
} catch (ex) {
print(ex);
await closeWifiRequest();
Utils.hideLoading(context);
Utils.handleException(ex, context, (msg) {
Utils.confirmDialog(context, msg);
});
}
} else {
Utils.confirmDialog(context, LocaleKeys.comeNearHMGWifi.tr());
}
}
// Future<void> performNfcAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
// if (isNfcLocationEnabled) {
// print("nfc location enabled");
// } else {
// print("nfc not location enabled");
// }
//
// showNfcReader(context, onNcfScan: (String? nfcId) async {
// print(nfcId);
// Utils.showLoading(context);
// try {
// GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 2, nfcValue: nfcId ?? "", isGpsRequired: isNfcLocationEnabled, lat: lat, long: lng);
// bool status = await model.fetchAttendanceTracking(context);
// Utils.hideLoading(context);
// } catch (ex) {
// print(ex);
// Utils.hideLoading(context);
// Utils.handleException(ex, context, (msg) {
// Utils.confirmDialog(context, msg);
// });
// }
// });
// }
//
// Future<void> performWifiAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
// if (isWifiLocationEnabled) {
// print("wifi location enabled");
// } else {
// print("wifi not location enabled");
// }
//
// bool v = await WiFiForIoTPlugin.connect(AppState().mohemmWifiSSID ?? "", password: AppState().mohemmWifiPassword ?? "", joinOnce: true, security: NetworkSecurity.WPA, withInternet: false);
// if (v) {
// await WiFiForIoTPlugin.forceWifiUsage(true);
// print("connected");
// Utils.showLoading(context);
// try {
// GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 3, nfcValue: "", isGpsRequired: isWifiLocationEnabled, lat: lat, long: lng);
// bool status = await model.fetchAttendanceTracking(context);
// Utils.hideLoading(context);
// await closeWifiRequest();
// } catch (ex) {
// print(ex);
// await closeWifiRequest();
// Utils.hideLoading(context);
// Utils.handleException(ex, context, (msg) {
// Utils.confirmDialog(context, msg);
// });
// }
// } else {
// Utils.confirmDialog(context, LocaleKeys.comeNearHMGWifi.tr());
// }
// }
Future<bool> closeWifiRequest() async {
await WiFiForIoTPlugin.forceWifiUsage(false);
@ -329,62 +322,62 @@ class _TodayAttendanceScreenState extends State<TodayAttendanceScreen> {
return v;
}
Future<void> performQrCodeAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
var qrCodeValue = await Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => QrScannerDialog(),
),
);
if (qrCodeValue != null) {
print("qrCode: " + qrCodeValue);
Utils.showLoading(context);
try {
GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 1, isGpsRequired: isQrLocationEnabled, lat: lat, long: lng, QRValue: qrCodeValue);
bool status = await model.fetchAttendanceTracking(context);
Utils.hideLoading(context);
} catch (ex) {
print(ex);
Utils.hideLoading(context);
Utils.handleException(ex, context, (msg) {
Utils.confirmDialog(context, msg);
});
}
}
}
Widget attendanceMethod(String title, String image, bool isEnabled, VoidCallback onPress) => Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
gradient: const LinearGradient(transform: GradientRotation(.64), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
]),
),
clipBehavior: Clip.antiAlias,
child: Stack(
children: [
Container(
padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
image,
color: Colors.white,
).expanded,
title.toText17(isBold: true, color: Colors.white),
],
),
),
if (!isEnabled)
Container(
width: double.infinity,
height: double.infinity,
color: Colors.grey.withOpacity(0.7),
)
],
),
).onPress(onPress);
// Future<void> performQrCodeAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async {
// var qrCodeValue = await Navigator.of(context).push(
// MaterialPageRoute(
// builder: (context) => QrScannerDialog(),
// ),
// );
// if (qrCodeValue != null) {
// print("qrCode: " + qrCodeValue);
// Utils.showLoading(context);
// try {
// GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 1, isGpsRequired: isQrLocationEnabled, lat: lat, long: lng, QRValue: qrCodeValue);
// bool status = await model.fetchAttendanceTracking(context);
// Utils.hideLoading(context);
// } catch (ex) {
// print(ex);
// Utils.hideLoading(context);
// Utils.handleException(ex, context, (msg) {
// Utils.confirmDialog(context, msg);
// });
// }
// }
// }
//
// Widget attendanceMethod(String title, String image, bool isEnabled, VoidCallback onPress) => Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(15),
// gradient: const LinearGradient(transform: GradientRotation(.64), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [
// MyColors.gradiantEndColor,
// MyColors.gradiantStartColor,
// ]),
// ),
// clipBehavior: Clip.antiAlias,
// child: Stack(
// children: [
// Container(
// padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// SvgPicture.asset(
// image,
// color: Colors.white,
// ).expanded,
// title.toText17(isBold: true, color: Colors.white),
// ],
// ),
// ),
// if (!isEnabled)
// Container(
// width: double.infinity,
// height: double.infinity,
// color: Colors.grey.withOpacity(0.7),
// )
// ],
// ),
// ).onPress(onPress);
Widget commonStatusView(String title, String time) => Expanded(
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),
).onPress(() async {
//await data.fetchWorkListCounter(context, showLoading: true);
).onPress(() {
Navigator.pushNamed(context, AppRoutes.workList);
}),
data.isMissingSwipeLoading
@ -102,7 +101,7 @@ class MenusWidget extends StatelessWidget {
],
).paddingOnly(left: 10, right: 10, bottom: 6, top: 6),
).onPress(() {
Navigator.pushNamed(context, AppRoutes.workList);
Navigator.pushNamed(context, AppRoutes.leaveBalance);
}),
data.isLeaveTicketBalanceLoading
? 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() {
final List<Meeting> meetings = <Meeting>[];
List<Meeting> meetings = <Meeting>[];
return meetings;
}
@ -545,7 +545,7 @@ class MeetingDataSource extends CalendarDataSource {
}
Meeting _getMeetingData(int index) {
final dynamic meeting = appointments;
dynamic meeting = appointments;
Meeting meetingData;
if (meeting is 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/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/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
@ -33,9 +34,11 @@ class _BasicDetailsState extends State<BasicDetails> {
String? emailAddress = "";
String? employeeNo = "";
int correctOrNew = 1;
List<GetEmployeeBasicDetailsList> getEmployeeBasicDetailsList = [];
List<GetEmployeeBasicDetailsList>? getEmployeeBasicDetailsList;
late MemberInformationListModel memberInformationList;
GetMenuEntriesList menuEntries = GetMenuEntriesList();
@override
void initState() {
super.initState();
@ -58,7 +61,6 @@ class _BasicDetailsState extends State<BasicDetails> {
}
}
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBarWidget(
@ -68,53 +70,43 @@ class _BasicDetailsState extends State<BasicDetails> {
backgroundColor: MyColors.backgroundColor,
body: Column(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: double.infinity,
margin: EdgeInsets.only(top: 20, left: 21, right: 21, bottom: 20),
padding: EdgeInsets.only(left: 14, right: 14, top: 13, bottom: 5),
height: 300,
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: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: getEmployeeBasicDetailsList.map((e) =>
Column(
children: [
e.dISPLAYFLAG == "Y" ? Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
"${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
"${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
SizedBox(height: 12,)
]): Container(),
],
)).toList()),
),
],
),
),
ListView(
padding: const EdgeInsets.all(21),
children: [
getEmployeeBasicDetailsList == null
? const SizedBox().expanded
: (getEmployeeBasicDetailsList!.isEmpty
? Utils.getNoDataWidget(context).expanded
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: getEmployeeBasicDetailsList!
.map((e) => Column(
children: [
e.dISPLAYFLAG == "Y"
? Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
"${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
"${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
12.height
])
: Container(),
],
))
.toList())
.objectContainerView())
],
).expanded,
DefaultButton(
LocaleKeys.update.tr(),
menuEntries.updateButton == 'Y' ? () async {
showAlertDialog(context);}
: null).insideContainer,
LocaleKeys.update.tr(),
menuEntries.updateButton == 'Y'
? () async {
showAlertDialog(context);
}
: null)
.insideContainer,
],
));
}
void showAlertDialog(BuildContext context) {
Widget cancelButton = TextButton(
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/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/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/dashboard/menu_entries.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/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/profile_screen.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';
class ContactDetails extends StatefulWidget {
@ -47,26 +47,12 @@ class _ContactDetailsState extends State<ContactDetails> {
menuEntriesPhone = menuData.where((GetMenuEntriesList e) => e.requestType == 'PHONE_NUMBERS').toList()[0];
menuEntriesAddress = menuData.where((GetMenuEntriesList e) => e.requestType == 'ADDRESS').toList()[0];
getEmployeePhones();
setState(() {});
}
void getEmployeePhones() async {
try {
Utils.showLoading(context);
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();
Utils.hideLoading(context);
setState(() {});
@ -78,37 +64,18 @@ class _ContactDetailsState extends State<ContactDetails> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBarWidget(
context,
title: LocaleKeys.profile_contactDetails.tr(),
),
backgroundColor: MyColors.backgroundColor,
// bottomSheet: footer(),
body: SingleChildScrollView(
child: Column(children: [
Container(
width: double.infinity,
margin: EdgeInsets.only(
top: 20,
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: [
appBar: AppBarWidget(
context,
title: LocaleKeys.profile_contactDetails.tr(),
),
backgroundColor: MyColors.backgroundColor,
// bottomSheet: footer(),
body: ListView(
padding: const EdgeInsets.all(21),
children: [
if (getEmployeePhonesList.isNotEmpty)
Stack(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
@ -125,37 +92,33 @@ class _ContactDetailsState extends State<ContactDetails> {
: Container()
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: getEmployeePhonesList
.map((e) => Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
"${e.pHONETYPEMEANING}".toText13(color: MyColors.lightGrayColor),
"${e.pHONENUMBER}".toText16(isBold: true, color: MyColors.blackColor),
]))
.toList())
])),
Container(
width: double.infinity,
margin: EdgeInsets.only(
top: 20,
left: 26,
right: 26,
),
padding: EdgeInsets.all(15),
// height: 400,
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: [
ListView.separated(
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.zero,
itemBuilder: (cxt, index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"${getEmployeePhonesList[index].pHONETYPEMEANING}".toText13(color: MyColors.lightGrayColor),
("${getEmployeePhonesList[index].pHONENUMBER}" ?? "").toText16(isBold: true, color: MyColors.blackColor),
],
),
separatorBuilder: (cxt, index) => 12.height,
itemCount: getEmployeePhonesList.length),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: getEmployeePhonesList
// .map((e) => Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
// "${e.pHONETYPEMEANING}".toText13(color: MyColors.lightGrayColor),
// "${e.pHONENUMBER}".toText16(isBold: true, color: MyColors.blackColor),
// ]))
// .toList())
],
).objectContainerView(),
12.height,
if (getEmployeeAddressList.isNotEmpty)
Stack(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
@ -172,34 +135,31 @@ class _ContactDetailsState extends State<ContactDetails> {
: Container()
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: getEmployeeAddressList
.map((e) => Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
"${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
"${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
SizedBox(
height: 20,
),
]))
.toList())
]))
])));
}
Widget footer() {
return Container(
decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10),
color: MyColors.white,
boxShadow: [
BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 3),
ListView.separated(
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.zero,
itemBuilder: (cxt, index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"${getEmployeeAddressList[index].sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
("${getEmployeeAddressList[index].sEGMENTVALUEDSP}" ?? "").toText16(isBold: true, color: MyColors.blackColor),
],
),
separatorBuilder: (cxt, index) => 12.height,
itemCount: getEmployeeAddressList.length),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: getEmployeeAddressList
// .map((e) => Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
// "${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
// "${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
// ]))
// .toList())
],
).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 {
DashboardProviderModel model;
double topPadding;
MarkAttendanceWidget(this.model, {Key? key}) : super(key: key);
MarkAttendanceWidget(this.model, {Key? key, this.topPadding = 0}) : super(key: key);
@override
_MarkAttendanceWidgetState createState() {
@ -70,9 +71,8 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.only(left: 21, right: 21, bottom: 21),
decoration: BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white),
padding: EdgeInsets.only(left: 21, right: 21, bottom: 21, top: widget.topPadding),
decoration: const BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white),
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -85,16 +85,16 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
padding: const EdgeInsets.only(bottom: 14, top: 21),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8),
children: <Widget>[
if (isNfcEnabled)
attendanceMethod("NFC", "assets/images/nfc.svg", isNfcEnabled, () {
if (isNfcLocationEnabled) {
Location.getCurrentLocation((LatLng? latlng) {
performNfcAttendance(widget.model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
});
} else {
performNfcAttendance(widget.model);
}
}),
// if (isNfcEnabled)
attendanceMethod("NFC", "assets/images/nfc.svg", isNfcEnabled, () {
if (isNfcLocationEnabled) {
Location.getCurrentLocation((LatLng? latlng) {
performNfcAttendance(widget.model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? "");
});
} else {
performNfcAttendance(widget.model);
}
}),
if (isWifiEnabled)
attendanceMethod("Wifi", "assets/images/wufu.svg", isWifiEnabled, () {
if (isWifiLocationEnabled) {
@ -180,8 +180,7 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> {
Future<bool> closeWifiRequest() async {
await WiFiForIoTPlugin.forceWifiUsage(false);
bool v = await WiFiForIoTPlugin.disconnect();
return v;
return await WiFiForIoTPlugin.disconnect();
}
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(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
gradient: const LinearGradient(
transform: GradientRotation(.64),
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: [
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
],
),
color: isEnabled ? null : Colors.grey.withOpacity(.5),
gradient: isEnabled
? const LinearGradient(
transform: GradientRotation(.64),
begin: Alignment.topRight,
end: Alignment.bottomLeft,
colors: [
MyColors.gradiantEndColor,
MyColors.gradiantStartColor,
],
)
: null,
),
clipBehavior: Clip.antiAlias,
child: Stack(
padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14),
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),
)
SvgPicture.asset(image, color: Colors.white).expanded,
title.toText17(isBold: true, color: Colors.white),
],
),
).onPress(onPress);
).onPress(() {
if (!isEnabled) return;
onPress();
});
}

Loading…
Cancel
Save