|
|
|
|
@ -42,8 +42,8 @@ import 'package:provider/provider.dart';
|
|
|
|
|
class ConfirmLogin extends StatefulWidget {
|
|
|
|
|
final Function changePageViewIndex;
|
|
|
|
|
final fromRegistration;
|
|
|
|
|
|
|
|
|
|
const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false}) : super(key: key);
|
|
|
|
|
final bool isDubai;
|
|
|
|
|
const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false, this.isDubai =false}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_ConfirmLogin createState() => _ConfirmLogin();
|
|
|
|
|
@ -385,8 +385,10 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
var request = this.getCommonRequest(type: type);
|
|
|
|
|
request.sMSSignature = await SMSOTP.getSignature();
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
if (healthId != null) {
|
|
|
|
|
request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob));
|
|
|
|
|
if (healthId != null || widget.isDubai) {
|
|
|
|
|
if(!widget.isDubai){
|
|
|
|
|
request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob));
|
|
|
|
|
}
|
|
|
|
|
request.healthId = healthId;
|
|
|
|
|
request.isHijri = isHijri;
|
|
|
|
|
await this.authService.sendActivationCodeRegister(request).then((result) {
|
|
|
|
|
@ -547,7 +549,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
request.searchType = this.registerd_data.searchType != null ? this.registerd_data.searchType : 1;
|
|
|
|
|
request.patientID = this.registerd_data.patientID != null ? this.registerd_data.patientID : 0;
|
|
|
|
|
request.patientIdentificationID = request.nationalID = this.registerd_data.patientIdentificationID != null ? this.registerd_data.patientIdentificationID : '0';
|
|
|
|
|
|
|
|
|
|
request.dob = this.registerd_data.dob;
|
|
|
|
|
request.isRegister = this.registerd_data.isRegister;
|
|
|
|
|
} else {
|
|
|
|
|
request.searchType = request.searchType != null ? request.searchType : 2;
|
|
|
|
|
@ -565,8 +567,10 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
var request = this.getCommonRequest().toJson();
|
|
|
|
|
dynamic res;
|
|
|
|
|
if (healthId != null) {
|
|
|
|
|
request['DOB'] = dob;
|
|
|
|
|
if (healthId != null || widget.isDubai) {
|
|
|
|
|
if(!widget.isDubai) {
|
|
|
|
|
request['DOB'] = dob;
|
|
|
|
|
}
|
|
|
|
|
request['HealthId'] = healthId;
|
|
|
|
|
request['IsHijri'] = isHijri;
|
|
|
|
|
|
|
|
|
|
@ -579,6 +583,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
result = CheckActivationCode.fromJson(result),
|
|
|
|
|
if (this.registerd_data != null && this.registerd_data.isRegister == true)
|
|
|
|
|
{
|
|
|
|
|
// if(widget.isDubai ==false){
|
|
|
|
|
widget.changePageViewIndex(1),
|
|
|
|
|
Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)),
|
|
|
|
|
}
|
|
|
|
|
|