|
|
|
|
@ -697,37 +697,37 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
checkIfUserAgreedBefore(CheckActivationCode result) {
|
|
|
|
|
this.authService.checkIfUserAgreed().then((result) {
|
|
|
|
|
if (result['IsPatientAlreadyAgreed']) {
|
|
|
|
|
goToHome();
|
|
|
|
|
} else {
|
|
|
|
|
this.authService.getUserAgreementContent().then((result) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
|
|
|
|
|
Navigator.pushAndRemoveUntil(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: UserLoginAgreementPage(
|
|
|
|
|
userAgreementText: result['UserAgreementContent'],
|
|
|
|
|
authenticatedUserObject: authenticatedUserObject,
|
|
|
|
|
appointmentRateViewModel: appointmentRateViewModel,
|
|
|
|
|
selectedOption: selectedOption,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
(r) => false);
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
print(err);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
print(err);
|
|
|
|
|
});
|
|
|
|
|
// this.authService.checkIfUserAgreed().then((result) {
|
|
|
|
|
// if (result['IsPatientAlreadyAgreed']) {
|
|
|
|
|
// goToHome();
|
|
|
|
|
// } else {
|
|
|
|
|
// this.authService.getUserAgreementContent().then((result) {
|
|
|
|
|
// GifLoaderDialogUtils.hideDialog(AppGlobal.context);
|
|
|
|
|
// Navigator.pushAndRemoveUntil(
|
|
|
|
|
// context,
|
|
|
|
|
// FadePage(
|
|
|
|
|
// page: UserLoginAgreementPage(
|
|
|
|
|
// userAgreementText: result['UserAgreementContent'],
|
|
|
|
|
// authenticatedUserObject: authenticatedUserObject,
|
|
|
|
|
// appointmentRateViewModel: appointmentRateViewModel,
|
|
|
|
|
// selectedOption: selectedOption,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// (r) => false);
|
|
|
|
|
// }).catchError((err) {
|
|
|
|
|
// GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
// print(err);
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// }).catchError((err) {
|
|
|
|
|
// GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
// print(err);
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// if (result.isNeedUserAgreement == true) {
|
|
|
|
|
//move to agreement page.
|
|
|
|
|
// } else {
|
|
|
|
|
// goToHome();
|
|
|
|
|
goToHome();
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|