dq_and_master
Haroon Amjad 4 years ago
parent c4bb75eab4
commit 9d3c64200e

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

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

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

@ -13,6 +13,7 @@ class DoctorInformation extends StatelessWidget {
return Container(
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Card(
shape: RoundedRectangleBorder(
@ -106,6 +107,7 @@ class DoctorInformation extends StatelessWidget {
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 10.0, 5.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
_getNormalText(docProfileList.doctorProfileInfo)
],
@ -123,7 +125,6 @@ class DoctorInformation extends StatelessWidget {
return Text(text,
style: TextStyle(
fontSize: 13,
fontFamily: 'Open-Sans',
fontWeight: FontWeight.bold,
letterSpacing: 0.5,
color: Colors.grey[800]));
@ -133,9 +134,9 @@ class DoctorInformation extends StatelessWidget {
return Container(
margin: EdgeInsets.only(top: 5.0),
child: Text(text,
maxLines: 16,
style: TextStyle(
fontSize: 13,
fontFamily: 'Open-Sans',
letterSpacing: 0.5,
color: Colors.grey[700])),
);
@ -151,7 +152,7 @@ class DoctorInformation extends StatelessWidget {
Text(text.trim(),
style: TextStyle(
fontSize: 13,
fontFamily: 'Open-Sans',
letterSpacing: 0.5,
color: Colors.grey[700])),
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/DoctorListResponse.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/services/appointment_services/GetDoctorsList.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/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
import 'widgets/AppointmentActions.dart';
@ -39,13 +42,13 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
@override
void dispose() {
// TODO: implement dispose
super.dispose();
_tabController.dispose();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: widget.appo.doctorNameObj,
isShowAppBar: true,
@ -109,7 +112,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
Container(
margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center,
child: Text(widget.appo.clinicName,
child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality),
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[900],
@ -139,7 +142,9 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
child: Text(
"(" +
widget.appo.noOfPatientsRate.toString() +
" Reviews)",
" " +
TranslationBase.of(context).reviews +
")",
style: TextStyle(
fontSize: 14.0,
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(
margin: EdgeInsets.only(top: 10.0),
child: Divider(
@ -493,6 +509,25 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
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 docObj = new DoctorList();
docObj.doctorID = widget.appo.doctorID;

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

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

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

@ -80,7 +80,12 @@ class _ApointmentCardState extends State<AppointmentCard> {
),
Container(
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(
fontSize: 12.0,
color: Colors.grey[600],
@ -104,33 +109,38 @@ class _ApointmentCardState extends State<AppointmentCard> {
Container(
transform:
Matrix4.translationValues(15.0, -40.0, 0.0),
child: projectViewModel.isArabic ? Image.asset(
"assets/images/new-design/arrow_menu_black-ar.png",
width: 25.0,
height: 25.0) : Image.asset(
"assets/images/new-design/arrow_menu_black-en.png",
width: 25.0,
height: 25.0),
child: projectViewModel.isArabic
? Image.asset(
"assets/images/new-design/arrow_menu_black-ar.png",
width: 25.0,
height: 25.0)
: Image.asset(
"assets/images/new-design/arrow_menu_black-en.png",
width: 25.0,
height: 25.0),
),
],
),
widget.appo.patientStatusType == AppointmentType.BOOKED ?
Container(
child: CountdownTimer(
endTime: DateTime.now().millisecondsSinceEpoch +
(widget.appo.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)));
},
),
) : Container(),
(widget.appo.patientStatusType == AppointmentType.BOOKED ||
widget.appo.patientStatusType ==
AppointmentType.CONFIRMED)
? Container(
child: CountdownTimer(
endTime: DateTime.now().millisecondsSinceEpoch +
(widget.appo.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)));
},
),
)
: Container(),
],
),
),

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

Loading…
Cancel
Save