From 4390e96270dcf66c471d703a5731e98f4b7cf308 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 16 Apr 2020 18:44:16 +0300 Subject: [PATCH] DoctorApplicati on_SendActivationCodebyOTPNotificationType fainlay works --- lib/routes.dart | 2 +- lib/widgets/auth/verfiy_account.dart | 5 +++-- lib/widgets/auth/verification_methods.dart | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/routes.dart b/lib/routes.dart index 5b995c84..9aacf6cb 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -12,7 +12,7 @@ import './screens/patients/patient_search_screen.dart'; import './screens/patients/patients_screen.dart'; import './screens/settings/settings_screen.dart'; -const String INIT_ROUTE = VERIFICATION_METHODS; +const String INIT_ROUTE = LOGIN; const String HOME = '/'; const String LOGIN = 'login'; const String CHANGE_PASSWORD = 'change-password'; diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index 091e6b20..90d9849a 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/widgets/home/home_item.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; @@ -237,10 +238,10 @@ class _VerifyAccountState extends State { "IsSilentLogIN": false }; - authProv.sendActivationCodeByOtpNotificationType(model).then((res) { + authProv.memberCheckActivationCodeNew(model).then((res) { // Navigator.of(context).pushNamed(VERIFY_ACCOUNT); if (res['MessageStatus'] == 1) { - Navigator.of(context).pushNamed(VERIFY_ACCOUNT); + Navigator.of(context).pushNamed(HOME); } else { helpers.showErrorToast(res['ErrorEndUserMessage']); } diff --git a/lib/widgets/auth/verification_methods.dart b/lib/widgets/auth/verification_methods.dart index 858daf15..eed7c190 100644 --- a/lib/widgets/auth/verification_methods.dart +++ b/lib/widgets/auth/verification_methods.dart @@ -177,18 +177,18 @@ class _VerificationMethodsState extends State { Map model = { "LogInTokenID": _loggedUser['LogInTokenID'], "Channel": 9, - "MobileNumber": _loggedUser['MobileNumber'], + "MobileNumber": 785228065,//_loggedUser['MobileNumber'], "IPAdress": "11.11.11.11", "LanguageID": 2, "ProjectID": 15, //TODO : this should become daynamci - "ZipCode": _loggedUser['ZipCode'], + "ZipCode":962, //_loggedUser['ZipCode'], "UserName": _loggedUser['List_MemberInformation'][0]['MemberID'], "OTP_SendType": oTPSendType }; print('$_loggedUser'); print(oTPSendType); authProv.sendActivationCodeByOtpNotificationType(model).then((res) { - Navigator.of(context).pushNamed(VERIFY_ACCOUNT); + // Navigator.of(context).pushNamed(VERIFY_ACCOUNT); if (res['MessageStatus'] == 1) { Navigator.of(context).pushNamed(VERIFY_ACCOUNT);