Compare commits

...

3 Commits

Author SHA1 Message Date
aamir-csol ddb3ab1940 api mappings 2 months ago
aamir-csol e87705a5a1 fixes 2 months ago
aamir-csol 7252bebd1f fixes 2 months ago

@ -0,0 +1,33 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18.141" height="24.326" viewBox="0 0 18.141 24.326">
<g id="biometrics" transform="translate(-76.645 0.102)">
<g id="Group_10711" data-name="Group 10711" transform="translate(76.745 -0.001)">
<g id="Group_10702" data-name="Group 10702" transform="translate(0.997 0)">
<path id="Path_13731" data-name="Path 13731" d="M92.682,4.276a.519.519,0,0,0,.373-.151,12.049,12.049,0,0,1,4.38-2.6c3.451-1.126,6.718-.255,9.7,2.573a.528.528,0,0,0,.746-.02.507.507,0,0,0,.144-.373.528.528,0,0,0-.164-.367A11.681,11.681,0,0,0,102.1.171a9.846,9.846,0,0,0-4.963.347,13.266,13.266,0,0,0-4.826,2.868.525.525,0,0,0-.157.373.519.519,0,0,0,.151.373A.574.574,0,0,0,92.682,4.276Z" transform="translate(-92.158 0.001)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10703" data-name="Group 10703" transform="translate(6.494 2.408)">
<path id="Path_13732" data-name="Path 13732" d="M227.426,62.967c-.537-3.457-1.9-5.939-4.053-7.366a9.5,9.5,0,0,0-6.98-1.139.526.526,0,0,0,.249,1.021,8.349,8.349,0,0,1,6.122,1c1.918,1.27,3.143,3.5,3.627,6.639a.539.539,0,0,0,.21.347.528.528,0,0,0,.308.1.318.318,0,0,0,.079-.007.531.531,0,0,0,.439-.6Z" transform="translate(-215.99 -54.236)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10704" data-name="Group 10704" transform="translate(0 3.288)">
<path id="Path_13733" data-name="Path 13733" d="M70.745,81.922c.471-5.513,4.132-6.783,4.289-6.836a.518.518,0,0,0,.3-.262.5.5,0,0,0,.026-.4.53.53,0,0,0-.668-.334c-.183.059-4.472,1.545-5,7.746a.53.53,0,0,0,.124.386.536.536,0,0,0,.36.183h.046a.545.545,0,0,0,.34-.124A.551.551,0,0,0,70.745,81.922Z" transform="translate(-69.688 -74.064)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10705" data-name="Group 10705" transform="translate(0.596 4.424)">
<path id="Path_13734" data-name="Path 13734" d="M85.763,106.351A7.125,7.125,0,0,1,87.3,102.73a5.731,5.731,0,0,1,2.1-1.6,5.122,5.122,0,0,1,2.665-.373,7.6,7.6,0,0,1,3.87,1.84.527.527,0,0,0,.74-.065.508.508,0,0,0,.118-.386.491.491,0,0,0-.19-.354,8.581,8.581,0,0,0-4.413-2.076,6.1,6.1,0,0,0-3.208.452,6.82,6.82,0,0,0-2.495,1.892,8.114,8.114,0,0,0-1.774,4.164,20.017,20.017,0,0,1-.511,2.757,3.9,3.9,0,0,1-.9,1.86.543.543,0,0,0-.19.36.555.555,0,0,0,.118.386.531.531,0,0,0,.406.19.521.521,0,0,0,.34-.124,4.747,4.747,0,0,0,1.244-2.39,21.652,21.652,0,0,0,.544-2.914Z" transform="translate(-83.109 -99.669)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10706" data-name="Group 10706" transform="translate(1.971 6.473)">
<path id="Path_13735" data-name="Path 13735" d="M125.938,152.379v-.007c-.052-.478-.1-.976-.151-1.4-.02-.17-.033-.275-.046-.38A4.981,4.981,0,0,0,124.307,147a4.777,4.777,0,0,0-2.377-1.12,4.646,4.646,0,0,0-2.167.151,4.453,4.453,0,0,0-1.971,1.283,6.3,6.3,0,0,0-1.434,3.241c-.007.026-.007.052-.013.072v.02a22.787,22.787,0,0,1-.9,4.367,6.623,6.623,0,0,1-1.165,2.514.543.543,0,0,0-.19.36.554.554,0,0,0,.118.386.543.543,0,0,0,.36.19.554.554,0,0,0,.386-.118,7.67,7.67,0,0,0,1.5-3.012,23.869,23.869,0,0,0,.949-4.6,5.31,5.31,0,0,1,1.179-2.711,3.32,3.32,0,0,1,1.506-.982,3.55,3.55,0,0,1,1.683-.111,3.692,3.692,0,0,1,1.846.864,4.191,4.191,0,0,1,1.087,2.92c.02.151.033.295.046.386.059.511.1.956.151,1.388a21.5,21.5,0,0,0,1.486,6.829.52.52,0,0,0,.478.308.514.514,0,0,0,.216-.046.528.528,0,0,0,.262-.694A20.806,20.806,0,0,1,125.938,152.379Z" transform="translate(-114.084 -145.821)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10707" data-name="Group 10707" transform="translate(3.013 8.548)">
<path id="Path_13736" data-name="Path 13736" d="M146.12,196.064a3.543,3.543,0,0,0-.537-2.449,2.455,2.455,0,0,0-1.08-.871,2.317,2.317,0,0,0-1.3-.138,2.291,2.291,0,0,0-1.44.917,4.445,4.445,0,0,0-.563,1.087,9.367,9.367,0,0,0-.386,1.434c-.079.413-.131.779-.177,1.126a8.913,8.913,0,0,1-.419,1.945,17.939,17.939,0,0,1-1.1,2.468,16.894,16.894,0,0,1-1.434,2.311.526.526,0,0,0,.458.858.5.5,0,0,0,.354-.19,17.82,17.82,0,0,0,1.552-2.482,18.717,18.717,0,0,0,1.165-2.619,10.284,10.284,0,0,0,.471-2.148c.046-.327.092-.668.17-1.067a7.909,7.909,0,0,1,.34-1.264,3.271,3.271,0,0,1,.426-.832,1.222,1.222,0,0,1,.779-.5,1.2,1.2,0,0,1,.707.079,1.388,1.388,0,0,1,.615.5,2.55,2.55,0,0,1,.347,1.742,22.62,22.62,0,0,1-1.46,5.284,25.8,25.8,0,0,1-2.573,5.271.53.53,0,0,0,.092.74.545.545,0,0,0,.321.111.518.518,0,0,0,.413-.2,26.528,26.528,0,0,0,2.724-5.546A23.906,23.906,0,0,0,146.12,196.064Z" transform="translate(-137.568 -192.57)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10708" data-name="Group 10708" transform="translate(14.291 8.495)">
<path id="Path_13737" data-name="Path 13737" d="M393.392,196.2a13.938,13.938,0,0,0-.773-4.518.526.526,0,0,0-.963.426,13.269,13.269,0,0,1,.681,4.158,11.225,11.225,0,0,0,.8,4.315.511.511,0,0,0,.314.255.6.6,0,0,0,.151.02.488.488,0,0,0,.249-.065.511.511,0,0,0,.255-.314.5.5,0,0,0-.046-.4A10.731,10.731,0,0,1,393.392,196.2Z" transform="translate(-391.612 -191.37)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10709" data-name="Group 10709" transform="translate(4.374 10.687)">
<path id="Path_13738" data-name="Path 13738" d="M173.334,241.3a.516.516,0,0,0-.138-.38.511.511,0,0,0-.367-.17.526.526,0,0,0-.55.5,19.166,19.166,0,0,1-1.2,5.762,14.612,14.612,0,0,1-2.711,4.59.529.529,0,0,0,.046.746.5.5,0,0,0,.347.131.523.523,0,0,0,.393-.177,15.861,15.861,0,0,0,2.914-4.917A20.284,20.284,0,0,0,173.334,241.3Z" transform="translate(-168.231 -240.745)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
<g id="Group_10710" data-name="Group 10710" transform="translate(8.472 16.753)">
<path id="Path_13739" data-name="Path 13739" d="M264.567,378.107l-.052-.262a.533.533,0,0,0-.347-.413.546.546,0,0,0-.406.02.529.529,0,0,0-.268.3l-.02.059c-.367,1.035-.727,2.049-1.179,3.064a19.518,19.518,0,0,1-1.676,3.077.522.522,0,0,0-.079.393.513.513,0,0,0,.223.334.539.539,0,0,0,.295.092.529.529,0,0,0,.439-.229,20.72,20.72,0,0,0,1.768-3.241c.2-.458.4-.943.609-1.5a11.594,11.594,0,0,0,1.146,2.92.519.519,0,0,0,.314.249.53.53,0,0,0,.4-.046.537.537,0,0,0,.249-.314.53.53,0,0,0-.046-.4A13.648,13.648,0,0,1,264.567,378.107Z" transform="translate(-260.531 -377.402)" fill="#fff" stroke="#fff" stroke-width="0.2"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB

@ -390,7 +390,7 @@
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Mohemm;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -528,7 +528,7 @@
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Mohemm;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -558,7 +558,7 @@
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Mohemm;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",

@ -378,11 +378,11 @@ class APIError {
// }
class ApiResponse<T> {
final int? totalItemsCount;
final dynamic totalItemsCount;
final T data;
final int? messageStatus;
final String? errorMessage;
final String? errorEndUserMessage;
final dynamic messageStatus;
final dynamic errorMessage;
final dynamic errorEndUserMessage;
ApiResponse({required this.totalItemsCount, required this.data, required this.messageStatus, this.errorMessage, this.errorEndUserMessage});

@ -73,14 +73,8 @@ class ApiClassMapper {
case 'CheckMobileAppVersion':
return CheckMobileAppVersionModel.fromRawJson(jsonData);
case 'GET_MENU':
{
List<ListMenu> data_ =[];
json.decode(jsonData).map((item) {
data_.add(ListMenu.fromRawJson(json.encode(item)));
});
return data_;
}
List<ListMenu> data = (jsonDecode(jsonEncode(jsonData)) as List).map((item) => ListMenu.fromRawJson(jsonEncode(item))).toList();
return data;
// COCWS endpoints
case 'Mohemm_ITG_GetCategories':
return;
@ -276,12 +270,13 @@ class ApiClassMapper {
return GenericResponseModel();
case 'ErrorCount_Get':
return;
case 'GET_Menu_Entries':
return GetMenuEntriesList.fromRawJson(jsonData);;
case 'GET_MENU_ENTRIES':
List<GetMenuEntriesList> data = (jsonDecode(jsonEncode(jsonData)) as List).map((item) => GetMenuEntriesList.fromRawJson(jsonEncode(item))).toList();
return data;
case 'GET_Open_Notifications':
return GenericResponseModel.fromJson(jsonData);
case 'Get_Open_Missing_Swipes':
return GetOpenMissingSwipes.fromRawJson(jsonData);
case 'GET_OPEN_MISSING_SWIPES':
return GetOpenMissingSwipes.fromJson(jsonData);
case 'GET_CONTACT_COLS_STRUCTURE':
return;
case 'GET_EMPLOYEE_ADDRESS':
@ -379,7 +374,9 @@ class ApiClassMapper {
case 'GET_DEFAULT_VALUE':
return;
case 'GET_ACCRUAL_BALANCES':
return GetAccrualBalancesList();
print(jsonEncode(jsonData));
List<GetAccrualBalancesList> data = (jsonDecode(jsonEncode(jsonData)) as List).map((item) => GetAccrualBalancesList.fromRawJson(jsonEncode(item))).toList();
return data;
case 'DisableSession':
return;
case 'GET_VACATION_RULES':

@ -87,8 +87,8 @@ class DashboardApiClient {
postParams.addAll(AppState().postParamsJson);
dynamic response = await ApiClient().postJsonForObject((json) => json, url, postParams, token: AppState().postParamsObject!.tokenID);
ApiResponse res = ApiResponse.fromJson(response);
GetOpenMissingSwipes ress = await ApiClassMapper().handleApiEndpoint(endpoint: "GET_OPEN_MISSING_SWIPES", jsonData: res.data);
ApiResponse res = ApiResponse.fromJson(response);
GetOpenMissingSwipes? ress = await ApiClassMapper().handleApiEndpoint(endpoint: "GET_OPEN_MISSING_SWIPES", jsonData: res.data);
return ress;
}

@ -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<OffersListModel> ress = await ApiClassMapper().handleApiEndpoint(endpoint: "GetOfferDiscountsConfigData", jsonData: res.data);
// return ress;
}
}

@ -1,39 +1,86 @@
// class GetAccrualBalancesList {
// GetAccrualBalancesList({
// this.accrualNetEntitlement,
// this.accrualUsedEntitlement,
// this.accrualYearlyEntitlement,
// this.accuralPlanName,
// this.endDate,
// this.lastAccrualDate,
// this.startDate,
// });
//
// double? accrualNetEntitlement;
// num? accrualUsedEntitlement; //Todo: Add function
// dynamic accrualYearlyEntitlement;
// String? accuralPlanName;
// String? endDate;
// String? lastAccrualDate;
// String? startDate;
//
// factory GetAccrualBalancesList.fromJson(Map<String, dynamic> json) => GetAccrualBalancesList(
// accrualNetEntitlement: json["ACCRUAL_NET_ENTITLEMENT"] == null ? null : json["ACCRUAL_NET_ENTITLEMENT"].toDouble(),
// accrualUsedEntitlement: json["ACCRUAL_USED_ENTITLEMENT"] == null ? null : json["ACCRUAL_USED_ENTITLEMENT"],
// accrualYearlyEntitlement: json["ACCRUAL_YEARLY_ENTITLEMENT"],
// accuralPlanName: json["ACCURAL_PLAN_NAME"] == null ? null : json["ACCURAL_PLAN_NAME"],
// endDate: json["END_DATE"] == null ? null : json["END_DATE"],
// lastAccrualDate: json["LAST_ACCRUAL_DATE"] == null ? null : json["LAST_ACCRUAL_DATE"],
// startDate: json["START_DATE"] == null ? null : json["START_DATE"],
// );
//
// Map<String, dynamic> toJson() => {
// "ACCRUAL_NET_ENTITLEMENT": accrualNetEntitlement == null ? null : accrualNetEntitlement,
// "ACCRUAL_USED_ENTITLEMENT": accrualUsedEntitlement == null ? null : accrualUsedEntitlement,
// "ACCRUAL_YEARLY_ENTITLEMENT": accrualYearlyEntitlement,
// "ACCURAL_PLAN_NAME": accuralPlanName == null ? null : accuralPlanName,
// "END_DATE": endDate == null ? null : endDate,
// "LAST_ACCRUAL_DATE": lastAccrualDate == null ? null : lastAccrualDate,
// "START_DATE": startDate == null ? null : startDate,
// };
// }
import 'dart:convert';
class GetAccrualBalancesList {
String? accuraLPlanName;
DateTime? starTDate;
DateTime? enDDate;
DateTime? lasTAccrualDate;
dynamic accruaLYearlyEntitlement;
double? accruaLNetEntitlement;
int? accruaLUsedEntitlement;
GetAccrualBalancesList({
this.accrualNetEntitlement,
this.accrualUsedEntitlement,
this.accrualYearlyEntitlement,
this.accuralPlanName,
this.endDate,
this.lastAccrualDate,
this.startDate,
this.accuraLPlanName,
this.starTDate,
this.enDDate,
this.lasTAccrualDate,
this.accruaLYearlyEntitlement,
this.accruaLNetEntitlement,
this.accruaLUsedEntitlement,
});
double? accrualNetEntitlement;
num? accrualUsedEntitlement; //Todo: Add function
dynamic accrualYearlyEntitlement;
String? accuralPlanName;
String? endDate;
String? lastAccrualDate;
String? startDate;
factory GetAccrualBalancesList.fromRawJson(String str) => GetAccrualBalancesList.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory GetAccrualBalancesList.fromJson(Map<String, dynamic> json) => GetAccrualBalancesList(
accrualNetEntitlement: json["ACCRUAL_NET_ENTITLEMENT"] == null ? null : json["ACCRUAL_NET_ENTITLEMENT"].toDouble(),
accrualUsedEntitlement: json["ACCRUAL_USED_ENTITLEMENT"] == null ? null : json["ACCRUAL_USED_ENTITLEMENT"],
accrualYearlyEntitlement: json["ACCRUAL_YEARLY_ENTITLEMENT"],
accuralPlanName: json["ACCURAL_PLAN_NAME"] == null ? null : json["ACCURAL_PLAN_NAME"],
endDate: json["END_DATE"] == null ? null : json["END_DATE"],
lastAccrualDate: json["LAST_ACCRUAL_DATE"] == null ? null : json["LAST_ACCRUAL_DATE"],
startDate: json["START_DATE"] == null ? null : json["START_DATE"],
accuraLPlanName: json["accuraL_PLAN_NAME"],
starTDate: json["starT_DATE"] == null ? null : DateTime.parse(json["starT_DATE"]),
enDDate: json["enD_DATE"] == null ? null : DateTime.parse(json["enD_DATE"]),
lasTAccrualDate: json["lasT_ACCRUAL_DATE"] == null ? null : DateTime.parse(json["lasT_ACCRUAL_DATE"]),
accruaLYearlyEntitlement: json["accruaL_YEARLY_ENTITLEMENT"],
accruaLNetEntitlement: json["accruaL_NET_ENTITLEMENT"]?.toDouble(),
accruaLUsedEntitlement: json["accruaL_USED_ENTITLEMENT"],
);
Map<String, dynamic> toJson() => {
"ACCRUAL_NET_ENTITLEMENT": accrualNetEntitlement == null ? null : accrualNetEntitlement,
"ACCRUAL_USED_ENTITLEMENT": accrualUsedEntitlement == null ? null : accrualUsedEntitlement,
"ACCRUAL_YEARLY_ENTITLEMENT": accrualYearlyEntitlement,
"ACCURAL_PLAN_NAME": accuralPlanName == null ? null : accuralPlanName,
"END_DATE": endDate == null ? null : endDate,
"LAST_ACCRUAL_DATE": lastAccrualDate == null ? null : lastAccrualDate,
"START_DATE": startDate == null ? null : startDate,
"accuraL_PLAN_NAME": accuraLPlanName,
"starT_DATE": starTDate?.toIso8601String(),
"enD_DATE": enDDate?.toIso8601String(),
"lasT_ACCRUAL_DATE": lasTAccrualDate?.toIso8601String(),
"accruaL_YEARLY_ENTITLEMENT": accruaLYearlyEntitlement,
"accruaL_NET_ENTITLEMENT": accruaLNetEntitlement,
"accruaL_USED_ENTITLEMENT": accruaLUsedEntitlement,
};
}

@ -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<String, dynamic> 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<String, dynamic> 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,
};
}

@ -46,7 +46,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
List<GetAccrualBalancesList>? accrualList;
GetAccrualBalancesList? leaveBalanceAccrual;
double get leaveBalance => leaveBalanceAccrual?.accrualNetEntitlement ?? 0;
double get leaveBalance => leaveBalanceAccrual?.accruaLNetEntitlement ?? 0;
double ticketBalance = 0;
//Menu Entries
@ -195,7 +195,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
accrualList = await DashboardApiClient().getAccrualBalances(DateFormat("MM/dd/yyyy", "en_US").format(date));
isLeaveTicketBalanceLoading = false;
leaveBalanceAccrual = accrualList![0];
ticketBalance = (accrualList![1].accrualNetEntitlement ?? 0.0) + (accrualList![2].accrualNetEntitlement ?? 0.0) + (accrualList![3].accrualNetEntitlement ?? 0.0);
ticketBalance = (accrualList![1].accruaLNetEntitlement ?? 0.0) + (accrualList![2].accruaLNetEntitlement ?? 0.0) + (accrualList![3].accruaLNetEntitlement ?? 0.0);
notifyListeners();
} catch (ex) {
isLeaveTicketBalanceLoading = false;
@ -231,11 +231,11 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
void fetchMenuEntries() async {
try {
List<GetMenuEntriesList>? 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<Menus> parseMenus(List<GetMenuEntriesList> getMenuEntriesList) {
List<Menus> 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<GetMenuEntriesList> 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<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
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));

@ -198,30 +198,30 @@ class ServicesWidget extends StatelessWidget {
void handleOnPress(context, GetMenuEntriesList menuEntry) {
var pro = Provider.of<DashboardProviderModel>(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<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 = "";
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<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));
}
return;

@ -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<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));
}
}

@ -58,18 +58,18 @@ class _CreateRequestState extends State<CreateRequest> {
List<Menus> parseMenus(List<GetMenuEntriesList> getMenuEntriesList) {
List<Menus> 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,

@ -292,7 +292,7 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
}
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) {
return data[0];
} else {

@ -48,7 +48,7 @@ class _BasicDetailsState extends State<BasicDetails> {
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<BasicDetails> {
),
DefaultButton(
LocaleKeys.update.tr(),
menuEntries.updateButton == 'Y'
menuEntries.updatEButton == 'Y'
? () async {
showAlertDialog(context);
}

@ -47,12 +47,12 @@ class _ContactDetailsState extends State<ContactDetails> {
super.initState();
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) {
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<ContactDetails> {
),
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<ContactDetails> {
),
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<ContactDetails> {
else
Stack(
children: [
if (menuEntriesAddress.addButton == 'Y')
if (menuEntriesAddress.adDButton == 'Y')
AppState().isArabic(context)
? Positioned(
top: 1,

@ -37,7 +37,7 @@ class _FamilyMembersState extends State<FamilyMembers> {
super.initState();
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) {
menuEntries = arr[0];
} else {
@ -95,16 +95,16 @@ class _FamilyMembersState extends State<FamilyMembers> {
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<FamilyMembers> {
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<FamilyMembers> {
),
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<FamilyMembers> {
Navigator.pushNamed(
context,
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(() {
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 {

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

@ -68,14 +68,14 @@ class _BalancesDashboardWidgetState extends State<BalancesDashboardWidget> {
if (widget.isLeaveBalance) {
leaveBalanceAccrual = accrualList[0];
chartModelList = [
PieChartModel(LocaleKeys.currentBalance.tr(), leaveBalanceAccrual?.accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""),
PieChartModel(LocaleKeys.usedBalance.tr(), leaveBalanceAccrual?.accrualUsedEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""),
PieChartModel(LocaleKeys.currentBalance.tr(), leaveBalanceAccrual?.accruaLNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""),
PieChartModel(LocaleKeys.usedBalance.tr(), leaveBalanceAccrual?.accruaLNetEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""),
];
} else {
chartModelList = [
PieChartModel(LocaleKeys.adult.tr(), accrualList[1].accrualNetEntitlement?.toDouble() ?? 0, MyColors.textMixColor, titleAppend: ""),
PieChartModel(LocaleKeys.child.tr(), accrualList[2].accrualNetEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""),
PieChartModel(LocaleKeys.infants.tr(), accrualList[3].accrualNetEntitlement?.toDouble() ?? 0, MyColors.pinkColor, titleAppend: ""),
PieChartModel(LocaleKeys.adult.tr(), accrualList[1].accruaLNetEntitlement?.toDouble() ?? 0, MyColors.textMixColor, titleAppend: ""),
PieChartModel(LocaleKeys.child.tr(), accrualList[2].accruaLNetEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""),
PieChartModel(LocaleKeys.infants.tr(), accrualList[3].accruaLNetEntitlement?.toDouble() ?? 0, MyColors.pinkColor, titleAppend: ""),
];
}
}
@ -92,8 +92,8 @@ class _BalancesDashboardWidgetState extends State<BalancesDashboardWidget> {
if (leaveBalanceAccrual == null && widget.isLeaveBalance) {
leaveBalanceAccrual = Provider.of<DashboardProviderModel>(context, listen: false).leaveBalanceAccrual;
chartModelList = [
PieChartModel(LocaleKeys.currentBalance.tr(), leaveBalanceAccrual?.accrualNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""),
PieChartModel(LocaleKeys.usedBalance.tr(), leaveBalanceAccrual?.accrualUsedEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""),
PieChartModel(LocaleKeys.currentBalance.tr(), leaveBalanceAccrual?.accruaLNetEntitlement ?? 0, MyColors.textMixColor, titleAppend: ""),
PieChartModel(LocaleKeys.usedBalance.tr(), leaveBalanceAccrual?.accruaLNetEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""),
];
}
@ -101,9 +101,9 @@ class _BalancesDashboardWidgetState extends State<BalancesDashboardWidget> {
ticketBalanceAccrualList = Provider.of<DashboardProviderModel>(context, listen: false).accrualList ?? [];
if (ticketBalanceAccrualList!.isNotEmpty) {
chartModelList = [
PieChartModel(LocaleKeys.adult.tr(), ticketBalanceAccrualList![1].accrualNetEntitlement?.toDouble() ?? 0, MyColors.textMixColor, titleAppend: ""),
PieChartModel(LocaleKeys.child.tr(), ticketBalanceAccrualList![2].accrualNetEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""),
PieChartModel(LocaleKeys.infants.tr(), ticketBalanceAccrualList![3].accrualNetEntitlement?.toDouble() ?? 0, MyColors.pinkColor, titleAppend: ""),
PieChartModel(LocaleKeys.adult.tr(), ticketBalanceAccrualList![1].accruaLNetEntitlement?.toDouble() ?? 0, MyColors.textMixColor, titleAppend: ""),
PieChartModel(LocaleKeys.child.tr(), ticketBalanceAccrualList![2].accruaLNetEntitlement?.toDouble() ?? 0, MyColors.backgroundBlackColor, titleAppend: ""),
PieChartModel(LocaleKeys.infants.tr(), ticketBalanceAccrualList![3].accruaLNetEntitlement?.toDouble() ?? 0, MyColors.pinkColor, titleAppend: ""),
];
}
}

Loading…
Cancel
Save