api mappings

master-Api2.0_update3.29
aamir-csol 6 months ago
parent e87705a5a1
commit ddb3ab1940

@ -270,7 +270,7 @@ class ApiClassMapper {
return GenericResponseModel(); return GenericResponseModel();
case 'ErrorCount_Get': case 'ErrorCount_Get':
return; return;
case 'GET_Menu_Entries': case 'GET_MENU_ENTRIES':
List<GetMenuEntriesList> data = (jsonDecode(jsonEncode(jsonData)) as List).map((item) => GetMenuEntriesList.fromRawJson(jsonEncode(item))).toList(); List<GetMenuEntriesList> data = (jsonDecode(jsonEncode(jsonData)) as List).map((item) => GetMenuEntriesList.fromRawJson(jsonEncode(item))).toList();
return data; return data;
case 'GET_Open_Notifications': case 'GET_Open_Notifications':

@ -67,5 +67,11 @@ class OffersAndDiscountsApiClient {
url, url,
postParams, postParams,
); );
// dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
// ApiResponse res = ApiResponse.fromJson(response);
// List<OffersListModel> ress = await ApiClassMapper().handleApiEndpoint(endpoint: "GetOfferDiscountsConfigData", jsonData: res.data);
// return ress;
} }
} }

@ -1,69 +1,69 @@
import 'dart:convert'; import 'dart:convert';
class GetMenuEntriesList { 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({ GetMenuEntriesList({
this.addButton,
this.deleteButton,
this.entrySequence,
this.functionName,
this.icon,
this.lvl, this.lvl,
this.menuEntryType, this.menUEntryType,
this.menuName,
this.parentMenuName,
this.prompt, this.prompt,
this.requestType, this.menUName,
this.updateButton, this.parenTMenuName,
this.attachmenTRequired 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)); factory GetMenuEntriesList.fromRawJson(String str) => GetMenuEntriesList.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson()); String toRawJson() => json.encode(toJson());
factory GetMenuEntriesList.fromJson(Map<String, dynamic> json) => GetMenuEntriesList( factory GetMenuEntriesList.fromJson(Map<String, dynamic> json) => GetMenuEntriesList(
addButton: json["adDButton"] == null ? null : json["adDButton"], lvl: json["lvl"],
deleteButton: json["deletEButton"] == null ? null : json["deletEButton"], menUEntryType: json["menU_ENTRY_TYPE"],
entrySequence: json["entrYSequence"] == null ? null : json["entrYSequence"], prompt: json["prompt"],
functionName: json["functioNName"] == null ? null : json["functioNName"], menUName: json["menU_NAME"],
icon: json["icon"] == null ? null : json["icon"], parenTMenuName: json["parenT_MENU_NAME"],
lvl: json["lvl"] == null ? null : json["lvl"], entrYSequence: json["entrY_SEQUENCE"],
menuEntryType: json["menU_ENTRY_TYPE"] == null ? null : json["menU_ENTRY_TYPE"], functioNName: json["functioN_NAME"],
menuName: json["menUName"] == null ? null : json["menUName"], requesTType: json["requesT_TYPE"],
parentMenuName: json["parenTMenuName"] == null ? null : json["parenTMenuName"], adDButton: json["adD_BUTTON"],
prompt: json["prompt"] == null ? null : json["prompt"], updatEButton: json["updatE_BUTTON"],
requestType: json["requesTType"] == null ? null : json["requesTType"], deletEButton: json["deletE_BUTTON"],
updateButton: json["updatEButton"] == null ? null :json["updatEButton"], icon: json["icon"],
attachmenTRequired: json["attachmenT_REQUIRED"], attachmenTRequired: json["attachmenT_REQUIRED"],
); );
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {
"adDButton": addButton == null ? null :addButton, "lvl": lvl,
"deletEButton": deleteButton == null ? null : deleteButton, "menU_ENTRY_TYPE": menUEntryType,
"entrYSequence": entrySequence == null ? null : entrySequence, "prompt": prompt,
"functioNName": functionName == null ? null : functionName, "menU_NAME": menUName,
"icon": icon == null ? null : icon, "parenT_MENU_NAME": parenTMenuName,
"lvl": lvl == null ? null : lvl, "entrY_SEQUENCE": entrYSequence,
"menU_ENTRY_TYPE": menuEntryType == null ? null : menuEntryType, "functioN_NAME": functioNName,
"menUName": menuName == null ? null : menuName, "requesT_TYPE": requesTType,
"parenTMenuName": parentMenuName == null ? null : parentMenuName, "adD_BUTTON": adDButton,
"prompt": prompt == null ? null : prompt, "updatE_BUTTON": updatEButton,
"requesTType": requestType == null ? null : requestType, "deletE_BUTTON": deletEButton,
"updatEButton": updateButton == null ? null : updateButton, "icon": icon,
"attachmenT_REQUIRED": attachmenTRequired, "attachmenT_REQUIRED": attachmenTRequired,
}; };
} }

@ -231,11 +231,11 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
void fetchMenuEntries() async { void fetchMenuEntries() async {
try { try {
List<GetMenuEntriesList>? getMenuEntriesList = await DashboardApiClient().getGetMenuEntries(); List<GetMenuEntriesList>? getMenuEntriesList = await DashboardApiClient().getGetMenuEntries();
getMenuEntriesList = getMenuEntriesList; //genericResponseModel!.getMenuEntriesList; // getMenuEntriesList = getMenuEntriesList; //genericResponseModel!.getMenuEntriesList;
homeMenus = parseMenus(getMenuEntriesList!); homeMenus = parseMenus(getMenuEntriesList);
if (homeMenus!.isNotEmpty) { if (homeMenus!.isNotEmpty) {
homeMenus!.first.menuEntiesList.insert(0, GetMenuEntriesList(requestType: "MONTHLY_ATTENDANCE", prompt: LocaleKeys.monthlyAttendance.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())); homeMenus!.first.menuEntiesList.add(GetMenuEntriesList(requesTType: "VACATION_RULE", prompt: LocaleKeys.vacationRule.tr()));
} }
isServicesMenusLoading = false; isServicesMenusLoading = false;
notifyListeners(); notifyListeners();
@ -264,23 +264,23 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
List<Menus> parseMenus(List<GetMenuEntriesList> getMenuEntriesList) { List<Menus> parseMenus(List<GetMenuEntriesList> getMenuEntriesList) {
List<Menus> menus = []; List<Menus> menus = [];
for (int i = 0; i < getMenuEntriesList.length; i++) { for (int i = 0; i < getMenuEntriesList.length; i++) {
if (getMenuEntriesList[i].parentMenuName!.isEmpty) { if (getMenuEntriesList[i].parenTMenuName == null || getMenuEntriesList[i].parenTMenuName!.isEmpty) {
GetMenuEntriesList abc = GetMenuEntriesList(requestType: "itg_forms", prompt: LocaleKeys.itgForms.tr()); GetMenuEntriesList abc = GetMenuEntriesList(requesTType: "itg_forms", prompt: LocaleKeys.itgForms.tr());
List<GetMenuEntriesList> list = getMenuEntriesList.where((element) => getMenuEntriesList[i].menuName == element.parentMenuName).toList(); List<GetMenuEntriesList> 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 // hard coding this check to add change password for Active Directory
GetMenuEntriesList activeDirectoryEntry = GetMenuEntriesList( GetMenuEntriesList activeDirectoryEntry = GetMenuEntriesList(
requestType: "RESET_ITG_AD_PASSWORD", requesTType: "RESET_ITG_AD_PASSWORD",
prompt: LocaleKeys.resetAdPassword.tr(), prompt: LocaleKeys.resetAdPassword.tr(),
parentMenuName: 'ITG_FORMS', parenTMenuName: 'ITG_FORMS',
menuName: LocaleKeys.itgForms.tr(), menUName: LocaleKeys.itgForms.tr(),
menuEntryType: "FUNCTION", //Reset AD Password menUEntryType: "FUNCTION", //Reset AD Password
); );
getMenuEntriesList.add(activeDirectoryEntry); 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)); menus.add(Menus(getMenuEntriesList[i], list));

@ -149,13 +149,13 @@ class _DashboardScreenState extends State<DashboardScreen> with WidgetsBindingOb
data.fetchMissingSwipe(context); data.fetchMissingSwipe(context);
data.fetchLeaveTicketBalance(context, DateTime.now()); data.fetchLeaveTicketBalance(context, DateTime.now());
data.fetchMenuEntries(); data.fetchMenuEntries();
// data.getCategoryOffersListAPI(context); data.getCategoryOffersListAPI(context);
// marathonProvider.getMarathonDetailsFromApi(); marathonProvider.getMarathonDetailsFromApi();
// marathonProvider.getMarathonTutorial(); marathonProvider.getMarathonTutorial();
// if (isFromInit) { if (isFromInit) {
// checkERMChannel(); checkERMChannel();
// } }
// if (!cProvider.disbaleChatForThisUser && !isFromInit) checkHubCon(); if (!cProvider.disbaleChatForThisUser && !isFromInit) checkHubCon();
_refreshController.refreshCompleted(); _refreshController.refreshCompleted();
} }

@ -198,30 +198,30 @@ class ServicesWidget extends StatelessWidget {
void handleOnPress(context, GetMenuEntriesList menuEntry) { void handleOnPress(context, GetMenuEntriesList menuEntry) {
var pro = Provider.of<DashboardProviderModel>(context, listen: false); var pro = Provider.of<DashboardProviderModel>(context, listen: false);
if (menuEntry.requestType == "MONTHLY_ATTENDANCE") { if (menuEntry.requesTType == "MONTHLY_ATTENDANCE") {
Navigator.pushNamed(context, AppRoutes.monthlyAttendance); Navigator.pushNamed(context, AppRoutes.monthlyAttendance);
return; return;
} else if (menuEntry.requestType == "VACATION_RULE") { } else if (menuEntry.requesTType == "VACATION_RULE") {
Navigator.pushNamed(context, AppRoutes.vacationRule); Navigator.pushNamed(context, AppRoutes.vacationRule);
return; return;
} else if (menuEntry.menuName == "MBL_PERINFO_SS") { } else if (menuEntry.menUName == "MBL_PERINFO_SS") {
Navigator.of(context).pushNamed(AppRoutes.profile); Navigator.of(context).pushNamed(AppRoutes.profile);
return; 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); Navigator.pushNamed(context, AppRoutes.myDocuments);
return; return;
} }
List<GetMenuEntriesList> menuList = pro.getMenuEntriesList?.where((element) => element.parentMenuName == menuEntry.menuName && (element.menuEntryType == "FUNCTION")).toList() ?? []; List<GetMenuEntriesList> menuList = pro.getMenuEntriesList?.where((element) => element.parenTMenuName == menuEntry.menUName && (element.menUEntryType == "FUNCTION")).toList() ?? [];
menuEntry.icon = ""; menuEntry.icon = "";
if (menuList.isEmpty) { if (menuList.isEmpty) {
if (menuEntry.requestType == "EIT") { if (menuEntry.requesTType == "EIT") {
Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(menuEntry.prompt!, menuEntry.functionName!)); Navigator.pushNamed(context, AppRoutes.dynamicScreen, arguments: DynamicListViewParams(menuEntry.prompt!, menuEntry.functioNName!));
} else if (menuEntry.requestType == "PAYSLIP") { } else if (menuEntry.requesTType == "PAYSLIP") {
Navigator.pushNamed(context, AppRoutes.monthlyPaySlip); Navigator.pushNamed(context, AppRoutes.monthlyPaySlip);
} }
} else { } else {
List<GetMenuEntriesList> _menuList = List<GetMenuEntriesList> _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)); Navigator.pushNamed(context, AppRoutes.servicesMenuListScreen, arguments: ServicesMenuListScreenParams(menuEntry.prompt!, _menuList.isEmpty ? menuList : _menuList));
} }
return; return;

@ -43,36 +43,36 @@ class ServicesMenuListScreen extends StatelessWidget {
: ListView.separated( : ListView.separated(
padding: const EdgeInsets.all(21), padding: const EdgeInsets.all(21),
itemBuilder: (cxt, index) => itemView("assets/images/pdf.svg", servicesMenuData.list[index].prompt!, context).onPress(() { 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].parenTMenuName == "MBL_PERINFO_SS") {
if (servicesMenuData.list[index].requestType == "BASIC_DETAILS") { if (servicesMenuData.list[index].requesTType == "BASIC_DETAILS") {
Navigator.pushNamed(context, AppRoutes.basicDetails); 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); Navigator.pushNamed(context, AppRoutes.personalInfo);
} else if (servicesMenuData.list[index].requestType == "ADDRESS") { } else if (servicesMenuData.list[index].requesTType == "ADDRESS") {
Navigator.pushNamed(context, AppRoutes.contactDetails); Navigator.pushNamed(context, AppRoutes.contactDetails);
} else if (servicesMenuData.list[index].requestType == "CONTACT") { } else if (servicesMenuData.list[index].requesTType == "CONTACT") {
Navigator.pushNamed(context, AppRoutes.familyMembers); Navigator.pushNamed(context, AppRoutes.familyMembers);
} }
return; return;
} else if (servicesMenuData.list[index].requestType == "ABSENCE") { } else if (servicesMenuData.list[index].requesTType == "ABSENCE") {
Navigator.pushNamed(context, AppRoutes.leaveBalance, arguments: servicesMenuData.selectedEmp); Navigator.pushNamed(context, AppRoutes.leaveBalance, arguments: servicesMenuData.selectedEmp);
return; 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); Navigator.pushNamed(context, AppRoutes.changeItgAdPasswordScreen);
return; return;
} }
if (servicesMenuData.list[index].requestType == "EIT") { if (servicesMenuData.list[index].requesTType == "EIT") {
Navigator.pushNamed(context, AppRoutes.dynamicScreen, Navigator.pushNamed(context, AppRoutes.dynamicScreen,
arguments: DynamicListViewParams(servicesMenuData.list[index].prompt!, servicesMenuData.list[index].functionName!, selectedEmp: servicesMenuData.selectedEmp)); arguments: DynamicListViewParams(servicesMenuData.list[index].prompt!, servicesMenuData.list[index].functioNName!, selectedEmp: servicesMenuData.selectedEmp));
} else if (servicesMenuData.list[index].requestType == "CEI") { } else if (servicesMenuData.list[index].requesTType == "CEI") {
Navigator.pushNamed(context, AppRoutes.childEducation, arguments: servicesMenuData.list[index]); Navigator.pushNamed(context, AppRoutes.childEducation, arguments: servicesMenuData.list[index]);
} else { } else {
if (servicesMenuData.list[index].requestType == "TERMINATION") { if (servicesMenuData.list[index].requesTType == "TERMINATION") {
Navigator.pushNamed(context, AppRoutes.endEmploymentScreen, 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 { } else {
var provider = Provider.of<DashboardProviderModel>(context, listen: false); var provider = Provider.of<DashboardProviderModel>(context, listen: false);
List<GetMenuEntriesList> menuList = provider.getMenuEntriesList?.where((element) => element.parentMenuName == servicesMenuData.list[index].menuName).toList() ?? []; List<GetMenuEntriesList> menuList = provider.getMenuEntriesList?.where((element) => element.parenTMenuName == servicesMenuData.list[index].menUName).toList() ?? [];
Navigator.pushNamed(context, AppRoutes.servicesMenuListScreen, arguments: ServicesMenuListScreenParams(servicesMenuData.list[index].prompt!, menuList)); Navigator.pushNamed(context, AppRoutes.servicesMenuListScreen, arguments: ServicesMenuListScreenParams(servicesMenuData.list[index].prompt!, menuList));
} }
} }

@ -58,18 +58,18 @@ class _CreateRequestState extends State<CreateRequest> {
List<Menus> parseMenus(List<GetMenuEntriesList> getMenuEntriesList) { List<Menus> parseMenus(List<GetMenuEntriesList> getMenuEntriesList) {
List<Menus> menus = []; List<Menus> menus = [];
for (int i = 0; i < getMenuEntriesList.length; i++) { for (int i = 0; i < getMenuEntriesList.length; i++) {
if (getMenuEntriesList[i].parentMenuName!.isEmpty) { if (getMenuEntriesList[i].parenTMenuName!.isEmpty) {
menus.add(Menus(getMenuEntriesList[i], getMenuEntriesList.where((element) => getMenuEntriesList[i].menuName == element.parentMenuName).toList())); menus.add(Menus(getMenuEntriesList[i], getMenuEntriesList.where((element) => getMenuEntriesList[i].menUName == element.parenTMenuName).toList()));
} }
} }
return menus; return menus;
} }
void handleOnPress(context, Menus menu) { void handleOnPress(context, Menus menu) {
if (menu.menuEntry.menuEntryType == "FUNCTION") { if (menu.menuEntry.menUEntryType == "FUNCTION") {
if (menu.menuEntry.requestType == "EIT") { if (menu.menuEntry.requesTType == "EIT") {
Navigator.pushNamed(context, AppRoutes.dynamicScreen, 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 {}
} else { } else {
Navigator.pushNamed(context, AppRoutes.servicesMenuListScreen, Navigator.pushNamed(context, AppRoutes.servicesMenuListScreen,

@ -292,7 +292,7 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
} }
GetMenuEntriesList getMenuEntries(String type) { GetMenuEntriesList getMenuEntries(String type) {
List<GetMenuEntriesList> data = _EmployeeDetailsState.menuData.where((GetMenuEntriesList test) => test.functionName == type).toList(); List<GetMenuEntriesList> data = _EmployeeDetailsState.menuData.where((GetMenuEntriesList test) => test.functioNName == type).toList();
if (data.isNotEmpty) { if (data.isNotEmpty) {
return data[0]; return data[0];
} else { } else {

@ -48,7 +48,7 @@ class _BasicDetailsState extends State<BasicDetails> {
menuData[i].icon == ""; 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) { if (filterList.isNotEmpty) {
menuEntries = filterList.first; menuEntries = filterList.first;
} }
@ -106,7 +106,7 @@ class _BasicDetailsState extends State<BasicDetails> {
), ),
DefaultButton( DefaultButton(
LocaleKeys.update.tr(), LocaleKeys.update.tr(),
menuEntries.updateButton == 'Y' menuEntries.updatEButton == 'Y'
? () async { ? () async {
showAlertDialog(context); showAlertDialog(context);
} }

@ -47,12 +47,12 @@ class _ContactDetailsState extends State<ContactDetails> {
super.initState(); super.initState();
List<GetMenuEntriesList> menuData = Provider.of<DashboardProviderModel>(context, listen: false).getMenuEntriesList!; List<GetMenuEntriesList> menuData = Provider.of<DashboardProviderModel>(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) { if (filterList.isNotEmpty) {
menuEntriesPhone = filterList.first; menuEntriesPhone = filterList.first;
} }
filterList = menuData.where((GetMenuEntriesList e) => e.requestType == 'ADDRESS').toList(); filterList = menuData.where((GetMenuEntriesList e) => e.requesTType == 'ADDRESS').toList();
if (filterList.isNotEmpty) { if (filterList.isNotEmpty) {
menuEntriesAddress = filterList.first; menuEntriesAddress = filterList.first;
} }
@ -100,7 +100,7 @@ class _ContactDetailsState extends State<ContactDetails> {
), ),
separatorBuilder: (cxt, index) => 12.height, separatorBuilder: (cxt, index) => 12.height,
itemCount: getEmployeePhonesList.length), itemCount: getEmployeePhonesList.length),
if (menuEntriesPhone.updateButton == 'Y') if (menuEntriesPhone.updatEButton == 'Y')
AppState().isArabic(context) AppState().isArabic(context)
? Positioned( ? Positioned(
top: 1, top: 1,
@ -131,7 +131,7 @@ class _ContactDetailsState extends State<ContactDetails> {
), ),
separatorBuilder: (cxt, index) => 12.height, separatorBuilder: (cxt, index) => 12.height,
itemCount: getEmployeeAddressList.length), itemCount: getEmployeeAddressList.length),
if (menuEntriesAddress.updateButton == 'Y') if (menuEntriesAddress.updatEButton == 'Y')
AppState().isArabic(context) AppState().isArabic(context)
? Positioned( ? Positioned(
top: 1, top: 1,
@ -148,7 +148,7 @@ class _ContactDetailsState extends State<ContactDetails> {
else else
Stack( Stack(
children: [ children: [
if (menuEntriesAddress.addButton == 'Y') if (menuEntriesAddress.adDButton == 'Y')
AppState().isArabic(context) AppState().isArabic(context)
? Positioned( ? Positioned(
top: 1, top: 1,

@ -37,7 +37,7 @@ class _FamilyMembersState extends State<FamilyMembers> {
super.initState(); super.initState();
List<GetMenuEntriesList> menuData = Provider.of<DashboardProviderModel>(context, listen: false).getMenuEntriesList!; List<GetMenuEntriesList> menuData = Provider.of<DashboardProviderModel>(context, listen: false).getMenuEntriesList!;
List<GetMenuEntriesList> arr = menuData.where((GetMenuEntriesList e) => e.requestType == 'CONTACT').toList(); List<GetMenuEntriesList> arr = menuData.where((GetMenuEntriesList e) => e.requesTType == 'CONTACT').toList();
if (arr.isNotEmpty) { if (arr.isNotEmpty) {
menuEntries = arr[0]; menuEntries = arr[0];
} else { } else {
@ -95,16 +95,16 @@ class _FamilyMembersState extends State<FamilyMembers> {
child: Icon( child: Icon(
Icons.edit, Icons.edit,
size: 14, size: 14,
color: menuEntries.updateButton == 'Y' ? MyColors.grey67Color : MyColors.lightGreyColor, color: menuEntries.updatEButton == 'Y' ? MyColors.grey67Color : MyColors.lightGreyColor,
)), )),
TextSpan( TextSpan(
text: LocaleKeys.update.tr(), text: LocaleKeys.update.tr(),
style: TextStyle( 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() recognizer: TapGestureRecognizer()
..onTap = () async { ..onTap = () async {
relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID; 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<FamilyMembers> {
child: Icon( child: Icon(
Icons.delete, Icons.delete,
size: 15, size: 15,
color: menuEntries.updateButton == 'Y' ? MyColors.redColor : MyColors.lightGreyColor, color: menuEntries.updatEButton == 'Y' ? MyColors.redColor : MyColors.lightGreyColor,
), ),
), ),
TextSpan( TextSpan(
text: LocaleKeys.remove.tr(), text: LocaleKeys.remove.tr(),
style: TextStyle( 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(() { ).onPress(() {
relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID; 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<FamilyMembers> {
), ),
DefaultButton( DefaultButton(
LocaleKeys.addNewFamilyMember.tr(), LocaleKeys.addNewFamilyMember.tr(),
menuEntries.updateButton == 'Y' menuEntries.updatEButton == 'Y'
? () async { ? () 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(); // ProfileScreen();
} }
: null) : null)
@ -167,7 +167,7 @@ class _FamilyMembersState extends State<FamilyMembers> {
Navigator.pushNamed( Navigator.pushNamed(
context, context,
AppRoutes.addUpdateFamilyMember, AppRoutes.addUpdateFamilyMember,
arguments:FamilyMemberScreenParams(relationId, flag: 2, actionType: "UPDATE"), arguments: FamilyMemberScreenParams(relationId, flag: 2, actionType: "UPDATE"),
); );
}, },
); );

@ -45,7 +45,7 @@ class ChildEducationAssistance extends StatelessWidget {
], ],
).objectContainerView(disablePadding: false, center: false).onPress(() { ).objectContainerView(disablePadding: false, center: false).onPress(() {
Navigator.pushNamed(context, AppRoutes.dynamicScreen, 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 { } else {

@ -19,7 +19,7 @@ class AddEITScreen extends StatelessWidget {
getMenu = ModalRoute.of(context)!.settings.arguments as GetMenuEntriesList; getMenu = ModalRoute.of(context)!.settings.arguments as GetMenuEntriesList;
data = Provider.of<EITProviderModel>(context, listen: false); data = Provider.of<EITProviderModel>(context, listen: false);
data.getEITList(getMenu.functionName.toString()); data.getEITList(getMenu.functioNName.toString());
return DefaultTabController( return DefaultTabController(
length: 2, length: 2,
child: Scaffold( child: Scaffold(

Loading…
Cancel
Save