Translation & bug fixes

dq_and_master
haroon amjad 4 years ago
parent 1db5b15dcd
commit 740a294867

@ -74,6 +74,10 @@ const Map localizedValues = {
'en': 'Please confirm the appointment to avoid cancellation',
'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': {
'en':
'Online Payment will be Activated before 24 Hours of Appointment Time',
@ -1110,4 +1114,20 @@ const Map localizedValues = {
"not-active": {"en": "Not Active", "ar": "غير نشط"},
"card-detail": {"en": "Insurance Details", "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": "لاحقاً"
},
};

@ -241,7 +241,7 @@ class _BookConfirmState extends State<BookConfirm> {
),
),
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(
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"),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Text(
"Please confirm the appointment to avoid the cancellation",
child: Text(TranslationBase.of(context).upcomingConfirm,
overflow: TextOverflow.clip,
style: TextStyle(fontSize: 13.0)),
),
@ -263,7 +429,7 @@ class _BookSuccessState extends State<BookSuccess> {
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Text(
"The online payment process will be available 24 hours before the appointment.",
TranslationBase.of(context).upcomingConfirmMore,
overflow: TextOverflow.clip,
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),
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(
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)),
),
),
],
),
),
// 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)),
// ),
// ),
// ],
// ),
// ),
],
);
}

@ -411,8 +411,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
.getPatientRadOrders(widget.appo.appointmentNo.toString(), context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['FinalRadiologyList']);
if (res['FinalRadiologyList'] != null) {
print(res['FinalRadiologyList']);
finalRadiology =
new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
print(finalRadiology.reportData);
@ -423,7 +423,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
// AppToast.showErrorToast(message: err);
AppToast.showErrorToast(message: err);
});
}
@ -433,19 +433,17 @@ class _AppointmentActionsState extends State<AppointmentActions> {
DoctorsListService service = new DoctorsListService();
service.getPatientPrescriptionReports(widget.appo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
res['ListPRM'].forEach((report) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
});
print(prescriptionReportEnhList.length);
if (prescriptionReportEnhList.length != 0) {
navigateToMedicinePrescriptionReport(
prescriptionReportEnhList, res['ListPRM']);
if (res['ListPRM'].length != 0) {
res['ListPRM'].forEach((report) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
});
print(prescriptionReportEnhList.length);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
}
}).catchError((err) {
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,
imagesInfo: imagesInfo,
isShowAppBar: false,
isShowDecPage: true,
description: TranslationBase.of(context).infoTodo,
body: SingleChildScrollView(
child: Column(

@ -1,4 +1,5 @@
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/my_balance_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -62,36 +63,41 @@ class PaymentService extends StatelessWidget {
),
),
Expanded(
child: Container(
margin: EdgeInsets.all(5.0),
padding: EdgeInsets.all(9),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.0),
shape: BoxShape.rectangle),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).onlineCheckIn,
color: HexColor('#B61422'),
bold: true,
),
Texts(
TranslationBase.of(context).appointment,
fontSize: 14,
fontWeight: FontWeight.normal,
),
Align(
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Image.asset(
'assets/images/al-habib_online_payment_service_icon.png',
height: 55,
child: InkWell(
onTap: () {
Navigator.push(context, FadePage(page: ToDo()));
},
child: Container(
margin: EdgeInsets.all(5.0),
padding: EdgeInsets.all(9),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.0),
shape: BoxShape.rectangle),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).onlineCheckIn,
color: HexColor('#B61422'),
bold: true,
),
),
],
Texts(
TranslationBase.of(context).appointment,
fontSize: 14,
fontWeight: FontWeight.normal,
),
Align(
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Image.asset(
'assets/images/al-habib_online_payment_service_icon.png',
height: 55,
),
),
],
),
),
),
)

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

@ -220,6 +220,9 @@ class TranslationBase {
String get upcomingConfirm =>
localizedValues['upcoming-confirm'][locale.languageCode];
String get upcomingConfirmMore =>
localizedValues['book-success-confirm-more-24-1-2'][locale.languageCode];
String get upcomingPaymentPending =>
localizedValues['upcoming-payment-pending'][locale.languageCode];
@ -1000,6 +1003,10 @@ class TranslationBase {
String get notActive => localizedValues['not-active'][locale.languageCode];
String get cardDetail => localizedValues['card-detail'][locale.languageCode];
String get dr => localizedValues['Dr'][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> {

Loading…
Cancel
Save