Insurance dialog added post registration

dev_3.3_LabReportEnhancementCR
haroon amjad 2 years ago
parent c7ee76d816
commit dd0099236d

@ -1900,4 +1900,5 @@ const Map localizedValues = {
"downloadReport": {"en": "Download Report", "ar": "تحميل تقرير المختبر"}, "downloadReport": {"en": "Download Report", "ar": "تحميل تقرير المختبر"},
"habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."}, "habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."},
"cashAmountUpdateInsurance": {"en": "Please note that this is the cash amount, If you want to update your insurance, Please tap below:", "ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"}, "cashAmountUpdateInsurance": {"en": "Please note that this is the cash amount, If you want to update your insurance, Please tap below:", "ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"},
"validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"},
}; };

@ -260,7 +260,7 @@ class _BookSuccessState extends State<BookSuccess> {
); );
Navigator.push(context, FadePage(page: InsuranceUpdate())); Navigator.push(context, FadePage(page: InsuranceUpdate()));
}, },
color: CustomColors.accentColor, color: Color(0xff313A43),
textColor: Colors.white, textColor: Colors.white,
), ),
], ],

@ -139,7 +139,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
); );
Navigator.push(context, FadePage(page: InsuranceUpdate())); Navigator.push(context, FadePage(page: InsuranceUpdate()));
}, },
color: CustomColors.accentColor, color: Color(0xff313A43),
textColor: Colors.white, textColor: Colors.white,
), ),
], ],

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/Authentication/check_activation_code
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/countries_list.dart'; import 'package:diplomaticquarterapp/models/Authentication/countries_list.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
@ -704,31 +705,35 @@ class _RegisterInfo extends State<RegisterInfo> {
projectViewModel.isLogin = true; projectViewModel.isLogin = true;
projectViewModel.user = authenticatedUserObject.user; projectViewModel.user = authenticatedUserObject.user;
await authenticatedUserObject.getUser(getUser: true); await authenticatedUserObject.getUser(getUser: true);
appointmentRateViewModel appointmentRateViewModel.getIsLastAppointmentRatedList().then((value) {
.getIsLastAppointmentRatedList() getToDoCount();
.then((value) => { GifLoaderDialogUtils.hideDialog(AppGlobal.context);
getToDoCount(), if (appointmentRateViewModel.isHaveAppointmentNotRate) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context), Navigator.pushAndRemoveUntil(
if (appointmentRateViewModel.isHaveAppointmentNotRate) context,
{ FadePage(
Navigator.pushAndRemoveUntil( page: RateAppointmentDoctor(isFromRegistration: true),
context, ),
FadePage( (r) => false);
page: RateAppointmentDoctor(), } else {
), ConfirmDialog dialog = new ConfirmDialog(
(r) => false) context: context,
} confirmMessage: TranslationBase.of(context).validInsurance,
else okText: TranslationBase.of(context).yes,
{ cancelText: TranslationBase.of(context).no,
Navigator.pushAndRemoveUntil( okFunction: () {
context, ConfirmDialog.closeAlertDialog(context);
FadePage( Navigator.pushAndRemoveUntil(
page: LandingPage(), context,
), MaterialPageRoute(builder: (context) => LandingPage()),
(r) => false) (Route<dynamic> route) => false,
} );
}) Navigator.push(context, FadePage(page: InsuranceUpdate()));
.catchError((err) { },
cancelFunction: () => {});
dialog.showAlertDialog(context);
}
}).catchError((err) {
print(err); print(err);
//GifLoaderDialogUtils.hideDialog(context); //GifLoaderDialogUtils.hideDialog(context);
}); });

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
@ -9,12 +10,18 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class RateAppointmentDoctor extends StatefulWidget { class RateAppointmentDoctor extends StatefulWidget {
bool isFromRegistration;
RateAppointmentDoctor({Key key, this.isFromRegistration = false}) : super(key: key);
@override @override
_RateAppointmentDoctorState createState() => _RateAppointmentDoctorState(); _RateAppointmentDoctorState createState() => _RateAppointmentDoctorState();
} }
@ -158,12 +165,31 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).later, TranslationBase.of(context).later,
() { () {
Navigator.pushReplacement( // if(widget.isFromRegistration) {
context, ConfirmDialog dialog = new ConfirmDialog(
FadePage( context: context,
page: LandingPage(), confirmMessage: TranslationBase.of(context).validInsurance,
), okText: TranslationBase.of(context).yes,
); cancelText: TranslationBase.of(context).no,
okFunction: () {
ConfirmDialog.closeAlertDialog(context);
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> route) => false,
);
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
cancelFunction: () => {});
dialog.showAlertDialog(context);
// } else {
// Navigator.pushReplacement(
// context,
// FadePage(
// page: LandingPage(),
// ),
// );
// }
}, },
color: CustomColors.accentColor, color: CustomColors.accentColor,
textColor: Colors.white, textColor: Colors.white,

@ -2909,6 +2909,7 @@ class TranslationBase {
String get downloadReport => localizedValues["downloadReport"][locale.languageCode]; String get downloadReport => localizedValues["downloadReport"][locale.languageCode];
String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode]; String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode];
String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode]; String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode];
String get validInsurance => localizedValues["validInsurance"][locale.languageCode];
} }

@ -99,9 +99,9 @@ class Mdialog extends StatelessWidget {
cancelFunction(); cancelFunction();
}, },
child: Container( child: Container(
decoration: containerRadius(CustomColors.lightGreyColor, 12), decoration: containerRadius(CustomColors.accentColor, 12),
padding: EdgeInsets.only(top: 8,bottom: 8), padding: EdgeInsets.only(top: 8,bottom: 8),
child: Center(child: Texts(cancelText, variant: "caption3")), child: Center(child: Texts(cancelText, variant: "caption3", color: CustomColors.white,)),
), ),
), ),
), ),
@ -110,7 +110,7 @@ class Mdialog extends StatelessWidget {
child: InkWell( child: InkWell(
onTap: okFunction, onTap: okFunction,
child: Container( child: Container(
decoration: containerRadius(CustomColors.accentColor, 12), decoration: containerRadius(CustomColors.green, 12),
padding: EdgeInsets.only(top: 8,bottom: 8), padding: EdgeInsets.only(top: 8,bottom: 8),
child: Center( child: Center(
child: Texts( child: Texts(

@ -35,9 +35,9 @@ class MyInAppBrowser extends InAppBrowser {
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS

Loading…
Cancel
Save