From 7ae4e7d6160e05264583461b3c648484fb3751f9 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 17 Oct 2022 11:41:49 +0300 Subject: [PATCH] updates & fixes --- lib/config/config.dart | 2 +- lib/config/localized_values.dart | 9 +- lib/core/service/client/base_app_client.dart | 4 +- .../components/DocAvailableAppointments.dart | 1 + .../AttachInsuranceCardImageDialog.dart | 41 +++- .../insurance/UpdateInsuranceManually.dart | 189 ++++++++++++++++++ lib/uitl/translations_delegate_base.dart | 6 + 7 files changed, 239 insertions(+), 13 deletions(-) create mode 100644 lib/pages/insurance/UpdateInsuranceManually.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 07b551b7..aff82d3f 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -408,7 +408,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnar var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 9.3; +var VERSION_ID = 9.4; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 0876df31..b488fc39 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1584,7 +1584,7 @@ const Map localizedValues = { "permissionsBellow": {"en": "Please allow the permissions below:", "ar": ":الرجاء السماح الأذونات أدناه"}, "appointmentReminder": {"en": "Would you like to set a reminder for this in your calendar?", "ar": "هل ترغب في اضافة تذكير لهذا في التقويم؟"}, "cancelAppointment": {"en": "Cancel Appt.", "ar": "الغاء الموعد"}, - "updateInsurCards": {"en": "Update Insurance Cards", "ar": "تحديث بطاقات التأمين"}, + "updateInsurCards": {"en": "Update Insurance Card", "ar": "تحديث بطاقات التأمين"}, "patientAge": {"en": "y", "ar": "سنة"}, "searchCriteria": {"en": "Select Search Criteria", "ar": "حدد معايير البحث"}, "RequesterInfo": {"en": "Requester Info", "ar": "معلومات مقدم الطلب"}, @@ -1851,4 +1851,11 @@ const Map localizedValues = { "deactivateAccount": { "en": "Are you sure you want to deactivate your account?", "ar": "هل أنت متأكد أنك تريد ايقاف الحساب مؤقتاً حسابك؟" }, "accountDeactivated": { "en": "Your account has been deactivated successfully", "ar": "تم ايقاف الحساب مؤقتاً بنجاح." }, "accountDeactivatedMsg": { "en": "Your account has been deactivated. Would you like to reactivate it?", "ar": "حسابك معطل. هل ترغب في إعادة تنشيطه مرة أخرى؟" }, + "updateInsuranceManually": { "en": "Update Insurance Manually", "ar": "تحديث التأمين يدويا" }, + "or": { "en": "Update Insurance Manually", "ar": "تحديث التأمين يدويا" }, + "enterInsuranceDetails": { "en": "Please enter your insurance card details below:", "ar": "الرجاء إدخال تفاصيل بطاقة التأمين الخاصة بك أدناه:" }, + "cardHolderName": { "en": "Card Holder Name", "ar": "إسم صاحب البطاقة" }, + "membershipNo": { "en": "Membership No.", "ar": "رقم العضوية" }, + "policyNo": { "en": "Policy No.", "ar": "رقم وثيقة التأمين" }, + "insuranceClassName": { "en": "Insurance Class", "ar": "فئة التأمين" }, }; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 4410b043..c1c83ca5 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -149,8 +149,8 @@ class BaseAppClient { // body['IdentificationNo'] = 1023854217; // body['MobileNo'] = "531940021"; - body['PatientID'] = 1231755; //3844083 - body['TokenID'] = "@dm!n"; + // body['PatientID'] = 1231755; //3844083 + // body['TokenID'] = "@dm!n"; // Patient ID: 3027574 // Mobile no.: 0502303285 diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index 46f8a6ce..6856bbee 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -320,6 +320,7 @@ class _DocAvailableAppointmentsState extends State wit }); } else { DocAvailableAppointments.areAppointmentsAvailable = false; + DocAvailableAppointments.areSlotsAvailable = false; AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } } else { diff --git a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart index 8272f0c2..76220ea8 100644 --- a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart +++ b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart @@ -1,8 +1,12 @@ import 'dart:io'; +import 'package:diplomaticquarterapp/pages/insurance/UpdateInsuranceManually.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -34,7 +38,7 @@ class _AttachInsuranceCardImageDialogState extends State createState() => _UpdateInsuranceManuallyState(); +} + +class _UpdateInsuranceManuallyState extends State { + TextEditingController _nationalIDTextController = TextEditingController(); + TextEditingController _cardHolderNameTextController = TextEditingController(); + TextEditingController _membershipNoTextController = TextEditingController(); + TextEditingController _policyNoTextController = TextEditingController(); + ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + _nationalIDTextController.text = projectViewModel.user.patientIdentificationNo; + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).updateInsurCards, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + TranslationBase.of(context).enterInsuranceDetails, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + List list = [ + RadioSelectionDialogModel(TranslationBase.of(context).myAccount, 0), + RadioSelectionDialogModel(TranslationBase.of(context).myFamilyFiles, 1), + RadioSelectionDialogModel(TranslationBase.of(context).otherAccount, 2), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + // selectedIndex: + // beneficiaryType == BeneficiaryType.MyAccount ? 0 : (beneficiaryType == BeneficiaryType.MyFamilyFiles ? 1 : (beneficiaryType == BeneficiaryType.OtherAccount ? 2 : -1)), + onValueSelected: (index) { + var type; + if (index == 0) { + // type = BeneficiaryType.MyAccount; + } else if (index == 1) { + // type = BeneficiaryType.MyFamilyFiles; + } else { + // type = BeneficiaryType.OtherAccount; + } + + setState(() {}); + }, + ), + ); + }, + child: Container( + padding: EdgeInsets.all(8), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).insuranceCompany, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + SizedBox(height: 12), + NewTextFields( + hintText: TranslationBase.of(context).nationalIdNumber, + controller: _nationalIDTextController, + readOnly: true, + ), + SizedBox(height: 12), + NewTextFields( + hintText: TranslationBase.of(context).cardHolderName, + controller: _cardHolderNameTextController, + readOnly: false, + ), + SizedBox(height: 12), + NewTextFields( + hintText: TranslationBase.of(context).membershipNo, + controller: _membershipNoTextController, + readOnly: false, + ), + SizedBox(height: 12), + NewTextFields( + hintText: TranslationBase.of(context).insurancePolicyNo, + controller: _policyNoTextController, + readOnly: false, + ), + SizedBox(height: 12), + InkWell( + onTap: () { + List list = [ + RadioSelectionDialogModel(TranslationBase.of(context).myAccount, 0), + RadioSelectionDialogModel(TranslationBase.of(context).myFamilyFiles, 1), + RadioSelectionDialogModel(TranslationBase.of(context).otherAccount, 2), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + // selectedIndex: + // beneficiaryType == BeneficiaryType.MyAccount ? 0 : (beneficiaryType == BeneficiaryType.MyFamilyFiles ? 1 : (beneficiaryType == BeneficiaryType.OtherAccount ? 2 : -1)), + onValueSelected: (index) { + var type; + if (index == 0) { + // type = BeneficiaryType.MyAccount; + } else if (index == 1) { + // type = BeneficiaryType.MyFamilyFiles; + } else { + // type = BeneficiaryType.OtherAccount; + } + + setState(() {}); + }, + ), + ); + }, + child: Container( + padding: EdgeInsets.all(8), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).insuranceClassName, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + ], + ), + ), + ), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + padding: EdgeInsets.all(18), + child: DefaultButton( + TranslationBase.of(context).submit, + (){} + ), + ), + ); + } +} diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 44b001ff..a6b3d14a 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2860,6 +2860,12 @@ class TranslationBase { String get deactivateAccount => localizedValues["deactivateAccount"][locale.languageCode]; String get accountDeactivated => localizedValues["accountDeactivated"][locale.languageCode]; String get accountDeactivatedMsg => localizedValues["accountDeactivatedMsg"][locale.languageCode]; + String get updateInsuranceManually => localizedValues["updateInsuranceManually"][locale.languageCode]; + String get enterInsuranceDetails => localizedValues["enterInsuranceDetails"][locale.languageCode]; + String get cardHolderName => localizedValues["cardHolderName"][locale.languageCode]; + String get membershipNo => localizedValues["membershipNo"][locale.languageCode]; + String get insurancePolicyNo => localizedValues["policyNo"][locale.languageCode]; + String get insuranceClassName => localizedValues["insuranceClassName"][locale.languageCode]; }