Merge branch 'master' into development_sikander
# Conflicts: # assets/langs/ar-SA.json # assets/langs/en-US.json # lib/generated/codegen_loader.g.dart # lib/generated/locale_keys.g.dart # lib/models/generic_response_model.dartmerge-requests/1/merge
						commit
						9314ea0514
					
				| @ -0,0 +1,7 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"> | ||||
|   <g id="phone-call_2_" data-name="phone-call (2)" transform="translate(0 0)"> | ||||
|     <g id="Group_7730" data-name="Group 7730" transform="translate(0 0)"> | ||||
|       <path id="Path_4724" data-name="Path 4724" d="M25.6,4.391A15,15,0,1,0,30,15,15,15,0,0,0,25.6,4.391Zm-2.888,16.5,0,0v0l-.76.755a4,4,0,0,1-3.775,1.08A13.291,13.291,0,0,1,14.32,21a17.834,17.834,0,0,1-3.045-2.455A17.971,17.971,0,0,1,9,15.781a14,14,0,0,1-1.71-3.46,4,4,0,0,1,1-4.085l.89-.89a.635.635,0,0,1,.9,0l0,0,2.81,2.81a.635.635,0,0,1,0,.9l0,0-1.65,1.65a1.345,1.345,0,0,0-.14,1.75,19.3,19.3,0,0,0,1.975,2.305,19.179,19.179,0,0,0,2.6,2.185,1.355,1.355,0,0,0,1.73-.15L19,17.177a.635.635,0,0,1,.9,0l0,0L22.715,20A.635.635,0,0,1,22.717,20.894Z" transform="translate(0 0)" fill="#2bb8a6"/> | ||||
|     </g> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 851 B | 
| @ -0,0 +1,6 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" width="20.438" height="20.438" viewBox="0 0 20.438 20.438"> | ||||
|   <g id="new-page" transform="translate(-1 -1)"> | ||||
|     <path id="Path_14" data-name="Path 14" d="M22.669,7H7.681A.681.681,0,0,0,7,7.681V22.669a.681.681,0,0,0,.681.681H22.669a.681.681,0,0,0,.681-.681V7.681A.681.681,0,0,0,22.669,7Zm-3.406,8.857H15.857v3.406H14.494V15.857H11.088V14.494h3.406V11.088h1.363v3.406h3.406Z" transform="translate(-1.912 -1.912)" fill="#2bb8a6"/> | ||||
|     <path id="Path_15" data-name="Path 15" d="M17.351,3.725V1.681A.681.681,0,0,0,16.669,1H1.681A.681.681,0,0,0,1,1.681V16.669a.681.681,0,0,0,.681.681H3.725V5.769A2.044,2.044,0,0,1,5.769,3.725Z" fill="#2bb8a6"/> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 694 B | 
| @ -0,0 +1,14 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" width="17.232" height="19.606" viewBox="0 0 17.232 19.606"> | ||||
|   <g id="user_19_" data-name="user (19)" transform="translate(-31)"> | ||||
|     <g id="Group_7233" data-name="Group 7233" transform="translate(34.446)"> | ||||
|       <g id="Group_7232" data-name="Group 7232"> | ||||
|         <path id="Path_16" data-name="Path 16" d="M126.17,0a5.17,5.17,0,1,0,5.169,5.17A5.175,5.175,0,0,0,126.17,0Z" transform="translate(-121)" fill="#2bb8a6"/> | ||||
|       </g> | ||||
|     </g> | ||||
|     <g id="Group_7235" data-name="Group 7235" transform="translate(31 11.488)"> | ||||
|       <g id="Group_7234" data-name="Group 7234"> | ||||
|         <path id="Path_17" data-name="Path 17" d="M46.048,302.228A7.369,7.369,0,0,0,40.765,300h-2.3a7.37,7.37,0,0,0-5.283,2.228A7.534,7.534,0,0,0,31,307.544a.574.574,0,0,0,.574.574H47.657a.574.574,0,0,0,.574-.574A7.534,7.534,0,0,0,46.048,302.228Z" transform="translate(-31 -300)" fill="#2bb8a6"/> | ||||
|       </g> | ||||
|     </g> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 936 B | 
| @ -0,0 +1,34 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" width="22.515" height="19.099" viewBox="0 0 22.515 19.099"> | ||||
|   <g id="group_2_" data-name="group (2)" transform="translate(0 -38.84)"> | ||||
|     <g id="Group_7238" data-name="Group 7238" transform="translate(17.523 49.151)"> | ||||
|       <g id="Group_7237" data-name="Group 7237" transform="translate(0 0)"> | ||||
|         <path id="Path_23" data-name="Path 23" d="M400.235,273.32h-1.741a4.53,4.53,0,0,1,.274,1.557v6.581a1.94,1.94,0,0,1-.112.65h2.879a1.952,1.952,0,0,0,1.95-1.95V276.57A3.254,3.254,0,0,0,400.235,273.32Z" transform="translate(-398.494 -273.32)" fill="#2bb8a6"/> | ||||
|       </g> | ||||
|     </g> | ||||
|     <g id="Group_7240" data-name="Group 7240" transform="translate(0 49.151)"> | ||||
|       <g id="Group_7239" data-name="Group 7239"> | ||||
|         <path id="Path_24" data-name="Path 24" d="M4.717,274.878a4.529,4.529,0,0,1,.274-1.557H3.25A3.254,3.254,0,0,0,0,276.571v3.587a1.952,1.952,0,0,0,1.95,1.95H4.829a1.941,1.941,0,0,1-.112-.65Z" transform="translate(0 -273.321)" fill="#2bb8a6"/> | ||||
|       </g> | ||||
|     </g> | ||||
|     <g id="Group_7242" data-name="Group 7242" transform="translate(6.017 47.458)"> | ||||
|       <g id="Group_7241" data-name="Group 7241" transform="translate(0 0)"> | ||||
|         <path id="Path_25" data-name="Path 25" d="M144.06,234.815h-3.981a3.254,3.254,0,0,0-3.25,3.25v6.581a.65.65,0,0,0,.65.65h9.181a.65.65,0,0,0,.65-.65v-6.581A3.254,3.254,0,0,0,144.06,234.815Z" transform="translate(-136.829 -234.815)" fill="#2bb8a6"/> | ||||
|       </g> | ||||
|     </g> | ||||
|     <g id="Group_7244" data-name="Group 7244" transform="translate(7.349 38.84)"> | ||||
|       <g id="Group_7243" data-name="Group 7243" transform="translate(0 0)"> | ||||
|         <path id="Path_26" data-name="Path 26" d="M171.023,38.84a3.908,3.908,0,1,0,3.909,3.909A3.913,3.913,0,0,0,171.023,38.84Z" transform="translate(-167.114 -38.84)" fill="#2bb8a6"/> | ||||
|       </g> | ||||
|     </g> | ||||
|     <g id="Group_7246" data-name="Group 7246" transform="translate(1.471 42.483)"> | ||||
|       <g id="Group_7245" data-name="Group 7245" transform="translate(0 0)"> | ||||
|         <path id="Path_27" data-name="Path 27" d="M36.366,121.689a2.922,2.922,0,1,0,2.923,2.923A2.926,2.926,0,0,0,36.366,121.689Z" transform="translate(-33.443 -121.689)" fill="#2bb8a6"/> | ||||
|       </g> | ||||
|     </g> | ||||
|     <g id="Group_7248" data-name="Group 7248" transform="translate(15.198 42.483)"> | ||||
|       <g id="Group_7247" data-name="Group 7247" transform="translate(0 0)"> | ||||
|         <path id="Path_28" data-name="Path 28" d="M348.53,121.689a2.923,2.923,0,1,0,2.923,2.923A2.926,2.926,0,0,0,348.53,121.689Z" transform="translate(-345.607 -121.689)" fill="#2bb8a6"/> | ||||
|       </g> | ||||
|     </g> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 2.5 KiB | 
| @ -0,0 +1,8 @@ | ||||
| <svg xmlns="http://www.w3.org/2000/svg" width="18.591" height="22" viewBox="0 0 18.591 22"> | ||||
|   <g id="calendar_26_" data-name="calendar (26)" transform="translate(-7.31 -1.5)"> | ||||
|     <path id="Path_18" data-name="Path 18" d="M7.31,42.646a1.5,1.5,0,0,0,1.5,1.5h15.6a1.5,1.5,0,0,0,1.5-1.5V30.71H7.31Zm12.874-8.759H22.61v2.426H20.184Zm0,4.124H22.61v2.426H20.184Zm-4.79-4.124h2.423v2.426H15.394Zm0,4.124h2.423v2.426H15.394Zm-4.8-4.124h2.426v2.426H10.6Zm0,4.124h2.426v2.426H10.6Z" transform="translate(0 -20.642)" fill="#2bb8a6"/> | ||||
|     <path id="Path_19" data-name="Path 19" d="M54.364,6.4a.264.264,0,0,0,.264-.264V1.764a.264.264,0,1,0-.528,0V6.141a.264.264,0,0,0,.264.264Z" transform="translate(-33.065)" fill="#2bb8a6"/> | ||||
|     <path id="Path_20" data-name="Path 20" d="M24.405,9.4H22.082v2.323a.795.795,0,0,1-1.59,0V9.4H12.716v2.323a.795.795,0,1,1-1.587,0V9.4H8.806a1.5,1.5,0,0,0-1.5,1.5v4.227H25.9V10.9a1.5,1.5,0,0,0-1.5-1.5Z" transform="translate(0 -5.583)" fill="#2bb8a6"/> | ||||
|     <path id="Path_21" data-name="Path 21" d="M22.364,6.465a.264.264,0,0,0,.267-.264V1.824a.267.267,0,0,0-.531,0V6.2a.264.264,0,0,0,.264.264Z" transform="translate(-10.452 -0.06)" fill="#2bb8a6"/> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 1.2 KiB | 
| @ -0,0 +1,149 @@ | ||||
| 
 | ||||
| 
 | ||||
| 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/dashboard/get_attendance_tracking_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart'; | ||||
| import 'package:mohem_flutter_app/models/generic_response_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_day_hours_type_details_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/my_team/get_employee_subordinates_list.dart'; | ||||
| import 'package:mohem_flutter_app/models/worklist/get_favorite_replacements_model.dart'; | ||||
| 
 | ||||
| class MyTeamApiClient { | ||||
|   static final MyTeamApiClient _instance = MyTeamApiClient._internal(); | ||||
| 
 | ||||
|   MyTeamApiClient._internal(); | ||||
| 
 | ||||
|   factory MyTeamApiClient() => _instance; | ||||
| 
 | ||||
| 
 | ||||
|   Future<List<GetEmployeeSubordinatesList>> getEmployeeSubordinates(String searchEmpEmail, String searchEmpName, String searchEmpNo) async { | ||||
|     String url = "${ApiConsts.erpRest}GET_EMPLOYEE_SUBORDINATES"; | ||||
|     Map<String, dynamic> postParams = { | ||||
|       "P_PAGE_LIMIT": 50, | ||||
|       "P_PAGE_NUM": 1, | ||||
|       "P_SEARCH_EMAIL_ADDRESS": searchEmpEmail, | ||||
|       "P_SEARCH_EMPLOYEE_DISPLAY_NAME": searchEmpName, | ||||
|       "P_SEARCH_EMPLOYEE_NUMBER": searchEmpNo, | ||||
|     }; | ||||
|     postParams.addAll(AppState().postParamsJson); | ||||
|     return await ApiClient().postJsonForObject((json) { | ||||
|       GenericResponseModel? responseData = GenericResponseModel.fromJson(json); | ||||
|       return responseData.getEmployeeSubordinatesList ?? []; | ||||
|     }, url, postParams); | ||||
|   } | ||||
| 
 | ||||
|   Future<GetTimeCardSummaryList?> getTimeCardSummary(String month, int year, String? empID) async { | ||||
|     String url = "${ApiConsts.erpRest}GET_TIME_CARD_SUMMARY"; | ||||
|     Map<String, dynamic> postParams = { | ||||
|       "P_MENU_TYPE": "M", | ||||
|       "P_SELECTED_RESP_ID": -999, | ||||
|       "SearchMonth": month, | ||||
|       "SearchYear": year, | ||||
|     }; | ||||
| 
 | ||||
|     postParams.addAll(AppState().postParamsJson); | ||||
|     postParams['P_SELECTED_EMPLOYEE_NUMBER'] = empID; | ||||
|     return await ApiClient().postJsonForObject((json) { | ||||
|       GenericResponseModel? responseData = GenericResponseModel.fromJson(json); | ||||
|       return (responseData.getTimeCardSummaryList?.length ?? 0) > 0 ? responseData.getTimeCardSummaryList!.first : null; | ||||
|     }, url, postParams); | ||||
|   } | ||||
| 
 | ||||
|   Future<List<GetDayHoursTypeDetailsList>> getDayHoursTypeDetails(String month, int year, String? empID) async { | ||||
|     String url = "${ApiConsts.erpRest}GET_DAY_HOURS_TYPE_DETAILS"; | ||||
|     Map<String, dynamic> postParams = { | ||||
|       "P_MENU_TYPE": "M", | ||||
|       "P_PAGE_LIMIT": 100, | ||||
|       "P_PAGE_NUM": 1, | ||||
|       "P_SELECTED_RESP_ID": -999, | ||||
|       "SearchMonth": month, | ||||
|       "SearchYear": year, | ||||
|     }; | ||||
|     postParams.addAll(AppState().postParamsJson); | ||||
|     postParams['P_SELECTED_EMPLOYEE_NUMBER'] = empID; | ||||
|     return await ApiClient().postJsonForObject((json) { | ||||
|       GenericResponseModel? responseData = GenericResponseModel.fromJson(json); | ||||
|       print(responseData.getDayHoursTypeDetailsList!.length); | ||||
|       return responseData.getDayHoursTypeDetailsList ?? []; | ||||
|     }, url, postParams); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
|   Future<GetAttendanceTracking?> getAttendanceTracking(String? empID) async { | ||||
|     String url = "${ApiConsts.erpRest}GET_Attendance_Tracking"; | ||||
|     Map<String, dynamic> postParams = {}; | ||||
|     postParams.addAll(AppState().postParamsJson); | ||||
|     postParams['P_SELECTED_EMPLOYEE_NUMBER'] = empID; | ||||
|     return await ApiClient().postJsonForObject((json) { | ||||
|       GenericResponseModel? responseData = GenericResponseModel.fromJson(json); | ||||
|       print(responseData.getAttendanceTrackingList); | ||||
|       return responseData.getAttendanceTrackingList; | ||||
|     }, url, postParams); | ||||
|   } | ||||
| 
 | ||||
|   Future<List<GetEmployeeSubordinatesList>> employeeSubordinates(String searchEmpEmail, String searchEmpName, String searchEmpNo, String? empID) async { | ||||
|     String url = "${ApiConsts.erpRest}GET_EMPLOYEE_SUBORDINATES"; | ||||
|     Map<String, dynamic> postParams = { | ||||
|       "P_PAGE_LIMIT": 50, | ||||
|       "P_PAGE_NUM": 1, | ||||
|       "P_SEARCH_EMAIL_ADDRESS": searchEmpEmail, | ||||
|       "P_SEARCH_EMPLOYEE_DISPLAY_NAME": searchEmpName, | ||||
|       "P_SEARCH_EMPLOYEE_NUMBER": searchEmpNo, | ||||
|     }; | ||||
|     postParams.addAll(AppState().postParamsJson); | ||||
|     postParams['P_SELECTED_EMPLOYEE_NUMBER'] = empID; | ||||
|     return await ApiClient().postJsonForObject((json) { | ||||
|       GenericResponseModel? responseData = GenericResponseModel.fromJson(json); | ||||
|       return responseData.getEmployeeSubordinatesList ?? []; | ||||
|     }, url, postParams); | ||||
|   } | ||||
| 
 | ||||
|   Future<List<GetMenuEntriesList>> employeeSubordinatesRequest(String? empID) async { | ||||
|     String url = "${ApiConsts.erpRest}GET_MENU_ENTRIES"; | ||||
|     Map<String, dynamic> postParams = { | ||||
|       "P_MENU_TYPE": "M", | ||||
|       "P_SELECTED_RESP_ID": -999, | ||||
|     }; | ||||
|     postParams.addAll(AppState().postParamsJson); | ||||
|     postParams['P_SELECTED_EMPLOYEE_NUMBER'] = empID; | ||||
|     return await ApiClient().postJsonForObject((json) { | ||||
|       GenericResponseModel? responseData = GenericResponseModel.fromJson(json); | ||||
|       return responseData.getMenuEntriesList ?? []; | ||||
|     }, url, postParams); | ||||
|   } | ||||
| 
 | ||||
|   Future<List<GetFavoriteReplacements>?> getFavoriteReplacement() async { | ||||
|     String url = "${ApiConsts.erpRest}Mohemm_GetFavoriteReplacements"; | ||||
|     Map<String, dynamic> postParams = { | ||||
|     }; | ||||
|     postParams.addAll(AppState().postParamsJson); | ||||
|     return await ApiClient().postJsonForObject((json) { | ||||
|       GenericResponseModel responseData = GenericResponseModel.fromJson(json); | ||||
|       return responseData.mohemmGetFavoriteReplacementsList; | ||||
|     }, url, postParams); | ||||
|   } | ||||
| 
 | ||||
|   Future<GenericResponseModel> changeFavoriteReplacements({required String email, required String employeName, required String image, required String userName, bool isFav = false}) async { | ||||
|     String url = "${ApiConsts.erpRest}Mohemm_ChangeFavoriteReplacements"; | ||||
|     Map<String, dynamic> postParamsObj = { | ||||
|       "EMAIL_ADDRESS": email, | ||||
|       "EMPLOYEE_DISPLAY_NAME": employeName, | ||||
|       "EMPLOYEE_IMAGE": image, | ||||
|       "IsFavorite": isFav, | ||||
|       "USER_NAME": userName, | ||||
|     }; | ||||
|     Map<String, dynamic> postParams = { | ||||
|       "Mohemm_ChangeReplacementsInputList": [postParamsObj], | ||||
|     //postParams["Mohemm_ChangeReplacementsInputList"] = list; | ||||
|     }; | ||||
|     postParams.addAll(AppState().postParamsJson); | ||||
|     return await ApiClient().postJsonForObject((json) { | ||||
|       GenericResponseModel responseData = GenericResponseModel.fromJson(json); | ||||
|       return responseData; | ||||
|     }, url, postParams); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| @ -0,0 +1,35 @@ | ||||
| 
 | ||||
| 
 | ||||
| class GetUserItemTypesList { | ||||
|   String? fYAENABLEDFALG; | ||||
|   String? fYIENABLEDFLAG; | ||||
|   String? iTEMTYPE; | ||||
|   int? uSERITEMTYPEID; | ||||
|   bool? isFYI; | ||||
|   bool? isFYA; | ||||
| 
 | ||||
|   GetUserItemTypesList( | ||||
|       {this.fYAENABLEDFALG, | ||||
|         this.fYIENABLEDFLAG, | ||||
|         this.iTEMTYPE, | ||||
|         this.uSERITEMTYPEID, | ||||
|       this.isFYI, | ||||
|         this.isFYA | ||||
|       }); | ||||
| 
 | ||||
|   GetUserItemTypesList.fromJson(Map<String, dynamic> json) { | ||||
|     fYAENABLEDFALG = json['FYA_ENABLED_FALG']; | ||||
|     fYIENABLEDFLAG = json['FYI_ENABLED_FLAG']; | ||||
|     iTEMTYPE = json['ITEM_TYPE']; | ||||
|     uSERITEMTYPEID = json['USER_ITEM_TYPE_ID']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final 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; | ||||
|     data['USER_ITEM_TYPE_ID'] = this.uSERITEMTYPEID; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,58 @@ | ||||
| 
 | ||||
| 
 | ||||
| class GetAttendanceTrackingList { | ||||
|   String? pBREAKHOURS; | ||||
|   String? pLATEINHOURS; | ||||
|   String? pREMAININGHOURS; | ||||
|   String? pRETURNMSG; | ||||
|   String? pRETURNSTATUS; | ||||
|   String? pSCHEDULEDHOURS; | ||||
|   String? pSHTNAME; | ||||
|   String? pSPENTHOURS; | ||||
|   String? pSWIPESEXEMPTEDFLAG; | ||||
|   Null? pSWIPEIN; | ||||
|   Null? pSWIPEOUT; | ||||
| 
 | ||||
|   GetAttendanceTrackingList( | ||||
|       {this.pBREAKHOURS, | ||||
|         this.pLATEINHOURS, | ||||
|         this.pREMAININGHOURS, | ||||
|         this.pRETURNMSG, | ||||
|         this.pRETURNSTATUS, | ||||
|         this.pSCHEDULEDHOURS, | ||||
|         this.pSHTNAME, | ||||
|         this.pSPENTHOURS, | ||||
|         this.pSWIPESEXEMPTEDFLAG, | ||||
|         this.pSWIPEIN, | ||||
|         this.pSWIPEOUT}); | ||||
| 
 | ||||
|   GetAttendanceTrackingList.fromJson(Map<String, dynamic> json) { | ||||
|     pBREAKHOURS = json['P_BREAK_HOURS']; | ||||
|     pLATEINHOURS = json['P_LATE_IN_HOURS']; | ||||
|     pREMAININGHOURS = json['P_REMAINING_HOURS']; | ||||
|     pRETURNMSG = json['P_RETURN_MSG']; | ||||
|     pRETURNSTATUS = json['P_RETURN_STATUS']; | ||||
|     pSCHEDULEDHOURS = json['P_SCHEDULED_HOURS']; | ||||
|     pSHTNAME = json['P_SHT_NAME']; | ||||
|     pSPENTHOURS = json['P_SPENT_HOURS']; | ||||
|     pSWIPESEXEMPTEDFLAG = json['P_SWIPES_EXEMPTED_FLAG']; | ||||
|     pSWIPEIN = json['P_SWIPE_IN']; | ||||
|     pSWIPEOUT = json['P_SWIPE_OUT']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final 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; | ||||
|     data['P_RETURN_MSG'] = this.pRETURNMSG; | ||||
|     data['P_RETURN_STATUS'] = this.pRETURNSTATUS; | ||||
|     data['P_SCHEDULED_HOURS'] = this.pSCHEDULEDHOURS; | ||||
|     data['P_SHT_NAME'] = this.pSHTNAME; | ||||
|     data['P_SPENT_HOURS'] = this.pSPENTHOURS; | ||||
|     data['P_SWIPES_EXEMPTED_FLAG'] = this.pSWIPESEXEMPTEDFLAG; | ||||
|     data['P_SWIPE_IN'] = this.pSWIPEIN; | ||||
|     data['P_SWIPE_OUT'] = this.pSWIPEOUT; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,313 @@ | ||||
| 
 | ||||
| class GetEmployeeSubordinatesList { | ||||
|   String? aCTUALTERMINATIONDATE; | ||||
|   String? aSSIGNMENTENDDATE; | ||||
|   int? aSSIGNMENTID; | ||||
|   String? aSSIGNMENTNUMBER; | ||||
|   String? aSSIGNMENTSTARTDATE; | ||||
|   int? aSSIGNMENTSTATUSTYPEID; | ||||
|   String? aSSIGNMENTTYPE; | ||||
|   int? bUSINESSGROUPID; | ||||
|   String? bUSINESSGROUPNAME; | ||||
|   String? cURRENTEMPLOYEEFLAG; | ||||
|   String? eMPLOYEEDISPLAYNAME; | ||||
|   String? eMPLOYEEEMAILADDRESS; | ||||
|   String? eMPLOYEEIMAGE; | ||||
|   String? eMPLOYEEMOBILENUMBER; | ||||
|   String? eMPLOYEENAME; | ||||
|   String? eMPLOYEENUMBER; | ||||
|   String? eMPLOYEEWORKNUMBER; | ||||
|   String? eMPLOYMENTCATEGORY; | ||||
|   String? eMPLOYMENTCATEGORYMEANING; | ||||
|   String? fREQUENCY; | ||||
|   String? fREQUENCYMEANING; | ||||
|   int? fROMROWNUM; | ||||
|   dynamic? gRADEID; | ||||
|   dynamic? gRADENAME; | ||||
|   dynamic? genderCode; | ||||
|   dynamic? genderMeaning; | ||||
|   String? hIREDATE; | ||||
|   bool? isFavorite; | ||||
|   int? jOBID; | ||||
|   String? jOBNAME; | ||||
|   int? lOCATIONID; | ||||
|   String? lOCATIONNAME; | ||||
|   String? mANUALTIMECARDFLAG; | ||||
|   String? mANUALTIMECARDMEANING; | ||||
|   String? nATIONALITYCODE; | ||||
|   String? nATIONALITYMEANING; | ||||
|   String? nATIONALIDENTIFIER; | ||||
|   dynamic? nORMALHOURS; | ||||
|   int? nOOFROWS; | ||||
|   int? nUMOFSUBORDINATES; | ||||
|   int? oRGANIZATIONID; | ||||
|   String? oRGANIZATIONNAME; | ||||
|   String? pAYROLLCODE; | ||||
|   int? pAYROLLID; | ||||
|   String? pAYROLLNAME; | ||||
|   int? pERSONID; | ||||
|   String? pERSONTYPE; | ||||
|   int? pERSONTYPEID; | ||||
|   String? pERINFORMATIONCATEGORY; | ||||
|   int? pOSITIONID; | ||||
|   String? pOSITIONNAME; | ||||
|   String? pRIMARYFLAG; | ||||
|   int? rOWNUM; | ||||
|   int? sERVICEDAYS; | ||||
|   int? sERVICEMONTHS; | ||||
|   int? sERVICEYEARS; | ||||
|   String? sUPERVISORASSIGNMENTID; | ||||
|   String? sUPERVISORDISPLAYNAME; | ||||
|   String? sUPERVISOREMAILADDRESS; | ||||
|   int? sUPERVISORID; | ||||
|   String? sUPERVISORMOBILENUMBER; | ||||
|   String? sUPERVISORNAME; | ||||
|   String? sUPERVISORNUMBER; | ||||
|   String? sUPERVISORWORKNUMBER; | ||||
|   String? sWIPESEXEMPTEDFLAG; | ||||
|   String? sWIPESEXEMPTEDMEANING; | ||||
|   String? sYSTEMPERSONTYPE; | ||||
|   String? tKEMAILADDRESS; | ||||
|   String? tKEMPLOYEEDISPLAYNAME; | ||||
|   String? tKEMPLOYEENAME; | ||||
|   String? tKEMPLOYEENUMBER; | ||||
|   int? tKPERSONID; | ||||
|   int? tOROWNUM; | ||||
|   String? uNITNUMBER; | ||||
|   String? uSERSTATUS; | ||||
| 
 | ||||
|   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}); | ||||
| 
 | ||||
|   GetEmployeeSubordinatesList.fromJson(Map<String, dynamic> json) { | ||||
|     aCTUALTERMINATIONDATE = json['ACTUAL_TERMINATION_DATE']; | ||||
|     aSSIGNMENTENDDATE = json['ASSIGNMENT_END_DATE']; | ||||
|     aSSIGNMENTID = json['ASSIGNMENT_ID']; | ||||
|     aSSIGNMENTNUMBER = json['ASSIGNMENT_NUMBER']; | ||||
|     aSSIGNMENTSTARTDATE = json['ASSIGNMENT_START_DATE']; | ||||
|     aSSIGNMENTSTATUSTYPEID = json['ASSIGNMENT_STATUS_TYPE_ID']; | ||||
|     aSSIGNMENTTYPE = json['ASSIGNMENT_TYPE']; | ||||
|     bUSINESSGROUPID = json['BUSINESS_GROUP_ID']; | ||||
|     bUSINESSGROUPNAME = json['BUSINESS_GROUP_NAME']; | ||||
|     cURRENTEMPLOYEEFLAG = json['CURRENT_EMPLOYEE_FLAG']; | ||||
|     eMPLOYEEDISPLAYNAME = json['EMPLOYEE_DISPLAY_NAME']; | ||||
|     eMPLOYEEEMAILADDRESS = json['EMPLOYEE_EMAIL_ADDRESS']; | ||||
|     eMPLOYEEIMAGE = json['EMPLOYEE_IMAGE']; | ||||
|     eMPLOYEEMOBILENUMBER = json['EMPLOYEE_MOBILE_NUMBER']; | ||||
|     eMPLOYEENAME = json['EMPLOYEE_NAME']; | ||||
|     eMPLOYEENUMBER = json['EMPLOYEE_NUMBER']; | ||||
|     eMPLOYEEWORKNUMBER = json['EMPLOYEE_WORK_NUMBER']; | ||||
|     eMPLOYMENTCATEGORY = json['EMPLOYMENT_CATEGORY']; | ||||
|     eMPLOYMENTCATEGORYMEANING = json['EMPLOYMENT_CATEGORY_MEANING']; | ||||
|     fREQUENCY = json['FREQUENCY']; | ||||
|     fREQUENCYMEANING = json['FREQUENCY_MEANING']; | ||||
|     fROMROWNUM = json['FROM_ROW_NUM']; | ||||
|     gRADEID = json['GRADE_ID']; | ||||
|     gRADENAME = json['GRADE_NAME']; | ||||
|     genderCode = json['GenderCode']; | ||||
|     genderMeaning = json['GenderMeaning']; | ||||
|     hIREDATE = json['HIRE_DATE']; | ||||
|     isFavorite = json['IsFavorite']; | ||||
|     jOBID = json['JOB_ID']; | ||||
|     jOBNAME = json['JOB_NAME']; | ||||
|     lOCATIONID = json['LOCATION_ID']; | ||||
|     lOCATIONNAME = json['LOCATION_NAME']; | ||||
|     mANUALTIMECARDFLAG = json['MANUAL_TIMECARD_FLAG']; | ||||
|     mANUALTIMECARDMEANING = json['MANUAL_TIMECARD_MEANING']; | ||||
|     nATIONALITYCODE = json['NATIONALITY_CODE']; | ||||
|     nATIONALITYMEANING = json['NATIONALITY_MEANING']; | ||||
|     nATIONALIDENTIFIER = json['NATIONAL_IDENTIFIER']; | ||||
|     nORMALHOURS = json['NORMAL_HOURS']; | ||||
|     nOOFROWS = json['NO_OF_ROWS']; | ||||
|     nUMOFSUBORDINATES = json['NUM_OF_SUBORDINATES']; | ||||
|     oRGANIZATIONID = json['ORGANIZATION_ID']; | ||||
|     oRGANIZATIONNAME = json['ORGANIZATION_NAME']; | ||||
|     pAYROLLCODE = json['PAYROLL_CODE']; | ||||
|     pAYROLLID = json['PAYROLL_ID']; | ||||
|     pAYROLLNAME = json['PAYROLL_NAME']; | ||||
|     pERSONID = json['PERSON_ID']; | ||||
|     pERSONTYPE = json['PERSON_TYPE']; | ||||
|     pERSONTYPEID = json['PERSON_TYPE_ID']; | ||||
|     pERINFORMATIONCATEGORY = json['PER_INFORMATION_CATEGORY']; | ||||
|     pOSITIONID = json['POSITION_ID']; | ||||
|     pOSITIONNAME = json['POSITION_NAME']; | ||||
|     pRIMARYFLAG = json['PRIMARY_FLAG']; | ||||
|     rOWNUM = json['ROW_NUM']; | ||||
|     sERVICEDAYS = json['SERVICE_DAYS']; | ||||
|     sERVICEMONTHS = json['SERVICE_MONTHS']; | ||||
|     sERVICEYEARS = json['SERVICE_YEARS']; | ||||
|     sUPERVISORASSIGNMENTID = json['SUPERVISOR_ASSIGNMENT_ID']; | ||||
|     sUPERVISORDISPLAYNAME = json['SUPERVISOR_DISPLAY_NAME']; | ||||
|     sUPERVISOREMAILADDRESS = json['SUPERVISOR_EMAIL_ADDRESS']; | ||||
|     sUPERVISORID = json['SUPERVISOR_ID']; | ||||
|     sUPERVISORMOBILENUMBER = json['SUPERVISOR_MOBILE_NUMBER']; | ||||
|     sUPERVISORNAME = json['SUPERVISOR_NAME']; | ||||
|     sUPERVISORNUMBER = json['SUPERVISOR_NUMBER']; | ||||
|     sUPERVISORWORKNUMBER = json['SUPERVISOR_WORK_NUMBER']; | ||||
|     sWIPESEXEMPTEDFLAG = json['SWIPES_EXEMPTED_FLAG']; | ||||
|     sWIPESEXEMPTEDMEANING = json['SWIPES_EXEMPTED_MEANING']; | ||||
|     sYSTEMPERSONTYPE = json['SYSTEM_PERSON_TYPE']; | ||||
|     tKEMAILADDRESS = json['TK_EMAIL_ADDRESS']; | ||||
|     tKEMPLOYEEDISPLAYNAME = json['TK_EMPLOYEE_DISPLAY_NAME']; | ||||
|     tKEMPLOYEENAME = json['TK_EMPLOYEE_NAME']; | ||||
|     tKEMPLOYEENUMBER = json['TK_EMPLOYEE_NUMBER']; | ||||
|     tKPERSONID = json['TK_PERSON_ID']; | ||||
|     tOROWNUM = json['TO_ROW_NUM']; | ||||
|     uNITNUMBER = json['UNIT_NUMBER']; | ||||
|     uSERSTATUS = json['USER_STATUS']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final 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; | ||||
|     data['ASSIGNMENT_NUMBER'] = this.aSSIGNMENTNUMBER; | ||||
|     data['ASSIGNMENT_START_DATE'] = this.aSSIGNMENTSTARTDATE; | ||||
|     data['ASSIGNMENT_STATUS_TYPE_ID'] = this.aSSIGNMENTSTATUSTYPEID; | ||||
|     data['ASSIGNMENT_TYPE'] = this.aSSIGNMENTTYPE; | ||||
|     data['BUSINESS_GROUP_ID'] = this.bUSINESSGROUPID; | ||||
|     data['BUSINESS_GROUP_NAME'] = this.bUSINESSGROUPNAME; | ||||
|     data['CURRENT_EMPLOYEE_FLAG'] = this.cURRENTEMPLOYEEFLAG; | ||||
|     data['EMPLOYEE_DISPLAY_NAME'] = this.eMPLOYEEDISPLAYNAME; | ||||
|     data['EMPLOYEE_EMAIL_ADDRESS'] = this.eMPLOYEEEMAILADDRESS; | ||||
|     data['EMPLOYEE_IMAGE'] = this.eMPLOYEEIMAGE; | ||||
|     data['EMPLOYEE_MOBILE_NUMBER'] = this.eMPLOYEEMOBILENUMBER; | ||||
|     data['EMPLOYEE_NAME'] = this.eMPLOYEENAME; | ||||
|     data['EMPLOYEE_NUMBER'] = this.eMPLOYEENUMBER; | ||||
|     data['EMPLOYEE_WORK_NUMBER'] = this.eMPLOYEEWORKNUMBER; | ||||
|     data['EMPLOYMENT_CATEGORY'] = this.eMPLOYMENTCATEGORY; | ||||
|     data['EMPLOYMENT_CATEGORY_MEANING'] = this.eMPLOYMENTCATEGORYMEANING; | ||||
|     data['FREQUENCY'] = this.fREQUENCY; | ||||
|     data['FREQUENCY_MEANING'] = this.fREQUENCYMEANING; | ||||
|     data['FROM_ROW_NUM'] = this.fROMROWNUM; | ||||
|     data['GRADE_ID'] = this.gRADEID; | ||||
|     data['GRADE_NAME'] = this.gRADENAME; | ||||
|     data['GenderCode'] = this.genderCode; | ||||
|     data['GenderMeaning'] = this.genderMeaning; | ||||
|     data['HIRE_DATE'] = this.hIREDATE; | ||||
|     data['IsFavorite'] = this.isFavorite; | ||||
|     data['JOB_ID'] = this.jOBID; | ||||
|     data['JOB_NAME'] = this.jOBNAME; | ||||
|     data['LOCATION_ID'] = this.lOCATIONID; | ||||
|     data['LOCATION_NAME'] = this.lOCATIONNAME; | ||||
|     data['MANUAL_TIMECARD_FLAG'] = this.mANUALTIMECARDFLAG; | ||||
|     data['MANUAL_TIMECARD_MEANING'] = this.mANUALTIMECARDMEANING; | ||||
|     data['NATIONALITY_CODE'] = this.nATIONALITYCODE; | ||||
|     data['NATIONALITY_MEANING'] = this.nATIONALITYMEANING; | ||||
|     data['NATIONAL_IDENTIFIER'] = this.nATIONALIDENTIFIER; | ||||
|     data['NORMAL_HOURS'] = this.nORMALHOURS; | ||||
|     data['NO_OF_ROWS'] = this.nOOFROWS; | ||||
|     data['NUM_OF_SUBORDINATES'] = this.nUMOFSUBORDINATES; | ||||
|     data['ORGANIZATION_ID'] = this.oRGANIZATIONID; | ||||
|     data['ORGANIZATION_NAME'] = this.oRGANIZATIONNAME; | ||||
|     data['PAYROLL_CODE'] = this.pAYROLLCODE; | ||||
|     data['PAYROLL_ID'] = this.pAYROLLID; | ||||
|     data['PAYROLL_NAME'] = this.pAYROLLNAME; | ||||
|     data['PERSON_ID'] = this.pERSONID; | ||||
|     data['PERSON_TYPE'] = this.pERSONTYPE; | ||||
|     data['PERSON_TYPE_ID'] = this.pERSONTYPEID; | ||||
|     data['PER_INFORMATION_CATEGORY'] = this.pERINFORMATIONCATEGORY; | ||||
|     data['POSITION_ID'] = this.pOSITIONID; | ||||
|     data['POSITION_NAME'] = this.pOSITIONNAME; | ||||
|     data['PRIMARY_FLAG'] = this.pRIMARYFLAG; | ||||
|     data['ROW_NUM'] = this.rOWNUM; | ||||
|     data['SERVICE_DAYS'] = this.sERVICEDAYS; | ||||
|     data['SERVICE_MONTHS'] = this.sERVICEMONTHS; | ||||
|     data['SERVICE_YEARS'] = this.sERVICEYEARS; | ||||
|     data['SUPERVISOR_ASSIGNMENT_ID'] = this.sUPERVISORASSIGNMENTID; | ||||
|     data['SUPERVISOR_DISPLAY_NAME'] = this.sUPERVISORDISPLAYNAME; | ||||
|     data['SUPERVISOR_EMAIL_ADDRESS'] = this.sUPERVISOREMAILADDRESS; | ||||
|     data['SUPERVISOR_ID'] = this.sUPERVISORID; | ||||
|     data['SUPERVISOR_MOBILE_NUMBER'] = this.sUPERVISORMOBILENUMBER; | ||||
|     data['SUPERVISOR_NAME'] = this.sUPERVISORNAME; | ||||
|     data['SUPERVISOR_NUMBER'] = this.sUPERVISORNUMBER; | ||||
|     data['SUPERVISOR_WORK_NUMBER'] = this.sUPERVISORWORKNUMBER; | ||||
|     data['SWIPES_EXEMPTED_FLAG'] = this.sWIPESEXEMPTEDFLAG; | ||||
|     data['SWIPES_EXEMPTED_MEANING'] = this.sWIPESEXEMPTEDMEANING; | ||||
|     data['SYSTEM_PERSON_TYPE'] = this.sYSTEMPERSONTYPE; | ||||
|     data['TK_EMAIL_ADDRESS'] = this.tKEMAILADDRESS; | ||||
|     data['TK_EMPLOYEE_DISPLAY_NAME'] = this.tKEMPLOYEEDISPLAYNAME; | ||||
|     data['TK_EMPLOYEE_NAME'] = this.tKEMPLOYEENAME; | ||||
|     data['TK_EMPLOYEE_NUMBER'] = this.tKEMPLOYEENUMBER; | ||||
|     data['TK_PERSON_ID'] = this.tKPERSONID; | ||||
|     data['TO_ROW_NUM'] = this.tOROWNUM; | ||||
|     data['UNIT_NUMBER'] = this.uNITNUMBER; | ||||
|     data['USER_STATUS'] = this.uSERSTATUS; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,25 @@ | ||||
| 
 | ||||
| 
 | ||||
| class UpdateItemTypeSuccessList { | ||||
|   int? itemID; | ||||
|   String? updateError; | ||||
|   bool? updateSuccess; | ||||
| 
 | ||||
|   UpdateItemTypeSuccessList( | ||||
|       {this.itemID, this.updateError, this.updateSuccess}); | ||||
| 
 | ||||
|   UpdateItemTypeSuccessList.fromJson(Map<String, dynamic> json) { | ||||
|     itemID = json['ItemID']; | ||||
|     updateError = json['UpdateError']; | ||||
|     updateSuccess = json['UpdateSuccess']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['ItemID'] = this.itemID; | ||||
|     data['UpdateError'] = this.updateError; | ||||
|     data['UpdateSuccess'] = this.updateSuccess; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| @ -0,0 +1,20 @@ | ||||
| 
 | ||||
| 
 | ||||
| class UpdateUserItemTypesList { | ||||
|   String? pRETURNMSG; | ||||
|   String? pRETURNSTATUS; | ||||
| 
 | ||||
|   UpdateUserItemTypesList({this.pRETURNMSG, this.pRETURNSTATUS}); | ||||
| 
 | ||||
|   UpdateUserItemTypesList.fromJson(Map<String, dynamic> json) { | ||||
|     pRETURNMSG = json['P_RETURN_MSG']; | ||||
|     pRETURNSTATUS = json['P_RETURN_STATUS']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['P_RETURN_MSG'] = this.pRETURNMSG; | ||||
|     data['P_RETURN_STATUS'] = this.pRETURNSTATUS; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,28 @@ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 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) { | ||||
|     itemID = json['ItemID']; | ||||
|     pFYAENABLEDFALG = json['P_FYAENABLED_FALG']; | ||||
|     pFYIENABLEDFALG = json['P_FYIENABLED_FALG']; | ||||
|     pITEMTYPE = json['P_ITEM_TYPE']; | ||||
|   } | ||||
| 
 | ||||
|   Map<String, dynamic> toJson() { | ||||
|     final Map<String, dynamic> data = new Map<String, dynamic>(); | ||||
|     data['ItemID'] = this.itemID; | ||||
|     data['P_FYAENABLED_FALG'] = this.pFYAENABLEDFALG; | ||||
|     data['P_FYIENABLED_FALG'] = this.pFYIENABLEDFALG; | ||||
|     data['P_ITEM_TYPE'] = this.pITEMTYPE; | ||||
|     return data; | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,95 @@ | ||||
| 
 | ||||
| import 'dart:ui'; | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:flutter_svg/flutter_svg.dart'; | ||||
| import 'package:mohem_flutter_app/api/my_team/my_team_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/my_team/get_employee_subordinates_list.dart'; | ||||
| import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; | ||||
| import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | ||||
| 
 | ||||
| class CreateRequest extends StatefulWidget { | ||||
|   const CreateRequest ({Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   _CreateRequestState createState() => _CreateRequestState(); | ||||
| } | ||||
| 
 | ||||
| class _CreateRequestState extends State<CreateRequest> { | ||||
|   String searchEmpEmail =""; | ||||
|   String searchEmpName =""; | ||||
|   String searchEmpNo = ""; | ||||
|   String? empId; | ||||
|   List<GetEmployeeSubordinatesList> getEmployeeSubordinatesList = []; | ||||
| //  late DashboardProviderModel data; | ||||
|   List<GetMenuEntriesList> getMenuEntriesList = []; | ||||
|   GetEmployeeSubordinatesList? getEmployeeSubordinates; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|   //  data.fetchMenuEntries(); | ||||
|     employeeSubRequest(); | ||||
|   } | ||||
| 
 | ||||
|   void employeeSubRequest() async { | ||||
|     try { | ||||
|       Utils.showLoading(context); | ||||
|       getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString()); | ||||
|       getMenuEntriesList = await MyTeamApiClient().employeeSubordinatesRequest(getEmployeeSubordinates?.eMPLOYEENUMBER); | ||||
|       Utils.hideLoading(context); | ||||
|       setState(() {}); | ||||
|     } catch (ex) { | ||||
|       Utils.hideLoading(context); | ||||
|       Utils.handleException(ex, context, null); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     getEmployeeSubordinates ??= ModalRoute.of(context)?.settings.arguments as GetEmployeeSubordinatesList; | ||||
|     print(getMenuEntriesList.length); | ||||
|     return Scaffold( | ||||
|       backgroundColor: Colors.white, | ||||
|       appBar: AppBarWidget( | ||||
|         context, | ||||
|         title: LocaleKeys.createRequest.tr(), | ||||
|       ), | ||||
|         body: SizedBox( | ||||
|           width: double.infinity, | ||||
|           height: double.infinity, | ||||
|           child: getMenuEntriesList.isEmpty | ||||
|               ? Utils.getNoDataWidget(context) | ||||
|               : ListView.separated( | ||||
|               padding: const EdgeInsets.all(21), | ||||
|               itemBuilder: (cxt, index) => itemView("assets/images/pdf.svg", getMenuEntriesList[index].prompt!, index).onPress(() { | ||||
|                 Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(getMenuEntriesList[index].prompt!, getMenuEntriesList[index].functionName!)); | ||||
|               }), | ||||
|               separatorBuilder: (cxt, index) => 12.height, | ||||
|               itemCount: getMenuEntriesList.length), | ||||
|         ), | ||||
| 
 | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget itemView(String icon, String title, index) { | ||||
|     return  getMenuEntriesList[index].parentMenuName !=""? Row( | ||||
|       children: [ | ||||
|         (title).toText16().expanded, 12.width, | ||||
|         SvgPicture.asset( | ||||
|           "assets/images/arrow_next.svg", | ||||
|           color: MyColors.darkIconColor, | ||||
|         ) | ||||
|       ], | ||||
|     ).objectContainerView() : SizedBox(); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,319 @@ | ||||
| import 'dart:collection'; | ||||
| import 'dart:ui'; | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:flutter_html/html_parser.dart'; | ||||
| import 'package:flutter_svg/flutter_svg.dart'; | ||||
| import 'package:mohem_flutter_app/api/my_team/my_team_api_client.dart'; | ||||
| import 'package:mohem_flutter_app/api/worklist/worklist_api_client.dart'; | ||||
| import 'package:mohem_flutter_app/classes/colors.dart'; | ||||
| import 'package:mohem_flutter_app/classes/utils.dart'; | ||||
| import 'package:mohem_flutter_app/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/generic_response_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/my_team/get_employee_subordinates_list.dart'; | ||||
| import 'package:mohem_flutter_app/models/profile_menu.model.dart'; | ||||
| import 'package:mohem_flutter_app/models/worklist/get_favorite_replacements_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/worklist/replacement_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/circular_avatar.dart'; | ||||
| import 'package:url_launcher/url_launcher.dart'; | ||||
| 
 | ||||
| class EmployeeDetails extends StatefulWidget { | ||||
|   EmployeeDetails(); | ||||
| 
 | ||||
|   @override | ||||
|   _EmployeeDetailsState createState() => _EmployeeDetailsState(); | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| class _EmployeeDetailsState extends State<EmployeeDetails> { | ||||
|   GetEmployeeSubordinatesList? getEmployeeSubordinates; | ||||
|   static List<GetMenuEntriesList> menuData = []; | ||||
|   List<ProfileMenu> menu =[]; | ||||
|   String? selectedFavLetter; | ||||
|   List<String>? favLetters; | ||||
|   List<GetFavoriteReplacements>? favUsersList; | ||||
|   List<ReplacementList>? replacementList; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|     // setState(() {}); | ||||
|   } | ||||
| 
 | ||||
|   //favorite | ||||
|   void fetchChangeFav({required String email, required String employeName, required String image, required String userName, bool isFav = false, bool isNeedToRefresh = false}) async { | ||||
|     Utils.showLoading(context); | ||||
|     getEmployeeSubordinates = ModalRoute.of(context)?.settings.arguments as GetEmployeeSubordinatesList; | ||||
|     GenericResponseModel model = await MyTeamApiClient().changeFavoriteReplacements( | ||||
|       email: email, | ||||
|       employeName: employeName, | ||||
|       image: image, | ||||
|       userName: userName, | ||||
|       isFav: isFav, | ||||
|     ); | ||||
|     getEmployeeSubordinates!.isFavorite = isFav; | ||||
|     Utils.hideLoading(context); | ||||
|     setState(() {}); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     getEmployeeSubordinates = ModalRoute.of(context)?.settings.arguments as GetEmployeeSubordinatesList; | ||||
|     setMenu(); | ||||
|     return Scaffold( | ||||
|         extendBody: true, | ||||
|         backgroundColor: MyColors.lightGreyEFColor, | ||||
|         body: Stack(children: [ | ||||
|           Container( | ||||
|             height: 200, | ||||
|             margin: EdgeInsets.only(top: 30), | ||||
|             decoration: BoxDecoration(image: DecorationImage(image: MemoryImage(Utils.getPostBytes(getEmployeeSubordinates!.eMPLOYEEIMAGE)), fit: BoxFit.cover)), | ||||
|             child: new BackdropFilter( | ||||
|               filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), | ||||
|               child: new Container( | ||||
|                 decoration: new BoxDecoration(color: Colors.white.withOpacity(0.0)), | ||||
|               ), | ||||
|             ), | ||||
|           ), | ||||
|           SingleChildScrollView( | ||||
|             scrollDirection: Axis.vertical, | ||||
|             child: Column( | ||||
|               crossAxisAlignment: CrossAxisAlignment.center, | ||||
|               children: [ | ||||
|                 80.height, | ||||
|                 Container( | ||||
|                   padding: EdgeInsets.only(left: 15, right: 15), | ||||
|                   child: Row( | ||||
|                     mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                     children: [ | ||||
|                       IconButton( | ||||
|                         onPressed: () { | ||||
|                           Navigator.pop(context); | ||||
|                         }, | ||||
|                         icon: Icon( | ||||
|                           Icons.arrow_back_ios, | ||||
|                           color: Colors.white, | ||||
|                         ), | ||||
|                       ), | ||||
|                     ], | ||||
|                   ), | ||||
|                 ), | ||||
|                 myTeamInfo() | ||||
|               ], | ||||
|             ), | ||||
|           ) | ||||
|         ])); | ||||
|   } | ||||
| 
 | ||||
|   Widget myTeamInfo() { | ||||
|     Uri phoneNumber = Uri.parse('tel:${getEmployeeSubordinates?.eMPLOYEEMOBILENUMBER}'); | ||||
|     double _width = MediaQuery | ||||
|         .of(context) | ||||
|         .size | ||||
|         .width; | ||||
|     return Column( | ||||
|       children: [ | ||||
|         Container( | ||||
|             margin: EdgeInsets.fromLTRB(21, 0, 21, 10), | ||||
|             child: Stack(children: [ | ||||
|               Container( | ||||
|                 width: _width, | ||||
|                 //height: 150, | ||||
|                 margin: EdgeInsets.only(top: 50), | ||||
|                 //padding: EdgeInsets.only(right: 17, left: 17), | ||||
|                 decoration: BoxDecoration( | ||||
|                   color: MyColors.whiteColor, | ||||
|                   borderRadius: const BorderRadius.all(Radius.circular(15)), | ||||
|                   boxShadow: [BoxShadow(color: MyColors.lightGreyColor, blurRadius: 15, spreadRadius: 3)], | ||||
|                 ), | ||||
|                 child: Column( | ||||
|                   children: [ | ||||
|                     Row( | ||||
|                       mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                       children: [ | ||||
|                         IconButton( | ||||
|                           onPressed: (){ | ||||
|                             if(getEmployeeSubordinates!.isFavorite != true){ | ||||
|                               showFavoriteAlertDialog(context); | ||||
|                               setState(() {}); | ||||
|                             }else{ | ||||
|                               fetchChangeFav( | ||||
|                                 email: getEmployeeSubordinates?.eMPLOYEEEMAILADDRESS ?? "", | ||||
|                                 employeName: getEmployeeSubordinates!.eMPLOYEENAME ?? "", | ||||
|                                 image: getEmployeeSubordinates!.eMPLOYEEIMAGE ?? "", | ||||
|                                 userName: getEmployeeSubordinates!.eMPLOYEENUMBER ?? "", | ||||
|                                 isFav: false,); | ||||
|                               setState(() {}); | ||||
|                             } }, | ||||
|                           icon: getEmployeeSubordinates!.isFavorite != true | ||||
|                               ? Icon( | ||||
|                             Icons.star_outline, | ||||
|                             size: 35, | ||||
|                             color: MyColors.green9CColor, | ||||
|                           ) | ||||
|                               : Icon( | ||||
|                             Icons.star_outlined, | ||||
|                             size: 35, | ||||
|                             color: MyColors.green9CColor, | ||||
|                           ), | ||||
|                         ), | ||||
|                         // Container(height: 100, alignment: Alignment.center, child: ProfileImage()), | ||||
|                         InkWell( | ||||
|                           onTap:() { | ||||
|                             launchUrl(phoneNumber); | ||||
|                           }, | ||||
|                           child: SvgPicture.asset("assets/images/call.svg"), | ||||
|                         ), | ||||
|                       ], | ||||
|                     ).paddingOnly(left:6, right: 17, top: 16), | ||||
|                     Column( | ||||
|                       crossAxisAlignment: CrossAxisAlignment.center, | ||||
|                       children: [ | ||||
|                         /// card header | ||||
|                         customLabel(getEmployeeSubordinates!.eMPLOYEENAME.toString(), 21, MyColors.grey3AColor, true), | ||||
|                         customLabel(getEmployeeSubordinates!.eMPLOYEENUMBER.toString() + ' | ' + getEmployeeSubordinates!.jOBNAME.toString(), 13, MyColors.grey80Color, true), | ||||
|                         customLabel(getEmployeeSubordinates!.eMPLOYEEEMAILADDRESS.toString(), 13, MyColors.grey3AColor, true), | ||||
|                       ], | ||||
|                     ).paddingOnly(bottom: 10), | ||||
|                   ], | ||||
|                 ), | ||||
|               ), | ||||
|               Container(height: 100, alignment: Alignment.center, child: ProfileImage()), | ||||
|             ]) | ||||
|         ), | ||||
|         Container( | ||||
|           margin: EdgeInsets.fromLTRB(21, 8, 21, 10), | ||||
|           height: 260, | ||||
|           padding: EdgeInsets.only(top: 15, bottom: 15), | ||||
|           decoration: BoxDecoration( | ||||
|             color: Colors.white, | ||||
|             borderRadius: const BorderRadius.all(Radius.circular(15)), | ||||
|             boxShadow: [BoxShadow(color: MyColors.lightGreyColor, blurRadius: 15, spreadRadius: 3)], | ||||
|           ), | ||||
|           child: Column( | ||||
|              children: menu.map((ProfileMenu i) => rowItem(i, context)).toList(), | ||||
|           ), | ||||
|         ), | ||||
|       ], | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget ProfileImage() => | ||||
|       CircleAvatar( | ||||
|         radius: 70, | ||||
|         backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSubordinates?.eMPLOYEEIMAGE)), | ||||
|         backgroundColor: Colors.black, | ||||
|       ); | ||||
| 
 | ||||
|   Widget customLabel(String label, double size, Color color, bool isBold, {double padding = 0.0}) => | ||||
|       Container( | ||||
|           padding: EdgeInsets.all(padding), | ||||
|           child: Column( | ||||
|               mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||||
|               crossAxisAlignment: CrossAxisAlignment.center, | ||||
|               children: [Text(label, style: TextStyle(color: color, fontSize: size, fontWeight: isBold ? FontWeight.bold : FontWeight.normal))])); | ||||
| 
 | ||||
|   Widget rowItem(obj, context) { | ||||
|     return InkWell( | ||||
|       onTap: () { | ||||
| 
 | ||||
|         Navigator.pushNamed(context, obj.route, arguments:obj.arguments); | ||||
| 
 | ||||
|       }, | ||||
|       child: ListTile( | ||||
|         leading: SvgPicture.asset('assets/images/' + obj.icon), | ||||
|         title: Text(obj.name, | ||||
|           style: TextStyle(color: MyColors.grey3AColor, | ||||
|           fontWeight: FontWeight.w600, | ||||
|           fontSize: 16)), | ||||
|         trailing: Icon(Icons.arrow_forward, | ||||
|         color: MyColors.grey3AColor,), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
|   void setMenu(){ | ||||
|     menu = [ | ||||
|       ProfileMenu(name: "Profile Details", icon: "profile_details.svg", route: AppRoutes.profileDetails, arguments:getEmployeeSubordinates), | ||||
|       ProfileMenu(name: "Create Request", icon:  "create_request.svg", route: AppRoutes.createRequest,arguments: getEmployeeSubordinates), | ||||
|       ProfileMenu(name: "View Attendance", icon: "view_attendance.svg", route: AppRoutes.viewAttendance, arguments: getEmployeeSubordinates), | ||||
|       ProfileMenu(name: "Team Members", icon: "team.svg", route: AppRoutes.teamMembers, arguments: getEmployeeSubordinates), | ||||
|     ]; | ||||
|   } | ||||
| 
 | ||||
|   void showFavoriteAlertDialog(BuildContext context) { | ||||
|     Widget cancelButton = TextButton( | ||||
|       child: Text( | ||||
|         LocaleKeys.cancel.tr(), | ||||
|       ), | ||||
|       onPressed: () { | ||||
|         Navigator.pop(context); | ||||
|       }, | ||||
|     ); | ||||
|     Widget continueButton = TextButton( | ||||
|       child: Text( | ||||
|         LocaleKeys.ok.tr(), | ||||
|       ), | ||||
|       onPressed: () { | ||||
|          fetchChangeFav( | ||||
|           email: getEmployeeSubordinates?.eMPLOYEEEMAILADDRESS ?? "", | ||||
|           employeName: getEmployeeSubordinates!.eMPLOYEENAME ?? "", | ||||
|           image: getEmployeeSubordinates!.eMPLOYEEIMAGE ?? "", | ||||
|           userName: getEmployeeSubordinates!.eMPLOYEENUMBER ?? "", | ||||
|           isFav: true, | ||||
|         ); | ||||
|          setState(() {}); | ||||
|          Navigator.pop(context); | ||||
|       }, | ||||
|     ); | ||||
|     AlertDialog alert = AlertDialog( | ||||
|       title: Text( | ||||
|         LocaleKeys.confirm.tr(), | ||||
|       ), | ||||
|       content: Container( | ||||
|         height: 150, | ||||
|         child: Column( | ||||
|           children: [ | ||||
|             Text("Do you want to add" + "${getEmployeeSubordinates!.eMPLOYEENAME.toString()}" + "in your favorite list "), | ||||
|             CircularAvatar( | ||||
|               url: getEmployeeSubordinates!.eMPLOYEEIMAGE ?? "", | ||||
|               height: 50, | ||||
|               width: 50, | ||||
|               isImageBase64: true, | ||||
|             ).paddingOnly(top: 21), | ||||
|           //  16.width, | ||||
|           ], | ||||
|         ), | ||||
|       ), | ||||
|       actions: [ | ||||
|         cancelButton, | ||||
|         continueButton, | ||||
|       ], | ||||
|     ); | ||||
|     showDialog( | ||||
|       context: context, | ||||
|       builder: (BuildContext context) { | ||||
|         return alert; | ||||
|       }, | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
|   GetMenuEntriesList getMenuEntries(String type) { | ||||
|     List<GetMenuEntriesList> data = _EmployeeDetailsState.menuData.where((GetMenuEntriesList test) => test.functionName == type).toList(); | ||||
|     if (data.isNotEmpty) { | ||||
|       return data[0]; | ||||
|     } else { | ||||
|       return GetMenuEntriesList(); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| @ -0,0 +1,184 @@ | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:flutter_svg/flutter_svg.dart'; | ||||
| import 'package:mohem_flutter_app/api/my_team/my_team_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/my_team/get_employee_subordinates_list.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | ||||
| import 'package:url_launcher/url_launcher.dart'; | ||||
| 
 | ||||
| class MyTeam extends StatefulWidget { | ||||
|   const MyTeam({Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   _MyTeamState createState() => _MyTeamState(); | ||||
| } | ||||
| 
 | ||||
| class _MyTeamState extends State<MyTeam> { | ||||
|   String searchEmpEmail = ""; | ||||
|   String searchEmpName = ""; | ||||
|   String searchEmpNo = ""; | ||||
|   String? empId; | ||||
|   List<GetEmployeeSubordinatesList> getEmployeeSubordinatesList = []; | ||||
|   TextEditingController? _textEditingController = TextEditingController(); | ||||
|   List<GetEmployeeSubordinatesList> getEmployeeSListOnSearch = []; | ||||
| 
 | ||||
|   String dropdownValue = 'Name'; | ||||
| 
 | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|     getEmployeeSubordinates(); | ||||
|   } | ||||
| 
 | ||||
|   void getEmployeeSubordinates() async { | ||||
|     try { | ||||
|       Utils.showLoading(context); | ||||
|       getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString()); | ||||
|       getEmployeeSListOnSearch = getEmployeeSubordinatesList; | ||||
|       Utils.hideLoading(context); | ||||
|       setState(() {}); | ||||
|     } catch (ex) { | ||||
|       Utils.hideLoading(context); | ||||
|       Utils.handleException(ex, context, null); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Scaffold( | ||||
|         appBar: AppBarWidget( | ||||
|           context, | ||||
|           title: LocaleKeys.myTeamMembers.tr(), | ||||
|         ), | ||||
|         backgroundColor: MyColors.backgroundColor, | ||||
|         body: SingleChildScrollView( | ||||
|           child: Column( | ||||
|             children: [ | ||||
|               Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ | ||||
|                 Expanded( | ||||
|                     child: TextField( | ||||
|                   onChanged: dropdownValue == "Name" | ||||
|                       ? (String value) { | ||||
|                           getEmployeeSListOnSearch = | ||||
|                               getEmployeeSubordinatesList.where((GetEmployeeSubordinatesList element) => element.eMPLOYEENAME!.toLowerCase().contains(value.toLowerCase())).toList(); | ||||
|                           setState(() {}); | ||||
|                         } | ||||
|                       : (String value) { | ||||
|                           getEmployeeSListOnSearch = | ||||
|                               getEmployeeSubordinatesList.where((GetEmployeeSubordinatesList element) => element.eMPLOYEEEMAILADDRESS!.toLowerCase().contains(value.toLowerCase())).toList(); | ||||
|                           setState(() {}); | ||||
|                         }, | ||||
|                   controller: _textEditingController, | ||||
|                   decoration: InputDecoration( | ||||
|                     filled: true, | ||||
|                     fillColor: Colors.white, | ||||
|                     border: InputBorder.none, | ||||
|                     enabledBorder: InputBorder.none, | ||||
|                     focusedBorder: InputBorder.none, | ||||
|                     // contentPadding: EdgeInsets.fromLTRB(10, 15, 10, 15), | ||||
|                     hintText: LocaleKeys.searchBy.tr() + " $dropdownValue", | ||||
|                     hintStyle: TextStyle(fontSize: 14.0, color: MyColors.grey57Color, fontWeight: FontWeight.w600), | ||||
|                   ), | ||||
|                 )), | ||||
|                 Row( | ||||
|                   children: [ | ||||
|                     "|".toText16(color: MyColors.greyC4Color), | ||||
|                     10.width, | ||||
|                     dropDown(), | ||||
|                   ], | ||||
|                 ) | ||||
|               ]).objectContainerBorderView(), | ||||
|               //  ), | ||||
|               Container( | ||||
|                 margin: EdgeInsets.only(left: 21, right: 21), | ||||
|                 width: MediaQuery.of(context).size.width, | ||||
|                 child: SingleChildScrollView( | ||||
|                   scrollDirection: Axis.vertical, | ||||
|                   child: Column( | ||||
|                     children: <Widget>[ | ||||
|                       _textEditingController!.text.isNotEmpty && getEmployeeSListOnSearch.isEmpty | ||||
|                           ? Container( | ||||
|                               child: LocaleKeys.noResultsFound.tr().toText16(color: MyColors.blackColor), | ||||
|                             ).paddingOnly(top: 10) | ||||
|                           : ListView.separated( | ||||
|                               scrollDirection: Axis.vertical, | ||||
|                               shrinkWrap: true, | ||||
|                             //  padding: EdgeInsets.only(left: 21, right: 21), | ||||
|                               physics: ScrollPhysics(), | ||||
|                               separatorBuilder: (cxt, index) => 12.height, | ||||
|                               itemCount: _textEditingController!.text.isNotEmpty ? getEmployeeSListOnSearch.length : getEmployeeSubordinatesList.length, | ||||
|                               itemBuilder: (context, index) { | ||||
|                                 var phoneNumber = Uri.parse('tel:${getEmployeeSListOnSearch[index].eMPLOYEEMOBILENUMBER}'); | ||||
|                                 return Row( | ||||
|                                     mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                                     children: [ | ||||
|                                       CircleAvatar( | ||||
|                                         radius: 25, | ||||
|                                         backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSListOnSearch[index].eMPLOYEEIMAGE)), | ||||
|                                         backgroundColor: Colors.black, | ||||
|                                       ), | ||||
|                                       10.width, | ||||
|                                       Column( | ||||
|                                         crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                                         children: [ | ||||
|                                           // "Present".toText13(color: MyColors.greenColor), | ||||
|                                           "${getEmployeeSListOnSearch[index].eMPLOYEENAME}".toText16(isBold: true, color: MyColors.grey3AColor), | ||||
|                                           "${getEmployeeSListOnSearch[index].pOSITIONNAME}".toText10(isBold: true, color: MyColors.grey57Color), | ||||
|                                         ], | ||||
|                                       ).expanded, | ||||
|                                       Column( | ||||
|                                         children: [ | ||||
|                                           InkWell( | ||||
|                                             onTap: () { | ||||
|                                               launchUrl(phoneNumber); | ||||
|                                             }, | ||||
|                                               child: SvgPicture.asset("assets/images/call.svg"), | ||||
|                                           ), | ||||
|                                           21.height, | ||||
|                                           InkWell( | ||||
|                                             onTap: () async { | ||||
|                                               Navigator.pushNamed(context, AppRoutes.employeeDetails, arguments: getEmployeeSListOnSearch[index]); | ||||
|                                             }, | ||||
|                                             child: Icon(Icons.arrow_forward_outlined, color: MyColors.grey3AColor), | ||||
|                                           ), | ||||
|                                         ], | ||||
|                                       ), | ||||
|                                     ], | ||||
|                                   ).objectContainerView(); | ||||
|                               }) | ||||
|                     ], | ||||
|                   ), | ||||
|                 ), | ||||
|               ) | ||||
|             ], | ||||
|           ), | ||||
|         )); | ||||
|   } | ||||
| 
 | ||||
|   Widget dropDown() { | ||||
|     return DropdownButton<String>( | ||||
|       value: dropdownValue, | ||||
|       icon: const Icon(Icons.keyboard_arrow_down, | ||||
|       color: MyColors.grey57Color), | ||||
|       elevation: 16, | ||||
|       onChanged: (String? newValue) { | ||||
|         setState(() { | ||||
|           dropdownValue = newValue!; | ||||
|         }); | ||||
|       }, | ||||
|       items: <String>['Name', 'Email'].map<DropdownMenuItem<String>>((String value) { | ||||
|         return DropdownMenuItem<String>( | ||||
|           value: value, | ||||
|           child: Text(value), | ||||
|         ); | ||||
|       }).toList(), | ||||
|       style: TextStyle(fontSize: 14.0, color: MyColors.grey57Color, fontWeight: FontWeight.w600), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,83 @@ | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/app_state/app_state.dart'; | ||||
| import 'package:mohem_flutter_app/classes/colors.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | ||||
| import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_employee_basic_details.model.dart'; | ||||
| import 'package:mohem_flutter_app/models/member_information_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/my_team/get_employee_subordinates_list.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/button/default_button.dart'; | ||||
| 
 | ||||
| class ProfileDetails extends StatefulWidget { | ||||
|   const ProfileDetails({Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   _ProfileDetailsState createState() => _ProfileDetailsState(); | ||||
| } | ||||
| 
 | ||||
| class _ProfileDetailsState extends State<ProfileDetails> { | ||||
| 
 | ||||
|   GetEmployeeSubordinatesList? getEmployeeSubordinates; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|   } | ||||
| 
 | ||||
|   Widget build(BuildContext context) { | ||||
|     getEmployeeSubordinates ??= ModalRoute.of(context)?.settings.arguments as GetEmployeeSubordinatesList; | ||||
|     return Scaffold( | ||||
|         appBar: AppBarWidget( | ||||
|           context, | ||||
|           title: LocaleKeys.profileDetails.tr(), | ||||
|         ), | ||||
|         backgroundColor: MyColors.backgroundColor, | ||||
|         body: Column( | ||||
|           children: [ | ||||
|             Container( | ||||
|               width: double.infinity, | ||||
|               margin: EdgeInsets.only( | ||||
|                 top: 20, | ||||
|                 left: 21, | ||||
|                 right: 21, | ||||
|               ), | ||||
|               padding: EdgeInsets.only(left: 14, right: 14, top: 13, bottom: 20), | ||||
|               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: [ | ||||
|                 LocaleKeys.category.tr().toText13(color: MyColors.lightGrayColor), | ||||
|                 "${getEmployeeSubordinates?.eMPLOYMENTCATEGORYMEANING}".toText16(isBold: true, color: MyColors.darkTextColor), | ||||
|                 23.height, | ||||
|                 LocaleKeys.address.tr().toText13(color: MyColors.lightGrayColor), | ||||
|                 "${getEmployeeSubordinates?.lOCATIONNAME}".toText16(isBold: true, color: MyColors.darkTextColor), | ||||
|                 23.height, | ||||
|                 LocaleKeys.phoneNumber.tr().toText13(color: MyColors.lightGrayColor), | ||||
|                 "${getEmployeeSubordinates?.eMPLOYEEMOBILENUMBER}".toText16(isBold: true, color: MyColors.darkTextColor), | ||||
|                 23.height, | ||||
|                 LocaleKeys.businessGroup.tr().toText13(color: MyColors.lightGrayColor), | ||||
|                 "${getEmployeeSubordinates?.bUSINESSGROUPNAME}".toText16(isBold: true, color: MyColors.darkTextColor), | ||||
|                  23.height, | ||||
|                 LocaleKeys.Payroll.tr().toText13(color: MyColors.lightGrayColor), | ||||
|                 "${getEmployeeSubordinates?.pAYROLLNAME}".toText16(isBold: true, color: MyColors.darkTextColor), | ||||
|               ]), | ||||
|             ), | ||||
|           ], | ||||
|         )); | ||||
|   } | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,108 @@ | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/api/my_team/my_team_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/my_team/get_employee_subordinates_list.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | ||||
| import 'package:url_launcher/url_launcher.dart'; | ||||
| 
 | ||||
| class TeamMembers extends StatefulWidget { | ||||
|   const TeamMembers({Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   _TeamMembersState createState() => _TeamMembersState(); | ||||
| } | ||||
| 
 | ||||
| class _TeamMembersState extends State<TeamMembers> { | ||||
|   String searchEmpEmail =""; | ||||
|   String searchEmpName =""; | ||||
|   String searchEmpNo = ""; | ||||
|   String? empId; | ||||
|   List<GetEmployeeSubordinatesList> getEmployeeSubordinatesList = []; | ||||
|   GetEmployeeSubordinatesList? getEmployeeSubordinates; | ||||
| 
 | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|    employeeSubordinates(); | ||||
|   } | ||||
| 
 | ||||
|   void employeeSubordinates() async { | ||||
|     try { | ||||
|       Utils.showLoading(context); | ||||
|       getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString()); | ||||
|       getEmployeeSubordinatesList = await MyTeamApiClient().employeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString(),getEmployeeSubordinates?.eMPLOYEENUMBER); | ||||
|       Utils.hideLoading(context); | ||||
|       setState(() {}); | ||||
|     } catch (ex) { | ||||
|       Utils.hideLoading(context); | ||||
|       Utils.handleException(ex, context, null); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     getEmployeeSubordinates ??= ModalRoute.of(context)?.settings.arguments as GetEmployeeSubordinatesList; | ||||
|     return Scaffold( | ||||
|         appBar: AppBarWidget( | ||||
|           context, | ||||
|           title: LocaleKeys.teamMembers.tr(), | ||||
|         ), | ||||
|         backgroundColor: MyColors.backgroundColor, | ||||
|         body: SingleChildScrollView( | ||||
|          scrollDirection: Axis.vertical, | ||||
|          child: Column( | ||||
|             children: <Widget>[ | ||||
|             getEmployeeSubordinatesList != 0 | ||||
|             ? ListView.separated( | ||||
|             scrollDirection: Axis.vertical, | ||||
|             shrinkWrap: true, | ||||
|             padding: EdgeInsets.all(21), | ||||
|             physics: ScrollPhysics(), | ||||
|             separatorBuilder: (cxt, index) => 12.height, | ||||
|             itemCount: getEmployeeSubordinatesList.length, | ||||
|             itemBuilder: (context, index) { | ||||
|             var phoneNumber = Uri.parse('tel:${getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER}'); | ||||
|               return Container( | ||||
|                 child: Row( | ||||
|                 mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                   children: [ | ||||
|                    CircleAvatar( | ||||
|                   radius: 25, | ||||
|                   backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSubordinatesList[index].eMPLOYEEIMAGE)), | ||||
|                   backgroundColor: Colors.black, | ||||
|                   ), | ||||
|                  SizedBox(width: 10,), | ||||
|                   Column( | ||||
|                   crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                   children: [ | ||||
|                   // "Present".toText13(color: MyColors.greenColor), | ||||
|                   "${getEmployeeSubordinatesList[index].eMPLOYEENAME}".toText16(isBold: true, color: MyColors.grey3AColor), | ||||
|                   "${getEmployeeSubordinatesList[index].pOSITIONNAME}".toText10(isBold: true, color: MyColors.grey57Color), | ||||
|                   ], | ||||
|                   ).expanded, | ||||
|                         Column( | ||||
|                         children: [ | ||||
|                           IconButton( | ||||
|                         onPressed: () { | ||||
|                         launchUrl(phoneNumber); | ||||
|                         }, | ||||
|                             icon: Icon( | ||||
|                             Icons.whatsapp, | ||||
|                             color: Colors.green, | ||||
|                             ),),], | ||||
|                             ),], | ||||
|                   ),).objectContainerView(); | ||||
|                         }): Container( | ||||
|                          child: LocaleKeys.noResultsFound.tr().toText16(color: MyColors.blackColor), | ||||
|                           ).paddingOnly(top: 10), | ||||
|         ], | ||||
|         ) | ||||
|     )); | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,565 @@ | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/api/monthly_attendance_api_client.dart'; | ||||
| import 'package:mohem_flutter_app/api/my_team/my_team_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/get_attendance_tracking_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_day_hours_type_details_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_schedule_shifts_details_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart'; | ||||
| import 'package:mohem_flutter_app/models/my_team/get_employee_subordinates_list.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart'; | ||||
| import 'package:month_picker_dialog/month_picker_dialog.dart'; | ||||
| import 'package:pie_chart/pie_chart.dart'; | ||||
| import 'package:syncfusion_flutter_calendar/calendar.dart'; | ||||
| 
 | ||||
| class ViewAttendance extends StatefulWidget { | ||||
|   const ViewAttendance({Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   _ViewAttendanceState createState() => _ViewAttendanceState(); | ||||
| } | ||||
| 
 | ||||
| class _ViewAttendanceState extends State<ViewAttendance> { | ||||
|   bool isPresent = false; | ||||
|   bool isAbsent = false; | ||||
|   bool isMissing = false; | ||||
|   bool isOff = false; | ||||
|   DateTime date = DateTime.now(); | ||||
|   late DateTime formattedDate; | ||||
|   var currentMonth = DateTime.now().month; | ||||
|   String searchMonth = getMonth(DateTime.now().month); | ||||
|   int searchYear = DateTime.now().year; | ||||
|   int? pRTPID; | ||||
| 
 | ||||
|   String searchEmpEmail =""; | ||||
|   String searchEmpName =""; | ||||
|   String searchEmpNo = ""; | ||||
|   String? empId; | ||||
|   List<GetEmployeeSubordinatesList> getEmployeeSubordinatesList = []; | ||||
|   List<GetDayHoursTypeDetailsList> getDayHoursTypeDetailsList = []; | ||||
|   GetTimeCardSummaryList? getTimeCardSummaryList; | ||||
|   GetAttendanceTracking? attendanceTracking; | ||||
|   GetEmployeeSubordinatesList? getEmployeeSubordinates; | ||||
| 
 | ||||
|   @override | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|     formattedDate = date; | ||||
|     callTimeCardAndHourDetails(date.day, searchMonth, searchYear); | ||||
|    // setState(() {}); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
|   void callTimeCardAndHourDetails(index, searchMonth, searchYear) async { | ||||
|     try { | ||||
|       Utils.showLoading(context); | ||||
|       getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString()); | ||||
|       getTimeCardSummaryList = await MyTeamApiClient().getTimeCardSummary(searchMonth, searchYear,getEmployeeSubordinates?.eMPLOYEENUMBER); | ||||
|       getDayHoursTypeDetailsList = await MyTeamApiClient().getDayHoursTypeDetails(searchMonth, searchYear, getEmployeeSubordinates?.eMPLOYEENUMBER); | ||||
|       attendanceTracking = await MyTeamApiClient().getAttendanceTracking(getEmployeeSubordinates?.eMPLOYEENUMBER); | ||||
|       Utils.hideLoading(context); | ||||
|       _calendarController.displayDate = formattedDate; | ||||
|       setState(() {}); | ||||
|     } catch (ex) { | ||||
|       Utils.hideLoading(context); | ||||
|       Utils.handleException(ex, context, null); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   final CalendarController _calendarController = CalendarController(); | ||||
|   final List<Color> _colorList = [Color(0xff2AB2AB), Color(0xff202529)]; | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     getEmployeeSubordinates ??= ModalRoute.of(context)?.settings.arguments as GetEmployeeSubordinatesList; | ||||
|     Map<String, double> dataMap = { | ||||
|       "Present": getTimeCardSummaryList?.aTTENDEDDAYS != null ? getTimeCardSummaryList!.aTTENDEDDAYS!.toDouble() : 0, | ||||
|       "Absent": getTimeCardSummaryList?.aBSENTDAYS != null ? getTimeCardSummaryList!.aBSENTDAYS!.toDouble() : 0, | ||||
|     }; | ||||
|     //if(getTimeCardSummaryList ==null) | ||||
|     // callTimeCardAndHourDetails(date.day, searchMonth, searchYear); | ||||
|     return Scaffold( | ||||
|       appBar: AppBarWidget( | ||||
|         context, | ||||
|         title: LocaleKeys.viewAttendance.tr(), | ||||
|       ), | ||||
|       backgroundColor: MyColors.backgroundColor, | ||||
|       body: SingleChildScrollView( | ||||
|         child: Column(children: [ | ||||
|           Container( | ||||
|             width: double.infinity, | ||||
|             margin: EdgeInsets.only( | ||||
|               top: 21, | ||||
|               left: 21, | ||||
|               right: 21, | ||||
|             ), | ||||
|             padding: EdgeInsets.only(left: 14, right: 14, top: 15, bottom: 15), | ||||
|             // height: 120, | ||||
|             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: [ | ||||
|                 LocaleKeys.todayAttendance.tr().toText16(isBold: true, color: MyColors.darkColor), | ||||
|                 SizedBox( | ||||
|                   height: 10, | ||||
|                 ), | ||||
|                 Row( | ||||
|                   mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                   children: [ | ||||
|                     Column( | ||||
|                       children: [ | ||||
|                         LocaleKeys.checkIn.tr().toText10(isBold: true, color: MyColors.green69Color), | ||||
|                         "${(attendanceTracking?.pSwipeIn)?? "- - : - -"}".toText14(isBold: true, color: MyColors.grey57Color), | ||||
|                       ], | ||||
|                     ), | ||||
|                     Column( | ||||
|                       children: [ | ||||
|                         LocaleKeys.checkOut.tr().toText10(isBold: true, color: MyColors.redA3Color), | ||||
|                         "${(attendanceTracking?.pSwipeOut)?? "- - : - -"}".toText14(isBold: true, color: MyColors.grey57Color), | ||||
|                       ], | ||||
|                     ), | ||||
|                     Column( | ||||
|                       children: [ | ||||
|                         LocaleKeys.lateIn.tr().toText10(isBold: true, color: MyColors.darkGreyColor), | ||||
|                         "${(attendanceTracking?.pLateInHours)?? "- - : - -"}".toText14(isBold: true, color: MyColors.grey57Color), | ||||
|                       ], | ||||
|                     ), | ||||
|                   ], | ||||
|                 ) | ||||
|               ], | ||||
|             ), | ||||
|           ), | ||||
|           Container( | ||||
|             width: double.infinity, | ||||
|             margin: EdgeInsets.only( | ||||
|               top: 18, | ||||
|               left: 18, | ||||
|               right: 18, | ||||
|               bottom: 28, | ||||
|             ), | ||||
|             padding: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 16), | ||||
|             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( | ||||
|               children: [ | ||||
|                 //20.height, | ||||
|                 Column( | ||||
|                   crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                   children: [ | ||||
|                     Row( | ||||
|                       children: [ | ||||
|                         "${DateFormat("MMMM-yyyy").format(formattedDate)}".toText16(color: MyColors.grey3AColor), | ||||
|                         const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.grey3AColor), | ||||
|                       ], | ||||
|                     ).onPress(() async { | ||||
|                       showMonthPicker( | ||||
|                         context: context, //locale: EasyLocalization.of(context)?.locale, | ||||
|                         initialDate: formattedDate, | ||||
|                         firstDate: DateTime(searchYear - 2), | ||||
|                         lastDate: DateTime.now(), | ||||
|                       ).then((selectedDate) { | ||||
|                         if (selectedDate != null) { | ||||
|                           searchMonth = getMonth(selectedDate.month); | ||||
|                           searchYear = selectedDate.year; | ||||
|                           formattedDate = selectedDate; //DateFormat('MMMM-yyyy').format(selectedDate); | ||||
|                           //  _calendarController.selectedDate = formattedDate; | ||||
|                           callTimeCardAndHourDetails(selectedDate.day, searchMonth, searchYear); | ||||
|                         } | ||||
|                       }); | ||||
|                     }) | ||||
|                   ], | ||||
|                 ), | ||||
|                 18.height, | ||||
|                 AspectRatio(aspectRatio: 333 / 270, child: calendarWidget()), | ||||
|                 Row( | ||||
|                   children: [ | ||||
|                     Column( | ||||
|                       crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                       children: <Widget>[ | ||||
|                         Column( | ||||
|                           children: [ | ||||
|                             LocaleKeys.attendance.tr().toText12(isBold: true, color: MyColors.grey3AColor), | ||||
|                             LocaleKeys.stats.tr().toText24(isBold: true, color: MyColors.grey3AColor), | ||||
|                           ], | ||||
|                         ), | ||||
|                         30.height, | ||||
|                         Row( | ||||
|                           children: [ | ||||
|                             Container( | ||||
|                               height: 8, | ||||
|                               width: 8, | ||||
|                               decoration: BoxDecoration( | ||||
|                                 color: MyColors.lightGreenColor, | ||||
|                                 borderRadius: BorderRadius.circular(100), | ||||
|                               ), | ||||
|                             ), | ||||
|                             Container( | ||||
|                               margin: const EdgeInsets.only(left: 5, right: 5), | ||||
|                               child: "${LocaleKeys.present.tr()} ${getTimeCardSummaryList?.aTTENDEDDAYS != null ? getTimeCardSummaryList?.aTTENDEDDAYS : 0}".toText16(isBold: true, color: MyColors.lightGreenColor), | ||||
|                             ), | ||||
|                           ], | ||||
|                         ), | ||||
|                         8.height, | ||||
|                         Row( | ||||
|                           children: [ | ||||
|                             Container( | ||||
|                               height: 9, | ||||
|                               width: 9, | ||||
|                               decoration: BoxDecoration( | ||||
|                                 color: MyColors.backgroundBlackColor, | ||||
|                                 borderRadius: BorderRadius.circular(100), | ||||
|                               ), | ||||
|                             ), | ||||
|                             Container( | ||||
|                               margin: const EdgeInsets.only(left: 5, right: 5), | ||||
|                               child: "${LocaleKeys.absent.tr()} ${getTimeCardSummaryList?.aBSENTDAYS != null ? getTimeCardSummaryList?.aBSENTDAYS : 0 }".toText16( | ||||
|                                 isBold: true, | ||||
|                                 color: MyColors.backgroundBlackColor, | ||||
|                               ), | ||||
|                             ) | ||||
|                           ], | ||||
|                         ), | ||||
|                       ], | ||||
|                     ), | ||||
|                     SizedBox( | ||||
|                       width: 20, | ||||
|                     ), | ||||
|                     Column( | ||||
|                       crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                       children: <Widget>[ | ||||
|                         Container( | ||||
|                           width: 170, | ||||
|                           height: 170, | ||||
|                           child: PieChart( | ||||
|                             dataMap: dataMap, | ||||
|                             animationDuration: const Duration(milliseconds: 800), | ||||
|                             chartLegendSpacing: 0, | ||||
|                             chartRadius: MediaQuery.of(context).size.width / 5.2, | ||||
|                             colorList: _colorList, | ||||
|                             initialAngleInDegree: 0, | ||||
|                             chartType: ChartType.ring, | ||||
|                             ringStrokeWidth: 80, | ||||
|                             legendOptions: const LegendOptions( | ||||
|                               showLegendsInRow: false, | ||||
|                               showLegends: false, | ||||
|                             ), | ||||
|                             chartValuesOptions: const ChartValuesOptions( | ||||
|                                 showChartValueBackground: false, | ||||
|                                 showChartValues: true, | ||||
|                                 showChartValuesInPercentage: true, | ||||
|                                 showChartValuesOutside: false, | ||||
|                                 decimalPlaces: 1, | ||||
|                                 chartValueStyle: TextStyle( | ||||
|                                   fontWeight: FontWeight.bold, | ||||
|                                   fontSize: 16, | ||||
|                                   color: MyColors.white, | ||||
|                                 )), | ||||
|                           ), | ||||
|                         ), | ||||
|                       ], | ||||
|                     ).paddingOnly(left: 21, right: 21, bottom: 21), | ||||
|                   ], | ||||
|                 ), | ||||
|               ], | ||||
|             ), | ||||
|           ), | ||||
|         ]), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget calendarWidget() { | ||||
|     return SfCalendar( | ||||
|       view: CalendarView.month, | ||||
|       showDatePickerButton: false, | ||||
|       controller: _calendarController, | ||||
|       backgroundColor: Colors.white, | ||||
|       headerHeight: 0, | ||||
|       viewNavigationMode: ViewNavigationMode.none, | ||||
|       todayHighlightColor: MyColors.grey3AColor, | ||||
|       showNavigationArrow: false, | ||||
|       showCurrentTimeIndicator: false, | ||||
|       showWeekNumber: false, | ||||
|       cellBorderColor: Colors.white, | ||||
|       selectionDecoration: BoxDecoration( | ||||
|         border: Border.all(color: MyColors.white, width: 10), | ||||
|         borderRadius: const BorderRadius.all(Radius.circular(100)), | ||||
|         shape: BoxShape.circle, | ||||
|       ), | ||||
|       dataSource: MeetingDataSource(_getDataSource()), | ||||
|       monthViewSettings: const MonthViewSettings( | ||||
|         dayFormat: 'EEE', | ||||
|         showTrailingAndLeadingDates: false, | ||||
|         showAgenda: false, | ||||
|         //navigationDirection: MonthNavigationDirection.vertical, | ||||
|         monthCellStyle: MonthCellStyle( | ||||
|           textStyle: TextStyle( | ||||
|             fontStyle: FontStyle.normal, | ||||
|             fontSize: 13, | ||||
|             color: Colors.white, | ||||
|           ), | ||||
|         ), | ||||
|       ), | ||||
|       viewHeaderStyle: const ViewHeaderStyle( | ||||
|         dayTextStyle: TextStyle(color: MyColors.grey3AColor, fontSize: 13, fontWeight: FontWeight.w600), | ||||
|       ), | ||||
|       monthCellBuilder: (build, details) { | ||||
|         if (details.date.month == formattedDate.month && details.date.year == formattedDate.year) { | ||||
|           int val = details.date.day; | ||||
|           //check day is off | ||||
|           if (getDayHoursTypeDetailsList.isNotEmpty) { | ||||
|             if (getDayHoursTypeDetailsList?[val - 1].aTTENDEDFLAG == 'N' && getDayHoursTypeDetailsList?[val - 1].dAYTYPE == 'OFF') { | ||||
|               return Container( | ||||
|                 margin: const EdgeInsets.all(4), | ||||
|                 decoration: BoxDecoration( | ||||
|                   color: MyColors.greyACColor.withOpacity(.12), | ||||
|                   shape: BoxShape.circle, | ||||
|                 ), | ||||
|                 alignment: Alignment.center, | ||||
|                 child: Text( | ||||
|                   "$val", | ||||
|                   style: const TextStyle( | ||||
|                     fontSize: 13, | ||||
|                     fontWeight: FontWeight.w500, | ||||
|                     color: MyColors.greyA5Color, | ||||
|                   ), | ||||
|                 ), | ||||
|               ); | ||||
|             } | ||||
|             //check day is Present | ||||
|             else if (getDayHoursTypeDetailsList?[val - 1].aTTENDEDFLAG == 'Y') { | ||||
|               return Container( | ||||
|                 margin: const EdgeInsets.all(4), | ||||
|                 decoration: BoxDecoration( | ||||
|                   gradient: const LinearGradient( | ||||
|                     transform: GradientRotation(.46), | ||||
|                     begin: Alignment.topRight, | ||||
|                     end: Alignment.bottomLeft, | ||||
|                     colors: [MyColors.gradiantEndColor, MyColors.gradiantStartColor], | ||||
|                   ), | ||||
|                   shape: BoxShape.circle, | ||||
|                   boxShadow: [ | ||||
|                     BoxShadow( | ||||
|                       offset: const Offset(0, 2), | ||||
|                       blurRadius: 26, | ||||
|                       color: MyColors.blackColor.withOpacity(0.100), | ||||
|                     ), | ||||
|                   ], | ||||
|                 ), | ||||
|                 alignment: Alignment.center, | ||||
|                 child: Text( | ||||
|                   "$val", | ||||
|                   style: const TextStyle( | ||||
|                     fontSize: 13, | ||||
|                     fontWeight: FontWeight.w500, | ||||
|                     color: MyColors.white, | ||||
|                   ), | ||||
|                 ), | ||||
|               ); | ||||
|             } | ||||
|             //check day is Absent | ||||
|             else if (getDayHoursTypeDetailsList?[val - 1].aTTENDEDFLAG == 'N' && getDayHoursTypeDetailsList?[val - 1].aBSENTFLAG == 'Y') { | ||||
|               return Container( | ||||
|                 margin: const EdgeInsets.all(4), | ||||
|                 decoration: BoxDecoration( | ||||
|                   color: MyColors.backgroundBlackColor, | ||||
|                   shape: BoxShape.circle, | ||||
|                   boxShadow: [ | ||||
|                     BoxShadow( | ||||
|                       offset: const Offset(0, 2), | ||||
|                       blurRadius: 26, | ||||
|                       color: MyColors.blackColor.withOpacity(0.100), | ||||
|                     ), | ||||
|                   ], | ||||
|                 ), | ||||
|                 alignment: Alignment.center, | ||||
|                 child: Text( | ||||
|                   "$val", | ||||
|                   style: const TextStyle( | ||||
|                     fontSize: 13, | ||||
|                     fontWeight: FontWeight.w500, | ||||
|                     color: MyColors.white, | ||||
|                   ), | ||||
|                 ), | ||||
|               ); | ||||
|             } | ||||
|           } | ||||
|           return Container( | ||||
|             margin: const EdgeInsets.all(4), | ||||
|             decoration: BoxDecoration( | ||||
|               border: Border.all(color: MyColors.backgroundBlackColor, width: 2.0, style: BorderStyle.solid), //Border.all | ||||
|               shape: BoxShape.circle, | ||||
|               boxShadow: [ | ||||
|                 BoxShadow( | ||||
|                   offset: const Offset(0, 2), | ||||
|                   blurRadius: 26, | ||||
|                   color: MyColors.blackColor.withOpacity(0.100), | ||||
|                 ), | ||||
|               ], | ||||
|             ), | ||||
|             alignment: Alignment.center, | ||||
|             child: Text( | ||||
|               "$val", | ||||
|               style: const TextStyle( | ||||
|                 fontSize: 13, | ||||
|                 fontWeight: FontWeight.w500, | ||||
|                 color: Color(0xff1F2428), | ||||
|               ), | ||||
|             ), | ||||
|           ); | ||||
|         } else { | ||||
|           return const SizedBox(); | ||||
|         } | ||||
|       }, | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
|   List<Meeting> _getDataSource() { | ||||
|     final List<Meeting> meetings = <Meeting>[]; | ||||
|     return meetings; | ||||
|   } | ||||
| 
 | ||||
|   static String getMonth(int month) { | ||||
|     switch (month) { | ||||
|       case 1: | ||||
|         return "January"; | ||||
|       case 2: | ||||
|         return "February"; | ||||
|       case 3: | ||||
|         return "March"; | ||||
|       case 4: | ||||
|         return "April"; | ||||
|       case 5: | ||||
|         return "May"; | ||||
|       case 6: | ||||
|         return "June"; | ||||
|       case 7: | ||||
|         return "July"; | ||||
|       case 8: | ||||
|         return "August"; | ||||
|       case 9: | ||||
|         return "September"; | ||||
|       case 10: | ||||
|         return "October"; | ||||
|       case 11: | ||||
|         return "November"; | ||||
|       case 12: | ||||
|         return "December"; | ||||
|       default: | ||||
|         return ""; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   static String getMonthAr(int month) { | ||||
|     switch (month) { | ||||
|       case 1: | ||||
|         return 'يناير'; | ||||
|       case 2: | ||||
|         return ' فبراير'; | ||||
|       case 3: | ||||
|         return 'مارس'; | ||||
|       case 4: | ||||
|         return 'أبريل'; | ||||
|       case 5: | ||||
|         return 'مايو'; | ||||
|       case 6: | ||||
|         return 'يونيو'; | ||||
|       case 7: | ||||
|         return 'يوليو'; | ||||
|       case 8: | ||||
|         return 'أغسطس'; | ||||
|       case 9: | ||||
|         return 'سبتمبر'; | ||||
|       case 10: | ||||
|         return ' اكتوبر'; | ||||
|       case 11: | ||||
|         return ' نوفمبر'; | ||||
|       case 12: | ||||
|         return 'ديسمبر'; | ||||
|       default: | ||||
|         return ""; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class MeetingDataSource extends CalendarDataSource { | ||||
|   MeetingDataSource(List<Meeting> source) { | ||||
|     appointments = source; | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   DateTime getStartTime(int index) { | ||||
|     return _getMeetingData(index).from; | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   DateTime getEndTime(int index) { | ||||
|     return _getMeetingData(index).to; | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   String getSubject(int index) { | ||||
|     return _getMeetingData(index).eventName; | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   Color getColor(int index) { | ||||
|     return _getMeetingData(index).background; | ||||
|   } | ||||
| 
 | ||||
|   @override | ||||
|   bool isAllDay(int index) { | ||||
|     return _getMeetingData(index).isAllDay; | ||||
|   } | ||||
| 
 | ||||
|   Meeting _getMeetingData(int index) { | ||||
|     final dynamic meeting = appointments; | ||||
|     Meeting meetingData; | ||||
|     if (meeting is Meeting) { | ||||
|       meetingData = meeting; | ||||
|     } | ||||
|     return meeting; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| class Meeting { | ||||
|   Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay); | ||||
| 
 | ||||
|   String eventName; | ||||
|   DateTime from; | ||||
|   DateTime to; | ||||
|   Color background; | ||||
|   bool isAllDay; | ||||
| } | ||||
| @ -0,0 +1,178 @@ | ||||
| 
 | ||||
| import 'package:easy_localization/src/public_ext.dart'; | ||||
| import 'package:flutter/cupertino.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:mohem_flutter_app/api/worklist/worklist_api_client.dart'; | ||||
| import 'package:mohem_flutter_app/classes/colors.dart'; | ||||
| import 'package:mohem_flutter_app/classes/utils.dart'; | ||||
| import 'package:mohem_flutter_app/config/routes.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/get_user_item_type_list.dart'; | ||||
| import 'package:mohem_flutter_app/models/update_user_item_type_list.dart'; | ||||
| import 'package:mohem_flutter_app/models/worklist/update_user_type_list.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/app_bar_widget.dart'; | ||||
| import 'package:mohem_flutter_app/widgets/button/default_button.dart'; | ||||
| 
 | ||||
| class  WorklistSettings extends StatefulWidget { | ||||
|   const WorklistSettings({Key? key}) : super(key: key); | ||||
| 
 | ||||
|   @override | ||||
|   _WorklistSettingsState createState() => _WorklistSettingsState(); | ||||
| } | ||||
| 
 | ||||
| class _WorklistSettingsState extends State<WorklistSettings> { | ||||
|   List<GetUserItemTypesList> getUserItemTypesList = []; | ||||
|   UpdateUserItemTypesList? updateUserItemTypesList; | ||||
| 
 | ||||
| 
 | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|     userItemTypesList(); | ||||
|   } | ||||
| 
 | ||||
|   void userItemTypesList() async { | ||||
|     try { | ||||
|       Utils.showLoading(context); | ||||
|       getUserItemTypesList = await WorkListApiClient().getUserItemTypes(); | ||||
|       Utils.hideLoading(context); | ||||
|       setState(() {}); | ||||
|     } catch (ex) { | ||||
|       Utils.hideLoading(context); | ||||
|       Utils.handleException(ex, context, null); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   void updateUserItem() async { | ||||
|     try { | ||||
|       Utils.showLoading(context); | ||||
|       List<Map<String, dynamic>> itemList=[]; | ||||
|       for (var element in getUserItemTypesList) { | ||||
|         itemList.add(UpdateUserTypesList(itemID: element.uSERITEMTYPEID, pITEMTYPE: element.iTEMTYPE,pFYAENABLEDFALG: element.fYAENABLEDFALG, pFYIENABLEDFALG: element.fYIENABLEDFLAG).toJson()); | ||||
| 
 | ||||
|       } | ||||
|       updateUserItemTypesList = await WorkListApiClient().updateUserItemTypes(itemList); | ||||
|       Utils.hideLoading(context); | ||||
|       Navigator.pushNamed(context, AppRoutes.workList); | ||||
|       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.worklistSettings.tr(), | ||||
|         ), | ||||
|         body:Column( | ||||
|           children: [ | ||||
|             Expanded( | ||||
|               child: Container( | ||||
|                 margin: const EdgeInsets.only(top: 21, left: 21, right: 21), | ||||
|                 child: Column( | ||||
|                   crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                   children: [ | ||||
|                     Container( | ||||
|                      child:  LocaleKeys.TurnNotificationsFor.tr().toText22(color: MyColors.blackColor), | ||||
|                     ).paddingOnly(top: 10, bottom: 50), | ||||
|                     Row( | ||||
|                       mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                       children: [ | ||||
|                         Container( | ||||
|                           child: LocaleKeys.itemType.tr().toText14(color: MyColors.blackColor) , | ||||
|                         ), | ||||
|                         Row( | ||||
|                           mainAxisAlignment: MainAxisAlignment.spaceAround, | ||||
|                           children: [ | ||||
|                             Container( | ||||
|                               child: "FYA".tr().toText14(color: MyColors.blackColor) , | ||||
|                             ), | ||||
|                             Container( | ||||
|                               child: "FYI".tr().toText14(color: MyColors.blackColor) , | ||||
|                             ).paddingOnly(left: 30, right: 30), | ||||
|                           ], | ||||
|                         ) | ||||
|                       ], | ||||
|                     ), | ||||
|                     Divider(color: MyColors.greyA5Color,), | ||||
|                     SingleChildScrollView( | ||||
|                     scrollDirection: Axis.vertical, | ||||
|                      child: ListView.builder( | ||||
|                      scrollDirection: Axis.vertical, | ||||
|                      shrinkWrap: true, | ||||
|                      physics: ScrollPhysics(), | ||||
|                      itemCount: getUserItemTypesList == null ? 0 : getUserItemTypesList.length, | ||||
|                      itemBuilder: (BuildContext context,int index) { | ||||
|                      return  Column( | ||||
|                        children:[ | ||||
|                          customSwitch(getUserItemTypesList[index]), | ||||
|                          Divider( | ||||
|                            color: MyColors.greyC4Color, | ||||
|                            thickness: 0.5,), | ||||
|                   ]); | ||||
|                      } | ||||
|                     ), | ||||
|                    ), | ||||
|                   ], | ||||
|                 ), | ||||
|               ), | ||||
|             ), | ||||
|             DefaultButton( | ||||
|                 LocaleKeys.save.tr(), () async { | ||||
|               updateUserItem(); | ||||
|             }).insideContainer, | ||||
|           ], | ||||
|         ) | ||||
| 
 | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
|   Widget customSwitch(GetUserItemTypesList list){ | ||||
|    return Padding( | ||||
|      padding: const EdgeInsets.only(top: 21), | ||||
|      child: Row( | ||||
|        mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|        children: [ | ||||
|          Text(list.iTEMTYPE.toString(), style: TextStyle( | ||||
|            fontSize: 16, | ||||
|            fontWeight: FontWeight.w600, | ||||
|            color: MyColors.blackColor | ||||
|          ),), | ||||
|          const Spacer(), | ||||
|          Row( | ||||
|            children: [ | ||||
|              CupertinoSwitch( | ||||
|                trackColor: Colors.grey, | ||||
|                  activeColor: MyColors.gradiantEndColor, | ||||
|                  value: list?.fYAENABLEDFALG =='Y' ?true : false, | ||||
|                  onChanged: (value){ | ||||
|                    setState(() { | ||||
|                      list?.fYAENABLEDFALG = value == true ? 'Y': 'N'; | ||||
|                    }); | ||||
|                  } | ||||
|              ), | ||||
|              CupertinoSwitch( | ||||
|                  trackColor: Colors.grey, | ||||
|                  activeColor: MyColors.gradiantEndColor, | ||||
|                  value:  list?.fYIENABLEDFLAG =='Y' ?true : false, | ||||
|                  onChanged: (value){ | ||||
|                    setState(() { | ||||
|                     // list.isFYI  = value; | ||||
|                      list?.fYIENABLEDFLAG = value ==true ? 'Y': 'N'; | ||||
|                    }); | ||||
|                  } | ||||
|              ), | ||||
|            ], | ||||
|          ) | ||||
|        ], | ||||
|      ), | ||||
|    ); | ||||
|   } | ||||
| 
 | ||||
| } | ||||
					Loading…
					
					
				
		Reference in New Issue