Merge branch 'diplomatic-quarter-live' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into hot_fix

merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit 97776ce99b

@ -74,6 +74,10 @@ const Map localizedValues = {
'en': 'Please confirm the appointment to avoid cancellation', 'en': 'Please confirm the appointment to avoid cancellation',
'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء' 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'
}, },
"book-success-confirm-more-24-1-2": {
"en": "The online payment process will be available 24 hours before the appointment.",
"ar": "- عملية الدفع الالكتروني ستكون متاحة قبل الموعد ب 24 ساعة."
},
'upcoming-payment-pending': { 'upcoming-payment-pending': {
'en': 'en':
'Online Payment will be Activated before 24 Hours of Appointment Time', 'Online Payment will be Activated before 24 Hours of Appointment Time',
@ -1110,6 +1114,22 @@ const Map localizedValues = {
"not-active": {"en": "Not Active", "ar": "غير نشط"}, "not-active": {"en": "Not Active", "ar": "غير نشط"},
"card-detail": {"en": "Insurance Details", "ar": "منافعك التامينية"}, "card-detail": {"en": "Insurance Details", "ar": "منافعك التامينية"},
"Dr": {"en": "Dr. ", "ar": "الدكتور."}, "Dr": {"en": "Dr. ", "ar": "الدكتور."},
"empty": {
"en": "You do not have any records.",
"ar": "ليس لديك أي سجلات"
},
"last-visit": {
"en": "How was your last visit with doctor?",
"ar": "كيف تقيم زيارتك الأخيرة للطبيب؟"
},
"tap-title": {
"en": "Please rate the doctor",
"ar": "يرجى تقييم الطبيب"
},
"later": {
"en": "Later",
"ar": "لاحقاً"
},
"sendSuc":{ "sendSuc":{
"en":"A copy has been sent to the email", "en":"A copy has been sent to the email",
"ar":"تم إرسال نسخة إلى البريد الإلكتروني" "ar":"تم إرسال نسخة إلى البريد الإلكتروني"

@ -241,7 +241,7 @@ class _BookConfirmState extends State<BookConfirm> {
), ),
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
child: Text( child: Text(
TranslationBase.of(context).date + TranslationBase.of(context).date +
": " + ": " +

@ -165,6 +165,173 @@ class _BookSuccessState extends State<BookSuccess> {
], ],
), ),
), ),
bottomNavigationBar: getBottomContainer(),
);
}
Widget getBottomContainer() {
switch (widget.patientShareResponse.nextAction) {
case 0:
return Container();
break;
case 10:
return _getConfirmAppoButtons();
break;
case 15:
return _getPaymentPendingAppo();
break;
case 20:
return _getPayNowButtons();
break;
case 30:
return _getQRButtons();
break;
case 50:
return _getConfirmAppoButtons();
break;
}
}
Widget _getQRButtons() {
return Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.18,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
// navigateToQR(context);
getAppoQR(context);
},
child: Text(TranslationBase.of(context).viewQR.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
);
}
Widget _getPayNowButtons() {
return Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.2,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
startPaymentProcess();
},
child: Text(TranslationBase.of(context).payNow.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(TranslationBase.of(context).payLater.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
);
}
Widget _getConfirmAppoButtons() {
return Container(
alignment: Alignment.bottomCenter,
margin: EdgeInsets.only(bottom: 5.0),
height: MediaQuery.of(context).size.height * 0.15,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
AppoitmentAllHistoryResultList appo =
new AppoitmentAllHistoryResultList();
appo.clinicID = widget.docObject.clinicID;
appo.projectID = widget.docObject.projectID;
appo.appointmentNo = widget.patientShareResponse.appointmentNo;
appo.serviceID = widget.patientShareResponse.serviceID;
appo.isLiveCareAppointment =
widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
confirmAppointment(appo);
},
child: Text(
widget.patientShareResponse.isLiveCareAppointment
? TranslationBase.of(context)
.confirmLiveCare
.toUpperCase()
: TranslationBase.of(context).confirm.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(
TranslationBase.of(context).confirmLater.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
); );
} }
@ -238,8 +405,7 @@ class _BookSuccessState extends State<BookSuccess> {
_getBulletPoint("1"), _getBulletPoint("1"),
Container( Container(
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Text( child: Text(TranslationBase.of(context).upcomingConfirm,
"Please confirm the appointment to avoid the cancellation",
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle(fontSize: 13.0)), style: TextStyle(fontSize: 13.0)),
), ),
@ -263,7 +429,7 @@ class _BookSuccessState extends State<BookSuccess> {
Container( Container(
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Text( child: Text(
"The online payment process will be available 24 hours before the appointment.", TranslationBase.of(context).upcomingConfirmMore,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle(fontSize: 13.0)), style: TextStyle(fontSize: 13.0)),
), ),
@ -277,67 +443,6 @@ class _BookSuccessState extends State<BookSuccess> {
margin: EdgeInsets.fromLTRB(50.0, 20.0, 50.0, 20.0), margin: EdgeInsets.fromLTRB(50.0, 20.0, 50.0, 20.0),
child: Image.asset("assets/images/new-design/payment-method.png"), child: Image.asset("assets/images/new-design/payment-method.png"),
), ),
Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.32,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
AppoitmentAllHistoryResultList appo =
new AppoitmentAllHistoryResultList();
appo.clinicID = widget.docObject.clinicID;
appo.projectID = widget.docObject.projectID;
appo.appointmentNo =
widget.patientShareResponse.appointmentNo;
appo.serviceID = widget.patientShareResponse.serviceID;
appo.isLiveCareAppointment =
widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
confirmAppointment(appo);
},
child: Text(
widget.patientShareResponse.isLiveCareAppointment
? TranslationBase.of(context)
.confirmLiveCare
.toUpperCase()
: TranslationBase.of(context).confirm.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(
TranslationBase.of(context).confirmLater.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
),
], ],
); );
} }
@ -463,52 +568,6 @@ class _BookSuccessState extends State<BookSuccess> {
), ),
], ],
), ),
Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.2,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
startPaymentProcess();
},
child: Text(TranslationBase.of(context).payNow.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF40ACC9),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(
TranslationBase.of(context).payLater.toUpperCase(),
style: TextStyle(fontSize: 18.0)),
),
),
],
),
),
], ],
); );
} }
@ -770,34 +829,34 @@ class _BookSuccessState extends State<BookSuccess> {
), ),
], ],
), ),
Container( // Container(
alignment: Alignment.bottomCenter, // alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.18, // height: MediaQuery.of(context).size.height * 0.18,
child: Column( // child: Column(
mainAxisAlignment: MainAxisAlignment.end, // mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ // children: <Widget>[
ButtonTheme( // ButtonTheme(
shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), // borderRadius: BorderRadius.circular(10.0),
), // ),
minWidth: MediaQuery.of(context).size.width * 0.7, // minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0, // height: 45.0,
child: RaisedButton( // child: RaisedButton(
color: new Color(0xFF60686b), // color: new Color(0xFF60686b),
textColor: Colors.white, // textColor: Colors.white,
disabledTextColor: Colors.white, // disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), // disabledColor: new Color(0xFFbcc2c4),
onPressed: () { // onPressed: () {
// navigateToQR(context); // // navigateToQR(context);
getAppoQR(context); // getAppoQR(context);
}, // },
child: Text(TranslationBase.of(context).viewQR.toUpperCase(), // child: Text(TranslationBase.of(context).viewQR.toUpperCase(),
style: TextStyle(fontSize: 18.0)), // style: TextStyle(fontSize: 18.0)),
), // ),
), // ),
], // ],
), // ),
), // ),
], ],
); );
} }

@ -411,11 +411,15 @@ class _AppointmentActionsState extends State<AppointmentActions> {
.getPatientRadOrders(widget.appo.appointmentNo.toString(), context) .getPatientRadOrders(widget.appo.appointmentNo.toString(), context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res['FinalRadiologyList']); if (res['FinalRadiologyList'] != null) {
finalRadiology = print(res['FinalRadiologyList']);
new FinalRadiology.fromJson(res['FinalRadiologyList'][0]); finalRadiology =
print(finalRadiology.reportData); new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
navigateToRadiologyDetails(finalRadiology); print(finalRadiology.reportData);
navigateToRadiologyDetails(finalRadiology);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
@ -429,19 +433,17 @@ class _AppointmentActionsState extends State<AppointmentActions> {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.getPatientPrescriptionReports(widget.appo, context).then((res) { service.getPatientPrescriptionReports(widget.appo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
res['ListPRM'].forEach((report) { if (res['ListPRM'].length != 0) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report)); res['ListPRM'].forEach((report) {
}); prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
print(prescriptionReportEnhList.length); });
if (prescriptionReportEnhList.length != 0) { print(prescriptionReportEnhList.length);
navigateToMedicinePrescriptionReport(
prescriptionReportEnhList, res['ListPRM']);
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
// AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
}); });
} }

@ -63,6 +63,7 @@ class _ToDoState extends State<ToDo> {
appBarTitle: TranslationBase.of(context).todoList, appBarTitle: TranslationBase.of(context).todoList,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
isShowAppBar: false, isShowAppBar: false,
isShowDecPage: true,
description: TranslationBase.of(context).infoTodo, description: TranslationBase.of(context).infoTodo,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(

@ -468,7 +468,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
case 3: case 3:
return TranslationBase.of(context).services; return TranslationBase.of(context).services;
case 4: case 4:
return TranslationBase.of(context).bookAppo; return TranslationBase.of(context).todoList;
} }
} }

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.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';
@ -60,10 +61,10 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 25, height: 25, //5598
), ),
Texts( Texts(
'How would you rate your last visit to the doctor', TranslationBase.of(context).lastVisit,
bold: true, bold: true,
color: Colors.black, color: Colors.black,
), ),
@ -114,7 +115,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
), ),
Center( Center(
child: Texts( child: Texts(
'Please rate the doctor', TranslationBase.of(context).tapTitle,
textAlign: TextAlign.center, textAlign: TextAlign.center,
)), )),
SizedBox( SizedBox(
@ -204,7 +205,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
); );
} }
}, },
label: "Next", label: TranslationBase.of(context).next,
disabled: model.state == ViewState.BusyLocal, disabled: model.state == ViewState.BusyLocal,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor), textColor: Theme.of(context).backgroundColor),
@ -222,7 +223,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
); );
}, },
child: Texts( child: Texts(
'Later', TranslationBase.of(context).later,
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
color: HexColor('#151DFE'), color: HexColor('#151DFE'),
fontSize: 18, fontSize: 18,

@ -220,6 +220,9 @@ class TranslationBase {
String get upcomingConfirm => String get upcomingConfirm =>
localizedValues['upcoming-confirm'][locale.languageCode]; localizedValues['upcoming-confirm'][locale.languageCode];
String get upcomingConfirmMore =>
localizedValues['book-success-confirm-more-24-1-2'][locale.languageCode];
String get upcomingPaymentPending => String get upcomingPaymentPending =>
localizedValues['upcoming-payment-pending'][locale.languageCode]; localizedValues['upcoming-payment-pending'][locale.languageCode];
@ -1008,6 +1011,10 @@ class TranslationBase {
String get infoChat => localizedValues['info-chat'][locale.languageCode]; String get infoChat => localizedValues['info-chat'][locale.languageCode];
String get noRecords => localizedValues['empty'][locale.languageCode];
String get lastVisit => localizedValues['last-visit'][locale.languageCode];
String get tapTitle => localizedValues['tap-title'][locale.languageCode];
String get later => localizedValues['later'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save