Implemented countdown timer in ToDo list & removed Smart progress bar from the whole app

merge-update-with-lab-changes
haroon amjad 5 years ago
parent 23d458f035
commit dfa1952f4d

@ -1044,5 +1044,35 @@ const Map localizedValues = {
"Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file.", "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file.",
"ar": "ar":
"هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي." "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي."
} },
"dental-complains": {
"en": "Symptoms",
"ar": "الأعراض"
},
"empty-result": {
"en": "There is no search results found",
"ar": "لايوجد نتائج"
},
"no-booked-appointment": {
"en": "No booked appointments",
"ar": "لا يوجد مواعيد محجوزة"
},
"no-confirmed-appointment": {
"en": "No confirmed appointments",
"ar": "لا توجد مواعيد مؤكدة"
},
"no-arrived-appointment": {
"en": "No arrived appointments",
"ar": "لا يوجد مواعيد"
},
"upcoming-empty": {
"en": "You do not have any Todo actions yet.",
"ar": "ليس لديك أي إجراءات الآن."
},
"upcoming-timeLeft": {
"en": "time left for appointment",
"ar": "الوقت المتبقي للموعد"
},
}; };

@ -1,14 +1,20 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../locator.dart'; import '../../locator.dart';
class DashboardViewModel extends BaseViewModel { class DashboardViewModel extends BaseViewModel {
VitalSignService _vitalSignService = locator<VitalSignService>(); VitalSignService _vitalSignService = locator<VitalSignService>();
String get weightKg => _vitalSignService.weightKg;
String get heightCm => _vitalSignService.heightCm; String get weightKg => _vitalSignService.weightKg;
String get heightCm => _vitalSignService.heightCm;
String bloadType = ""; String bloadType = "";
// ToDoCountProviderModel toDoProvider =
// Provider.of<ToDoCountProviderModel>(AppGlobal.context);
getPatientRadOrders() async { getPatientRadOrders() async {
if (isLogin && _vitalSignService.weightKg.isEmpty) { if (isLogin && _vitalSignService.weightKg.isEmpty) {
setState(ViewState.Busy); setState(ViewState.Busy);
@ -17,7 +23,21 @@ class DashboardViewModel extends BaseViewModel {
error = _vitalSignService.error; error = _vitalSignService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
// getToDoCount();
} }
} }
// getToDoCount() {
// toDoProvider.setState(0);
// ClinicListService service = new ClinicListService();
// service.getActiveAppointmentNo(AppGlobal.context).then((res) {
// print(res['AppointmentActiveNumber']);
// if (res['MessageStatus'] == 1) {
// toDoProvider.setState(res['AppointmentActiveNumber']);
// } else {}
// }).catchError((err) {
// print(err);
// });
// }
} }

@ -27,7 +27,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:giffy_dialog/giffy_dialog.dart'; import 'package:giffy_dialog/giffy_dialog.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';

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
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/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -10,6 +11,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.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/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -18,7 +20,6 @@ import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.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 'dialogs/ConfirmSMSDialog.dart'; import 'dialogs/ConfirmSMSDialog.dart';
import 'new_text_Field.dart'; import 'new_text_Field.dart';
@ -159,16 +160,16 @@ class ConfirmPaymentPage extends StatelessWidget {
label: TranslationBase.of(context).confirm.toUpperCase(), label: TranslationBase.of(context).confirm.toUpperCase(),
disabled: model.state == ViewState.Busy, disabled: model.state == ViewState.Busy,
onTap: () { onTap: () {
GifLoaderDialogUtils.showMyDialog(context);
model model
.sendActivationCodeForAdvancePayment( .sendActivationCodeForAdvancePayment(
patientID: int.parse(advanceModel.fileNumber), patientID: int.parse(advanceModel.fileNumber),
projectID: advanceModel.hospitalsModel.iD) projectID: advanceModel.hospitalsModel.iD)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.ErrorLocal && if (model.state != ViewState.ErrorLocal &&
model.state != ViewState.Error) showSMSDialog(); model.state != ViewState.Error) showSMSDialog();
}).showProgressBar( });
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
}, },
), ),
), ),
@ -248,12 +249,14 @@ class ConfirmPaymentPage extends StatelessWidget {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) { checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service service
.checkPaymentStatus( .checkPaymentStatus(
Utils.getAppointmentTransID( Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo), appo.projectID, appo.clinicID, appo.appointmentNo),
AppGlobal.context) AppGlobal.context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print("Printing Payment Status Reponse!!!!"); print("Printing Payment Status Reponse!!!!");
print(res); print(res);
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];
@ -263,18 +266,21 @@ class ConfirmPaymentPage extends StatelessWidget {
AppToast.showErrorToast(message: res['Response_Message']); AppToast.showErrorToast(message: res['Response_Message']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString(); String paymentReference = res['Fort_id'].toString();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service service
.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], .createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'],
res['PaymentMethod'], AppGlobal.context) res['PaymentMethod'], AppGlobal.context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest( addAdvancedNumberRequest(
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
@ -282,24 +288,28 @@ class ConfirmPaymentPage extends StatelessWidget {
appo.appointmentNo.toString(), appo.appointmentNo.toString(),
appo); appo);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
addAdvancedNumberRequest(String advanceNumber, String paymentReference, addAdvancedNumberRequest(String advanceNumber, String paymentReference,
String appointmentID, AppoitmentAllHistoryResultList appo) { String appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service service
.addAdvancedNumberRequest( .addAdvancedNumberRequest(
advanceNumber, paymentReference, appointmentID, AppGlobal.context) advanceNumber, paymentReference, appointmentID, AppGlobal.context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(res); print(res);
navigateToHome(AppGlobal.context); navigateToHome(AppGlobal.context);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToHome(context) async { Future navigateToHome(context) async {

@ -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(
@ -334,15 +333,14 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
} }
void submit(MyBalanceViewModel model) { void submit(MyBalanceViewModel model) {
GifLoaderDialogUtils.showMyDialog(context);
if (verifyAccountForm.currentState.validate()) { if (verifyAccountForm.currentState.validate()) {
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);
}); });
} }

@ -2,9 +2,11 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/routes.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/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/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -15,7 +17,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.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 'BookSuccess.dart'; import 'BookSuccess.dart';
@ -38,11 +39,15 @@ class BookConfirm extends StatefulWidget {
PatientShareResponse patientShareResponse; PatientShareResponse patientShareResponse;
AuthenticatedUser authUser; AuthenticatedUser authUser;
@override @override
_BookConfirmState createState() => _BookConfirmState(); _BookConfirmState createState() => _BookConfirmState();
} }
class _BookConfirmState extends State<BookConfirm> { class _BookConfirmState extends State<BookConfirm> {
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
widget.authUser = new AuthenticatedUser(); widget.authUser = new AuthenticatedUser();
@ -471,9 +476,10 @@ class _BookConfirmState extends State<BookConfirm> {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: "Appointment Booked Successfully");
print(res['AppointmentNo']); print(res['AppointmentNo']);
Future.delayed(new Duration(milliseconds: 1800), () { Future.delayed(new Duration(milliseconds: 500), () {
getLiveCareAppointmentPatientShare(context, res['AppointmentNo'], getLiveCareAppointmentPatientShare(context, res['AppointmentNo'],
docObject.clinicID, docObject.projectID, docObject); docObject.clinicID, docObject.projectID, docObject);
getToDoCount();
}); });
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -499,10 +505,23 @@ 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);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); }
getToDoCount() {
toDoProvider.setState(0);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber']);
} else {}
}).catchError((err) {
print(err);
});
} }
getPatientShare(context, String appointmentNo, int clinicID, int projectID, getPatientShare(context, String appointmentNo, int clinicID, int projectID,

@ -14,7 +14,6 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'QRCode.dart'; import 'QRCode.dart';
@ -349,36 +348,37 @@ class _BookSuccessState extends State<BookSuccess> {
confirmAppointment(AppoitmentAllHistoryResultList appo) { confirmAppointment(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID, .confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.isLiveCareAppointment, context) appo.isLiveCareAppointment, context)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); if (res['MessageStatus'] == 1) {
} else { AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); if (appo.isLiveCareAppointment) {
} insertLiveCareVIDARequest(appo);
}) } else {
.catchError((err) { navigateToHome(context);
print(err); }
}) } else {
.showProgressBar( AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) }
.then((value) { }).catchError((err) {
if (appo.isLiveCareAppointment) { GifLoaderDialogUtils.hideDialog(context);
insertLiveCareVIDARequest(appo); AppToast.showErrorToast(message: err);
} else { print(err);
navigateToHome(context); });
}
});
} }
insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) { insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, .insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID,
appo.serviceID, appo.doctorID, context) appo.serviceID, appo.doctorID, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
navigateToHome(context); navigateToHome(context);
@ -386,9 +386,10 @@ class _BookSuccessState extends State<BookSuccess> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Widget _getPayNowAppo() { Widget _getPayNowAppo() {
@ -633,6 +634,7 @@ class _BookSuccessState extends State<BookSuccess> {
} }
getApplePayAPQ(AppoitmentAllHistoryResultList appo) { getApplePayAPQ(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.checkPaymentStatus( .checkPaymentStatus(
@ -640,6 +642,7 @@ class _BookSuccessState extends State<BookSuccess> {
appo.projectID, appo.clinicID, appo.appointmentNo), appo.projectID, appo.clinicID, appo.appointmentNo),
context) context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
print("Printing Payment Status Reponse!!!!"); print("Printing Payment Status Reponse!!!!");
print(res); print(res);
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];
@ -649,9 +652,10 @@ class _BookSuccessState extends State<BookSuccess> {
AppToast.showErrorToast(message: res['Response_Message']); AppToast.showErrorToast(message: res['Response_Message']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {

@ -52,11 +52,10 @@ class _BookingOptionsState extends State<BookingOptions> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: CardCommon( child: CardCommon(
image: 'assets/images/new-design/search_by_clinic.png', image: 'assets/images/new-design/search_by_clinic.png',
text: TranslationBase.of(context).clinic, text: TranslationBase.of(context).clinic,
subText: TranslationBase.of(context).name, subText: TranslationBase.of(context).name,
type: 0, type: 0),
),
), ),
Expanded( Expanded(
child: CardCommon( child: CardCommon(

@ -2,12 +2,13 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplaintCard.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplaintCard.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/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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';
class DentalComplaints extends StatefulWidget { class DentalComplaints extends StatefulWidget {
SearchInfo searchInfo; SearchInfo searchInfo;
@ -35,7 +36,8 @@ class _DentalComplaintsState extends State<DentalComplaints> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: "Symptoms", appBarTitle: TranslationBase.of(context).dentalComplaints,
isShowDecPage: false,
body: Container( body: Container(
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: ListView.builder( child: ListView.builder(
@ -59,12 +61,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(() {
@ -73,10 +77,13 @@ class _DentalComplaintsState extends State<DentalComplaints> {
}); });
print(complaintsList.length); print(complaintsList.length);
}); });
} else {} } else {
}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
} }

@ -275,209 +275,214 @@ class _DoctorProfileState extends State<DoctorProfile>
child: Opacity( child: Opacity(
opacity: a1.value, opacity: a1.value,
child: Dialog( child: Dialog(
child: Container( child: Column(
height: 400.0, mainAxisSize: MainAxisSize.min,
width: MediaQuery.of(context).size.width * 0.8, children: [
color: Colors.white, Container(
child: Column( // height: 400.0,
children: [ width: MediaQuery.of(context).size.width * 0.8,
Container( color: Colors.white,
alignment: Alignment.center, child: Column(
width: MediaQuery.of(context).size.width, children: [
color: Theme.of(context).primaryColor, Container(
margin: EdgeInsets.only(bottom: 5.0), alignment: Alignment.center,
padding: EdgeInsets.all(10.0), width: MediaQuery.of(context).size.width,
child: Text(TranslationBase.of(context).doctorRating, color: Theme.of(context).primaryColor,
style: TextStyle( margin: EdgeInsets.only(bottom: 5.0),
fontSize: 22.0, color: Colors.white))), padding: EdgeInsets.all(10.0),
Container( child: Text(TranslationBase.of(context).doctorRating,
margin: EdgeInsets.only(top: 0.0), style: TextStyle(
child: Text( fontSize: 22.0, color: Colors.white))),
this Container(
.widget margin: EdgeInsets.only(top: 0.0),
.doctor child: Text(
.actualDoctorRate this
.ceilToDouble() .widget
.toString(), .doctor
style: TextStyle( .actualDoctorRate
fontSize: 32.0, color: Colors.black))), .ceilToDouble()
Container( .toString(),
margin: EdgeInsets.only(top: 5.0), style: TextStyle(
alignment: Alignment.center, fontSize: 32.0, color: Colors.black))),
child: RatingBar.readOnly( Container(
initialRating: margin: EdgeInsets.only(top: 5.0),
this.widget.doctor.actualDoctorRate.toDouble(), alignment: Alignment.center,
size: 35.0, child: RatingBar.readOnly(
filledColor: Colors.yellow[700], initialRating:
emptyColor: Colors.grey[500], this.widget.doctor.actualDoctorRate.toDouble(),
isHalfAllowed: true, size: 35.0,
halfFilledIcon: Icons.star_half, filledColor: Colors.yellow[700],
filledIcon: Icons.star, emptyColor: Colors.grey[500],
emptyIcon: Icons.star, isHalfAllowed: true,
), halfFilledIcon: Icons.star_half,
), filledIcon: Icons.star,
Container( emptyIcon: Icons.star,
margin: EdgeInsets.only(top: 10.0),
child: Text(
this.widget.doctor.noOfPatientsRate.toString() +
" " +
TranslationBase.of(context).reviews,
style: TextStyle(
fontSize: 14.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context).excellent,
style: TextStyle(
fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[0].patientNumber),
height: 6.0,
child: Container(
color: Colors.green[700],
),
),
), ),
], ),
), Container(
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).v_good,
style: TextStyle(
fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: SizedBox( child: Text(
width: getRatingWidth( this.widget.doctor.noOfPatientsRate.toString() +
doctorDetailsList[1].patientNumber), " " +
height: 6.0, TranslationBase.of(context).reviews,
child: Container( style: TextStyle(
color: Color(0xffB7B723), fontSize: 14.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context).excellent,
style: TextStyle(
fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[0].patientNumber),
height: 6.0,
child: Container(
color: Colors.green[700],
),
),
), ),
), ],
), ),
], ),
), Container(
), child: Row(
Container( children: [
child: Row( Container(
children: [ width: 100.0,
Container( margin: EdgeInsets.only(
width: 100.0, top: 10.0, left: 15.0, right: 15.0),
margin: EdgeInsets.only( child: Text(TranslationBase.of(context).v_good,
top: 10.0, left: 15.0, right: 15.0), style: TextStyle(
child: Text(TranslationBase.of(context).good, fontSize: 13.0, color: Colors.black))),
style: TextStyle( Container(
fontSize: 13.0, color: Colors.black))), margin: EdgeInsets.only(top: 10.0),
Container( child: SizedBox(
margin: EdgeInsets.only(top: 10.0), width: getRatingWidth(
child: SizedBox( doctorDetailsList[1].patientNumber),
width: getRatingWidth( height: 6.0,
doctorDetailsList[2].patientNumber), child: Container(
height: 6.0, color: Color(0xffB7B723),
child: Container( ),
color: Color(0xffEBA727), ),
), ),
), ],
), ),
], ),
), Container(
), child: Row(
Container( children: [
child: Row( Container(
children: [ width: 100.0,
Container( margin: EdgeInsets.only(
width: 100.0, top: 10.0, left: 15.0, right: 15.0),
margin: EdgeInsets.only( child: Text(TranslationBase.of(context).good,
top: 10.0, left: 15.0, right: 15.0), style: TextStyle(
child: Text(TranslationBase.of(context).average, fontSize: 13.0, color: Colors.black))),
style: TextStyle( Container(
fontSize: 13.0, color: Colors.black))), margin: EdgeInsets.only(top: 10.0),
Container( child: SizedBox(
margin: EdgeInsets.only(top: 10.0), width: getRatingWidth(
child: SizedBox( doctorDetailsList[2].patientNumber),
width: getRatingWidth( height: 6.0,
doctorDetailsList[3].patientNumber), child: Container(
height: 6.0, color: Color(0xffEBA727),
child: Container( ),
color: Color(0xffEB7227), ),
), ),
), ],
), ),
], ),
), Container(
), child: Row(
Container( children: [
child: Row( Container(
children: [ width: 100.0,
Container( margin: EdgeInsets.only(
width: 100.0, top: 10.0, left: 15.0, right: 15.0),
margin: EdgeInsets.only( child: Text(TranslationBase.of(context).average,
top: 10.0, left: 15.0, right: 15.0), style: TextStyle(
child: Text( fontSize: 13.0, color: Colors.black))),
TranslationBase.of(context).below_average, Container(
style: TextStyle( margin: EdgeInsets.only(top: 10.0),
fontSize: 13.0, color: Colors.black))), child: SizedBox(
Container( width: getRatingWidth(
margin: EdgeInsets.only(top: 10.0), doctorDetailsList[3].patientNumber),
child: SizedBox( height: 6.0,
width: getRatingWidth( child: Container(
doctorDetailsList[4].patientNumber), color: Color(0xffEB7227),
height: 6.0, ),
child: Container( ),
color: Color(0xffE20C0C),
), ),
), ],
), ),
], ),
), Container(
), child: Row(
Container( children: [
margin: EdgeInsets.only(top: 40.0), child: Divider()), Container(
Container( width: 100.0,
margin: EdgeInsets.only(top: 0.0), margin: EdgeInsets.only(
child: Align( top: 10.0, left: 15.0, right: 15.0),
alignment: FractionalOffset.bottomCenter, child: Text(
child: ButtonTheme( TranslationBase.of(context).below_average,
shape: RoundedRectangleBorder( style: TextStyle(
borderRadius: BorderRadius.circular(10.0), fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[4].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffE20C0C),
),
),
),
],
), ),
minWidth: MediaQuery.of(context).size.width, ),
height: 40.0, Container(
child: RaisedButton( margin: EdgeInsets.only(top: 40.0), child: Divider()),
elevation: 0.0, Container(
color: Colors.white, margin: EdgeInsets.only(top: 0.0),
textColor: Colors.red, child: Align(
hoverColor: Colors.transparent, alignment: FractionalOffset.bottomCenter,
focusColor: Colors.transparent, child: ButtonTheme(
highlightColor: Colors.transparent, shape: RoundedRectangleBorder(
disabledColor: new Color(0xFFbcc2c4), borderRadius: BorderRadius.circular(10.0),
onPressed: () { ),
Navigator.of(context).pop(); minWidth: MediaQuery.of(context).size.width,
}, height: 40.0,
child: Text(TranslationBase.of(context).cancel, child: RaisedButton(
style: TextStyle(fontSize: 18.0)), elevation: 0.0,
color: Colors.white,
textColor: Colors.red,
hoverColor: Colors.transparent,
focusColor: Colors.transparent,
highlightColor: Colors.transparent,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
Navigator.of(context).pop();
},
child: Text(TranslationBase.of(context).cancel,
style: TextStyle(fontSize: 18.0)),
),
),
), ),
), ),
), ],
), ),
], ),
), ],
), ),
), ),
), ),
@ -491,10 +496,7 @@ class _DoctorProfileState extends State<DoctorProfile>
} }
double getRatingWidth(int patientNumber) { double getRatingWidth(int patientNumber) {
print(patientNumber);
print(this.widget.doctor.noOfPatientsRate);
var width = (patientNumber / this.widget.doctor.noOfPatientsRate) * 100; var width = (patientNumber / this.widget.doctor.noOfPatientsRate) * 100;
print(width);
return width; return width;
} }

@ -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,15 @@ class _QRCodeState extends State<QRCode> {
widget.patientShareResponse.doctorSpeciality), widget.patientShareResponse.doctorSpeciality),
context) context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res); print(res);
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(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);

@ -1,18 +1,16 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart';
import 'package:diplomaticquarterapp/uitl/location_util.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/others/arrow_back.dart'; import 'package:diplomaticquarterapp/widgets/others/arrow_back.dart';
import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
class Search extends StatefulWidget { class Search extends StatefulWidget {
final int type; final int type;
final List clnicIds; final List clnicIds;
Search({this.type = 0, this.clnicIds}); Search({this.type = 0, this.clnicIds});
@override @override
_SearchState createState() => _SearchState(); _SearchState createState() => _SearchState();
} }

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

@ -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;
@ -137,7 +136,8 @@ class _SearchByClinicState extends State<SearchByClinic> {
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 Project"), hint:
new Text(TranslationBase.of(context).selectHospital),
value: projectDropdownValue, value: projectDropdownValue,
items: projectsList.map((item) { items: projectsList.map((item) {
return new DropdownMenuItem<String>( return new DropdownMenuItem<String>(

@ -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';
@ -129,9 +128,12 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
navigateToSearchResults( navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital); context, doctorsList, _patientDoctorAppointmentListHospital);
} else { } else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}); });
} }

@ -1,12 +1,16 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class CardCommon extends StatelessWidget { class CardCommon extends StatelessWidget {
var languageID;
final image; final image;
final text; final text;
final subText; final subText;
final type; final type;
const CardCommon(
CardCommon(
{@required this.image, {@required this.image,
@required this.text, @required this.text,
@required this.subText, @required this.subText,
@ -14,6 +18,7 @@ class CardCommon extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
navigateToSearch(context, this.type); navigateToSearch(context, this.type);
@ -43,8 +48,12 @@ class CardCommon extends StatelessWidget {
color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)), color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
), ),
Container( Container(
alignment: Alignment.bottomRight, alignment: projectViewModel.isArabic
margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0), ? Alignment.bottomLeft
: Alignment.bottomRight,
margin: projectViewModel.isArabic
? EdgeInsets.fromLTRB(10.0, 0.0, 00.0, 8.0)
: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0),
child: Image.asset(this.image, width: 60.0, height: 60.0), child: Image.asset(this.image, width: 60.0, height: 60.0),
), ),
], ],

@ -3,8 +3,9 @@ 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: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';
// ignore: must_be_immutable // ignore: must_be_immutable
class DentalComplaintCard extends StatefulWidget { class DentalComplaintCard extends StatefulWidget {
@ -69,14 +70,15 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
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['ErrorEndUserMessage']);
setState(() { setState(() {
doctorsList.clear(); doctorsList.clear();
res['List_DentalDoctorChiefComplaintMapping'].forEach((v) { res['List_DentalDoctorChiefComplaintMapping'].forEach((v) {
@ -107,16 +109,21 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
patientDoctorAppointment: element)); patientDoctorAppointment: element));
} }
}); });
navigateToSearchResults( if (doctorsList.length != 0) {
context, doctorsList, _patientDoctorAppointmentListHospital); navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).emptyResult);
}
}); });
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
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';

@ -9,13 +9,13 @@ import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.da
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: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 {
@ -481,6 +481,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
insertAppointmentCovidTest(context, DoctorList docObject) { insertAppointmentCovidTest(context, DoctorList docObject) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
service service
.insertAppointment( .insertAppointment(
@ -491,7 +492,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
CovidTimeSlots.selectedDate, CovidTimeSlots.selectedDate,
context) context)
.then((res) { .then((res) {
print(res); GifLoaderDialogUtils.hideDialog(context);
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), () { Future.delayed(new Duration(milliseconds: 1800), () {
@ -521,17 +522,19 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
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);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo,
BuildContext context) { BuildContext context) {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.cancelAppointment(appo, context).then((res) { service.cancelAppointment(appo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
Future.delayed(new Duration(milliseconds: 1500), () { Future.delayed(new Duration(milliseconds: 1500), () {
insertAppointmentCovidTest(context, docObject); insertAppointmentCovidTest(context, docObject);
@ -540,28 +543,27 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: 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,
DoctorList docObject) { DoctorList docObject) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
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); widget.patientShareResponse = new PatientShareResponse.fromJson(res);
}) navigateToPaymentAlert();
.catchError((err) { }).catchError((err) {
print(err); GifLoaderDialogUtils.hideDialog(context);
}) AppToast.showErrorToast(message: err);
.showProgressBar( print(err);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) });
.then((value) {
navigateToPaymentAlert();
});
} }
navigateToPaymentAlert() { navigateToPaymentAlert() {
@ -573,8 +575,10 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
} }
getCovidFreeSlots(BuildContext context, int projectID) { getCovidFreeSlots(BuildContext context, int projectID) {
GifLoaderDialogUtils.showMyDialog(context);
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
service.getCovidFreeSlots(context, projectID).then((res) { service.getCovidFreeSlots(context, projectID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['COVID19_FreeTimeSlots']); print(res['COVID19_FreeTimeSlots']);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
if (res['COVID19_FreeTimeSlots'].length != 0) { if (res['COVID19_FreeTimeSlots'].length != 0) {
@ -595,8 +599,9 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
} }

@ -3,11 +3,12 @@ import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCe
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/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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';
class CovidDrivethruLocation extends StatefulWidget { class CovidDrivethruLocation extends StatefulWidget {
@override @override
@ -258,37 +259,38 @@ 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);
}); });
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CovidPaymentDetails(
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
)));
} else {} } else {}
}) })
.catchError((err) { .catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: 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); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print(res); print(res);
setState(() { setState(() {
@ -298,8 +300,9 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
}); });
} else {} } else {}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
} }

@ -47,10 +47,19 @@ class _MyAppointmentsState extends State<MyAppointments>
void initState() { void initState() {
_tabController = new TabController(length: 3, vsync: this); _tabController = new TabController(length: 3, vsync: this);
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (Provider.of<ProjectViewModel>(context, listen: false).isLogin) getPatientAppointmentHistory(); if (Provider.of<ProjectViewModel>(context, listen: false).isLogin)
getPatientAppointmentHistory();
}); });
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/ar/0.png')); imagesInfo.add(ImagesInfo(
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/ar/1.png')); imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/ar/1.png'));
super.initState(); super.initState();
} }
@ -108,14 +117,14 @@ class _MyAppointmentsState extends State<MyAppointments>
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
setState(() { setState(() {
isDataLoaded = true;
if (res['AppoimentAllHistoryResultList'].length != 0) { if (res['AppoimentAllHistoryResultList'].length != 0) {
isDataLoaded = true;
res['AppoimentAllHistoryResultList'].forEach((v) { res['AppoimentAllHistoryResultList'].forEach((v) {
widget.appoList widget.appoList
.add(new AppoitmentAllHistoryResultList.fromJson(v)); .add(new AppoitmentAllHistoryResultList.fromJson(v));
}); });
sortAppointmentList(); sortAppointmentList();
openAppointmentsTab();
isDataLoaded = true;
} else {} } else {}
}); });
} else { } else {
@ -224,6 +233,7 @@ class _MyAppointmentsState extends State<MyAppointments>
filterName: element.clinicName, filterName: element.clinicName,
patientDoctorAppointment: element)); patientDoctorAppointment: element));
} }
openAppointmentsTab();
}); });
} }
@ -290,7 +300,7 @@ class _MyAppointmentsState extends State<MyAppointments>
"assets/images/new-design/noAppointmentIcon.png"), "assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("No Booked Appointments", child: Text(TranslationBase.of(context).noBookedAppo,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
)), )),
@ -345,8 +355,7 @@ class _MyAppointmentsState extends State<MyAppointments>
Image.asset("assets/images/new-design/noAppointmentIcon.png"), Image.asset("assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text( child: Text(TranslationBase.of(context).noConfirmedAppo,
TranslationBase.of(context).noConfirmedAppointments,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
)), )),
@ -400,11 +409,10 @@ class _MyAppointmentsState extends State<MyAppointments>
Image.asset("assets/images/new-design/noAppointmentIcon.png"), Image.asset("assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: child: Text(TranslationBase.of(context).noArrivedAppo,
Text(TranslationBase.of(context).noArrivedAppointments, style: TextStyle(
style: TextStyle( fontSize: 16.0,
fontSize: 16.0, )),
)),
), ),
], ],
), ),

@ -2,11 +2,11 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.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/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class VisitTicket extends StatefulWidget { class VisitTicket extends StatefulWidget {
List<DoctorList> appoList = []; List<DoctorList> appoList = [];
@ -48,9 +48,10 @@ class _VisitTicketState extends State<VisitTicket> {
} }
getPatientAppointmentCurfewHistory(BuildContext context) { getPatientAppointmentCurfewHistory(BuildContext context) {
loading(true);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.getPatientAppointmentHistory(true, context).then((res) { service.getPatientAppointmentHistory(true, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['AppoimentAllHistoryResultList']); print(res['AppoimentAllHistoryResultList']);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
@ -61,20 +62,13 @@ class _VisitTicketState extends State<VisitTicket> {
}); });
} else {} } else {}
}); });
loading(false);
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
loading(false);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
loading(false);
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
loading(bool flag) {
setState(() {
isLoading = flag;
}); });
} }
} }

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart'; import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart';
@ -17,6 +19,7 @@ import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.d
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart'; import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_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/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.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:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -24,6 +27,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.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:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class AppointmentActions extends StatefulWidget { class AppointmentActions extends StatefulWidget {
@ -44,16 +48,22 @@ class AppointmentActions extends StatefulWidget {
class _AppointmentActionsState extends State<AppointmentActions> { class _AppointmentActionsState extends State<AppointmentActions> {
List<AppoDetailsButton> appoButtonsList = []; List<AppoDetailsButton> appoButtonsList = [];
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
_getAppointmentActionButtons(); _getAppointmentActionButtons();
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
var size = MediaQuery.of(context).size; var size = MediaQuery.of(context).size;
final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.455) / 2; final double itemHeight = projectViewModel.isArabic
? ((size.height - kToolbarHeight - 24) * 0.47) / 2
: ((size.height - kToolbarHeight - 24) * 0.4) / 2;
final double itemWidth = size.width / 2; final double itemWidth = size.width / 2;
return Container( return Container(
@ -72,51 +82,62 @@ class _AppointmentActionsState extends State<AppointmentActions> {
onTap: () { onTap: () {
_handleButtonClicks(e); _handleButtonClicks(e);
}, },
child: Container( child: Column(
// height: 100.0, mainAxisSize: MainAxisSize.min,
margin: EdgeInsets.all(7.0), children: [
decoration: BoxDecoration( Container(
boxShadow: [ // height: 100.0,
BoxShadow( margin: EdgeInsets.all(7.0),
color: Colors.grey[400], padding: EdgeInsets.only(bottom: 15.0),
blurRadius: 2.0, decoration: BoxDecoration(
spreadRadius: 0.0) boxShadow: [
], BoxShadow(
borderRadius: BorderRadius.circular(10), color: Colors.grey[400],
color: Colors.white), blurRadius: 2.0,
child: Column( spreadRadius: 0.0)
crossAxisAlignment: CrossAxisAlignment.start, ],
mainAxisSize: MainAxisSize.min, borderRadius: BorderRadius.circular(10),
children: <Widget>[ color: Colors.white),
Container( child: Column(
margin: crossAxisAlignment: CrossAxisAlignment.start,
EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 0.0), mainAxisSize: MainAxisSize.min,
child: Text(e.title, children: <Widget>[
overflow: TextOverflow.clip, Container(
style: TextStyle( margin:
color: new Color(0xFF40ACC9), EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 0.0),
letterSpacing: 1.0, child: Text(e.title,
fontSize: 18.0)), overflow: TextOverflow.clip,
), style: TextStyle(
Container( color: new Color(0xFF40ACC9),
margin: letterSpacing: 1.0,
EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0), fontSize: 18.0)),
child: Text(e.subtitle, ),
overflow: TextOverflow.clip, Container(
style: TextStyle( margin:
color: Colors.black, EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
letterSpacing: 1.0, child: Text(e.subtitle,
fontSize: 15.0)), overflow: TextOverflow.clip,
), style: TextStyle(
Container( color: Colors.black,
alignment: Alignment.bottomRight, letterSpacing: 1.0,
margin: fontSize: 15.0)),
EdgeInsets.fromLTRB(0.0, 10.0, 10.0, 7.0), ),
child: Image.asset(e.icon, Container(
width: 40.0, height: 40.0), alignment: projectViewModel.isArabic
? Alignment.bottomLeft
: Alignment.bottomRight,
margin: projectViewModel.isArabic
? EdgeInsets.fromLTRB(
10.0, 7.0, 0.0, 8.0)
: EdgeInsets.fromLTRB(
0.0, 7.0, 10.0, 8.0),
child: Image.asset(e.icon,
width: 45.0, height: 45.0),
),
],
), ),
], ),
), ],
), ),
)) ))
.toList(), .toList(),
@ -357,6 +378,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res); print(res);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
getToDoCount();
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
Navigator.of(context).pop(); Navigator.of(context).pop();
} else { } else {
@ -368,6 +390,19 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}); });
} }
getToDoCount() {
toDoProvider.setState(0);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber']);
} else {}
}).catchError((err) {
print(err);
});
}
openAppointmentRadiology() { openAppointmentRadiology() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();

@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -16,7 +16,10 @@ class PrescriptionReportPage extends StatefulWidget {
dynamic listPres; dynamic listPres;
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
PrescriptionReportPage({@required this.prescriptionReportEnhList, @required this.listPres, @required this.appo}); PrescriptionReportPage(
{@required this.prescriptionReportEnhList,
@required this.listPres,
@required this.appo});
@override @override
_PrescriptionReportState createState() => _PrescriptionReportState(); _PrescriptionReportState createState() => _PrescriptionReportState();
@ -113,12 +116,18 @@ class _PrescriptionReportState extends State<PrescriptionReportPage> {
sendPrescriptionReportEmail() { sendPrescriptionReportEmail() {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.sendPrescriptionEmail(widget.appo.appointmentDate, widget.appo.setupID, widget.listPres, context).then((res) { GifLoaderDialogUtils.showMyDialog(context);
service
.sendPrescriptionEmail(widget.appo.appointmentDate, widget.appo.setupID,
widget.listPres, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: 'A copy has been sent to the e-mail'); AppToast.showSuccessToast(message: 'A copy has been sent to the e-mail');
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); });
} }
navigateToPrescriptionDetails(PrescriptionReportEnh prescriptionReportEnh) { navigateToPrescriptionDetails(PrescriptionReportEnh prescriptionReportEnh) {

@ -19,6 +19,8 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.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:flutter_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
@ -208,6 +210,22 @@ class _ToDoState extends State<ToDo> {
), ),
], ],
), ),
Container(
child: CountdownTimer(
endTime: DateTime.now().millisecondsSinceEpoch +
(widget.appoList[index]
.remaniningHoursTocanPay *
1000) *
60,
widgetBuilder: (_, CurrentRemainingTime time) {
return Text(
'${time.days}:${time.hours}:${time.min}:${time.sec} ' + TranslationBase.of(context).upcomingTimeLeft,
style: TextStyle(
fontSize: 12.0,
color: Color(0xff40ACC9)));
},
),
),
], ],
), ),
), ),
@ -503,6 +521,7 @@ class _ToDoState extends State<ToDo> {
widget.appoList.forEach((element) { widget.appoList.forEach((element) {
print(element.isLiveCareAppointment); print(element.isLiveCareAppointment);
print(element.nextAction); print(element.nextAction);
print(element.remaniningHoursTocanPay);
}); });
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);

@ -191,7 +191,7 @@ class _HomePageState extends State<HomePage> {
) )
: Container( : Container(
width: double.infinity, width: double.infinity,
height: projectViewModel.isArabic ? 180 : 150, height: projectViewModel.isArabic ? 180 : 160,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,

@ -3,12 +3,11 @@ 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/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/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;
@ -93,40 +92,37 @@ class _LiveCareHomeState extends State<LiveCareHome>
hasLiveCareRequest = false; hasLiveCareRequest = false;
}); });
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
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;
} }
} }
}); });
}) setState(() {
.catchError((err) { isDataLoaded = true;
print(err); });
}) }).catchError((err) {
.showProgressBar( GifLoaderDialogUtils.hideDialog(context);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) AppToast.showErrorToast(message: err);
.then((value) { print(err);
setState(() { });
isDataLoaded = true;
});
});
} }
} }

@ -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;
@ -177,6 +177,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(),
@ -184,12 +185,13 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
authUser.emailAddress, authUser.emailAddress,
context) context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: "LiveCare invoice sent successfully"); AppToast.showSuccessToast(message: "LiveCare invoice sent successfully");
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
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,19 @@ 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) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast( AppToast.showSuccessToast(
message: "LiveCare request cancelled successfully"); message: "LiveCare request cancelled successfully");
widget.getLiveCareHistory();
}) })
.catchError((err) { .catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
})
.showProgressBar(
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,9 @@ class _State extends State<ClinicCard> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
} }

@ -17,13 +17,13 @@ import 'package:diplomaticquarterapp/services/authentication/auth_provider.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/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.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';
class ClinicList extends StatefulWidget { class ClinicList extends StatefulWidget {
final Function getLiveCareHistory; final Function getLiveCareHistory;
@ -79,31 +79,27 @@ class _clinic_listState extends State<ClinicList> {
void startLiveCare() { void startLiveCare() {
bool isError = false; bool isError = false;
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse = ERAppointmentFeesResponse erAppointmentFeesResponse =
new ERAppointmentFeesResponse(); new ERAppointmentFeesResponse();
service service.getERAppointmentFees(selectedClinicID, context).then((res) {
.getERAppointmentFees(selectedClinicID, context) GifLoaderDialogUtils.hideDialog(context);
.then((res) { if (res['HasAppointment'] == true) {
if (res['HasAppointment'] == true) { isError = true;
isError = true; showLiveCareCancelDialog(res['ErrorEndUserMessage'], res);
showLiveCareCancelDialog(res['ErrorEndUserMessage'], res); } else {
} else { erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res);
erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res); isError = false;
isError = false; }
} if (!isError)
}) getERAppointmentTime(
.catchError((err) { erAppointmentFeesResponse.getERAppointmentFeesList);
print(err); }).catchError((err) {
isError = true; GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); print(err);
}) isError = true;
.showProgressBar( AppToast.showErrorToast(message: err);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) });
.then((value) {
if (!isError)
getERAppointmentTime(
erAppointmentFeesResponse.getERAppointmentFeesList);
});
} }
showLiveCareCancelDialog(String msg, res) { showLiveCareCancelDialog(String msg, res) {
@ -112,8 +108,7 @@ class _clinic_listState extends State<ClinicList> {
confirmMessage: msg, confirmMessage: msg,
okText: TranslationBase.of(context).confirm, okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => okFunction: () => {cancelAppointment(res)},
{cancelAppointment(res)},
cancelFunction: () => {}); cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
} }
@ -132,38 +127,37 @@ class _clinic_listState extends State<ClinicList> {
appo.appointmentDate = res['AppointmentDate']; appo.appointmentDate = res['AppointmentDate'];
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service.cancelAppointment(appo, context).then((res) {
.cancelAppointment(appo, context) GifLoaderDialogUtils.hideDialog(context);
.then((res) { print(res);
print(res); if (res['MessageStatus'] == 1) {
if (res['MessageStatus'] == 1) { AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); startLiveCare();
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}) }).catchError((err) {
.catchError((err) { GifLoaderDialogUtils.hideDialog(context);
print(err); AppToast.showErrorToast(message: err);
}) print(err);
.showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
startLiveCare();
});
} }
getERAppointmentTime(GetERAppointmentFeesList getERAppointmentFeesList) { getERAppointmentTime(GetERAppointmentFeesList getERAppointmentFeesList) {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.getERAppointmentTime(selectedClinicID, context).then((res) { service.getERAppointmentTime(selectedClinicID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res); print(res);
showLiveCarePaymentDialog( showLiveCarePaymentDialog(
getERAppointmentFeesList, res['WatingtimeInteger']); getERAppointmentFeesList, res['WatingtimeInteger']);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
showLiveCarePaymentDialog( showLiveCarePaymentDialog(
@ -320,12 +314,14 @@ class _clinic_listState extends State<ClinicList> {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) { checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.checkPaymentStatus( .checkPaymentStatus(
Utils.getAppointmentTransID( Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo), appo.projectID, appo.clinicID, appo.appointmentNo),
context) context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
print("Printing Payment Status Reponse!!!!"); print("Printing Payment Status Reponse!!!!");
print(res); print(res);
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];
@ -336,27 +332,27 @@ class _clinic_listState extends State<ClinicList> {
AppToast.showErrorToast(message: res['Response_Message']); AppToast.showErrorToast(message: res['Response_Message']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
addNewCallForPatientER(String clientRequestID) { addNewCallForPatientER(String clientRequestID) {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service service
.addNewCallForPatientER(selectedClinicID, clientRequestID, context) .addNewCallForPatientER(selectedClinicID, clientRequestID, context)
.then((res) { .then((res) {
AppToast.showSuccessToast( GifLoaderDialogUtils.hideDialog(context);
message: "New Call has been added successfully"); AppToast.showSuccessToast(
}) message: "New Call has been added successfully");
.catchError((err) { widget.getLiveCareHistory();
print(err); }).catchError((err) {
}) GifLoaderDialogUtils.hideDialog(context);
.showProgressBar( AppToast.showErrorToast(message: err);
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) print(err);
.then((value) { });
widget.getLiveCareHistory();
});
} }
getLanguageID() async { getLanguageID() async {
@ -366,7 +362,9 @@ class _clinic_listState extends State<ClinicList> {
getLiveCareClinicsList() { getLiveCareClinicsList() {
isDataLoaded = false; isDataLoaded = false;
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.getLivecareClinics(context).then((res) { service.getLivecareClinics(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['PatientER_GetClinicsList'].length); print(res['PatientER_GetClinicsList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
@ -384,15 +382,18 @@ class _clinic_listState extends State<ClinicList> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
getLiveCareScheduleClinicsList() { getLiveCareScheduleClinicsList() {
isDataLoaded = false; isDataLoaded = false;
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.getLiveCareScheduledClinics(context).then((res) { service.getLiveCareScheduledClinics(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['ClinicsHaveScheduleList'].length); print(res['ClinicsHaveScheduleList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
@ -411,9 +412,10 @@ class _clinic_listState extends State<ClinicList> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
openLiveCareSelectionDialog() { openLiveCareSelectionDialog() {
@ -605,13 +607,13 @@ class _clinic_listState extends State<ClinicList> {
void startScheduleLiveCare() { void startScheduleLiveCare() {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List(); List();
service service
.getLiveCareScheduledDoctorList(context, selectedClinicID) .getLiveCareScheduledDoctorList(context, selectedClinicID)
.then((res) { .then((res) {
print(res['DoctorByClinicIDList']); GifLoaderDialogUtils.hideDialog(context);
print(res['DoctorByClinicIDList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
if (res['DoctorByClinicIDList'].length != 0) { if (res['DoctorByClinicIDList'].length != 0) {
@ -650,9 +652,10 @@ class _clinic_listState extends State<ClinicList> {
context, doctorsList, _patientDoctorAppointmentListHospital); context, doctorsList, _patientDoctorAppointmentListHospital);
} else {} } else {}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToSearchResults( Future navigateToSearchResults(

@ -20,13 +20,11 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.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:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class Login extends StatefulWidget { class Login extends StatefulWidget {
@override @override
@ -93,23 +91,24 @@ class _Login extends State<Login> {
onNumberChange: (value) => onNumberChange: (value) =>
{mobileNo = value, validateForm()}, {mobileNo = value, validateForm()},
onCountryChange: (value) => countryCode = value), onCountryChange: (value) => countryCode = value),
Directionality( Directionality(
textDirection:TextDirection.ltr,child:Container( textDirection: TextDirection.ltr,
child: TextFields( child: Container(
fontWeight: FontWeight.normal, child: TextFields(
controller: nationalIDorFile, fontWeight: FontWeight.normal,
onChanged: (value) => {validateForm()}, controller: nationalIDorFile,
prefixIcon: Icon( onChanged: (value) => {validateForm()},
loginType == 1 prefixIcon: Icon(
? Icons.chrome_reader_mode loginType == 1
: Icons.receipt, ? Icons.chrome_reader_mode
color: Color(0xFF40ACC9)), : Icons.receipt,
padding: EdgeInsets.only( color: Color(0xFF40ACC9)),
top: 20, bottom: 20, left: 10, right: 10), padding: EdgeInsets.only(
hintText: loginType == 1 top: 20, bottom: 20, left: 10, right: 10),
? TranslationBase.of(context).nationalID hintText: loginType == 1
: TranslationBase.of(context).fileNo, ? TranslationBase.of(context).nationalID
))) : TranslationBase.of(context).fileNo,
)))
], ],
), ),
), ),
@ -122,7 +121,9 @@ class _Login extends State<Login> {
color: Colors.grey, color: Colors.grey,
height: 2, height: 2,
), ),
SizedBox(height: 10,), SizedBox(
height: 10,
),
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -209,15 +210,13 @@ class _Login extends State<Login> {
okText: TranslationBase.of(context).confirm, okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => { okFunction: () => {
ConfirmDialog.closeAlertDialog(context), ConfirmDialog.closeAlertDialog(context),
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
REGISTER, REGISTER,
), ),
}, },
cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)}); cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
}); });
// SMSOTP.showLoadingDialog(context, false), // SMSOTP.showLoadingDialog(context, false),
} }
@ -244,9 +243,9 @@ class _Login extends State<Login> {
this.authService.checkActivationCode(request, code).then((result) => { this.authService.checkActivationCode(request, code).then((result) => {
sharedPref.remove(FAMILY_FILE), sharedPref.remove(FAMILY_FILE),
result = CheckActivationCode.fromJson(result), result = CheckActivationCode.fromJson(result),
result.list.isFamily =false, result.list.isFamily = false,
this.sharedPref.setObject(USER_PROFILE, result.list), this.sharedPref.setObject(USER_PROFILE, result.list),
this.sharedPref.setObject(MAIN_USER, result.list), this.sharedPref.setObject(MAIN_USER, result.list),
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
this.sharedPref.setString(TOKEN, result.authenticationTokenID), this.sharedPref.setString(TOKEN, result.authenticationTokenID),
authenticatedUserObject.getUser(), authenticatedUserObject.getUser(),

@ -1,7 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/ask_doctor/request_type.dart'; import 'package:diplomaticquarterapp/pages/medical/ask_doctor/request_type.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -12,7 +10,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

@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectHospitalDialog.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectHospitalDialog.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/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -19,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';
@ -56,7 +56,11 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
void initState() { void initState() {
super.initState(); super.initState();
getAuthUser(); getAuthUser();
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/advance-payment/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/advance-payment/ar/0.png')); imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/advance-payment/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/advance-payment/ar/0.png'));
} }
@override @override
@ -107,13 +111,13 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
if (beneficiaryType == BeneficiaryType.MyFamilyFiles) if (beneficiaryType == BeneficiaryType.MyFamilyFiles)
InkWell( InkWell(
onTap: () { onTap: () {
GifLoaderDialogUtils.showMyDialog(context);
model.getFamilyFiles().then((value) { model.getFamilyFiles().then((value) {
GifLoaderDialogUtils.hideDialog(context);
confirmSelectFamilyDialog(model confirmSelectFamilyDialog(model
.getAllSharedRecordsByStatusResponse .getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList); .getAllSharedRecordsByStatusList);
}).showProgressBar( });
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
}, },
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
@ -145,17 +149,16 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
if (beneficiaryType == BeneficiaryType.OtherAccount) if (beneficiaryType == BeneficiaryType.OtherAccount)
InkWell( InkWell(
onTap: () { onTap: () {
if (_fileTextController.text.isNotEmpty) if (_fileTextController.text.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
model model
.getPatientInfoByPatientID( .getPatientInfoByPatientID(
id: _fileTextController.text) id: _fileTextController.text)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context);
confirmSelectPatientDialog(model.patientInfoList); confirmSelectPatientDialog(model.patientInfoList);
}).showProgressBar( });
text: "Loading", } else
backgroundColor:
Colors.blue.withOpacity(0.6));
else
AppToast.showErrorToast( AppToast.showErrorToast(
message: 'Please Enter The File Number'); message: 'Please Enter The File Number');
}, },
@ -268,10 +271,11 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
advanceModel.amount = amount; advanceModel.amount = amount;
advanceModel.mobileNumber = mobileNum; advanceModel.mobileNumber = mobileNum;
advanceModel.patientName = patientName; advanceModel.patientName = patientName;
GifLoaderDialogUtils.showMyDialog(context);
model model
.getPatientInfoByPatientIDAndMobileNumber(advanceModel) .getPatientInfoByPatientIDAndMobileNumber(advanceModel)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.Error && if (model.state != ViewState.Error &&
model.state != ViewState.ErrorLocal) { model.state != ViewState.ErrorLocal) {
Utils.hideKeyboard(context); Utils.hideKeyboard(context);
@ -295,9 +299,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
}, },
); );
} }
}).showProgressBar( });
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
}, },
), ),
)), )),

@ -19,7 +19,6 @@ import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.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 'dialogs/ConfirmSMSDialog.dart'; import 'dialogs/ConfirmSMSDialog.dart';
import 'new_text_Field.dart'; import 'new_text_Field.dart';
@ -165,16 +164,16 @@ class ConfirmPaymentPage extends StatelessWidget {
label: TranslationBase.of(context).confirm.toUpperCase(), label: TranslationBase.of(context).confirm.toUpperCase(),
disabled: model.state == ViewState.Busy, disabled: model.state == ViewState.Busy,
onTap: () { onTap: () {
GifLoaderDialogUtils.showMyDialog(context);
model model
.sendActivationCodeForAdvancePayment( .sendActivationCodeForAdvancePayment(
patientID: int.parse(advanceModel.fileNumber), patientID: int.parse(advanceModel.fileNumber),
projectID: advanceModel.hospitalsModel.iD) projectID: advanceModel.hospitalsModel.iD)
.then((value) { .then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.ErrorLocal && if (model.state != ViewState.ErrorLocal &&
model.state != ViewState.Error) showSMSDialog(); model.state != ViewState.Error) showSMSDialog();
}).showProgressBar( });
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
}, },
), ),
), ),

@ -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() {

@ -58,8 +58,8 @@ class LocationUtils {
void setLocation(Position position) { void setLocation(Position position) {
print(position); print(position);
this.sharedPref.setDouble(USER_LAT, position.latitude); this.sharedPref.setDouble(USER_LAT, position.latitude ?? 0.0);
this.sharedPref.setDouble(USER_LONG, position.longitude); this.sharedPref.setDouble(USER_LONG, position.longitude ?? 0.0);
} }
void setZeroLocation() { void setZeroLocation() {

@ -911,6 +911,14 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get infoMyAppointments => localizedValues['info-my-appointments'][locale.languageCode]; String get infoMyAppointments => localizedValues['info-my-appointments'][locale.languageCode];
String get infoTodo => localizedValues['info-todo'][locale.languageCode]; String get infoTodo => localizedValues['info-todo'][locale.languageCode];
String get familyInfo => localizedValues['family-info'][locale.languageCode]; String get familyInfo => localizedValues['family-info'][locale.languageCode];
String get dentalComplaints => localizedValues['dental-complains'][locale.languageCode];
String get emptyResult => localizedValues['empty-result'][locale.languageCode];
String get noBookedAppo => localizedValues['no-booked-appointment'][locale.languageCode];
String get noConfirmedAppo => localizedValues['no-confirmed-appointment'][locale.languageCode];
String get noArrivedAppo => localizedValues['no-arrived-appointment'][locale.languageCode];
String get upcomingEmpty => localizedValues['upcoming-empty'][locale.languageCode];
String get upcomingTimeLeft => localizedValues['upcoming-timeLeft'][locale.languageCode];
} }

@ -10,8 +10,9 @@ import 'bottom_navigation_item.dart';
class BottomNavBar extends StatefulWidget { class BottomNavBar extends StatefulWidget {
final ValueChanged<int> changeIndex; final ValueChanged<int> changeIndex;
final int index ; final int index;
BottomNavBar({Key key, this.changeIndex,this.index}) : super(key: key);
BottomNavBar({Key key, this.changeIndex, this.index}) : super(key: key);
@override @override
_BottomNavBarState createState() => _BottomNavBarState(); _BottomNavBarState createState() => _BottomNavBarState();
@ -52,29 +53,28 @@ class _BottomNavBarState extends State<BottomNavBar> {
currentIndex: 1, currentIndex: 1,
name: TranslationBase.of(context).medicalProfile, name: TranslationBase.of(context).medicalProfile,
), ),
if(widget.index == 0) if (widget.index == 0)
Expanded( Expanded(
child: SizedBox( child: SizedBox(
height: 50, height: 50,
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
SizedBox(height: 22), SizedBox(height: 22),
], ],
), ),
), ),
), ),
if(widget.index != 0) if (widget.index != 0)
BottomNavigationItem( BottomNavigationItem(
icon: EvaIcons.calendar, icon: EvaIcons.calendar,
activeIcon: EvaIcons.calendar, activeIcon: EvaIcons.calendar,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
currentIndex: 2, currentIndex: 2,
name: TranslationBase.of(context).bookAppo, name: TranslationBase.of(context).bookAppo,
), ),
BottomNavigationItem( BottomNavigationItem(
icon: DQIcons.family, icon: DQIcons.family,
activeIcon: DQIcons.family, activeIcon: DQIcons.family,

@ -17,7 +17,6 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.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';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../../config/size_config.dart'; import '../../config/size_config.dart';

@ -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,10 @@ class _SearchBot extends State<BottomBarSearch> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
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';
@ -55,7 +56,6 @@ 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 +734,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 +787,10 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
Future navigateToDoctorProfile(context, docObject, docProfile, Future navigateToDoctorProfile(context, docObject, docProfile,

@ -106,8 +106,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
@ -138,12 +136,15 @@ dependencies:
device_calendar: ^3.1.0 device_calendar: ^3.1.0
#Handle Geolocation #Handle Geolocation
geolocator: ^6.0.0+1 geolocator: ^6.1.10
screen: ^0.0.5 screen: ^0.0.5
#google maps places #google maps places
google_maps_place_picker: ^1.0.0 google_maps_place_picker: ^1.0.0
#countdown timer for Upcoming List
flutter_countdown_timer: ^1.4.0
#Dependencies for video call implementation #Dependencies for video call implementation
native_device_orientation: ^0.3.0 native_device_orientation: ^0.3.0
enum_to_string: ^1.0.9 enum_to_string: ^1.0.9

Loading…
Cancel
Save