Merge branch 'master' into development_mirza
commit
a109a0529f
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
@ -0,0 +1,94 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||
import 'package:mohem_flutter_app/classes/consts.dart';
|
||||
import 'package:mohem_flutter_app/models/basic_member_information_model.dart';
|
||||
import 'package:mohem_flutter_app/models/check_mobile_app_version_model.dart';
|
||||
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
||||
import 'package:mohem_flutter_app/models/member_login_list_model.dart';
|
||||
|
||||
import 'api_client.dart';
|
||||
|
||||
class LoginApiClient {
|
||||
static final LoginApiClient _instance = LoginApiClient._internal();
|
||||
|
||||
LoginApiClient._internal();
|
||||
|
||||
factory LoginApiClient() => _instance;
|
||||
|
||||
Future<CheckMobileAppVersionModel> checkMobileAppVersion() async {
|
||||
String url = "${ApiConsts.utilitiesRest}CheckMobileAppVersion";
|
||||
Map<String, dynamic> postParams = {};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) => CheckMobileAppVersionModel.fromJson(json), url, postParams);
|
||||
}
|
||||
|
||||
Future<MemberLoginListModel?> memberLogin(String username, String password) async {
|
||||
String url = "${ApiConsts.erpRest}MemberLogin";
|
||||
Map<String, dynamic> postParams = {"P_APP_VERSION": "CS", "P_LANGUAGE": "US", "P_PASSWORD": password, "P_USER_NAME": username};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
|
||||
AppState().postParamsObject?.setLogInTokenID = responseData.logInTokenID;
|
||||
return responseData.memberLoginList;
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<BasicMemberInformationModel?> mohemmSendActivationCodeByOTPNotificationType(int isMobileFingerPrint, String? mobileNumber, int optSendType, String? pUserName) async {
|
||||
String url = "${ApiConsts.erpRest}Mohemm_SendActivationCodebyOTPNotificationType";
|
||||
Map<String, dynamic> postParams = {"IsMobileFingerPrint": isMobileFingerPrint, "MobileNumber": mobileNumber, "OTP_SendType": optSendType, "P_USER_NAME": pUserName};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) => GenericResponseModel.fromJson(json).basicMemberInformation, url, postParams);
|
||||
}
|
||||
|
||||
Future<GenericResponseModel?> checkActivationCode(bool isDeviceNFC, String? mobileNumber, String activationCode, String? pUserName) async {
|
||||
String url = "${ApiConsts.erpRest}CheckActivationCode";
|
||||
Map<String, dynamic> postParams = {"isDeviceNFC": isDeviceNFC, "MobileNumber": mobileNumber, "activationCode": activationCode, "P_USER_NAME": pUserName};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
|
||||
AppState().postParamsObject?.setTokenID = responseData.tokenID;
|
||||
return responseData;
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<BasicMemberInformationModel?> getBasicUserInformation(String pAppVersion, String pUsername) async {
|
||||
String url = "${ApiConsts.erpRest}Get_BasicUserInformation";
|
||||
Map<String, dynamic> postParams = {"P_APP_VERSION": pAppVersion, "P_USER_NAME": pUsername};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) => GenericResponseModel.fromJson(json).basicMemberInformation, url, postParams);
|
||||
}
|
||||
|
||||
Future<GenericResponseModel?> sendPublicActivationCode(String? mobileNumber, String? pUsername) async {
|
||||
String url = "${ApiConsts.erpRest}SendPublicActivationCode";
|
||||
Map<String, dynamic> postParams = {"MobileNumber": mobileNumber, "P_MOBILE_NUMBER": mobileNumber, "P_USER_NAME": pUsername};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
|
||||
AppState().postParamsObject?.setLogInTokenID = responseData.logInTokenID;
|
||||
return responseData;
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<GenericResponseModel?> checkPublicActivationCode(String activationCode, String? pUserName) async {
|
||||
String url = "${ApiConsts.erpRest}checkPublicActivationCode";
|
||||
Map<String, dynamic> postParams = {"activationCode": activationCode, "P_USER_NAME": pUserName};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
|
||||
AppState().setForgetPasswordTokenID = responseData.tokenID;
|
||||
return responseData;
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<GenericResponseModel?> changePasswordForget(String forgetPasswordTokenID, String pNewPassword, String pConfirmNewPassword, String? pUserName) async {
|
||||
String url = "${ApiConsts.erpRest}ChangePassword_Forget";
|
||||
Map<String, dynamic> postParams = {"P_USER_NAME": pUserName, "ForgetPasswordTokenID": forgetPasswordTokenID, "P_Confirm_NEW_PASSWORD": pConfirmNewPassword, "P_NEW_PASSWORD": pNewPassword};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel responseData = GenericResponseModel.fromJson(json);
|
||||
|
||||
return responseData;
|
||||
}, url, postParams);
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
class BasicMemberInformationModel {
|
||||
String? pEMAILADDRESS;
|
||||
String? pLEGISLATIONCODE;
|
||||
String? pMOBILENUMBER;
|
||||
String? pRETURNMSG;
|
||||
String? pRETURNSTATUS;
|
||||
|
||||
BasicMemberInformationModel(
|
||||
{this.pEMAILADDRESS,
|
||||
this.pLEGISLATIONCODE,
|
||||
this.pMOBILENUMBER,
|
||||
this.pRETURNMSG,
|
||||
this.pRETURNSTATUS});
|
||||
|
||||
BasicMemberInformationModel.fromJson(Map<String, dynamic> json) {
|
||||
pEMAILADDRESS = json['P_EMAIL_ADDRESS'];
|
||||
pLEGISLATIONCODE = json['P_LEGISLATION_CODE'];
|
||||
pMOBILENUMBER = json['P_MOBILE_NUMBER'];
|
||||
pRETURNMSG = json['P_RETURN_MSG'];
|
||||
pRETURNSTATUS = json['P_RETURN_STATUS'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['P_EMAIL_ADDRESS'] = this.pEMAILADDRESS;
|
||||
data['P_LEGISLATION_CODE'] = this.pLEGISLATIONCODE;
|
||||
data['P_MOBILE_NUMBER'] = this.pMOBILENUMBER;
|
||||
data['P_RETURN_MSG'] = this.pRETURNMSG;
|
||||
data['P_RETURN_STATUS'] = this.pRETURNSTATUS;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,191 @@
|
||||
class CheckMobileAppVersionModel {
|
||||
String? date;
|
||||
int? languageID;
|
||||
int? serviceName;
|
||||
String? time;
|
||||
String? androidLink;
|
||||
String? authenticationTokenID;
|
||||
String? data;
|
||||
bool? dataw;
|
||||
int? dietType;
|
||||
int? dietTypeID;
|
||||
int? errorCode;
|
||||
String? errorEndUserMessage;
|
||||
String? errorEndUserMessageN;
|
||||
String? errorMessage;
|
||||
int? errorType;
|
||||
int? foodCategory;
|
||||
String? iOSLink;
|
||||
bool? isAuthenticated;
|
||||
int? mealOrderStatus;
|
||||
int? mealType;
|
||||
int? messageStatus;
|
||||
int? numberOfResultRecords;
|
||||
String? patientBlodType;
|
||||
String? successMsg;
|
||||
String? successMsgN;
|
||||
String? vidaUpdatedResponse;
|
||||
String? encryprURL;
|
||||
bool? kioskHelp;
|
||||
List<Null>? listRssItems;
|
||||
List<Null>? listKioskFingerPrint;
|
||||
List<Null>? listKioskFingerPrintGetByID;
|
||||
List<Null>? listKioskGetLastTransaction;
|
||||
List<Null>? listRegKioskFingerPrint;
|
||||
String? message;
|
||||
String? ramadanTimeObj;
|
||||
String? habibTwitterList;
|
||||
|
||||
CheckMobileAppVersionModel(
|
||||
{this.date,
|
||||
this.languageID,
|
||||
this.serviceName,
|
||||
this.time,
|
||||
this.androidLink,
|
||||
this.authenticationTokenID,
|
||||
this.data,
|
||||
this.dataw,
|
||||
this.dietType,
|
||||
this.dietTypeID,
|
||||
this.errorCode,
|
||||
this.errorEndUserMessage,
|
||||
this.errorEndUserMessageN,
|
||||
this.errorMessage,
|
||||
this.errorType,
|
||||
this.foodCategory,
|
||||
this.iOSLink,
|
||||
this.isAuthenticated,
|
||||
this.mealOrderStatus,
|
||||
this.mealType,
|
||||
this.messageStatus,
|
||||
this.numberOfResultRecords,
|
||||
this.patientBlodType,
|
||||
this.successMsg,
|
||||
this.successMsgN,
|
||||
this.vidaUpdatedResponse,
|
||||
this.encryprURL,
|
||||
this.kioskHelp,
|
||||
this.listRssItems,
|
||||
this.listKioskFingerPrint,
|
||||
this.listKioskFingerPrintGetByID,
|
||||
this.listKioskGetLastTransaction,
|
||||
this.listRegKioskFingerPrint,
|
||||
this.message,
|
||||
this.ramadanTimeObj,
|
||||
this.habibTwitterList});
|
||||
|
||||
CheckMobileAppVersionModel.fromJson(Map<String, dynamic> json) {
|
||||
date = json['Date'];
|
||||
languageID = json['LanguageID'];
|
||||
serviceName = json['ServiceName'];
|
||||
time = json['Time'];
|
||||
androidLink = json['AndroidLink'];
|
||||
authenticationTokenID = json['AuthenticationTokenID'];
|
||||
data = json['Data'];
|
||||
dataw = json['Dataw'];
|
||||
dietType = json['DietType'];
|
||||
dietTypeID = json['DietTypeID'];
|
||||
errorCode = json['ErrorCode'];
|
||||
errorEndUserMessage = json['ErrorEndUserMessage'];
|
||||
errorEndUserMessageN = json['ErrorEndUserMessageN'];
|
||||
errorMessage = json['ErrorMessage'];
|
||||
errorType = json['ErrorType'];
|
||||
foodCategory = json['FoodCategory'];
|
||||
iOSLink = json['IOSLink'];
|
||||
isAuthenticated = json['IsAuthenticated'];
|
||||
mealOrderStatus = json['MealOrderStatus'];
|
||||
mealType = json['MealType'];
|
||||
messageStatus = json['MessageStatus'];
|
||||
numberOfResultRecords = json['NumberOfResultRecords'];
|
||||
patientBlodType = json['PatientBlodType'];
|
||||
successMsg = json['SuccessMsg'];
|
||||
successMsgN = json['SuccessMsgN'];
|
||||
vidaUpdatedResponse = json['VidaUpdatedResponse'];
|
||||
encryprURL = json['EncryprURL'];
|
||||
kioskHelp = json['KioskHelp'];
|
||||
if (json['ListRssItems'] != null) {
|
||||
listRssItems = <Null>[];
|
||||
json['ListRssItems'].forEach((v) {
|
||||
//listRssItems!.add(new Null.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['List_Kiosk_FingerPrint'] != null) {
|
||||
listKioskFingerPrint = <Null>[];
|
||||
json['List_Kiosk_FingerPrint'].forEach((v) {
|
||||
// listKioskFingerPrint!.add(new Null.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['List_Kiosk_FingerPrintGetByID'] != null) {
|
||||
listKioskFingerPrintGetByID = <Null>[];
|
||||
json['List_Kiosk_FingerPrintGetByID'].forEach((v) {
|
||||
// listKioskFingerPrintGetByID!.add(new Null.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['List_Kiosk_GetLastTransaction'] != null) {
|
||||
listKioskGetLastTransaction = <Null>[];
|
||||
json['List_Kiosk_GetLastTransaction'].forEach((v) {
|
||||
// listKioskGetLastTransaction!.add(new Null.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['List_RegKiosk_FingerPrint'] != null) {
|
||||
listRegKioskFingerPrint = <Null>[];
|
||||
json['List_RegKiosk_FingerPrint'].forEach((v) {
|
||||
// listRegKioskFingerPrint!.add(new Null.fromJson(v));
|
||||
});
|
||||
}
|
||||
message = json['Message'];
|
||||
ramadanTimeObj = json['RamadanTimeObj'];
|
||||
habibTwitterList = json['habibTwitterList'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Date'] = this.date;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['ServiceName'] = this.serviceName;
|
||||
data['Time'] = this.time;
|
||||
data['AndroidLink'] = this.androidLink;
|
||||
data['AuthenticationTokenID'] = this.authenticationTokenID;
|
||||
data['Data'] = this.data;
|
||||
data['Dataw'] = this.dataw;
|
||||
data['DietType'] = this.dietType;
|
||||
data['DietTypeID'] = this.dietTypeID;
|
||||
data['ErrorCode'] = this.errorCode;
|
||||
data['ErrorEndUserMessage'] = this.errorEndUserMessage;
|
||||
data['ErrorEndUserMessageN'] = this.errorEndUserMessageN;
|
||||
data['ErrorMessage'] = this.errorMessage;
|
||||
data['ErrorType'] = this.errorType;
|
||||
data['FoodCategory'] = this.foodCategory;
|
||||
data['IOSLink'] = this.iOSLink;
|
||||
data['IsAuthenticated'] = this.isAuthenticated;
|
||||
data['MealOrderStatus'] = this.mealOrderStatus;
|
||||
data['MealType'] = this.mealType;
|
||||
data['MessageStatus'] = this.messageStatus;
|
||||
data['NumberOfResultRecords'] = this.numberOfResultRecords;
|
||||
data['PatientBlodType'] = this.patientBlodType;
|
||||
data['SuccessMsg'] = this.successMsg;
|
||||
data['SuccessMsgN'] = this.successMsgN;
|
||||
data['VidaUpdatedResponse'] = this.vidaUpdatedResponse;
|
||||
data['EncryprURL'] = this.encryprURL;
|
||||
data['KioskHelp'] = this.kioskHelp;
|
||||
if (this.listRssItems != null) {
|
||||
//data['ListRssItems'] = this.listRssItems!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.listKioskFingerPrint != null) {
|
||||
// data['List_Kiosk_FingerPrint'] = this.listKioskFingerPrint!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.listKioskFingerPrintGetByID != null) {
|
||||
//data['List_Kiosk_FingerPrintGetByID'] = this.listKioskFingerPrintGetByID!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.listKioskGetLastTransaction != null) {
|
||||
//data['List_Kiosk_GetLastTransaction'] = this.listKioskGetLastTransaction!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.listRegKioskFingerPrint != null) {
|
||||
//data['List_RegKiosk_FingerPrint'] = this.listRegKioskFingerPrint!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['Message'] = this.message;
|
||||
data['RamadanTimeObj'] = this.ramadanTimeObj;
|
||||
data['habibTwitterList'] = this.habibTwitterList;
|
||||
return data;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,336 @@
|
||||
class MemberInformationListModel {
|
||||
String? aCTUALTERMINATIONDATE;
|
||||
String? aSSIGNMENTENDDATE;
|
||||
int? aSSIGNMENTID;
|
||||
String? aSSIGNMENTNUMBER;
|
||||
String? aSSIGNMENTSTARTDATE;
|
||||
int? aSSIGNMENTSTATUSTYPEID;
|
||||
String? aSSIGNMENTTYPE;
|
||||
int? bUSINESSGROUPID;
|
||||
String? bUSINESSGROUPNAME;
|
||||
String? businessCardQR;
|
||||
String? cURRENTEMPLOYEEFLAG;
|
||||
String? eMPLOYEEDISPLAYNAME;
|
||||
String? eMPLOYEEDISPLAYNAMEAr;
|
||||
String? eMPLOYEEDISPLAYNAMEEn;
|
||||
String? eMPLOYEEEMAILADDRESS;
|
||||
String? eMPLOYEEIMAGE;
|
||||
String? eMPLOYEEMOBILENUMBER;
|
||||
String? eMPLOYEENAME;
|
||||
String? eMPLOYEENAMEAr;
|
||||
String? eMPLOYEENAMEEn;
|
||||
String? eMPLOYEENUMBER;
|
||||
String? eMPLOYEEWORKNUMBER;
|
||||
String? eMPLOYMENTCATEGORY;
|
||||
String? eMPLOYMENTCATEGORYMEANING;
|
||||
String? employeeQR;
|
||||
String? fREQUENCY;
|
||||
String? fREQUENCYMEANING;
|
||||
int? fROMROWNUM;
|
||||
String? gRADEID;
|
||||
String? gRADENAME;
|
||||
String? hIREDATE;
|
||||
int? jOBID;
|
||||
String? jOBNAME;
|
||||
String? jOBNAMEAr;
|
||||
String? jOBNAMEEn;
|
||||
int? lEDGERID;
|
||||
int? lOCATIONID;
|
||||
String? lOCATIONNAME;
|
||||
String? mANUALTIMECARDFLAG;
|
||||
String? mANUALTIMECARDMEANING;
|
||||
String? mobileNumberWithZipCode;
|
||||
String? nATIONALITYCODE;
|
||||
String? nATIONALITYMEANING;
|
||||
String? nATIONALIDENTIFIER;
|
||||
String? nORMALHOURS;
|
||||
int? nOOFROWS;
|
||||
int? oRGANIZATIONID;
|
||||
String? oRGANIZATIONNAME;
|
||||
String? pAYROLLCODE;
|
||||
int? pAYROLLID;
|
||||
String? pAYROLLNAME;
|
||||
int? pERSONID;
|
||||
String? pERSONTYPE;
|
||||
int? pERSONTYPEID;
|
||||
String? pERINFORMATIONCATEGORY;
|
||||
int? pOSITIONID;
|
||||
String? pOSITIONNAME;
|
||||
String? pRIMARYFLAG;
|
||||
int? rOWNUM;
|
||||
int? sERVICEDAYS;
|
||||
int? sERVICEMONTHS;
|
||||
int? sERVICEYEARS;
|
||||
String? sUPERVISORASSIGNMENTID;
|
||||
String? sUPERVISORDISPLAYNAME;
|
||||
String? sUPERVISOREMAILADDRESS;
|
||||
int? sUPERVISORID;
|
||||
String? sUPERVISORMOBILENUMBER;
|
||||
String? sUPERVISORNAME;
|
||||
String? sUPERVISORNUMBER;
|
||||
String? sUPERVISORWORKNUMBER;
|
||||
String? sWIPESEXEMPTEDFLAG;
|
||||
String? sWIPESEXEMPTEDMEANING;
|
||||
String? sYSTEMPERSONTYPE;
|
||||
String? tKEMAILADDRESS;
|
||||
String? tKEMPLOYEEDISPLAYNAME;
|
||||
String? tKEMPLOYEENAME;
|
||||
String? tKEMPLOYEENUMBER;
|
||||
int? tKPERSONID;
|
||||
int? tOROWNUM;
|
||||
String? uNITNUMBER;
|
||||
String? uSERSTATUS;
|
||||
|
||||
MemberInformationListModel(
|
||||
{this.aCTUALTERMINATIONDATE,
|
||||
this.aSSIGNMENTENDDATE,
|
||||
this.aSSIGNMENTID,
|
||||
this.aSSIGNMENTNUMBER,
|
||||
this.aSSIGNMENTSTARTDATE,
|
||||
this.aSSIGNMENTSTATUSTYPEID,
|
||||
this.aSSIGNMENTTYPE,
|
||||
this.bUSINESSGROUPID,
|
||||
this.bUSINESSGROUPNAME,
|
||||
this.businessCardQR,
|
||||
this.cURRENTEMPLOYEEFLAG,
|
||||
this.eMPLOYEEDISPLAYNAME,
|
||||
this.eMPLOYEEDISPLAYNAMEAr,
|
||||
this.eMPLOYEEDISPLAYNAMEEn,
|
||||
this.eMPLOYEEEMAILADDRESS,
|
||||
this.eMPLOYEEIMAGE,
|
||||
this.eMPLOYEEMOBILENUMBER,
|
||||
this.eMPLOYEENAME,
|
||||
this.eMPLOYEENAMEAr,
|
||||
this.eMPLOYEENAMEEn,
|
||||
this.eMPLOYEENUMBER,
|
||||
this.eMPLOYEEWORKNUMBER,
|
||||
this.eMPLOYMENTCATEGORY,
|
||||
this.eMPLOYMENTCATEGORYMEANING,
|
||||
this.employeeQR,
|
||||
this.fREQUENCY,
|
||||
this.fREQUENCYMEANING,
|
||||
this.fROMROWNUM,
|
||||
this.gRADEID,
|
||||
this.gRADENAME,
|
||||
this.hIREDATE,
|
||||
this.jOBID,
|
||||
this.jOBNAME,
|
||||
this.jOBNAMEAr,
|
||||
this.jOBNAMEEn,
|
||||
this.lEDGERID,
|
||||
this.lOCATIONID,
|
||||
this.lOCATIONNAME,
|
||||
this.mANUALTIMECARDFLAG,
|
||||
this.mANUALTIMECARDMEANING,
|
||||
this.mobileNumberWithZipCode,
|
||||
this.nATIONALITYCODE,
|
||||
this.nATIONALITYMEANING,
|
||||
this.nATIONALIDENTIFIER,
|
||||
this.nORMALHOURS,
|
||||
this.nOOFROWS,
|
||||
this.oRGANIZATIONID,
|
||||
this.oRGANIZATIONNAME,
|
||||
this.pAYROLLCODE,
|
||||
this.pAYROLLID,
|
||||
this.pAYROLLNAME,
|
||||
this.pERSONID,
|
||||
this.pERSONTYPE,
|
||||
this.pERSONTYPEID,
|
||||
this.pERINFORMATIONCATEGORY,
|
||||
this.pOSITIONID,
|
||||
this.pOSITIONNAME,
|
||||
this.pRIMARYFLAG,
|
||||
this.rOWNUM,
|
||||
this.sERVICEDAYS,
|
||||
this.sERVICEMONTHS,
|
||||
this.sERVICEYEARS,
|
||||
this.sUPERVISORASSIGNMENTID,
|
||||
this.sUPERVISORDISPLAYNAME,
|
||||
this.sUPERVISOREMAILADDRESS,
|
||||
this.sUPERVISORID,
|
||||
this.sUPERVISORMOBILENUMBER,
|
||||
this.sUPERVISORNAME,
|
||||
this.sUPERVISORNUMBER,
|
||||
this.sUPERVISORWORKNUMBER,
|
||||
this.sWIPESEXEMPTEDFLAG,
|
||||
this.sWIPESEXEMPTEDMEANING,
|
||||
this.sYSTEMPERSONTYPE,
|
||||
this.tKEMAILADDRESS,
|
||||
this.tKEMPLOYEEDISPLAYNAME,
|
||||
this.tKEMPLOYEENAME,
|
||||
this.tKEMPLOYEENUMBER,
|
||||
this.tKPERSONID,
|
||||
this.tOROWNUM,
|
||||
this.uNITNUMBER,
|
||||
this.uSERSTATUS});
|
||||
|
||||
MemberInformationListModel.fromJson(Map<String, dynamic> json) {
|
||||
aCTUALTERMINATIONDATE = json['ACTUAL_TERMINATION_DATE'];
|
||||
aSSIGNMENTENDDATE = json['ASSIGNMENT_END_DATE'];
|
||||
aSSIGNMENTID = json['ASSIGNMENT_ID'];
|
||||
aSSIGNMENTNUMBER = json['ASSIGNMENT_NUMBER'];
|
||||
aSSIGNMENTSTARTDATE = json['ASSIGNMENT_START_DATE'];
|
||||
aSSIGNMENTSTATUSTYPEID = json['ASSIGNMENT_STATUS_TYPE_ID'];
|
||||
aSSIGNMENTTYPE = json['ASSIGNMENT_TYPE'];
|
||||
bUSINESSGROUPID = json['BUSINESS_GROUP_ID'];
|
||||
bUSINESSGROUPNAME = json['BUSINESS_GROUP_NAME'];
|
||||
businessCardQR = json['BusinessCardQR'];
|
||||
cURRENTEMPLOYEEFLAG = json['CURRENT_EMPLOYEE_FLAG'];
|
||||
eMPLOYEEDISPLAYNAME = json['EMPLOYEE_DISPLAY_NAME'];
|
||||
eMPLOYEEDISPLAYNAMEAr = json['EMPLOYEE_DISPLAY_NAME_Ar'];
|
||||
eMPLOYEEDISPLAYNAMEEn = json['EMPLOYEE_DISPLAY_NAME_En'];
|
||||
eMPLOYEEEMAILADDRESS = json['EMPLOYEE_EMAIL_ADDRESS'];
|
||||
eMPLOYEEIMAGE = json['EMPLOYEE_IMAGE'];
|
||||
eMPLOYEEMOBILENUMBER = json['EMPLOYEE_MOBILE_NUMBER'];
|
||||
eMPLOYEENAME = json['EMPLOYEE_NAME'];
|
||||
eMPLOYEENAMEAr = json['EMPLOYEE_NAME_Ar'];
|
||||
eMPLOYEENAMEEn = json['EMPLOYEE_NAME_En'];
|
||||
eMPLOYEENUMBER = json['EMPLOYEE_NUMBER'];
|
||||
eMPLOYEEWORKNUMBER = json['EMPLOYEE_WORK_NUMBER'];
|
||||
eMPLOYMENTCATEGORY = json['EMPLOYMENT_CATEGORY'];
|
||||
eMPLOYMENTCATEGORYMEANING = json['EMPLOYMENT_CATEGORY_MEANING'];
|
||||
employeeQR = json['EmployeeQR'];
|
||||
fREQUENCY = json['FREQUENCY'];
|
||||
fREQUENCYMEANING = json['FREQUENCY_MEANING'];
|
||||
fROMROWNUM = json['FROM_ROW_NUM'];
|
||||
gRADEID = json['GRADE_ID'];
|
||||
gRADENAME = json['GRADE_NAME'];
|
||||
hIREDATE = json['HIRE_DATE'];
|
||||
jOBID = json['JOB_ID'];
|
||||
jOBNAME = json['JOB_NAME'];
|
||||
jOBNAMEAr = json['JOB_NAME_Ar'];
|
||||
jOBNAMEEn = json['JOB_NAME_En'];
|
||||
lEDGERID = json['LEDGER_ID'];
|
||||
lOCATIONID = json['LOCATION_ID'];
|
||||
lOCATIONNAME = json['LOCATION_NAME'];
|
||||
mANUALTIMECARDFLAG = json['MANUAL_TIMECARD_FLAG'];
|
||||
mANUALTIMECARDMEANING = json['MANUAL_TIMECARD_MEANING'];
|
||||
mobileNumberWithZipCode = json['MobileNumberWithZipCode'];
|
||||
nATIONALITYCODE = json['NATIONALITY_CODE'];
|
||||
nATIONALITYMEANING = json['NATIONALITY_MEANING'];
|
||||
nATIONALIDENTIFIER = json['NATIONAL_IDENTIFIER'];
|
||||
nORMALHOURS = json['NORMAL_HOURS'];
|
||||
nOOFROWS = json['NO_OF_ROWS'];
|
||||
oRGANIZATIONID = json['ORGANIZATION_ID'];
|
||||
oRGANIZATIONNAME = json['ORGANIZATION_NAME'];
|
||||
pAYROLLCODE = json['PAYROLL_CODE'];
|
||||
pAYROLLID = json['PAYROLL_ID'];
|
||||
pAYROLLNAME = json['PAYROLL_NAME'];
|
||||
pERSONID = json['PERSON_ID'];
|
||||
pERSONTYPE = json['PERSON_TYPE'];
|
||||
pERSONTYPEID = json['PERSON_TYPE_ID'];
|
||||
pERINFORMATIONCATEGORY = json['PER_INFORMATION_CATEGORY'];
|
||||
pOSITIONID = json['POSITION_ID'];
|
||||
pOSITIONNAME = json['POSITION_NAME'];
|
||||
pRIMARYFLAG = json['PRIMARY_FLAG'];
|
||||
rOWNUM = json['ROW_NUM'];
|
||||
sERVICEDAYS = json['SERVICE_DAYS'];
|
||||
sERVICEMONTHS = json['SERVICE_MONTHS'];
|
||||
sERVICEYEARS = json['SERVICE_YEARS'];
|
||||
sUPERVISORASSIGNMENTID = json['SUPERVISOR_ASSIGNMENT_ID'];
|
||||
sUPERVISORDISPLAYNAME = json['SUPERVISOR_DISPLAY_NAME'];
|
||||
sUPERVISOREMAILADDRESS = json['SUPERVISOR_EMAIL_ADDRESS'];
|
||||
sUPERVISORID = json['SUPERVISOR_ID'];
|
||||
sUPERVISORMOBILENUMBER = json['SUPERVISOR_MOBILE_NUMBER'];
|
||||
sUPERVISORNAME = json['SUPERVISOR_NAME'];
|
||||
sUPERVISORNUMBER = json['SUPERVISOR_NUMBER'];
|
||||
sUPERVISORWORKNUMBER = json['SUPERVISOR_WORK_NUMBER'];
|
||||
sWIPESEXEMPTEDFLAG = json['SWIPES_EXEMPTED_FLAG'];
|
||||
sWIPESEXEMPTEDMEANING = json['SWIPES_EXEMPTED_MEANING'];
|
||||
sYSTEMPERSONTYPE = json['SYSTEM_PERSON_TYPE'];
|
||||
tKEMAILADDRESS = json['TK_EMAIL_ADDRESS'];
|
||||
tKEMPLOYEEDISPLAYNAME = json['TK_EMPLOYEE_DISPLAY_NAME'];
|
||||
tKEMPLOYEENAME = json['TK_EMPLOYEE_NAME'];
|
||||
tKEMPLOYEENUMBER = json['TK_EMPLOYEE_NUMBER'];
|
||||
tKPERSONID = json['TK_PERSON_ID'];
|
||||
tOROWNUM = json['TO_ROW_NUM'];
|
||||
uNITNUMBER = json['UNIT_NUMBER'];
|
||||
uSERSTATUS = json['USER_STATUS'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ACTUAL_TERMINATION_DATE'] = this.aCTUALTERMINATIONDATE;
|
||||
data['ASSIGNMENT_END_DATE'] = this.aSSIGNMENTENDDATE;
|
||||
data['ASSIGNMENT_ID'] = this.aSSIGNMENTID;
|
||||
data['ASSIGNMENT_NUMBER'] = this.aSSIGNMENTNUMBER;
|
||||
data['ASSIGNMENT_START_DATE'] = this.aSSIGNMENTSTARTDATE;
|
||||
data['ASSIGNMENT_STATUS_TYPE_ID'] = this.aSSIGNMENTSTATUSTYPEID;
|
||||
data['ASSIGNMENT_TYPE'] = this.aSSIGNMENTTYPE;
|
||||
data['BUSINESS_GROUP_ID'] = this.bUSINESSGROUPID;
|
||||
data['BUSINESS_GROUP_NAME'] = this.bUSINESSGROUPNAME;
|
||||
data['BusinessCardQR'] = this.businessCardQR;
|
||||
data['CURRENT_EMPLOYEE_FLAG'] = this.cURRENTEMPLOYEEFLAG;
|
||||
data['EMPLOYEE_DISPLAY_NAME'] = this.eMPLOYEEDISPLAYNAME;
|
||||
data['EMPLOYEE_DISPLAY_NAME_Ar'] = this.eMPLOYEEDISPLAYNAMEAr;
|
||||
data['EMPLOYEE_DISPLAY_NAME_En'] = this.eMPLOYEEDISPLAYNAMEEn;
|
||||
data['EMPLOYEE_EMAIL_ADDRESS'] = this.eMPLOYEEEMAILADDRESS;
|
||||
data['EMPLOYEE_IMAGE'] = this.eMPLOYEEIMAGE;
|
||||
data['EMPLOYEE_MOBILE_NUMBER'] = this.eMPLOYEEMOBILENUMBER;
|
||||
data['EMPLOYEE_NAME'] = this.eMPLOYEENAME;
|
||||
data['EMPLOYEE_NAME_Ar'] = this.eMPLOYEENAMEAr;
|
||||
data['EMPLOYEE_NAME_En'] = this.eMPLOYEENAMEEn;
|
||||
data['EMPLOYEE_NUMBER'] = this.eMPLOYEENUMBER;
|
||||
data['EMPLOYEE_WORK_NUMBER'] = this.eMPLOYEEWORKNUMBER;
|
||||
data['EMPLOYMENT_CATEGORY'] = this.eMPLOYMENTCATEGORY;
|
||||
data['EMPLOYMENT_CATEGORY_MEANING'] = this.eMPLOYMENTCATEGORYMEANING;
|
||||
data['EmployeeQR'] = this.employeeQR;
|
||||
data['FREQUENCY'] = this.fREQUENCY;
|
||||
data['FREQUENCY_MEANING'] = this.fREQUENCYMEANING;
|
||||
data['FROM_ROW_NUM'] = this.fROMROWNUM;
|
||||
data['GRADE_ID'] = this.gRADEID;
|
||||
data['GRADE_NAME'] = this.gRADENAME;
|
||||
data['HIRE_DATE'] = this.hIREDATE;
|
||||
data['JOB_ID'] = this.jOBID;
|
||||
data['JOB_NAME'] = this.jOBNAME;
|
||||
data['JOB_NAME_Ar'] = this.jOBNAMEAr;
|
||||
data['JOB_NAME_En'] = this.jOBNAMEEn;
|
||||
data['LEDGER_ID'] = this.lEDGERID;
|
||||
data['LOCATION_ID'] = this.lOCATIONID;
|
||||
data['LOCATION_NAME'] = this.lOCATIONNAME;
|
||||
data['MANUAL_TIMECARD_FLAG'] = this.mANUALTIMECARDFLAG;
|
||||
data['MANUAL_TIMECARD_MEANING'] = this.mANUALTIMECARDMEANING;
|
||||
data['MobileNumberWithZipCode'] = this.mobileNumberWithZipCode;
|
||||
data['NATIONALITY_CODE'] = this.nATIONALITYCODE;
|
||||
data['NATIONALITY_MEANING'] = this.nATIONALITYMEANING;
|
||||
data['NATIONAL_IDENTIFIER'] = this.nATIONALIDENTIFIER;
|
||||
data['NORMAL_HOURS'] = this.nORMALHOURS;
|
||||
data['NO_OF_ROWS'] = this.nOOFROWS;
|
||||
data['ORGANIZATION_ID'] = this.oRGANIZATIONID;
|
||||
data['ORGANIZATION_NAME'] = this.oRGANIZATIONNAME;
|
||||
data['PAYROLL_CODE'] = this.pAYROLLCODE;
|
||||
data['PAYROLL_ID'] = this.pAYROLLID;
|
||||
data['PAYROLL_NAME'] = this.pAYROLLNAME;
|
||||
data['PERSON_ID'] = this.pERSONID;
|
||||
data['PERSON_TYPE'] = this.pERSONTYPE;
|
||||
data['PERSON_TYPE_ID'] = this.pERSONTYPEID;
|
||||
data['PER_INFORMATION_CATEGORY'] = this.pERINFORMATIONCATEGORY;
|
||||
data['POSITION_ID'] = this.pOSITIONID;
|
||||
data['POSITION_NAME'] = this.pOSITIONNAME;
|
||||
data['PRIMARY_FLAG'] = this.pRIMARYFLAG;
|
||||
data['ROW_NUM'] = this.rOWNUM;
|
||||
data['SERVICE_DAYS'] = this.sERVICEDAYS;
|
||||
data['SERVICE_MONTHS'] = this.sERVICEMONTHS;
|
||||
data['SERVICE_YEARS'] = this.sERVICEYEARS;
|
||||
data['SUPERVISOR_ASSIGNMENT_ID'] = this.sUPERVISORASSIGNMENTID;
|
||||
data['SUPERVISOR_DISPLAY_NAME'] = this.sUPERVISORDISPLAYNAME;
|
||||
data['SUPERVISOR_EMAIL_ADDRESS'] = this.sUPERVISOREMAILADDRESS;
|
||||
data['SUPERVISOR_ID'] = this.sUPERVISORID;
|
||||
data['SUPERVISOR_MOBILE_NUMBER'] = this.sUPERVISORMOBILENUMBER;
|
||||
data['SUPERVISOR_NAME'] = this.sUPERVISORNAME;
|
||||
data['SUPERVISOR_NUMBER'] = this.sUPERVISORNUMBER;
|
||||
data['SUPERVISOR_WORK_NUMBER'] = this.sUPERVISORWORKNUMBER;
|
||||
data['SWIPES_EXEMPTED_FLAG'] = this.sWIPESEXEMPTEDFLAG;
|
||||
data['SWIPES_EXEMPTED_MEANING'] = this.sWIPESEXEMPTEDMEANING;
|
||||
data['SYSTEM_PERSON_TYPE'] = this.sYSTEMPERSONTYPE;
|
||||
data['TK_EMAIL_ADDRESS'] = this.tKEMAILADDRESS;
|
||||
data['TK_EMPLOYEE_DISPLAY_NAME'] = this.tKEMPLOYEEDISPLAYNAME;
|
||||
data['TK_EMPLOYEE_NAME'] = this.tKEMPLOYEENAME;
|
||||
data['TK_EMPLOYEE_NUMBER'] = this.tKEMPLOYEENUMBER;
|
||||
data['TK_PERSON_ID'] = this.tKPERSONID;
|
||||
data['TO_ROW_NUM'] = this.tOROWNUM;
|
||||
data['UNIT_NUMBER'] = this.uNITNUMBER;
|
||||
data['USER_STATUS'] = this.uSERSTATUS;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
class MemberLoginListModel {
|
||||
String? pEMAILADDRESS;
|
||||
String? pINVALIDLOGINMSG;
|
||||
String? pLEGISLATIONCODE;
|
||||
String? pMOBILENUMBER;
|
||||
String? pPASSOWRDEXPIRED;
|
||||
String? pPASSWORDEXPIREDMSG;
|
||||
String? pRETURNMSG;
|
||||
String? pRETURNSTATUS;
|
||||
int? pSESSIONID;
|
||||
|
||||
MemberLoginListModel(
|
||||
{this.pEMAILADDRESS,
|
||||
this.pINVALIDLOGINMSG,
|
||||
this.pLEGISLATIONCODE,
|
||||
this.pMOBILENUMBER,
|
||||
this.pPASSOWRDEXPIRED,
|
||||
this.pPASSWORDEXPIREDMSG,
|
||||
this.pRETURNMSG,
|
||||
this.pRETURNSTATUS,
|
||||
this.pSESSIONID});
|
||||
|
||||
MemberLoginListModel.fromJson(Map<String, dynamic> json) {
|
||||
pEMAILADDRESS = json['P_EMAIL_ADDRESS'];
|
||||
pINVALIDLOGINMSG = json['P_INVALID_LOGIN_MSG'];
|
||||
pLEGISLATIONCODE = json['P_LEGISLATION_CODE'];
|
||||
pMOBILENUMBER = json['P_MOBILE_NUMBER'];
|
||||
pPASSOWRDEXPIRED = json['P_PASSOWRD_EXPIRED'];
|
||||
pPASSWORDEXPIREDMSG = json['P_PASSWORD_EXPIRED_MSG'];
|
||||
pRETURNMSG = json['P_RETURN_MSG'];
|
||||
pRETURNSTATUS = json['P_RETURN_STATUS'];
|
||||
pSESSIONID = json['P_SESSION_ID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['P_EMAIL_ADDRESS'] = this.pEMAILADDRESS;
|
||||
data['P_INVALID_LOGIN_MSG'] = this.pINVALIDLOGINMSG;
|
||||
data['P_LEGISLATION_CODE'] = this.pLEGISLATIONCODE;
|
||||
data['P_MOBILE_NUMBER'] = this.pMOBILENUMBER;
|
||||
data['P_PASSOWRD_EXPIRED'] = this.pPASSOWRDEXPIRED;
|
||||
data['P_PASSWORD_EXPIRED_MSG'] = this.pPASSWORDEXPIREDMSG;
|
||||
data['P_RETURN_MSG'] = this.pRETURNMSG;
|
||||
data['P_RETURN_STATUS'] = this.pRETURNSTATUS;
|
||||
data['P_SESSION_ID'] = this.pSESSIONID;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
class MemberModel {
|
||||
int? totalItemsCount;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<MemberDataModel>? data;
|
||||
|
||||
MemberModel({this.totalItemsCount, this.statusCode, this.message, this.data});
|
||||
|
||||
MemberModel.fromJson(Map<String, dynamic> json) {
|
||||
totalItemsCount = json['totalItemsCount'];
|
||||
statusCode = json['statusCode'];
|
||||
message = json['message'];
|
||||
if (json['data'] != null) {
|
||||
data = [];
|
||||
json['data'].forEach((v) {
|
||||
data?.add(new MemberDataModel.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['totalItemsCount'] = this.totalItemsCount;
|
||||
data['statusCode'] = this.statusCode;
|
||||
data['message'] = this.message;
|
||||
if (this.data != null) {
|
||||
data['data'] = this.data?.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class MemberDataModel {
|
||||
int? committeeId;
|
||||
String? firstName;
|
||||
String? lastName;
|
||||
String? description;
|
||||
String? picture;
|
||||
int? orderNo;
|
||||
|
||||
MemberDataModel({this.committeeId, this.firstName, this.lastName, this.description, this.picture, this.orderNo});
|
||||
|
||||
MemberDataModel.fromJson(Map<String, dynamic> json) {
|
||||
committeeId = json['committeeId'];
|
||||
firstName = json['firstName'];
|
||||
lastName = json['lastName'];
|
||||
description = json['description'];
|
||||
picture = json['picture'];
|
||||
orderNo = json['orderNo'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['committeeId'] = this.committeeId;
|
||||
data['firstName'] = this.firstName;
|
||||
data['lastName'] = this.lastName;
|
||||
data['description'] = this.description;
|
||||
data['picture'] = this.picture;
|
||||
data['orderNo'] = this.orderNo;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
class PostParamsModel {
|
||||
double? versionID;
|
||||
int? channel;
|
||||
int? languageID;
|
||||
String? mobileType;
|
||||
String? logInTokenID;
|
||||
String? tokenID;
|
||||
|
||||
PostParamsModel({this.versionID, this.channel, this.languageID, this.mobileType, this.logInTokenID, this.tokenID});
|
||||
|
||||
PostParamsModel.fromJson(Map<String, dynamic> json) {
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
mobileType = json['MobileType'];
|
||||
logInTokenID = json['LogInTokenID'];
|
||||
tokenID = json['TokenID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['MobileType'] = this.mobileType;
|
||||
data['LogInTokenID'] = this.logInTokenID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
return data;
|
||||
}
|
||||
|
||||
set setLogInTokenID(String? token) => logInTokenID = token;
|
||||
|
||||
set setTokenID(String? token) => tokenID = token;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
class PrivilegeListModel {
|
||||
int? iD;
|
||||
String? serviceName;
|
||||
bool? previlege;
|
||||
|
||||
PrivilegeListModel({this.iD, this.serviceName, this.previlege});
|
||||
|
||||
PrivilegeListModel.fromJson(Map<String, dynamic> json) {
|
||||
iD = json['ID'];
|
||||
serviceName = json['ServiceName'];
|
||||
previlege = json['Previlege'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ID'] = this.iD;
|
||||
data['ServiceName'] = this.serviceName;
|
||||
data['Previlege'] = this.previlege;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
import 'package:easy_localization/src/public_ext.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/api/login_api_client.dart';
|
||||
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||
import 'package:mohem_flutter_app/config/routes.dart';
|
||||
import 'package:mohem_flutter_app/dialogs/otp_dialog.dart';
|
||||
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||
import 'package:mohem_flutter_app/models/basic_member_information_model.dart';
|
||||
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
||||
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||
import 'package:mohem_flutter_app/widgets/input_widget.dart';
|
||||
|
||||
class ForgotPasswordScreen extends StatefulWidget {
|
||||
ForgotPasswordScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_ForgotPasswordScreenState createState() {
|
||||
return _ForgotPasswordScreenState();
|
||||
}
|
||||
}
|
||||
|
||||
class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> {
|
||||
TextEditingController employeeId = TextEditingController();
|
||||
BasicMemberInformationModel? _basicMemberInformation;
|
||||
GenericResponseModel? genericResponseModel;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void performLogin() async {
|
||||
// Utils.showLoading(context);
|
||||
try {
|
||||
_basicMemberInformation = await LoginApiClient().getBasicUserInformation("CS", employeeId.text);
|
||||
genericResponseModel = await LoginApiClient().sendPublicActivationCode(_basicMemberInformation?.pMOBILENUMBER, employeeId.text);
|
||||
OtpDialog(
|
||||
context,
|
||||
1,
|
||||
int.tryParse(_basicMemberInformation?.pMOBILENUMBER ?? ""),
|
||||
(value) async {
|
||||
GenericResponseModel? genericResponseModel = await LoginApiClient().checkPublicActivationCode(value, employeeId.text);
|
||||
if (genericResponseModel?.errorMessage != null) {
|
||||
Utils.showToast(genericResponseModel?.errorMessage ?? "");
|
||||
return;
|
||||
}
|
||||
|
||||
Navigator.pushNamed(context, AppRoutes.newPassword);
|
||||
// this.checkActivationCode(value: value);
|
||||
},
|
||||
() => {
|
||||
Navigator.pop(context),
|
||||
},
|
||||
).displayDialog(context);
|
||||
} catch (ex) {
|
||||
print(ex);
|
||||
Utils.handleException(ex, null);
|
||||
// Utils.hideLoading(context);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
//const SizedBox(height: 23),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(21.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
LocaleKeys.forgotPassword.tr().toText24(isBold: true),
|
||||
LocaleKeys.loginCodeWillSentToMobileNumber.tr().toText16(),
|
||||
16.height,
|
||||
InputWidget(LocaleKeys.employeeId.tr(), "123456", employeeId),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
DefaultButton(LocaleKeys.changePassword.tr(), () async {
|
||||
//Navigator.pushNamed(context, AppRoutes.verifyLogin);
|
||||
})
|
||||
.insideContainer
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
|
||||
class LoadingDialog extends StatefulWidget {
|
||||
LoadingDialog({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_LoadingDialogState createState() {
|
||||
return _LoadingDialogState();
|
||||
}
|
||||
}
|
||||
|
||||
class _LoadingDialogState extends State<LoadingDialog> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Dialog(
|
||||
insetPadding: const EdgeInsets.symmetric(horizontal: 60.0, vertical: 24.0),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
elevation: 0,
|
||||
backgroundColor: Colors.transparent,
|
||||
child: Directionality(
|
||||
textDirection: TextDirection.rtl,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/logos/loading_mohemm_logo.gif",
|
||||
height: 96.0,
|
||||
width: 96.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue