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

dq_and_master
Sultan Khan 5 years ago
commit 0f594059b5

@ -1152,11 +1152,32 @@ const Map localizedValues = {
}, },
"rate-clinic": {"en": "Please rate the clinic", "ar": "يرجى تقييم العيادة"}, "rate-clinic": {"en": "Please rate the clinic", "ar": "يرجى تقييم العيادة"},
"fetch-data": {"en": "Fetch Data", "ar": "تحديث الان"}, "fetch-data": {"en": "Fetch Data", "ar": "تحديث الان"},
"rate": {"en": "Rate", "ar": "تقييم"},
"send-email": { "send-email": {
"en": "Send a copy of this report to the email", "en": "Send a copy of this report to the email",
"ar": "أرسل نسخة من هذا التقرير إلى البريد الإلكتروني" "ar": "أرسل نسخة من هذا التقرير إلى البريد الإلكتروني"
}, },
"update-email": {"en": "Update Email", "ar": "تحديث البريد الالكتروني"}, "update-email": {"en": "Update Email", "ar": "تحديث البريد الالكتروني"},
"booked-success": {
"en": "The appointment has been successfully booked.",
"ar": "لقد تم حجز الموعد بنجاح"
},
"appo-reminder-select-option-30": {
"en": "Before 30 Mins",
"ar": "قبل 30 دقيقة"
},
"appo-reminder-select-option-60": {
"en": "Before 1 Hour",
"ar": "قبل ساعة واحدة"
},
"appo-reminder-select-option-90": {
"en": "Before 1 Hour and 30 mins",
"ar": "قبل ساعة و 30 دقيقة"
},
"appo-reminder-select-option-120": {
"en": "Before 2 Hours",
"ar": "قبل ساعتين"
},
"noDataAvailable": { "noDataAvailable": {
"en": "No data available", "en": "No data available",
"ar": " لا يوجد بيانات متاحة " "ar": " لا يوجد بيانات متاحة "

@ -423,7 +423,7 @@ class _BookConfirmState extends State<BookConfirm> {
context) context)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
print(res['AppointmentNo']); print(res['AppointmentNo']);
Future.delayed(new Duration(milliseconds: 500), () { Future.delayed(new Duration(milliseconds: 500), () {

@ -178,7 +178,8 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
holidayStyle: TextStyle().copyWith(color: Colors.blue[800]), holidayStyle: TextStyle().copyWith(color: Colors.blue[800]),
), ),
daysOfWeekStyle: DaysOfWeekStyle( daysOfWeekStyle: DaysOfWeekStyle(
weekendStyle: TextStyle().copyWith(color: Colors.blue[600]), weekendStyle: TextStyle().copyWith(color: Colors.black, fontSize: 14.0),
weekdayStyle: TextStyle().copyWith(color: Colors.black, fontSize: 14.0),
), ),
headerStyle: HeaderStyle( headerStyle: HeaderStyle(
centerHeaderTitle: true, centerHeaderTitle: true,
@ -190,7 +191,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
opacity: Tween(begin: 0.0, end: 1.0).animate(_animationController), opacity: Tween(begin: 0.0, end: 1.0).animate(_animationController),
child: Container( child: Container(
margin: const EdgeInsets.all(4.0), margin: const EdgeInsets.all(4.0),
padding: const EdgeInsets.only(top: 5.0, left: 6.0), padding: const EdgeInsets.only(top: 5.0, left: 5.0),
color: Colors.transparent, color: Colors.transparent,
width: 0, width: 0,
height: 0, height: 0,

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.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';
@ -15,30 +16,26 @@ class DoctorInformation extends StatelessWidget {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Card( AppExpandableNotifier(
shape: RoundedRectangleBorder( headerWidget: Container(
borderRadius: BorderRadius.circular(10), margin: EdgeInsets.all(10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SvgPicture.asset(
"assets/images/DQ/doctor_information_icon.svg"),
Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(TranslationBase.of(context).docInfo,
style: TextStyle(fontSize: 16.0, letterSpacing: 0.8)),
),
],
),
), ),
child: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container(
margin: EdgeInsets.all(15.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SvgPicture.asset(
"assets/images/DQ/doctor_information_icon.svg"),
Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(TranslationBase.of(context).docInfo,
style:
TextStyle(fontSize: 16.0, letterSpacing: 0.8)),
),
],
),
),
Container( Container(
padding: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 10.0), padding: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 10.0),
child: Table( child: Table(
@ -79,31 +76,27 @@ class DoctorInformation extends StatelessWidget {
], ],
), ),
), ),
Card( // ),
shape: RoundedRectangleBorder( AppExpandableNotifier(
borderRadius: BorderRadius.circular(10), headerWidget: Container(
margin: EdgeInsets.all(10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SvgPicture.asset(
"assets/images/DQ/doctor_qualification_icon.svg"),
Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(TranslationBase.of(context).docQualifications,
style: TextStyle(fontSize: 16.0, letterSpacing: 0.8)),
),
],
),
), ),
child: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container(
margin: EdgeInsets.all(15.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SvgPicture.asset(
"assets/images/DQ/doctor_qualification_icon.svg"),
Container(
margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0),
child: Text(
TranslationBase.of(context).docQualifications,
style:
TextStyle(fontSize: 16.0, letterSpacing: 0.8)),
),
],
),
),
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(
@ -136,9 +129,7 @@ class DoctorInformation extends StatelessWidget {
child: Text(text, child: Text(text,
maxLines: 16, maxLines: 16,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13, letterSpacing: 0.5, color: Colors.grey[700])),
letterSpacing: 0.5,
color: Colors.grey[700])),
); );
} }
@ -151,10 +142,7 @@ class DoctorInformation extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Text(text.trim(), Text(text.trim(),
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13, letterSpacing: 0.5, color: Colors.grey[700])),
letterSpacing: 0.5,
color: Colors.grey[700])),
Container( Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0), margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Image.network(icon, width: 18.0, height: 18.0), child: Image.network(icon, width: 18.0, height: 18.0),

@ -37,13 +37,16 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 2, vsync: this); _tabController = new TabController(length: 2, vsync: this);
AppointmentDetails.showFooterButton = false;
super.initState(); super.initState();
} }
@override @override
void dispose() { void dispose() {
super.dispose(); super.dispose();
_tabController.dispose(); _tabController.dispose();
AppointmentDetails.showFooterButton = false;
} }
@override @override
@ -162,7 +165,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
), ),
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
child: Text(widget.appo.startTime), child: Text(widget.appo.startTime.substring(0, 5)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -28,6 +29,10 @@ class MyAppointments extends StatefulWidget {
List(); List();
List<PatientAppointmentList> _patientArrivedAppointmentListHospital = List(); List<PatientAppointmentList> _patientArrivedAppointmentListHospital = List();
List<PatientAppointmentList> _patientBookedAppointmentListClinic = List();
List<PatientAppointmentList> _patientConfirmedAppointmentListClinic = List();
List<PatientAppointmentList> _patientArrivedAppointmentListClinic = List();
@override @override
_MyAppointmentsState createState() => _MyAppointmentsState(); _MyAppointmentsState createState() => _MyAppointmentsState();
} }
@ -43,9 +48,12 @@ class _MyAppointmentsState extends State<MyAppointments>
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
FilterType filterType;
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 3, vsync: this); _tabController = new TabController(length: 3, vsync: this);
filterType = FilterType.Clinic;
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (Provider.of<ProjectViewModel>(context, listen: false).isLogin) if (Provider.of<ProjectViewModel>(context, listen: false).isLogin)
getPatientAppointmentHistory(); getPatientAppointmentHistory();
@ -84,6 +92,42 @@ class _MyAppointmentsState extends State<MyAppointments>
color: Colors.grey[600], color: Colors.grey[600],
thickness: 0.5, thickness: 0.5,
), ),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () => setFilterType(FilterType.Clinic),
child: ListTile(
title: Text(TranslationBase.of(context).clinic),
leading: Radio(
value: FilterType.Clinic,
groupValue: filterType,
activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) {
setFilterType(value);
},
),
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => setFilterType(FilterType.Hospital),
child: ListTile(
title: Text(TranslationBase.of(context).hospital),
leading: Radio(
value: FilterType.Hospital,
groupValue: filterType,
activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) => setFilterType(value),
),
),
),
)
],
),
isDataLoaded isDataLoaded
? Expanded( ? Expanded(
child: new TabBarView( child: new TabBarView(
@ -114,6 +158,10 @@ class _MyAppointmentsState extends State<MyAppointments>
widget._patientConfirmedAppointmentListHospital.clear(); widget._patientConfirmedAppointmentListHospital.clear();
widget._patientArrivedAppointmentListHospital.clear(); widget._patientArrivedAppointmentListHospital.clear();
widget._patientBookedAppointmentListClinic.clear();
widget._patientConfirmedAppointmentListClinic.clear();
widget._patientArrivedAppointmentListClinic.clear();
service.getPatientAppointmentHistory(false, context).then((res) { service.getPatientAppointmentHistory(false, context).then((res) {
print(res['AppoimentAllHistoryResultList'].length); print(res['AppoimentAllHistoryResultList'].length);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -123,7 +171,8 @@ class _MyAppointmentsState extends State<MyAppointments>
if (res['AppoimentAllHistoryResultList'].length != 0) { if (res['AppoimentAllHistoryResultList'].length != 0) {
// isDataLoaded = true; // isDataLoaded = true;
res['AppoimentAllHistoryResultList'].forEach((v) { res['AppoimentAllHistoryResultList'].forEach((v) {
widget.appoList.add(new AppoitmentAllHistoryResultList.fromJson(v)); widget.appoList
.add(new AppoitmentAllHistoryResultList.fromJson(v));
}); });
sortAppointmentList(); sortAppointmentList();
} else {} } else {}
@ -169,11 +218,31 @@ class _MyAppointmentsState extends State<MyAppointments>
}); });
widget.bookedAppoList.forEach((element) { widget.bookedAppoList.forEach((element) {
List<PatientAppointmentList> doctorByClinic =
widget._patientBookedAppointmentListClinic
.where(
(elementClinic) =>
elementClinic.filterName == element.clinicName,
)
.toList();
if (doctorByClinic.length != 0) {
widget
._patientBookedAppointmentListClinic[widget
._patientBookedAppointmentListClinic
.indexOf(doctorByClinic[0])]
.patientDoctorAppointmentList
.add(element);
} else {
widget._patientBookedAppointmentListClinic.add(PatientAppointmentList(
filterName: element.clinicName, patientDoctorAppointment: element));
}
List<PatientAppointmentList> doctorByHospital = List<PatientAppointmentList> doctorByHospital =
widget._patientBookedAppointmentListHospital widget._patientBookedAppointmentListHospital
.where( .where(
(elementClinic) => (elementClinic) =>
elementClinic.filterName == element.clinicName, elementClinic.filterName == element.projectName,
) )
.toList(); .toList();
@ -186,16 +255,39 @@ class _MyAppointmentsState extends State<MyAppointments>
.add(element); .add(element);
} else { } else {
widget._patientBookedAppointmentListHospital.add(PatientAppointmentList( widget._patientBookedAppointmentListHospital.add(PatientAppointmentList(
filterName: element.clinicName, patientDoctorAppointment: element)); filterName: element.projectName,
patientDoctorAppointment: element));
} }
}); });
widget.confirmedAppoList.forEach((element) { widget.confirmedAppoList.forEach((element) {
List<PatientAppointmentList> doctorByClinic =
widget._patientConfirmedAppointmentListClinic
.where(
(elementClinic) =>
elementClinic.filterName == element.clinicName,
)
.toList();
if (doctorByClinic.length != 0) {
widget
._patientConfirmedAppointmentListClinic[widget
._patientConfirmedAppointmentListClinic
.indexOf(doctorByClinic[0])]
.patientDoctorAppointmentList
.add(element);
} else {
widget._patientConfirmedAppointmentListClinic.add(
PatientAppointmentList(
filterName: element.clinicName,
patientDoctorAppointment: element));
}
List<PatientAppointmentList> doctorByHospital = List<PatientAppointmentList> doctorByHospital =
widget._patientConfirmedAppointmentListHospital widget._patientConfirmedAppointmentListHospital
.where( .where(
(elementClinic) => (elementClinic) =>
elementClinic.filterName == element.clinicName, elementClinic.filterName == element.projectName,
) )
.toList(); .toList();
@ -209,17 +301,37 @@ class _MyAppointmentsState extends State<MyAppointments>
} else { } else {
widget._patientConfirmedAppointmentListHospital.add( widget._patientConfirmedAppointmentListHospital.add(
PatientAppointmentList( PatientAppointmentList(
filterName: element.clinicName, filterName: element.projectName,
patientDoctorAppointment: element)); patientDoctorAppointment: element));
} }
}); });
widget.arrivedAppoList.forEach((element) { widget.arrivedAppoList.forEach((element) {
List<PatientAppointmentList> doctorByClinic =
widget._patientArrivedAppointmentListClinic
.where(
(elementClinic) =>
elementClinic.filterName == element.clinicName,
)
.toList();
if (doctorByClinic.length != 0) {
widget
._patientArrivedAppointmentListClinic[widget
._patientArrivedAppointmentListClinic
.indexOf(doctorByClinic[0])]
.patientDoctorAppointmentList
.add(element);
} else {
widget._patientArrivedAppointmentListClinic.add(PatientAppointmentList(
filterName: element.clinicName, patientDoctorAppointment: element));
}
List<PatientAppointmentList> doctorByHospital = List<PatientAppointmentList> doctorByHospital =
widget._patientArrivedAppointmentListHospital widget._patientArrivedAppointmentListHospital
.where( .where(
(elementClinic) => (elementClinic) =>
elementClinic.filterName == element.clinicName, elementClinic.filterName == element.projectName,
) )
.toList(); .toList();
@ -233,9 +345,10 @@ class _MyAppointmentsState extends State<MyAppointments>
} else { } else {
widget._patientArrivedAppointmentListHospital.add( widget._patientArrivedAppointmentListHospital.add(
PatientAppointmentList( PatientAppointmentList(
filterName: element.clinicName, filterName: element.projectName,
patientDoctorAppointment: element)); patientDoctorAppointment: element));
} }
openAppointmentsTab(); openAppointmentsTab();
}); });
} }
@ -250,11 +363,11 @@ class _MyAppointmentsState extends State<MyAppointments>
} else if (flag == 3) { } else if (flag == 3) {
_tabController.index = 2; _tabController.index = 2;
} else { } else {
if (widget._patientBookedAppointmentListHospital.length != 0) { if (widget._patientBookedAppointmentListClinic.length != 0) {
_tabController.index = 0; _tabController.index = 0;
} else if (widget._patientConfirmedAppointmentListHospital.length != 0) { } else if (widget._patientConfirmedAppointmentListClinic.length != 0) {
_tabController.index = 1; _tabController.index = 1;
} else if (widget._patientArrivedAppointmentListHospital.length != 0) { } else if (widget._patientArrivedAppointmentListClinic.length != 0) {
_tabController.index = 2; _tabController.index = 2;
return; return;
} }
@ -270,24 +383,42 @@ class _MyAppointmentsState extends State<MyAppointments>
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
...List.generate( ...List.generate(
widget._patientBookedAppointmentListHospital.length, filterType == FilterType.Clinic
? widget._patientBookedAppointmentListClinic.length
: widget._patientBookedAppointmentListHospital.length,
(index) => AppExpandableNotifier( (index) => AppExpandableNotifier(
title: widget title: filterType == FilterType.Clinic
._patientBookedAppointmentListHospital[index] ? widget
.filterName, ._patientBookedAppointmentListClinic[index]
.filterName
: widget
._patientBookedAppointmentListHospital[index]
.filterName,
bodyWidget: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: widget children: filterType == FilterType.Clinic
._patientBookedAppointmentListHospital[index] ? widget
.patientDoctorAppointmentList ._patientBookedAppointmentListClinic[index]
.map((doctor) { .patientDoctorAppointmentList
return AppointmentCard( .map((doctor) {
appo: doctor, return AppointmentCard(
onReloadAppointmentHistory: appo: doctor,
getPatientAppointmentHistory, onReloadAppointmentHistory:
); getPatientAppointmentHistory,
}).toList(), );
}).toList()
: widget
._patientBookedAppointmentListHospital[
index]
.patientDoctorAppointmentList
.map((doctor) {
return AppointmentCard(
appo: doctor,
onReloadAppointmentHistory:
getPatientAppointmentHistory,
);
}).toList(),
)), )),
) )
], ],
@ -325,24 +456,43 @@ class _MyAppointmentsState extends State<MyAppointments>
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
...List.generate( ...List.generate(
widget._patientConfirmedAppointmentListHospital.length, filterType == FilterType.Clinic
? widget._patientConfirmedAppointmentListClinic.length
: widget
._patientConfirmedAppointmentListHospital.length,
(index) => AppExpandableNotifier( (index) => AppExpandableNotifier(
title: widget title: filterType == FilterType.Clinic
._patientConfirmedAppointmentListHospital[index] ? widget
.filterName, ._patientConfirmedAppointmentListClinic[index]
.filterName
: widget
._patientConfirmedAppointmentListHospital[index]
.filterName,
bodyWidget: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: widget children: filterType == FilterType.Clinic
._patientConfirmedAppointmentListHospital[index] ? widget
.patientDoctorAppointmentList ._patientConfirmedAppointmentListClinic[index]
.map((doctor) { .patientDoctorAppointmentList
return AppointmentCard( .map((doctor) {
appo: doctor, return AppointmentCard(
onReloadAppointmentHistory: appo: doctor,
getPatientAppointmentHistory, onReloadAppointmentHistory:
); getPatientAppointmentHistory,
}).toList(), );
}).toList()
: widget
._patientConfirmedAppointmentListHospital[
index]
.patientDoctorAppointmentList
.map((doctor) {
return AppointmentCard(
appo: doctor,
onReloadAppointmentHistory:
getPatientAppointmentHistory,
);
}).toList(),
)), )),
) )
], ],
@ -378,24 +528,38 @@ class _MyAppointmentsState extends State<MyAppointments>
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
...List.generate( ...List.generate(
widget._patientArrivedAppointmentListHospital.length, filterType == FilterType.Clinic
? widget._patientArrivedAppointmentListClinic.length
: widget._patientArrivedAppointmentListHospital.length,
(index) => AppExpandableNotifier( (index) => AppExpandableNotifier(
title: widget title: filterType == FilterType.Clinic
._patientArrivedAppointmentListHospital[index] ? widget._patientArrivedAppointmentListClinic[index]
.filterName, .filterName
: widget._patientArrivedAppointmentListHospital[index]
.filterName,
bodyWidget: Column( bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: widget children: filterType == FilterType.Clinic
._patientArrivedAppointmentListHospital[index] ? widget._patientArrivedAppointmentListClinic[index]
.patientDoctorAppointmentList .patientDoctorAppointmentList
.map((doctor) { .map((doctor) {
return AppointmentCard( return AppointmentCard(
appo: doctor, appo: doctor,
onReloadAppointmentHistory: onReloadAppointmentHistory:
getPatientAppointmentHistory, getPatientAppointmentHistory,
); );
}).toList(), }).toList()
: widget
._patientArrivedAppointmentListHospital[index]
.patientDoctorAppointmentList
.map((doctor) {
return AppointmentCard(
appo: doctor,
onReloadAppointmentHistory:
getPatientAppointmentHistory,
);
}).toList(),
), ),
), ),
) )
@ -422,4 +586,10 @@ class _MyAppointmentsState extends State<MyAppointments>
), ),
); );
} }
setFilterType(FilterType filterType) {
setState(() {
this.filterType = filterType;
});
}
} }

@ -46,7 +46,7 @@ class ArrivedButtons {
"caller": "Insurance" "caller": "Insurance"
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).askYour, "title": TranslationBase.of(AppGlobal.context).askDoctor,
"subtitle": TranslationBase.of(AppGlobal.context).askYourSubtitle, "subtitle": TranslationBase.of(AppGlobal.context).askYourSubtitle,
"icon": "assets/images/new-design/ask_doctor_icon.png", "icon": "assets/images/new-design/ask_doctor_icon.png",
"caller": "askDoc" "caller": "askDoc"

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class CustomRadio extends StatefulWidget { class CustomRadio extends StatefulWidget {
@ -21,17 +22,23 @@ class CustomRadioState extends State<CustomRadio> {
void initState() { void initState() {
super.initState(); super.initState();
if (widget.requestData != null) { WidgetsBinding.instance.addPostFrameCallback((_) {
widget.requestData.forEach((element) { if (widget.requestData != null) {
sampleData.add( widget.requestData.forEach((element) {
new RadioModel(false, element.description, element.parameterCode)); sampleData.add(new RadioModel(
}); false, element.description, element.parameterCode));
} else { });
sampleData.add(new RadioModel(false, "Before 30 Mins", 30)); } else {
sampleData.add(new RadioModel(false, 'Before 1 Hour', 60)); sampleData.add(new RadioModel(
sampleData.add(new RadioModel(false, 'Before 2 Hours', 120)); false, TranslationBase.of(context).appoReminder30, 30));
sampleData.add(new RadioModel(false, 'Before 4 Hours', 240)); sampleData.add(new RadioModel(
} false, TranslationBase.of(context).appoReminder60, 60));
sampleData.add(new RadioModel(
false, TranslationBase.of(context).appoReminder90, 90));
sampleData.add(new RadioModel(
false, TranslationBase.of(context).appoReminder120, 120));
}
});
} }
@override @override
@ -96,7 +103,7 @@ class RadioItem extends StatelessWidget {
), ),
), ),
new Container( new Container(
margin: new EdgeInsets.only(left: 15.0), margin: new EdgeInsets.only(left: 15.0, right: 15.0),
child: new Text(_item.text, style: TextStyle(fontSize: 16.0)), child: new Text(_item.text, style: TextStyle(fontSize: 16.0)),
), ),
], ],

@ -27,19 +27,18 @@ class _ReminderDialogState extends State<ReminderDialog> {
shape: shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.57, // height: MediaQuery.of(context).size.height * 0.57,
width: 450.0, width: 450.0,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.all(20.0), margin: EdgeInsets.all(20.0),
child: Text(TranslationBase.of(context).setReminder, child: Text(TranslationBase.of(context).setReminder,
style: TextStyle( style: TextStyle(
fontSize: 20.0, fontSize: 20.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold)),
fontFamily: "Open-Sans-Bold")),
), ),
Container( Container(
transform: Matrix4.translationValues(0.0, -30.0, 0.0), transform: Matrix4.translationValues(0.0, -30.0, 0.0),
@ -61,13 +60,12 @@ class _ReminderDialogState extends State<ReminderDialog> {
child: Text(TranslationBase.of(context).confirm, child: Text(TranslationBase.of(context).confirm,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold)),
fontFamily: 'Open-Sans-Bold')),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
margin: EdgeInsets.only(left: 100.0, top: 20.0, right: 100.0), margin: EdgeInsets.only(left: 100.0, top: 20.0, right: 100.0, bottom: 20.0),
child: OutlineButton( child: OutlineButton(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0)), borderRadius: BorderRadius.circular(10.0)),
@ -81,8 +79,7 @@ class _ReminderDialogState extends State<ReminderDialog> {
child: Text(TranslationBase.of(context).cancel_nocaps, child: Text(TranslationBase.of(context).cancel_nocaps,
style: TextStyle( style: TextStyle(
color: Colors.red, color: Colors.red,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold)),
fontFamily: 'Open-Sans-Bold')),
), ),
), ),
]), ]),

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
@ -69,6 +70,7 @@ class _ToDoState extends State<ToDo> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context); toDoProvider = Provider.of<ToDoCountProviderModel>(context);
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).todoList, appBarTitle: TranslationBase.of(context).todoList,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
@ -109,11 +111,15 @@ class _ToDoState extends State<ToDo> {
height: 20.0), height: 20.0),
Container( Container(
margin: margin:
EdgeInsets.only(left: 5.0, right: 20.0), EdgeInsets.only(left: 10.0, right: 10.0),
child: Text( child: Text(
getDate(widget DateUtil.getWeekDayMonthDayYearDateFormatted(
.appoList[index].appointmentDate), DateUtil.convertStringToDate(widget
style: TextStyle(fontSize: 11.0)), .appoList[index].appointmentDate),
projectViewModel.isArabic
? "ar"
: "en") + " " + widget.appoList[index].startTime.substring(0, 5),
style: TextStyle(fontSize: 10.0)),
), ),
widget.appoList[index].isLiveCareAppointment widget.appoList[index].isLiveCareAppointment
? SvgPicture.asset( ? SvgPicture.asset(
@ -141,7 +147,7 @@ class _ToDoState extends State<ToDo> {
: "-", : "-",
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
maxLines: 2, maxLines: 2,
style: TextStyle(fontSize: 11.0)), style: TextStyle(fontSize: 10.0)),
), ),
], ],
), ),

@ -179,7 +179,7 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
bottomSheet: Container( bottomSheet: Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context).size.height * 0.1, height: MediaQuery.of(context).size.height * 0.12,
color: Colors.grey[100], color: Colors.grey[100],
child: Column( child: Column(
children: <Widget>[ children: <Widget>[

@ -40,7 +40,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
headline6: headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold), TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
), ),
title: Text('Rate'), title: Text(TranslationBase.of(context).rate),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return IconButton( return IconButton(
@ -94,7 +94,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
height: 22, height: 22,
), ),
Texts( Texts(
model.appointmentDetails.doctorName, TranslationBase.of(context).dr + " " + model.appointmentDetails.doctorName,
bold: true, bold: true,
), ),
SizedBox( SizedBox(

@ -1034,6 +1034,17 @@ class TranslationBase {
localizedValues['noSearchResult'][locale.languageCode]; localizedValues['noSearchResult'][locale.languageCode];
String get selectFileSouse => String get selectFileSouse =>
localizedValues['selectFileSouse'][locale.languageCode]; localizedValues['selectFileSouse'][locale.languageCode];
String get rate => localizedValues['rate'][locale.languageCode];
String get bookedSuccess =>
localizedValues['booked-success'][locale.languageCode];
String get appoReminder30 =>
localizedValues['appo-reminder-select-option-30'][locale.languageCode];
String get appoReminder60 =>
localizedValues['appo-reminder-select-option-60'][locale.languageCode];
String get appoReminder90 =>
localizedValues['appo-reminder-select-option-90'][locale.languageCode];
String get appoReminder120 =>
localizedValues['appo-reminder-select-option-120'][locale.languageCode];
String get gallery => localizedValues['gallery'][locale.languageCode]; String get gallery => localizedValues['gallery'][locale.languageCode];
String get camera => localizedValues['camera'][locale.languageCode]; String get camera => localizedValues['camera'][locale.languageCode];
} }

Loading…
Cancel
Save