merge-update-with-lab-changes
Haroon Amjad 5 years ago
parent c4bb75eab4
commit 9d3c64200e

@ -1175,5 +1175,9 @@ const Map localizedValues = {
'details':{ 'details':{
'en':'Details', 'en':'Details',
'ar':'التفاصيل' 'ar':'التفاصيل'
},
"age": {
"en": "Age",
"ar": "العمر"
} }
}; };

@ -325,7 +325,7 @@ class _BookConfirmState extends State<BookConfirm> {
Container( Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
child: Text( child: Text(
"Gender: " + TranslationBase.of(context).gender + ": " +
widget.authUser.genderDescription, widget.authUser.genderDescription,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
@ -335,7 +335,7 @@ class _BookConfirmState extends State<BookConfirm> {
Container( Container(
margin: EdgeInsets.only(top: 5.0, bottom: 3.0), margin: EdgeInsets.only(top: 5.0, bottom: 3.0),
child: Text( child: Text(
"Age: " + widget.authUser.age.toString(), TranslationBase.of(context).age + ": " + widget.authUser.age.toString(),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.grey[600], color: Colors.grey[600],

@ -380,6 +380,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}); });
} }

@ -13,6 +13,7 @@ class DoctorInformation extends StatelessWidget {
return Container( return Container(
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Card( Card(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
@ -106,6 +107,7 @@ class DoctorInformation extends StatelessWidget {
Container( Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 10.0, 5.0), margin: EdgeInsets.fromLTRB(20.0, 0.0, 10.0, 5.0),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
_getNormalText(docProfileList.doctorProfileInfo) _getNormalText(docProfileList.doctorProfileInfo)
], ],
@ -123,7 +125,6 @@ class DoctorInformation extends StatelessWidget {
return Text(text, return Text(text,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
fontFamily: 'Open-Sans',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: 0.5, letterSpacing: 0.5,
color: Colors.grey[800])); color: Colors.grey[800]));
@ -133,9 +134,9 @@ class DoctorInformation extends StatelessWidget {
return Container( return Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
child: Text(text, child: Text(text,
maxLines: 16,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
fontFamily: 'Open-Sans',
letterSpacing: 0.5, letterSpacing: 0.5,
color: Colors.grey[700])), color: Colors.grey[700])),
); );
@ -151,7 +152,7 @@ class DoctorInformation extends StatelessWidget {
Text(text.trim(), Text(text.trim(),
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
fontFamily: 'Open-Sans',
letterSpacing: 0.5, letterSpacing: 0.5,
color: Colors.grey[700])), color: Colors.grey[700])),
Container( Container(

@ -1,3 +1,4 @@
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/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
@ -5,10 +6,12 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.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/date_uitl.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: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:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
import 'widgets/AppointmentActions.dart'; import 'widgets/AppointmentActions.dart';
@ -39,13 +42,13 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
@override @override
void dispose() { void dispose() {
// TODO: implement dispose
super.dispose(); super.dispose();
_tabController.dispose(); _tabController.dispose();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: widget.appo.doctorNameObj, appBarTitle: widget.appo.doctorNameObj,
isShowAppBar: true, isShowAppBar: true,
@ -109,7 +112,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center, alignment: Alignment.center,
child: Text(widget.appo.clinicName, child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.grey[900], color: Colors.grey[900],
@ -139,7 +142,9 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
child: Text( child: Text(
"(" + "(" +
widget.appo.noOfPatientsRate.toString() + widget.appo.noOfPatientsRate.toString() +
" Reviews)", " " +
TranslationBase.of(context).reviews +
")",
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.blue[800], color: Colors.blue[800],
@ -148,6 +153,17 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
)), )),
), ),
), ),
Container(
alignment: Alignment.center,
child: Text(DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(
widget.appo.appointmentDate),
projectViewModel.isArabic ? "ar" : "en")),
),
Container(
alignment: Alignment.center,
child: Text(widget.appo.startTime),
),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Divider( child: Divider(
@ -493,6 +509,25 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
return width; return width;
} }
String getDate(String date) {
DateTime dateObj = DateUtil.convertStringToDate(date);
return DateUtil.getWeekDay(dateObj.weekday) +
", " +
dateObj.day.toString() +
" " +
DateUtil.getMonth(dateObj.month) +
" " +
dateObj.year.toString();
}
String getDoctorSpeciality(List<String> docSpecial) {
String docSpeciality = "";
docSpecial.forEach((v) {
docSpeciality = docSpeciality + v + " ";
});
return docSpeciality;
}
DoctorList getDoctorObject() { DoctorList getDoctorObject() {
DoctorList docObj = new DoctorList(); DoctorList docObj = new DoctorList();
docObj.doctorID = widget.appo.doctorID; docObj.doctorID = widget.appo.doctorID;

@ -419,4 +419,6 @@ class _MyAppointmentsState extends State<MyAppointments>
), ),
); );
} }
} }

@ -40,7 +40,7 @@ class ArrivedButtons {
"caller": "insertComplaint" "caller": "insertComplaint"
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).insurance, "title": TranslationBase.of(AppGlobal.context).insuranceApproval,
"subtitle": TranslationBase.of(AppGlobal.context).insuranceSubtitle, "subtitle": TranslationBase.of(AppGlobal.context).insuranceSubtitle,
"icon": "assets/images/new-design/insurance_approvals_icon.png", "icon": "assets/images/new-design/insurance_approvals_icon.png",
"caller": "Insurance" "caller": "Insurance"
@ -58,4 +58,4 @@ class ArrivedButtons {
"caller": "Survey" "caller": "Survey"
} }
]; ];
} }

@ -437,12 +437,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
navigateToMedicinePrescriptionReport( navigateToMedicinePrescriptionReport(
prescriptionReportEnhList, res['ListPRM']); prescriptionReportEnhList, res['ListPRM']);
} else { } else {
AppToast.showErrorToast(message: "Sorry there is no data"); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); // AppToast.showErrorToast(message: err);
AppToast.showErrorToast(message: err);
}); });
} }

@ -80,7 +80,12 @@ class _ApointmentCardState extends State<AppointmentCard> {
), ),
Container( Container(
margin: EdgeInsets.only(top: 3.0, bottom: 3.0), margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
child: Text(getDate(widget.appo.appointmentDate).trim(), child: Text(
DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(
widget.appo.appointmentDate),
projectViewModel.isArabic ? "ar" : "en")
.trim(),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,
color: Colors.grey[600], color: Colors.grey[600],
@ -104,33 +109,38 @@ class _ApointmentCardState extends State<AppointmentCard> {
Container( Container(
transform: transform:
Matrix4.translationValues(15.0, -40.0, 0.0), Matrix4.translationValues(15.0, -40.0, 0.0),
child: projectViewModel.isArabic ? Image.asset( child: projectViewModel.isArabic
"assets/images/new-design/arrow_menu_black-ar.png", ? Image.asset(
width: 25.0, "assets/images/new-design/arrow_menu_black-ar.png",
height: 25.0) : Image.asset( width: 25.0,
"assets/images/new-design/arrow_menu_black-en.png", height: 25.0)
width: 25.0, : Image.asset(
height: 25.0), "assets/images/new-design/arrow_menu_black-en.png",
width: 25.0,
height: 25.0),
), ),
], ],
), ),
widget.appo.patientStatusType == AppointmentType.BOOKED ? (widget.appo.patientStatusType == AppointmentType.BOOKED ||
Container( widget.appo.patientStatusType ==
child: CountdownTimer( AppointmentType.CONFIRMED)
endTime: DateTime.now().millisecondsSinceEpoch + ? Container(
(widget.appo.remaniningHoursTocanPay * 1000) * child: CountdownTimer(
60, endTime: DateTime.now().millisecondsSinceEpoch +
widgetBuilder: (_, CurrentRemainingTime time) { (widget.appo.remaniningHoursTocanPay * 1000) *
return Text( 60,
'${time.days}:${time.hours}:${time.min}:${time.sec} ' + widgetBuilder: (_, CurrentRemainingTime time) {
TranslationBase.of(context) return Text(
.upcomingTimeLeft, '${time.days}:${time.hours}:${time.min}:${time.sec} ' +
style: TextStyle( TranslationBase.of(context)
fontSize: 12.0, .upcomingTimeLeft,
color: Color(0xff40ACC9))); style: TextStyle(
}, fontSize: 12.0,
), color: Color(0xff40ACC9)));
) : Container(), },
),
)
: Container(),
], ],
), ),
), ),

@ -945,8 +945,7 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get insurCards => localizedValues['insur-cards'][locale.languageCode]; String get insurCards => localizedValues['insur-cards'][locale.languageCode];
String get labResult => localizedValues['labResult'][locale.languageCode]; String get labResult => localizedValues['labResult'][locale.languageCode];
String get details => localizedValues['details'][locale.languageCode]; String get details => localizedValues['details'][locale.languageCode];
String get age => localizedValues['age'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save