Merge branch 'Haroon' into 'development'

Haroon

See merge request Cloud_Solution/diplomatic-quarter!263
merge-requests/262/merge
Mohammad Aljammal 5 years ago
commit ddea17a87c

@ -189,6 +189,8 @@ const HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvance
const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; const ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest';
const ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart';
const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; const IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult';
const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; const GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; const SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo';

@ -1184,6 +1184,98 @@ const Map localizedValues = {
"en": "To recieve water reminders, please turn on notifications in the system settings", "en": "To recieve water reminders, please turn on notifications in the system settings",
"ar": "الرجاء تفعيل الاشعارات في الاعدادات" "ar": "الرجاء تفعيل الاشعارات في الاعدادات"
}, },
"select-location": {
"en": "Select Location",
"ar": "اختر موقعا"
},
"result-header": {
"en": "Get The Result During 8 Hours",
"ar": "احصل على النتيجة خلال 8 ساعة"
},
"covid-info": {
"en": "We are using the advance technology to test COVID-19, The sample for examination is taking between the nose and mouth (nasopharyngeal swab), the examination is done by ELITE In Genius of the company ELITECH GROUP MOLECULAR DIAGNOSTICS, Note that the device belongs to an Italian company and is manufactured in Japan with RC- PCR",
"ar": "يتوفر لدينا أحدث جهاز خاص بفحص مرض الكورونا (COVID-19) طريقة الفحص تؤخذ مسحة من البلعوم الأنفي ( عن طريف الأنف) ويتم الفحص بواسطة جهاز ELITE In Genius التابع لشركة ELITECH GROUP MOLECULAR DIAGNOSTICS علما بأن الجهاز تابع لشركة إيطالية ومصنع في اليابان بتقينة RC-PCR"
},
"select-appo": {
"en": "Kindly select one of the available appointments from below:",
"ar": "يرجى اختيار أحد المواعيد المتاحة من أدناه:"
},
"covid-alert-header": {
"en": "Pay With-in 15 mins to confirm the appointment",
"ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد"
},
"covid-alert-info": {
"en": "Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically",
"ar": "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة​"
},
"covid-alert-mins": {
"en": "Pay With-in 15 mins",
"ar": "ادفع خلال 15 دقيقة"
},
"back": {
"en": "Back",
"ar": "رجوع"
},
"get-directions": {
"en": "Get Directions",
"ar": "احصل على الاتجاهات"
},
"selected-location": {
"en": "Selected Location:",
"ar": "الموقع المحدد:"
},
"test-fee": {
"en": "Test Fee",
"ar": "رسوم الاختبار"
},
"pay-options": {
"en": "You can pay by the following Options:",
"ar": "يمكنك الدفع عن طريق الخيارات التالية:"
},
"livecare-service": {
"en": "LiveCare Service",
"ar": "خدمة لايف كير"
},
"livecare-service-desc": {
"en": "is to obtain medical advice with a specialist doctor Via a video call",
"ar": "هي الحصول على استشارة طبية مع طبيب مختص عن طريق اتصال فيديو"
},
"why-livecare": {
"en": "WHY LIVECARE",
"ar": "لماذا خدمة اللايف كير"
},
"livecare-point-1": {
"en": "No need to wait you will get Medical consultation immediately via Video call",
"ar": "لا داعي للانتظار سوف تحصل على الاستشارة الطبية فورا عن طريق مكالمة الفيديو"
},
"doc-virtual-appo-ins4": {
"en": "The doctor will see your medical file",
"ar": "سوف يتمكن الطبيب من الاطلاع على ملفك الطبي كامل"
},
"doc-virtual-appo-ins5": {
"en": "Free prescription delivery service",
"ar": "خدمة توصيل الادوية مجانا"
},
"livecare-summary": {
"en": "** The service is included with some insurance companies according to the terms and conditions With our best wishes for health and wellness",
"ar": "** الخدمة مشمولة لدى بعض شركات التامين على حسب الشروط والاحكام مع تمنياتنا لكم بدوام الصحة والعافية"
},
"livecare-option-1": {
"en": "Get Medical consultation immediately",
"ar": "الحصول على الاستشارة فورا"
},
"livecare-option-2": {
"en": "Instant video call",
"ar": "اتصال فيديو فوري"
},
"livecare-option-3": {
"en": "Book Appointment",
"ar": "حجز موعد"
},
"livecare-option-4": {
"en": "Schedule video call",
"ar": "اتصال فيديو مجدول"
},
"verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"}, "verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"},
"sms_code": {"en": "Enter SMS Code here", "ar": "أدخل رمز التحقق هنا"}, "sms_code": {"en": "Enter SMS Code here", "ar": "أدخل رمز التحقق هنا"},
"code_failure": {"en": "Didnt received the code", "ar": "لم أستلم رمز التحقق"}, "code_failure": {"en": "Didnt received the code", "ar": "لم أستلم رمز التحقق"},

@ -29,7 +29,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart'; import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
//import '../../../core/model/my_balance/AdvanceModel.dart'; //import '../../../core/model/my_balance/AdvanceModel.dart';
import 'confirm_payment_page.dart'; import 'confirm_payment_page.dart';

@ -8,13 +8,13 @@ import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobi
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class ConfirmSMSDialog extends StatefulWidget { class ConfirmSMSDialog extends StatefulWidget {
final String phoneNumber; final String phoneNumber;
@ -112,32 +112,31 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
height: 40, height: 40,
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
child: Stack( child: Stack(
children: [ children: [
Center( Center(
child: Texts( child: Texts(
'SMS', 'SMS',
color: Colors.white, color: Colors.white,
textAlign: TextAlign.center, textAlign: TextAlign.center,
),
),
Positioned(child: Container(
child: InkWell(
onTap: () => Navigator.pop(context),
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle, color: Colors.white),
child: Icon(
Icons.clear,
color: Colors.grey[900],
)),
), ),
), ),
left: projectViewModel.isArabic? 2:0, Positioned(
right: projectViewModel.isArabic? 0:2, child: Container(
child: InkWell(
onTap: () => Navigator.pop(context),
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle, color: Colors.white),
child: Icon(
Icons.clear,
color: Colors.grey[900],
)),
),
),
left: projectViewModel.isArabic ? 2 : 0,
right: projectViewModel.isArabic ? 0 : 2,
) )
], ],
), ),
), ),
Image.asset( Image.asset(
@ -335,14 +334,13 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
void submit(MyBalanceViewModel model) { void submit(MyBalanceViewModel model) {
if (verifyAccountForm.currentState.validate()) { if (verifyAccountForm.currentState.validate()) {
GifLoaderDialogUtils.showMyDialog(context);
final activationCode = final activationCode =
digit1.text + digit2.text + digit3.text + digit4.text; digit1.text + digit2.text + digit3.text + digit4.text;
model model
.checkActivationCodeForAdvancePayment(activationCode: activationCode) .checkActivationCodeForAdvancePayment(activationCode: activationCode)
.then((value) {})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.pop(context, true); Navigator.pop(context, true);
}); });
} }

@ -61,6 +61,7 @@ class _BookConfirmState extends State<BookConfirm> {
toDoProvider = Provider.of<ToDoCountProviderModel>(context); toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
@ -461,6 +462,7 @@ class _BookConfirmState extends State<BookConfirm> {
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
print(err); print(err);
}); });

@ -5,9 +5,9 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplai
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class DentalComplaints extends StatefulWidget { class DentalComplaints extends StatefulWidget {
SearchInfo searchInfo; SearchInfo searchInfo;
@ -59,12 +59,14 @@ class _DentalComplaintsState extends State<DentalComplaints> {
} }
getChiefComplaintsList() { getChiefComplaintsList() {
GifLoaderDialogUtils.showMyDialog(context);
getLanguageID(); getLanguageID();
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service service
.getChiefComplaintsList( .getChiefComplaintsList(
widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context) widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print(res['List_DentalChiefComplain']); print(res['List_DentalChiefComplain']);
setState(() { setState(() {
@ -75,8 +77,8 @@ class _DentalComplaintsState extends State<DentalComplaints> {
}); });
} else {} } else {}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
} }

@ -10,11 +10,11 @@ import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsLis
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class QRCode extends StatefulWidget { class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse; PatientShareResponse patientShareResponse;
@ -235,6 +235,7 @@ class _QRCodeState extends State<QRCode> {
okText: TranslationBase.of(context).confirm, okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () { okFunction: () {
GifLoaderDialogUtils.showMyDialog(context);
service service
.sendAppointmentQREmail( .sendAppointmentQREmail(
widget.authUser.emailAddress, widget.authUser.emailAddress,
@ -247,15 +248,14 @@ class _QRCodeState extends State<QRCode> {
widget.patientShareResponse.doctorSpeciality), widget.patientShareResponse.doctorSpeciality),
context) context)
.then((res) { .then((res) {
print(res); GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
}).catchError((err) { }).catchError((err) {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
}, },
cancelFunction: () => {}); cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);

@ -26,6 +26,7 @@ class _SearchResultsState extends State<SearchResults> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
isShowDecPage: false,
isShowAppBar: true, isShowAppBar: true,
body: Container( body: Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),

@ -13,7 +13,6 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class SearchByClinic extends StatefulWidget { class SearchByClinic extends StatefulWidget {
final List clnicIds; final List clnicIds;

@ -4,7 +4,6 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../SearchResults.dart'; import '../SearchResults.dart';

@ -3,8 +3,8 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
class DentalComplaintCard extends StatefulWidget { class DentalComplaintCard extends StatefulWidget {
@ -70,11 +70,13 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List(); List();
GifLoaderDialogUtils.showMyDialog(context);
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service service
.getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD, .getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD,
widget.listDentalChiefComplain.projectID, context) widget.listDentalChiefComplain.projectID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print(res['List_DentalDoctorChiefComplaintMapping']); print(res['List_DentalDoctorChiefComplaintMapping']);
setState(() { setState(() {
@ -114,9 +116,9 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToSearchResults( Future navigateToSearchResults(

@ -6,7 +6,6 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../DoctorProfile.dart'; import '../DoctorProfile.dart';

@ -16,7 +16,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:table_calendar/table_calendar.dart'; import 'package:table_calendar/table_calendar.dart';
class CovidTimeSlots extends StatefulWidget { class CovidTimeSlots extends StatefulWidget {
@ -113,7 +112,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "COVID-19 TEST", appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
@ -147,8 +146,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 40.0), left: 20.0, right: 20.0, top: 20.0),
child: Text("COVID-19 TEST", child: Text(TranslationBase.of(context).covidTest,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -157,7 +156,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 10.0), left: 20.0, right: 20.0, top: 10.0),
child: Text("Drive-Thru", child: Text(TranslationBase.of(context).driveThru,
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 24.0)), color: Colors.white, fontSize: 24.0)),
), ),
@ -179,8 +178,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).selectAppo,
"Kindly select one of the available appointments from below: ",
style: style:
TextStyle(color: Colors.black, fontSize: 16.0)), TextStyle(color: Colors.black, fontSize: 16.0)),
), ),
@ -493,10 +491,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
print(res); print(res);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: "Appointment Booked Successfully");
// Future.delayed(new Duration(milliseconds: 1800), () {
getPatientShare(context, res['AppointmentNo'], docObject.clinicID, getPatientShare(context, res['AppointmentNo'], docObject.clinicID,
docObject.projectID, docObject); docObject.projectID, docObject);
// });
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList(); appo = new AppoitmentAllHistoryResultList();
@ -522,9 +518,9 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
} }
}).catchError((err) { }).catchError((err) {
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo,
@ -543,8 +539,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getPatientShare(context, String appointmentNo, int clinicID, int projectID, getPatientShare(context, String appointmentNo, int clinicID, int projectID,
@ -553,17 +548,14 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
service service
.getPatientShare(appointmentNo, clinicID, projectID, context) .getPatientShare(appointmentNo, clinicID, projectID, context)
.then((res) { .then((res) {
print(res); GifLoaderDialogUtils.hideDialog(context);
widget.patientShareResponse = new PatientShareResponse.fromJson(res); print(res);
}) widget.patientShareResponse = new PatientShareResponse.fromJson(res);
.catchError((err) { navigateToPaymentAlert();
print(err); }).catchError((err) {
}) GifLoaderDialogUtils.hideDialog(context);
.showProgressBar( print(err);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) });
.then((value) {
navigateToPaymentAlert();
});
} }
navigateToPaymentAlert() { navigateToPaymentAlert() {
@ -576,12 +568,12 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
getCovidFreeSlots(BuildContext context, int projectID) { getCovidFreeSlots(BuildContext context, int projectID) {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
service.getCovidFreeSlots(context, projectID).then((res) { service.getCovidFreeSlots(context, projectID).then((res) {
print(res['COVID19_FreeTimeSlots']); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
if (res['COVID19_FreeTimeSlots'].length != 0) { if (res['COVID19_FreeTimeSlots'].length != 0) {
freeSlotsResponse = res['COVID19_FreeTimeSlots']; freeSlotsResponse = res['COVID19_FreeTimeSlots'];
print(res['COVID19_FreeTimeSlots'].length);
_getJSONSlots().then((value) => { _getJSONSlots().then((value) => {
setState(() => { setState(() => {
widget.selectedClinicID = widget.selectedClinicID =
@ -599,7 +591,6 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
} }

@ -1,13 +1,16 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:provider/provider.dart';
class CovidDrivethruLocation extends StatefulWidget { class CovidDrivethruLocation extends StatefulWidget {
@override @override
@ -23,6 +26,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
String projectName = ""; String projectName = "";
String projectID = ""; String projectID = "";
ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
WidgetsBinding.instance WidgetsBinding.instance
@ -32,8 +37,9 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: "COVID-19 TEST", appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
@ -41,8 +47,10 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Container( Container(
alignment: Alignment.centerLeft, alignment: projectViewModel.isArabic
child: Text("Get The Result During 8 Hours", ? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 22.0, fontSize: 22.0,
@ -50,14 +58,15 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text( child: Text(TranslationBase.of(context).covidInfo,
"We are using the advance technology to test COVID-19, The sample for examination is taking between the nose and mouth (nasopharyngeal swab), the examination is done by ELITE In Genius of the company ELITECH GROUP MOLECULAR DIAGNOSTICS, Note that the device belongs to an Italian company and is manufactured in Japan with RC- PCR",
style: TextStyle(fontSize: 16.0, color: Colors.black)), style: TextStyle(fontSize: 16.0, color: Colors.black)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 20.0), margin: EdgeInsets.only(top: 20.0),
alignment: Alignment.centerLeft, alignment: projectViewModel.isArabic
child: Text("Select Location", ? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 18.0, fontSize: 18.0,
@ -79,7 +88,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
margin: EdgeInsets.only(top: 15.0), margin: EdgeInsets.only(top: 15.0),
child: DropdownButtonHideUnderline( child: DropdownButtonHideUnderline(
child: DropdownButton<String>( child: DropdownButton<String>(
hint: new Text("Select Address"), hint: new Text(TranslationBase.of(context).selectAddress),
value: projectDropdownValue, value: projectDropdownValue,
items: projectsList.map((item) { items: projectsList.map((item) {
return new DropdownMenuItem<String>( return new DropdownMenuItem<String>(
@ -98,8 +107,10 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
isLocationSelected isLocationSelected
? Container( ? Container(
margin: EdgeInsets.only(top: 15.0), margin: EdgeInsets.only(top: 15.0),
alignment: Alignment.centerLeft, alignment: projectViewModel.isArabic
child: Text("Selected Location", ? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 18.0, fontSize: 18.0,
@ -150,8 +161,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () { onPressed: () {
getDirections(); getDirections();
}, },
child: child: Text(TranslationBase.of(context).getDirections,
Text("GET DIRECTIONS", style: TextStyle(fontSize: 18.0)), style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -178,7 +189,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () { onPressed: () {
back(); back();
}, },
child: Text("BACK", style: TextStyle(fontSize: 18.0)), child: Text(TranslationBase.of(context).back,
style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -201,7 +213,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () { onPressed: () {
next(); next();
}, },
child: Text("NEXT", style: TextStyle(fontSize: 18.0)), child: Text(TranslationBase.of(context).next,
style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -258,35 +271,35 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidPaymentInfoResponse covidPaymentInfoResponse = CovidPaymentInfoResponse covidPaymentInfoResponse =
new CovidPaymentInfoResponse(); new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context);
service service
.getCovidPaymentInformation(context, int.parse(projectID)) .getCovidPaymentInformation(context, int.parse(projectID))
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson( covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(
res['COVID19_PatientShare']); res['COVID19_PatientShare']);
print(covidPaymentInfoResponse.procedureNameField); print(covidPaymentInfoResponse.procedureNameField);
}); });
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CovidPaymentDetails(
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
)));
} else {} } else {}
}) })
.catchError((err) { .catchError((err) {
print(err); print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CovidPaymentDetails(
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
)));
}); });
} }
getProjectsList(BuildContext context) { getProjectsList(BuildContext context) {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
service.getCovidProjectsList(context).then((res) { service.getCovidProjectsList(context).then((res) {
print(res); print(res);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
@ -296,10 +309,11 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
projectsList.add(new DriveThroughTestingCenterModel.fromJson(v)); projectsList.add(new DriveThroughTestingCenterModel.fromJson(v));
}); });
}); });
GifLoaderDialogUtils.hideDialog(context);
} else {} } else {}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
} }

@ -23,7 +23,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "COVID-19 TEST", appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
@ -57,8 +57,8 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 40.0), left: 20.0, right: 20.0, top: 20.0),
child: Text("COVID-19 TEST", child: Text(TranslationBase.of(context).covidTest,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -67,7 +67,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 10.0), left: 20.0, right: 20.0, top: 10.0),
child: Text("Drive-Thru", child: Text(TranslationBase.of(context).driveThru,
style: TextStyle( style: TextStyle(
color: Colors.white, fontSize: 24.0)), color: Colors.white, fontSize: 24.0)),
), ),
@ -88,7 +88,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
alignment: Alignment.center, alignment: Alignment.center,
margin: margin:
EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0), EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0),
child: Text("Test Fees", child: Text(TranslationBase.of(context).testFee,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 22.0, fontSize: 22.0,
@ -156,7 +156,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.fromLTRB(20.0, 15.0, 20.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 15.0, 20.0, 5.0),
child: Text("You can pay by following options: ", child: Text(TranslationBase.of(context).payOptions,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
@ -197,7 +197,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
onPressed: () { onPressed: () {
cancel(); cancel();
}, },
child: Text("CANCEL", style: TextStyle(fontSize: 18.0)), child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -218,7 +218,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: Colors.grey[500], disabledColor: Colors.grey[500],
onPressed: isAgree ? next : null, onPressed: isAgree ? next : null,
child: Text("NEXT", style: TextStyle(fontSize: 18.0)), child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),

@ -365,7 +365,9 @@ class _ToDoState extends State<ToDo> {
color: Color(0xff20bc44), color: Color(0xff20bc44),
), ),
height: 30.0, height: 30.0,
margin: projectViewModel.isArabic ? EdgeInsets.fromLTRB(160.0, 0.0, 30.0, 0.0) : EdgeInsets.fromLTRB(30.0, 0.0, 160.0, 0.0), margin: projectViewModel.isArabic
? EdgeInsets.fromLTRB(160.0, 0.0, 30.0, 0.0)
: EdgeInsets.fromLTRB(30.0, 0.0, 160.0, 0.0),
transform: Matrix4.translationValues(0.0, -8.0, 0.0), transform: Matrix4.translationValues(0.0, -8.0, 0.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -385,14 +387,17 @@ class _ToDoState extends State<ToDo> {
), ),
widget.appoList[index].isLiveCareAppointment widget.appoList[index].isLiveCareAppointment
? Container( ? Container(
child: Text(TranslationBase.of(context).videoAppo, child: Text(
TranslationBase.of(context).videoAppo,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12.0)), fontSize: 12.0)),
) )
: Container( : Container(
child: Text(TranslationBase.of(context).walkinAppo, child: Text(
TranslationBase.of(context)
.walkinAppo,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -825,20 +830,25 @@ class _ToDoState extends State<ToDo> {
res['Fort_id'], res['PaymentMethod'], context) res['Fort_id'], res['PaymentMethod'], context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]);
addAdvancedNumberRequest( addAdvancedNumberRequest(
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
paymentReference, paymentReference,
appo.appointmentNo.toString(), appo.appointmentNo.toString(),
appo); appo,
res['OnlineCheckInAppointments'][0]);
}).catchError((err) { }).catchError((err) {
print(err); print(err);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
}); });
} }
addAdvancedNumberRequest(String advanceNumber, String paymentReference, addAdvancedNumberRequest(
String appointmentID, AppoitmentAllHistoryResultList appo) { String advanceNumber,
String paymentReference,
String appointmentID,
AppoitmentAllHistoryResultList appo,
dynamic apptData) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
@ -846,8 +856,25 @@ class _ToDoState extends State<ToDo> {
advanceNumber, paymentReference, appointmentID, context) advanceNumber, paymentReference, appointmentID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (appo.isLiveCareAppointment)
addVIDARequestInsert(advanceNumber, paymentReference, apptData);
else
getAppoQR(context, appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
addVIDARequestInsert(
String advanceNumber, String paymentReference, dynamic apptData) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.addVIDARequest(advanceNumber, paymentReference, apptData, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res); print(res);
getAppoQR(context, appo);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);

@ -3,12 +3,10 @@ import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingReque
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/livecare_logs.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/livecare_logs.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'livecare_type_select.dart';
class LiveCareHome extends StatefulWidget { class LiveCareHome extends StatefulWidget {
static bool showFooterButton = true; static bool showFooterButton = true;
@ -35,7 +33,9 @@ class _LiveCareHomeState extends State<LiveCareHome>
pendingERRequestHistoryList = new ErRequestHistoryList(); pendingERRequestHistoryList = new ErRequestHistoryList();
WidgetsBinding.instance.addPostFrameCallback((_) => getLiveCareHistory()); WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isDataLoaded) getLiveCareHistory();
});
super.initState(); super.initState();
} }
@ -89,6 +89,7 @@ class _LiveCareHomeState extends State<LiveCareHome>
} }
void getLiveCareHistory() { void getLiveCareHistory() {
GifLoaderDialogUtils.showMyDialog(context);
setState(() { setState(() {
isDataLoaded = false; isDataLoaded = false;
hasLiveCareRequest = false; hasLiveCareRequest = false;
@ -96,38 +97,31 @@ class _LiveCareHomeState extends State<LiveCareHome>
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
PatientERVirtualHistoryResponse patientERVirtualHistoryResponse = PatientERVirtualHistoryResponse patientERVirtualHistoryResponse =
new PatientERVirtualHistoryResponse(); new PatientERVirtualHistoryResponse();
service service.getLivecareHistory(context).then((res) {
.getLivecareHistory(context) GifLoaderDialogUtils.hideDialog(context);
.then((res) { setState(() {
setState(() { print(res['ErRequestHistoryList'].length);
print(res['ErRequestHistoryList'].length); if (res['ErRequestHistoryList'].length != 0) {
if (res['ErRequestHistoryList'].length != 0) { patientERVirtualHistoryResponse =
patientERVirtualHistoryResponse = PatientERVirtualHistoryResponse.fromJson(res);
PatientERVirtualHistoryResponse.fromJson(res); erRequestHistoryList =
erRequestHistoryList = patientERVirtualHistoryResponse.erRequestHistoryList;
patientERVirtualHistoryResponse.erRequestHistoryList;
if (patientERVirtualHistoryResponse if (patientERVirtualHistoryResponse
.erRequestHistoryList[0].callStatus < .erRequestHistoryList[0].callStatus <
4) { 4) {
pendingERRequestHistoryList = pendingERRequestHistoryList =
patientERVirtualHistoryResponse.erRequestHistoryList[0]; patientERVirtualHistoryResponse.erRequestHistoryList[0];
hasLiveCareRequest = true; hasLiveCareRequest = true;
} else { } else {
hasLiveCareRequest = false; hasLiveCareRequest = false;
} }
} }
}); isDataLoaded = true;
}) });
.catchError((err) { }).catchError((err) {
print(err); GifLoaderDialogUtils.hideDialog(context);
}) print(err);
.showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
setState(() {
isDataLoaded = true;
});
});
} }
} }

@ -36,7 +36,7 @@ class _ScheduleClinicCardState extends State<ScheduleClinicCard> {
child: Text( child: Text(
widget.languageID == 'ar' widget.languageID == 'ar'
? widget.clinicsHaveScheduleList.clinicDescN != null ? widget.clinicsHaveScheduleList.clinicDescN: "" ? widget.clinicsHaveScheduleList.clinicDescN != null ? widget.clinicsHaveScheduleList.clinicDescN: ""
: widget.clinicsHaveScheduleList.clinicDesc != null ? widget.clinicsHaveScheduleList.clinicDesc: "Dermatology", : widget.clinicsHaveScheduleList.clinicDesc != null ? widget.clinicsHaveScheduleList.clinicDesc: "Test Clinic",
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
color: color:

@ -51,20 +51,19 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
), ),
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
child: Text("LiveCare Service", child: Text(TranslationBase.of(context).livecareService,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 20.0))), fontWeight: FontWeight.bold, fontSize: 20.0))),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
"is to obtain medical advice with a specialist doctor Via a video call", TranslationBase.of(context).livecareServiceDesc,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 18.0))), style: TextStyle(fontSize: 18.0))),
Container( Container(
margin: EdgeInsets.only(top: 15.0), margin: EdgeInsets.only(top: 15.0),
alignment: Alignment.centerLeft, child: Text(TranslationBase.of(context).whyLivecare,
child: Text("WHY LIVECARE?",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 20.0))), fontWeight: FontWeight.bold, fontSize: 20.0))),
Container( Container(
@ -77,7 +76,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
width: MediaQuery.of(context).size.width * 0.72, width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(
"No need to wait, you will get Medical consultation immediately via Video call.", TranslationBase.of(context).livecarePoint1,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle(fontSize: 14.0)), style: TextStyle(fontSize: 14.0)),
) )
@ -93,7 +92,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
Container( Container(
width: MediaQuery.of(context).size.width * 0.72, width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text("The doctor will see your medical file.", child: Text(TranslationBase.of(context).docVirtualAppoIns4,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle(fontSize: 14.0)), style: TextStyle(fontSize: 14.0)),
) )
@ -109,7 +108,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
Container( Container(
width: MediaQuery.of(context).size.width * 0.72, width: MediaQuery.of(context).size.width * 0.72,
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text("Free Prescription delivery service.", child: Text(TranslationBase.of(context).docVirtualAppoIns5,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle(fontSize: 14.0)), style: TextStyle(fontSize: 14.0)),
) )
@ -119,7 +118,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
Container( Container(
margin: EdgeInsets.only(top: 20.0), margin: EdgeInsets.only(top: 20.0),
child: Text( child: Text(
"** The service is included with some insurance companies according to the terms and conditions With our best wishes for health and wellness", TranslationBase.of(context).livecareSummary,
style: TextStyle(fontSize: 16.0))), style: TextStyle(fontSize: 16.0))),
InkWell( InkWell(
onTap: (){ onTap: (){
@ -134,7 +133,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only(left: 20.0), margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: SvgPicture.asset( child: SvgPicture.asset(
"assets/images/new-design/liveCare_logo_icon_white.svg", "assets/images/new-design/liveCare_logo_icon_white.svg",
width: 80), width: 80),
@ -144,7 +143,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
margin: EdgeInsets.fromLTRB(30.0, 20.0, 0.0, 0.0), margin: EdgeInsets.fromLTRB(30.0, 20.0, 0.0, 0.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Text("Get Medical consultation immediately", Text(TranslationBase.of(context).livecareOption1,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -152,8 +151,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
color: Colors.white)), color: Colors.white)),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.centerLeft, child: Text(TranslationBase.of(context).livecareOption2,
child: Text("Instant video call",
style: TextStyle( style: TextStyle(
fontSize: 18.0, color: Colors.white)), fontSize: 18.0, color: Colors.white)),
) )
@ -176,19 +174,18 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only(left: 20.0), margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: Image.asset( child: Image.asset(
"assets/images/new-design/calendar.png", "assets/images/new-design/calendar.png",
width: 70), width: 70),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.58, width: MediaQuery.of(context).size.width * 0.58,
margin: EdgeInsets.fromLTRB(30.0, 30.0, 0.0, 0.0), margin: EdgeInsets.fromLTRB(30.0, 20.0, 0.0, 0.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Container( Container(
alignment: Alignment.centerLeft, child: Text(TranslationBase.of(context).livecareOption3,
child: Text("Book Appointment",
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -197,8 +194,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.centerLeft, child: Text(TranslationBase.of(context).livecareOption4,
child: Text("Schedule Video Call",
style: TextStyle( style: TextStyle(
fontSize: 18.0, color: Colors.white)), fontSize: 18.0, color: Colors.white)),
) )

@ -5,11 +5,11 @@ import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class LiveCareHistoryCard extends StatefulWidget { class LiveCareHistoryCard extends StatefulWidget {
ErRequestHistoryList erRequestHistoryList; ErRequestHistoryList erRequestHistoryList;
@ -178,6 +178,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
sendInvoiceEmail(context) { sendInvoiceEmail(context) {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.sendLiveCareInvoiceEmail( .sendLiveCareInvoiceEmail(
widget.erRequestHistoryList.appointmentNo.toString(), widget.erRequestHistoryList.appointmentNo.toString(),
@ -189,8 +190,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
}).catchError((err) { }).catchError((err) {
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getAuthenticatedUser() async { getAuthenticatedUser() async {

@ -3,9 +3,9 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryR
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class LiveCarePendingRequest extends StatefulWidget { class LiveCarePendingRequest extends StatefulWidget {
ErRequestHistoryList pendingERRequestHistoryList; ErRequestHistoryList pendingERRequestHistoryList;
@ -149,19 +149,17 @@ class _LiveCarePendingRequestState extends State<LiveCarePendingRequest> {
cancelLiveCareRequest() { cancelLiveCareRequest() {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.cancelLiveCareRequest(widget.pendingERRequestHistoryList.vCID, context) .cancelLiveCareRequest(widget.pendingERRequestHistoryList.vCID, context)
.then((res) { .then((res) {
AppToast.showSuccessToast( GifLoaderDialogUtils.hideDialog(context);
message: "LiveCare request cancelled successfully"); AppToast.showSuccessToast(
}) message: "LiveCare request cancelled successfully");
.catchError((err) { widget.getLiveCareHistory();
print(err); }).catchError((err) {
}) GifLoaderDialogUtils.hideDialog(context);
.showProgressBar( print(err);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) });
.then((value) {
widget.getLiveCareHistory();
});
} }
} }

@ -2,8 +2,8 @@ import 'package:diplomaticquarterapp/models/LiveCare/ClinicsServiceTimingsRespon
import 'package:diplomaticquarterapp/models/LiveCare/LiveCareClinicsListResponse.dart'; import 'package:diplomaticquarterapp/models/LiveCare/LiveCareClinicsListResponse.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'ClinicTimingsDialog.dart'; import 'ClinicTimingsDialog.dart';
@ -90,9 +90,11 @@ class _State extends State<ClinicCard> {
getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) { getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.getLivecareClinicTiming(patientERGetClinicsList.serviceID, context) .getLivecareClinicTiming(patientERGetClinicsList.serviceID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
clinicsServiceTimingsResponse = clinicsServiceTimingsResponse =
@ -129,8 +131,8 @@ class _State extends State<ClinicCard> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
} }

@ -54,6 +54,8 @@ class _clinic_listState extends State<ClinicList> {
MyInAppBrowser browser; MyInAppBrowser browser;
bool isLiveCareTypeSelected = false;
@override @override
void initState() { void initState() {
liveCareClinicsListResponse = new LiveCareClinicsListResponse(); liveCareClinicsListResponse = new LiveCareClinicsListResponse();
@ -61,7 +63,7 @@ class _clinic_listState extends State<ClinicList> {
new LiveCareScheduleClinicsListResponse(); new LiveCareScheduleClinicsListResponse();
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
openLiveCareSelectionDialog(); if (!isLiveCareTypeSelected) openLiveCareSelectionDialog();
}); });
getLanguageID(); getLanguageID();
@ -431,6 +433,7 @@ class _clinic_listState extends State<ClinicList> {
Navigator.pop(context); Navigator.pop(context);
} else { } else {
print(value); print(value);
isLiveCareTypeSelected = true;
if (value == "immediate") { if (value == "immediate") {
setState(() { setState(() {
currentSelectedLiveCareType = "immediate"; currentSelectedLiveCareType = "immediate";

@ -12,7 +12,6 @@ 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';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class AskDoctorPage extends StatelessWidget { class AskDoctorPage extends StatelessWidget {
@override @override

@ -20,7 +20,6 @@ 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';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../../../core/model/my_balance/AdvanceModel.dart'; import '../../../core/model/my_balance/AdvanceModel.dart';
import 'confirm_payment_page.dart'; import 'confirm_payment_page.dart';

@ -3,9 +3,9 @@ import 'dart:io';
import 'package:carousel_slider/carousel_slider.dart'; import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart';
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart'; import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class SmartWatchInstructions extends StatefulWidget { class SmartWatchInstructions extends StatefulWidget {
@ -796,7 +796,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
getLastPatientRecord(BuildContext context) { getLastPatientRecord(BuildContext context) {
SmartWatchIntegrationService service = new SmartWatchIntegrationService(); SmartWatchIntegrationService service = new SmartWatchIntegrationService();
GifLoaderDialogUtils.showMyDialog(context);
service.getLastPatientRecord(context).then((res) { service.getLastPatientRecord(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print(res['Med_GetPatientLastRecordList']); print(res['Med_GetPatientLastRecordList']);
setState(() { setState(() {
@ -807,9 +809,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
}); });
} else {} } else {}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
_openHealthDataList() { _openHealthDataList() {

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
class DoctorsListService extends BaseService { class DoctorsListService extends BaseService {
@ -934,6 +935,64 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> addVIDARequest(String advanceNumber,
String paymentReference, dynamic apptData, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AdvanceNumber": advanceNumber,
"PaymentReferenceNumber": paymentReference,
"AppointmentNo": apptData.AppointmentNo,
"AcceptedBy": apptData.DoctorID,
"ServiceID": apptData.ServiceID,
"ProjectID": apptData.ProjectID,
"ClinicID": apptData.ClinicID,
"ClientRequestID": Utils.getAppointmentTransID(
apptData.ProjectID, apptData.ClinicID, apptData.AppointmentNo),
"AppointmentDate": apptData.AppointmentDate,
"DeviceType": Platform.isIOS ? "iOS" : "Android",
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
"SessionID": "YckwoXhUmWBsnHKEKig",
"isDentalAllowedBackend": false,
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"TokenID": "@dm!n",
"PatientTypeID": authUser.patientType,
"PatientType": authUser.patientType
};
// request.DeviceToken = this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
// request.Latitude = this.cs.sharedService.getSharedData('userLat', false);
// request.Longitude = this.cs.sharedService.getSharedData('userLong', false);
// request.ServiceID = apptData.ServiceID;
// request.ProjectID = apptData.ProjectID;
// request.ClinicID = apptData.ClinicID;
// request.ClientRequestID = AppointmentModel.getAppointmentTransID(apptData);
// request.AppointmentDate = apptData.AppointmentDate;
// request.DeviceType = this.getDeviceType();
// request.VoipToken = this.platform.is('ios') ? this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false) : "";
dynamic localRes;
await baseAppClient.post(ADD_VIDA_REQUEST,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> isAllowedToAskDoctor(int docID, BuildContext context) async { Future<Map> isAllowedToAskDoctor(int docID, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -1109,14 +1168,16 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getPatientLabOrdersByAppoNo(dynamic appoNo, dynamic projID, dynamic clinicID, BuildContext context) async { Future<Map> getPatientLabOrdersByAppoNo(dynamic appoNo, dynamic projID,
dynamic clinicID, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE)); await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"AppointmentNo": appoNo, "AppointmentNo": appoNo,
@ -1140,10 +1201,10 @@ class DoctorsListService extends BaseService {
dynamic localRes; dynamic localRes;
await baseAppClient.post(GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT, await baseAppClient.post(GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
}, body: request); }, body: request);
return Future.value(localRes); return Future.value(localRes);
} }

@ -1007,6 +1007,33 @@ class TranslationBase {
String get systolicAdd => localizedValues["systolic-add"][locale.languageCode]; String get systolicAdd => localizedValues["systolic-add"][locale.languageCode];
String get diastolicAdd => localizedValues["systolic-add"][locale.languageCode]; String get diastolicAdd => localizedValues["systolic-add"][locale.languageCode];
String get cmcHeading => localizedValues["cmc-heading"][locale.languageCode]; String get cmcHeading => localizedValues["cmc-heading"][locale.languageCode];
String get selectLocation => localizedValues["select-location"][locale.languageCode];
String get resultHeader => localizedValues["result-header"][locale.languageCode];
String get covidInfo => localizedValues["covid-info"][locale.languageCode];
String get selectAppo => localizedValues["select-appo"][locale.languageCode];
String get covidAlertHeader => localizedValues["covid-alert-header"][locale.languageCode];
String get covidAlertInfo => localizedValues["covid-alert-info"][locale.languageCode];
String get covidAlertMins => localizedValues["covid-alert-mins"][locale.languageCode];
String get back => localizedValues["back"][locale.languageCode];
String get getDirections => localizedValues["get-directions"][locale.languageCode];
String get selectedLocation => localizedValues["selected-location"][locale.languageCode];
String get testFee => localizedValues["test-fee"][locale.languageCode];
String get payOptions => localizedValues["pay-options"][locale.languageCode];
String get livecareService => localizedValues["livecare-service"][locale.languageCode];
String get livecareServiceDesc => localizedValues["livecare-service-desc"][locale.languageCode];
String get whyLivecare => localizedValues["why-livecare"][locale.languageCode];
String get livecarePoint1 => localizedValues["livecare-point-1"][locale.languageCode];
String get docVirtualAppoIns4 => localizedValues["doc-virtual-appo-ins4"][locale.languageCode];
String get docVirtualAppoIns5 => localizedValues["doc-virtual-appo-ins5"][locale.languageCode];
String get livecareSummary => localizedValues["livecare-summary"][locale.languageCode];
String get livecareOption1 => localizedValues["livecare-option-1"][locale.languageCode];
String get livecareOption2 => localizedValues["livecare-option-2"][locale.languageCode];
String get livecareOption3 => localizedValues["livecare-option-3"][locale.languageCode];
String get livecareOption4 => localizedValues["livecare-option-4"][locale.languageCode];
String get today => localizedValues["today"][locale.languageCode]; String get today => localizedValues["today"][locale.languageCode];
String get week => localizedValues["week"][locale.languageCode]; String get week => localizedValues["week"][locale.languageCode];

@ -8,17 +8,17 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart';
class MyInAppBrowser extends InAppBrowser { class MyInAppBrowser extends InAppBrowser {
// static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = // static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT // 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL = static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
static List<String> successURLS = [ static List<String> successURLS = [
'success', 'success',

@ -1,53 +1,41 @@
import 'dart:collection'; import 'dart:collection';
import 'dart:convert'; import 'dart:math';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/pages/ErService/NearestEr.dart'; import 'package:diplomaticquarterapp/pages/ErService/NearestEr.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_admissions_page.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart'; import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_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';
import 'package:flutter_tts/flutter_tts.dart'; import 'package:flutter_tts/flutter_tts.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_recognition_result.dart'; import 'package:speech_to_text/speech_recognition_result.dart';
import 'package:speech_to_text/speech_to_text.dart'; import 'package:speech_to_text/speech_to_text.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
import 'dart:math';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
class BottomBarSearch extends StatefulWidget { class BottomBarSearch extends StatefulWidget {
@override @override
@ -76,6 +64,7 @@ class _SearchBot extends State<BottomBarSearch> {
bool _isInit = true; bool _isInit = true;
TextEditingController searchController = TextEditingController(); TextEditingController searchController = TextEditingController();
@override @override
void initState() { void initState() {
requestPermissions(); requestPermissions();
@ -432,10 +421,12 @@ class _SearchBot extends State<BottomBarSearch> {
List<String> arr = []; List<String> arr = [];
List<String> arrDistance = []; List<String> arrDistance = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.getDoctorsList(clinicId, projectId, false, context, .getDoctorsList(clinicId, projectId, false, context,
doctorId: doctorId, doctorName: doctorName) doctorId: doctorId, doctorName: doctorName)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null && if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null &&
@ -483,9 +474,9 @@ class _SearchBot extends State<BottomBarSearch> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToDoctorProfile(context, docObject, docProfile, Future navigateToDoctorProfile(context, docObject, docProfile,

@ -40,6 +40,7 @@ import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart'; import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -54,8 +55,6 @@ import 'package:speech_to_text/speech_to_text.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class FloatingSearchButton extends StatefulWidget { class FloatingSearchButton extends StatefulWidget {
@ -734,10 +733,12 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
List<String> arr = []; List<String> arr = [];
List<String> arrDistance = []; List<String> arrDistance = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.getDoctorsList(clinicId, projectId, isNearest, context, .getDoctorsList(clinicId, projectId, isNearest, context,
doctorId: doctorId, doctorName: doctorName) doctorId: doctorId, doctorName: doctorName)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null && if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null &&
@ -785,9 +786,9 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToDoctorProfile(context, docObject, docProfile, Future navigateToDoctorProfile(context, docObject, docProfile,

@ -111,8 +111,6 @@ dependencies:
#Circular progress bar for reverse timer #Circular progress bar for reverse timer
circular_countdown_timer: ^0.0.5 circular_countdown_timer: ^0.0.5
smart_progress_bar: ^0.1.6
#Just Audio to play ringing for incoming video call #Just Audio to play ringing for incoming video call
just_audio: ^0.3.4 just_audio: ^0.3.4

Loading…
Cancel
Save