From ddb3ab194014f59c2a5ca11a988587f077cdc66a Mon Sep 17 00:00:00 2001 From: aamir-csol Date: Mon, 18 Aug 2025 15:34:34 +0300 Subject: [PATCH] api mappings --- lib/api/api_mapper_class.dart | 2 +- lib/api/offers_and_discounts_api_client.dart | 6 ++ lib/models/dashboard/menu_entries.dart | 98 +++++++++---------- lib/provider/dashboard_provider_model.dart | 26 ++--- lib/ui/landing/dashboard_screen.dart | 14 +-- lib/ui/landing/widget/services_widget.dart | 18 ++-- .../services_menu_list_screen.dart | 26 ++--- lib/ui/my_team/create_request.dart | 10 +- lib/ui/my_team/employee_details.dart | 2 +- lib/ui/profile/basic_details.dart | 4 +- lib/ui/profile/contact_details.dart | 10 +- lib/ui/profile/family_members.dart | 20 ++-- .../child_education_assistance.dart | 2 +- lib/ui/screens/eit/add_eit.dart | 2 +- 14 files changed, 123 insertions(+), 117 deletions(-) diff --git a/lib/api/api_mapper_class.dart b/lib/api/api_mapper_class.dart index 584dd4b..e0e65a9 100644 --- a/lib/api/api_mapper_class.dart +++ b/lib/api/api_mapper_class.dart @@ -270,7 +270,7 @@ class ApiClassMapper { return GenericResponseModel(); case 'ErrorCount_Get': return; - case 'GET_Menu_Entries': + case 'GET_MENU_ENTRIES': List data = (jsonDecode(jsonEncode(jsonData)) as List).map((item) => GetMenuEntriesList.fromRawJson(jsonEncode(item))).toList(); return data; case 'GET_Open_Notifications': diff --git a/lib/api/offers_and_discounts_api_client.dart b/lib/api/offers_and_discounts_api_client.dart index 83a0393..7bcd2a7 100644 --- a/lib/api/offers_and_discounts_api_client.dart +++ b/lib/api/offers_and_discounts_api_client.dart @@ -67,5 +67,11 @@ class OffersAndDiscountsApiClient { url, postParams, ); + + + // dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID); + // ApiResponse res = ApiResponse.fromJson(response); + // List ress = await ApiClassMapper().handleApiEndpoint(endpoint: "GetOfferDiscountsConfigData", jsonData: res.data); + // return ress; } } diff --git a/lib/models/dashboard/menu_entries.dart b/lib/models/dashboard/menu_entries.dart index 6250cb6..09f846f 100644 --- a/lib/models/dashboard/menu_entries.dart +++ b/lib/models/dashboard/menu_entries.dart @@ -1,69 +1,69 @@ import 'dart:convert'; class GetMenuEntriesList { + int? lvl; + String? menUEntryType; + String? prompt; + String? menUName; + dynamic parenTMenuName; + int? entrYSequence; + dynamic functioNName; + dynamic requesTType; + dynamic adDButton; + dynamic updatEButton; + dynamic deletEButton; + String? icon; + dynamic attachmenTRequired; + GetMenuEntriesList({ - this.addButton, - this.deleteButton, - this.entrySequence, - this.functionName, - this.icon, this.lvl, - this.menuEntryType, - this.menuName, - this.parentMenuName, + this.menUEntryType, this.prompt, - this.requestType, - this.updateButton, - this.attachmenTRequired + this.menUName, + this.parenTMenuName, + this.entrYSequence, + this.functioNName, + this.requesTType, + this.adDButton, + this.updatEButton, + this.deletEButton, + this.icon, + this.attachmenTRequired, }); - String? addButton; - String? deleteButton; - int? entrySequence; - String? functionName; - String? icon; - int? lvl; - String? menuEntryType; - String? menuName; - String? parentMenuName; - String? prompt; - String? requestType; - String? updateButton; - dynamic attachmenTRequired; factory GetMenuEntriesList.fromRawJson(String str) => GetMenuEntriesList.fromJson(json.decode(str)); String toRawJson() => json.encode(toJson()); factory GetMenuEntriesList.fromJson(Map json) => GetMenuEntriesList( - addButton: json["adDButton"] == null ? null : json["adDButton"], - deleteButton: json["deletEButton"] == null ? null : json["deletEButton"], - entrySequence: json["entrYSequence"] == null ? null : json["entrYSequence"], - functionName: json["functioNName"] == null ? null : json["functioNName"], - icon: json["icon"] == null ? null : json["icon"], - lvl: json["lvl"] == null ? null : json["lvl"], - menuEntryType: json["menU_ENTRY_TYPE"] == null ? null : json["menU_ENTRY_TYPE"], - menuName: json["menUName"] == null ? null : json["menUName"], - parentMenuName: json["parenTMenuName"] == null ? null : json["parenTMenuName"], - prompt: json["prompt"] == null ? null : json["prompt"], - requestType: json["requesTType"] == null ? null : json["requesTType"], - updateButton: json["updatEButton"] == null ? null :json["updatEButton"], + lvl: json["lvl"], + menUEntryType: json["menU_ENTRY_TYPE"], + prompt: json["prompt"], + menUName: json["menU_NAME"], + parenTMenuName: json["parenT_MENU_NAME"], + entrYSequence: json["entrY_SEQUENCE"], + functioNName: json["functioN_NAME"], + requesTType: json["requesT_TYPE"], + adDButton: json["adD_BUTTON"], + updatEButton: json["updatE_BUTTON"], + deletEButton: json["deletE_BUTTON"], + icon: json["icon"], attachmenTRequired: json["attachmenT_REQUIRED"], ); Map toJson() => { - "adDButton": addButton == null ? null :addButton, - "deletEButton": deleteButton == null ? null : deleteButton, - "entrYSequence": entrySequence == null ? null : entrySequence, - "functioNName": functionName == null ? null : functionName, - "icon": icon == null ? null : icon, - "lvl": lvl == null ? null : lvl, - "menU_ENTRY_TYPE": menuEntryType == null ? null : menuEntryType, - "menUName": menuName == null ? null : menuName, - "parenTMenuName": parentMenuName == null ? null : parentMenuName, - "prompt": prompt == null ? null : prompt, - "requesTType": requestType == null ? null : requestType, - "updatEButton": updateButton == null ? null : updateButton, + "lvl": lvl, + "menU_ENTRY_TYPE": menUEntryType, + "prompt": prompt, + "menU_NAME": menUName, + "parenT_MENU_NAME": parenTMenuName, + "entrY_SEQUENCE": entrYSequence, + "functioN_NAME": functioNName, + "requesT_TYPE": requesTType, + "adD_BUTTON": adDButton, + "updatE_BUTTON": updatEButton, + "deletE_BUTTON": deletEButton, + "icon": icon, "attachmenT_REQUIRED": attachmenTRequired, }; } - diff --git a/lib/provider/dashboard_provider_model.dart b/lib/provider/dashboard_provider_model.dart index 4168134..0b9c2bb 100644 --- a/lib/provider/dashboard_provider_model.dart +++ b/lib/provider/dashboard_provider_model.dart @@ -231,11 +231,11 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { void fetchMenuEntries() async { try { List? getMenuEntriesList = await DashboardApiClient().getGetMenuEntries(); - getMenuEntriesList = getMenuEntriesList; //genericResponseModel!.getMenuEntriesList; - homeMenus = parseMenus(getMenuEntriesList!); + // getMenuEntriesList = getMenuEntriesList; //genericResponseModel!.getMenuEntriesList; + homeMenus = parseMenus(getMenuEntriesList); if (homeMenus!.isNotEmpty) { - homeMenus!.first.menuEntiesList.insert(0, GetMenuEntriesList(requestType: "MONTHLY_ATTENDANCE", prompt: LocaleKeys.monthlyAttendance.tr())); - homeMenus!.first.menuEntiesList.add(GetMenuEntriesList(requestType: "VACATION_RULE", prompt: LocaleKeys.vacationRule.tr())); + homeMenus!.first.menuEntiesList.insert(0, GetMenuEntriesList(requesTType: "MONTHLY_ATTENDANCE", prompt: LocaleKeys.monthlyAttendance.tr())); + homeMenus!.first.menuEntiesList.add(GetMenuEntriesList(requesTType: "VACATION_RULE", prompt: LocaleKeys.vacationRule.tr())); } isServicesMenusLoading = false; notifyListeners(); @@ -264,23 +264,23 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { List parseMenus(List getMenuEntriesList) { List menus = []; for (int i = 0; i < getMenuEntriesList.length; i++) { - if (getMenuEntriesList[i].parentMenuName!.isEmpty) { - GetMenuEntriesList abc = GetMenuEntriesList(requestType: "itg_forms", prompt: LocaleKeys.itgForms.tr()); - List list = getMenuEntriesList.where((element) => getMenuEntriesList[i].menuName == element.parentMenuName).toList(); + if (getMenuEntriesList[i].parenTMenuName == null || getMenuEntriesList[i].parenTMenuName!.isEmpty) { + GetMenuEntriesList abc = GetMenuEntriesList(requesTType: "itg_forms", prompt: LocaleKeys.itgForms.tr()); + List list = getMenuEntriesList.where((element) => getMenuEntriesList[i].menUName == element.parenTMenuName).toList(); - if (getMenuEntriesList[i].menuName == "MBL_E_PROFESSIONALS_01") { + if (getMenuEntriesList[i].menUName == "MBL_E_PROFESSIONALS_01") { // hard coding this check to add change password for Active Directory GetMenuEntriesList activeDirectoryEntry = GetMenuEntriesList( - requestType: "RESET_ITG_AD_PASSWORD", + requesTType: "RESET_ITG_AD_PASSWORD", prompt: LocaleKeys.resetAdPassword.tr(), - parentMenuName: 'ITG_FORMS', - menuName: LocaleKeys.itgForms.tr(), - menuEntryType: "FUNCTION", //Reset AD Password + parenTMenuName: 'ITG_FORMS', + menUName: LocaleKeys.itgForms.tr(), + menUEntryType: "FUNCTION", //Reset AD Password ); getMenuEntriesList.add(activeDirectoryEntry); - list.add(GetMenuEntriesList(requestType: "ITG_FORMS", prompt: LocaleKeys.itgForms.tr(), menuName: 'ITG_FORMS')); + list.add(GetMenuEntriesList(requesTType: "ITG_FORMS", prompt: LocaleKeys.itgForms.tr(), menUName: 'ITG_FORMS')); } menus.add(Menus(getMenuEntriesList[i], list)); diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index 99b162a..8c75d56 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -149,13 +149,13 @@ class _DashboardScreenState extends State with WidgetsBindingOb data.fetchMissingSwipe(context); data.fetchLeaveTicketBalance(context, DateTime.now()); data.fetchMenuEntries(); - // data.getCategoryOffersListAPI(context); - // marathonProvider.getMarathonDetailsFromApi(); - // marathonProvider.getMarathonTutorial(); - // if (isFromInit) { - // checkERMChannel(); - // } - // if (!cProvider.disbaleChatForThisUser && !isFromInit) checkHubCon(); + data.getCategoryOffersListAPI(context); + marathonProvider.getMarathonDetailsFromApi(); + marathonProvider.getMarathonTutorial(); + if (isFromInit) { + checkERMChannel(); + } + if (!cProvider.disbaleChatForThisUser && !isFromInit) checkHubCon(); _refreshController.refreshCompleted(); } diff --git a/lib/ui/landing/widget/services_widget.dart b/lib/ui/landing/widget/services_widget.dart index 7c19b58..9707417 100644 --- a/lib/ui/landing/widget/services_widget.dart +++ b/lib/ui/landing/widget/services_widget.dart @@ -198,30 +198,30 @@ class ServicesWidget extends StatelessWidget { void handleOnPress(context, GetMenuEntriesList menuEntry) { var pro = Provider.of(context, listen: false); - if (menuEntry.requestType == "MONTHLY_ATTENDANCE") { + if (menuEntry.requesTType == "MONTHLY_ATTENDANCE") { Navigator.pushNamed(context, AppRoutes.monthlyAttendance); return; - } else if (menuEntry.requestType == "VACATION_RULE") { + } else if (menuEntry.requesTType == "VACATION_RULE") { Navigator.pushNamed(context, AppRoutes.vacationRule); return; - } else if (menuEntry.menuName == "MBL_PERINFO_SS") { + } else if (menuEntry.menUName == "MBL_PERINFO_SS") { Navigator.of(context).pushNamed(AppRoutes.profile); return; - } else if (menuEntry.menuName!.isNotEmpty && menuEntry.menuName!.substring(4, menuEntry.menuName!.length) == "MBL_EMPLOYEE_DOCUMENTS") { + } else if (menuEntry.menUName!.isNotEmpty && menuEntry.menUName!.substring(4, menuEntry.menUName!.length) == "MBL_EMPLOYEE_DOCUMENTS") { Navigator.pushNamed(context, AppRoutes.myDocuments); return; } - List menuList = pro.getMenuEntriesList?.where((element) => element.parentMenuName == menuEntry.menuName && (element.menuEntryType == "FUNCTION")).toList() ?? []; + List menuList = pro.getMenuEntriesList?.where((element) => element.parenTMenuName == menuEntry.menUName && (element.menUEntryType == "FUNCTION")).toList() ?? []; menuEntry.icon = ""; if (menuList.isEmpty) { - if (menuEntry.requestType == "EIT") { - Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(menuEntry.prompt!, menuEntry.functionName!)); - } else if (menuEntry.requestType == "PAYSLIP") { + if (menuEntry.requesTType == "EIT") { + Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(menuEntry.prompt!, menuEntry.functioNName!)); + } else if (menuEntry.requesTType == "PAYSLIP") { Navigator.pushNamed(context, AppRoutes.monthlyPaySlip); } } else { List _menuList = - pro.getMenuEntriesList?.where((element) => element.parentMenuName == menuEntry.menuName && (element.menuEntryType == "FUNCTION" || element.menuEntryType == "MENU")).toList() ?? []; + pro.getMenuEntriesList?.where((element) => element.parenTMenuName == menuEntry.menUName && (element.menUEntryType == "FUNCTION" || element.menUEntryType == "MENU")).toList() ?? []; Navigator.pushNamed(context, AppRoutes.servicesMenuListScreen, arguments: ServicesMenuListScreenParams(menuEntry.prompt!, _menuList.isEmpty ? menuList : _menuList)); } return; diff --git a/lib/ui/my_attendance/services_menu_list_screen.dart b/lib/ui/my_attendance/services_menu_list_screen.dart index a074cad..3637b4b 100644 --- a/lib/ui/my_attendance/services_menu_list_screen.dart +++ b/lib/ui/my_attendance/services_menu_list_screen.dart @@ -43,36 +43,36 @@ class ServicesMenuListScreen extends StatelessWidget { : ListView.separated( padding: const EdgeInsets.all(21), itemBuilder: (cxt, index) => itemView("assets/images/pdf.svg", servicesMenuData.list[index].prompt!, context).onPress(() { - if (servicesMenuData.list[index].parentMenuName == "MBL_PERINFO_SS") { - if (servicesMenuData.list[index].requestType == "BASIC_DETAILS") { + if (servicesMenuData.list[index].parenTMenuName == "MBL_PERINFO_SS") { + if (servicesMenuData.list[index].requesTType == "BASIC_DETAILS") { Navigator.pushNamed(context, AppRoutes.basicDetails); - } else if (servicesMenuData.list[index].requestType == "PHONE_NUMBERS") { + } else if (servicesMenuData.list[index].requesTType == "PHONE_NUMBERS") { Navigator.pushNamed(context, AppRoutes.personalInfo); - } else if (servicesMenuData.list[index].requestType == "ADDRESS") { + } else if (servicesMenuData.list[index].requesTType == "ADDRESS") { Navigator.pushNamed(context, AppRoutes.contactDetails); - } else if (servicesMenuData.list[index].requestType == "CONTACT") { + } else if (servicesMenuData.list[index].requesTType == "CONTACT") { Navigator.pushNamed(context, AppRoutes.familyMembers); } return; - } else if (servicesMenuData.list[index].requestType == "ABSENCE") { + } else if (servicesMenuData.list[index].requesTType == "ABSENCE") { Navigator.pushNamed(context, AppRoutes.leaveBalance, arguments: servicesMenuData.selectedEmp); return; - } else if (servicesMenuData.list[index].requestType == "RESET_ITG_AD_PASSWORD") { + } else if (servicesMenuData.list[index].requesTType == "RESET_ITG_AD_PASSWORD") { Navigator.pushNamed(context, AppRoutes.changeItgAdPasswordScreen); return; } - if (servicesMenuData.list[index].requestType == "EIT") { + if (servicesMenuData.list[index].requesTType == "EIT") { Navigator.pushNamed(context, AppRoutes.dynamicScreen, - arguments: DynamicListViewParams(servicesMenuData.list[index].prompt!, servicesMenuData.list[index].functionName!, selectedEmp: servicesMenuData.selectedEmp)); - } else if (servicesMenuData.list[index].requestType == "CEI") { + arguments: DynamicListViewParams(servicesMenuData.list[index].prompt!, servicesMenuData.list[index].functioNName!, selectedEmp: servicesMenuData.selectedEmp)); + } else if (servicesMenuData.list[index].requesTType == "CEI") { Navigator.pushNamed(context, AppRoutes.childEducation, arguments: servicesMenuData.list[index]); } else { - if (servicesMenuData.list[index].requestType == "TERMINATION") { + if (servicesMenuData.list[index].requesTType == "TERMINATION") { Navigator.pushNamed(context, AppRoutes.endEmploymentScreen, - arguments: DynamicListViewParams(servicesMenuData.list[index].prompt!, servicesMenuData.list[index].functionName!)); + arguments: DynamicListViewParams(servicesMenuData.list[index].prompt!, servicesMenuData.list[index].functioNName!)); } else { var provider = Provider.of(context, listen: false); - List menuList = provider.getMenuEntriesList?.where((element) => element.parentMenuName == servicesMenuData.list[index].menuName).toList() ?? []; + List menuList = provider.getMenuEntriesList?.where((element) => element.parenTMenuName == servicesMenuData.list[index].menUName).toList() ?? []; Navigator.pushNamed(context, AppRoutes.servicesMenuListScreen, arguments: ServicesMenuListScreenParams(servicesMenuData.list[index].prompt!, menuList)); } } diff --git a/lib/ui/my_team/create_request.dart b/lib/ui/my_team/create_request.dart index b77ac30..61033e8 100644 --- a/lib/ui/my_team/create_request.dart +++ b/lib/ui/my_team/create_request.dart @@ -58,18 +58,18 @@ class _CreateRequestState extends State { List parseMenus(List getMenuEntriesList) { List menus = []; for (int i = 0; i < getMenuEntriesList.length; i++) { - if (getMenuEntriesList[i].parentMenuName!.isEmpty) { - menus.add(Menus(getMenuEntriesList[i], getMenuEntriesList.where((element) => getMenuEntriesList[i].menuName == element.parentMenuName).toList())); + if (getMenuEntriesList[i].parenTMenuName!.isEmpty) { + menus.add(Menus(getMenuEntriesList[i], getMenuEntriesList.where((element) => getMenuEntriesList[i].menUName == element.parenTMenuName).toList())); } } return menus; } void handleOnPress(context, Menus menu) { - if (menu.menuEntry.menuEntryType == "FUNCTION") { - if (menu.menuEntry.requestType == "EIT") { + if (menu.menuEntry.menUEntryType == "FUNCTION") { + if (menu.menuEntry.requesTType == "EIT") { Navigator.pushNamed(context, AppRoutes.dynamicScreen, - arguments: DynamicListViewParams(menu.menuEntry.prompt!, menu.menuEntry.functionName!, selectedEmp: getEmployeeSubordinates?.eMPLOYEENUMBER ?? '')); + arguments: DynamicListViewParams(menu.menuEntry.prompt!, menu.menuEntry.functioNName!, selectedEmp: getEmployeeSubordinates?.eMPLOYEENUMBER ?? '')); } else {} } else { Navigator.pushNamed(context, AppRoutes.servicesMenuListScreen, diff --git a/lib/ui/my_team/employee_details.dart b/lib/ui/my_team/employee_details.dart index e78c304..cb65bb0 100644 --- a/lib/ui/my_team/employee_details.dart +++ b/lib/ui/my_team/employee_details.dart @@ -292,7 +292,7 @@ class _EmployeeDetailsState extends State { } GetMenuEntriesList getMenuEntries(String type) { - List data = _EmployeeDetailsState.menuData.where((GetMenuEntriesList test) => test.functionName == type).toList(); + List data = _EmployeeDetailsState.menuData.where((GetMenuEntriesList test) => test.functioNName == type).toList(); if (data.isNotEmpty) { return data[0]; } else { diff --git a/lib/ui/profile/basic_details.dart b/lib/ui/profile/basic_details.dart index 42ecf1d..b3885d1 100644 --- a/lib/ui/profile/basic_details.dart +++ b/lib/ui/profile/basic_details.dart @@ -48,7 +48,7 @@ class _BasicDetailsState extends State { menuData[i].icon == ""; } - var filterList = menuData.where((e) => e.requestType == 'BASIC_DETAILS').toList(); + var filterList = menuData.where((e) => e.requesTType == 'BASIC_DETAILS').toList(); if (filterList.isNotEmpty) { menuEntries = filterList.first; } @@ -106,7 +106,7 @@ class _BasicDetailsState extends State { ), DefaultButton( LocaleKeys.update.tr(), - menuEntries.updateButton == 'Y' + menuEntries.updatEButton == 'Y' ? () async { showAlertDialog(context); } diff --git a/lib/ui/profile/contact_details.dart b/lib/ui/profile/contact_details.dart index 749978e..4c6c0cd 100644 --- a/lib/ui/profile/contact_details.dart +++ b/lib/ui/profile/contact_details.dart @@ -47,12 +47,12 @@ class _ContactDetailsState extends State { super.initState(); List menuData = Provider.of(context, listen: false).getMenuEntriesList!; - var filterList = menuData.where((GetMenuEntriesList e) => e.requestType == 'PHONE_NUMBERS').toList(); + var filterList = menuData.where((GetMenuEntriesList e) => e.requesTType == 'PHONE_NUMBERS').toList(); if (filterList.isNotEmpty) { menuEntriesPhone = filterList.first; } - filterList = menuData.where((GetMenuEntriesList e) => e.requestType == 'ADDRESS').toList(); + filterList = menuData.where((GetMenuEntriesList e) => e.requesTType == 'ADDRESS').toList(); if (filterList.isNotEmpty) { menuEntriesAddress = filterList.first; } @@ -100,7 +100,7 @@ class _ContactDetailsState extends State { ), separatorBuilder: (cxt, index) => 12.height, itemCount: getEmployeePhonesList.length), - if (menuEntriesPhone.updateButton == 'Y') + if (menuEntriesPhone.updatEButton == 'Y') AppState().isArabic(context) ? Positioned( top: 1, @@ -131,7 +131,7 @@ class _ContactDetailsState extends State { ), separatorBuilder: (cxt, index) => 12.height, itemCount: getEmployeeAddressList.length), - if (menuEntriesAddress.updateButton == 'Y') + if (menuEntriesAddress.updatEButton == 'Y') AppState().isArabic(context) ? Positioned( top: 1, @@ -148,7 +148,7 @@ class _ContactDetailsState extends State { else Stack( children: [ - if (menuEntriesAddress.addButton == 'Y') + if (menuEntriesAddress.adDButton == 'Y') AppState().isArabic(context) ? Positioned( top: 1, diff --git a/lib/ui/profile/family_members.dart b/lib/ui/profile/family_members.dart index ffded0b..f1bfb3c 100644 --- a/lib/ui/profile/family_members.dart +++ b/lib/ui/profile/family_members.dart @@ -37,7 +37,7 @@ class _FamilyMembersState extends State { super.initState(); List menuData = Provider.of(context, listen: false).getMenuEntriesList!; - List arr = menuData.where((GetMenuEntriesList e) => e.requestType == 'CONTACT').toList(); + List arr = menuData.where((GetMenuEntriesList e) => e.requesTType == 'CONTACT').toList(); if (arr.isNotEmpty) { menuEntries = arr[0]; } else { @@ -95,16 +95,16 @@ class _FamilyMembersState extends State { child: Icon( Icons.edit, size: 14, - color: menuEntries.updateButton == 'Y' ? MyColors.grey67Color : MyColors.lightGreyColor, + color: menuEntries.updatEButton == 'Y' ? MyColors.grey67Color : MyColors.lightGreyColor, )), TextSpan( text: LocaleKeys.update.tr(), style: TextStyle( - color: menuEntries.updateButton == 'Y' ? MyColors.grey67Color : MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600), + color: menuEntries.updatEButton == 'Y' ? MyColors.grey67Color : MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600), recognizer: TapGestureRecognizer() ..onTap = () async { relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID; - menuEntries.updateButton == 'Y' ? showUpdateAlertDialog(context, relationId, 2, "UPDATE") : null; + menuEntries.updatEButton == 'Y' ? showUpdateAlertDialog(context, relationId, 2, "UPDATE") : null; }) ], ), @@ -117,19 +117,19 @@ class _FamilyMembersState extends State { child: Icon( Icons.delete, size: 15, - color: menuEntries.updateButton == 'Y' ? MyColors.redColor : MyColors.lightGreyColor, + color: menuEntries.updatEButton == 'Y' ? MyColors.redColor : MyColors.lightGreyColor, ), ), TextSpan( text: LocaleKeys.remove.tr(), style: TextStyle( - color: menuEntries.updateButton == 'Y' ? MyColors.redColor : MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600), + color: menuEntries.updatEButton == 'Y' ? MyColors.redColor : MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600), ), ], ), ).onPress(() { relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID; - menuEntries.updateButton == 'Y' ? showRemoveAlertDialog(context, relationId) : null; + menuEntries.updatEButton == 'Y' ? showRemoveAlertDialog(context, relationId) : null; }), ], ), @@ -139,9 +139,9 @@ class _FamilyMembersState extends State { ), DefaultButton( LocaleKeys.addNewFamilyMember.tr(), - menuEntries.updateButton == 'Y' + menuEntries.updatEButton == 'Y' ? () async { - Navigator.pushNamed(context, AppRoutes.addUpdateFamilyMember, arguments: FamilyMemberScreenParams( relationId, flag: 1, actionType: "ADD")); + Navigator.pushNamed(context, AppRoutes.addUpdateFamilyMember, arguments: FamilyMemberScreenParams(relationId, flag: 1, actionType: "ADD")); // ProfileScreen(); } : null) @@ -167,7 +167,7 @@ class _FamilyMembersState extends State { Navigator.pushNamed( context, AppRoutes.addUpdateFamilyMember, - arguments:FamilyMemberScreenParams(relationId, flag: 2, actionType: "UPDATE"), + arguments: FamilyMemberScreenParams(relationId, flag: 2, actionType: "UPDATE"), ); }, ); diff --git a/lib/ui/screens/child_education/child_education_assistance.dart b/lib/ui/screens/child_education/child_education_assistance.dart index 283dab3..8bf0bb4 100644 --- a/lib/ui/screens/child_education/child_education_assistance.dart +++ b/lib/ui/screens/child_education/child_education_assistance.dart @@ -45,7 +45,7 @@ class ChildEducationAssistance extends StatelessWidget { ], ).objectContainerView(disablePadding: false, center: false).onPress(() { Navigator.pushNamed(context, AppRoutes.dynamicScreen, - arguments: DynamicListViewParams(empContactList[index].cONTACTNAME!, menuEntry!.functionName!, pContactRelationshipId: empContactList[index].cONTACTRELATIONSHIPID)); + arguments: DynamicListViewParams(empContactList[index].cONTACTNAME!, menuEntry!.functioNName!, pContactRelationshipId: empContactList[index].cONTACTRELATIONSHIPID)); }); }); } else { diff --git a/lib/ui/screens/eit/add_eit.dart b/lib/ui/screens/eit/add_eit.dart index 629fbd0..5f1c84e 100644 --- a/lib/ui/screens/eit/add_eit.dart +++ b/lib/ui/screens/eit/add_eit.dart @@ -19,7 +19,7 @@ class AddEITScreen extends StatelessWidget { getMenu = ModalRoute.of(context)!.settings.arguments as GetMenuEntriesList; data = Provider.of(context, listen: false); - data.getEITList(getMenu.functionName.toString()); + data.getEITList(getMenu.functioNName.toString()); return DefaultTabController( length: 2, child: Scaffold(