diff --git a/assets/images/new/services/generate_ticket.svg b/assets/images/new/services/generate_ticket.svg
new file mode 100644
index 00000000..1c2e3a4c
--- /dev/null
+++ b/assets/images/new/services/generate_ticket.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/new/services/hosp_location.svg b/assets/images/new/services/hosp_location.svg
new file mode 100644
index 00000000..4d55f56b
--- /dev/null
+++ b/assets/images/new/services/hosp_location.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/images/new/services/online_payment.svg b/assets/images/new/services/online_payment.svg
new file mode 100644
index 00000000..238417d8
--- /dev/null
+++ b/assets/images/new/services/online_payment.svg
@@ -0,0 +1,29 @@
+
diff --git a/assets/images/new/services/raise_comp.svg b/assets/images/new/services/raise_comp.svg
new file mode 100644
index 00000000..74a87bae
--- /dev/null
+++ b/assets/images/new/services/raise_comp.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/new/services/reschedule.svg b/assets/images/new/services/reschedule.svg
new file mode 100644
index 00000000..28dbc920
--- /dev/null
+++ b/assets/images/new/services/reschedule.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/images/new/services/survey.svg b/assets/images/new/services/survey.svg
new file mode 100644
index 00000000..69fb7ad0
--- /dev/null
+++ b/assets/images/new/services/survey.svg
@@ -0,0 +1,4 @@
+
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index 65eb641a..51615216 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -37,6 +37,7 @@ const Map localizedValues = {
'home': {'en': 'Home', 'ar': 'الرئيسية'},
'services': {'en': 'SERVICES', 'ar': 'الخدمات'},
'mySchedule': {'en': 'My Schedule', 'ar': 'جدولي'},
+ 'schedule': {'en': 'Schedule', 'ar': 'جدول'},
'logout': {'en': 'Logout', 'ar': 'تسجيل خروج'},
'respirationRate': {'en': 'Respiration Rate', 'ar': 'معدل التنفس'},
'bookAppo': {'en': 'Book Appointment', 'ar': 'حجز موعد'},
diff --git a/lib/models/header_model.dart b/lib/models/header_model.dart
index 626d0b3f..f80091f3 100644
--- a/lib/models/header_model.dart
+++ b/lib/models/header_model.dart
@@ -1,16 +1,17 @@
-
-
-class HeaderModel{
+class HeaderModel {
String doctorName;
String doctorImageURL;
List speciality;
String invoiceNo;
String projectName;
- DateTime orderDate;
+ DateTime date;
+ String time;
String nationalityFlagURL;
int doctorRate;
int actualDoctorRate;
+ int totalReviews;
String email;
- HeaderModel(this.doctorName, this.doctorImageURL, this.speciality, this.invoiceNo, this.projectName, this.orderDate, this.nationalityFlagURL, this.doctorRate, this.actualDoctorRate, this.email);
-}
\ No newline at end of file
+ HeaderModel(this.doctorName, this.doctorImageURL, this.speciality, this.invoiceNo, this.projectName, this.date, this.time, this.nationalityFlagURL, this.doctorRate, this.actualDoctorRate,
+ this.totalReviews, this.email);
+}
diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart
index bb80886f..494bbe15 100644
--- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart
+++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart
@@ -21,8 +21,7 @@ class AnicllaryOrdersDetails extends StatefulWidget {
_AnicllaryOrdersState createState() => _AnicllaryOrdersState();
}
-class _AnicllaryOrdersState extends State
- with SingleTickerProviderStateMixin {
+class _AnicllaryOrdersState extends State with SingleTickerProviderStateMixin {
void initState() {
super.initState();
}
@@ -34,8 +33,7 @@ class _AnicllaryOrdersState extends State
@override
Widget build(BuildContext context) {
return BaseView(
- onModelReady: (model) =>
- model.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID),
+ onModelReady: (model) => model.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
@@ -70,9 +68,12 @@ class _AnicllaryOrdersState extends State
label: TranslationBase.of(context).payNow,
backgroundColor: Colors.red[800],
onTap: () {
- Navigator.push(context,
- FadePage(page: OrdersPayment(),
- ),);
+ Navigator.push(
+ context,
+ FadePage(
+ page: OrdersPayment(),
+ ),
+ );
},
)
],
@@ -153,10 +154,7 @@ class _AnicllaryOrdersState extends State
// ),
Texts(" : "),
Texts(
- DateUtil.getFormattedDate(
- DateUtil.convertStringToDate(
- model.ancillaryListsDetails[0].appointmentDate),
- "MMM dd,yyyy"),
+ DateUtil.getFormattedDate(DateUtil.convertStringToDate(model.ancillaryListsDetails[0].appointmentDate), "MMM dd,yyyy"),
)
],
),
@@ -223,50 +221,41 @@ class _AnicllaryOrdersState extends State
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Row(
- children: [
-
- ],
+ children: [],
),
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
-
- children: [
- Texts(
- TranslationBase.of(context).price,
- color: Colors.grey[500],
- fontSize: 14,
- ),
- SizedBox(width: 15),
- Texts(
- TranslationBase.of(context).vat,
- color: Colors.grey[500],
- fontSize: 14,
- ),
- SizedBox(width: 15),
- Texts(
- TranslationBase.of(context).total,
- color: Colors.grey[500],
- fontSize: 14,
- ),
- ] ),
+ Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
+ Texts(
+ TranslationBase.of(context).price,
+ color: Colors.grey[500],
+ fontSize: 14,
+ ),
+ SizedBox(width: 15),
+ Texts(
+ TranslationBase.of(context).vat,
+ color: Colors.grey[500],
+ fontSize: 14,
+ ),
+ SizedBox(width: 15),
+ Texts(
+ TranslationBase.of(context).total,
+ color: Colors.grey[500],
+ fontSize: 14,
+ ),
+ ]),
],
),
Divider(
color: Colors.black26,
),
-
],
));
}
Widget getAncillaryDetails(model) {
- Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList,
- (obj) => obj.procedureCategoryName);
+ Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList, (obj) => obj.procedureCategoryName);
print(newMap);
- return Padding(
- padding: EdgeInsets.only(top: 10, bottom: 10),
- child: getHeaderDetails(newMap));
+ return Padding(padding: EdgeInsets.only(top: 10, bottom: 10), child: getHeaderDetails(newMap));
}
Widget getHeaderDetails(newMap) {
@@ -295,8 +284,7 @@ class _AnicllaryOrdersState extends State
String getTotalValue(value) {
double total = 0.0;
- value.ancillaryListsDetails[0].ancillaryOrderProcDetailsList
- .forEach((result) => {total += result.companyShareWithTax});
+ value.ancillaryListsDetails[0].ancillaryOrderProcDetailsList.forEach((result) => {total += result.companyShareWithTax});
return total.toStringAsFixed(2);
}
@@ -310,10 +298,7 @@ class _AnicllaryOrdersState extends State
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
- Expanded(
- flex: 3,
- child: Text(result.procedureName.toString(),
- overflow: TextOverflow.ellipsis)),
+ Expanded(flex: 3, child: Text(result.procedureName.toString(), overflow: TextOverflow.ellipsis)),
Expanded(child: AppText(result.companyShare.toString())),
Expanded(child: AppText(result.companyTaxAmount.toString())),
Expanded(
@@ -325,6 +310,4 @@ class _AnicllaryOrdersState extends State
}).toList(),
);
}
-
-
}
diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart
index a6708855..a6e490a8 100644
--- a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart
+++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart
@@ -55,10 +55,8 @@ class _OvulationPeriodState extends State {
deliveryDue = selectedDateTime.add(Duration(days: 280));
// babyAge = Jiffy([DateTime.now()]).diff(Jiffy([date]), Units.WEEK);
- babyAgeWeeks = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day])
- .diff(Jiffy([selectedDateTime.year, selectedDateTime.month, dateTo.day]), Units.WEEK);
- babyAgeDays = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day])
- .diff(Jiffy([selectedDateTime.year, selectedDateTime.month, dateTo.day]), Units.DAY);
+ babyAgeWeeks = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day]).diff(Jiffy([selectedDateTime.year, selectedDateTime.month, dateTo.day]), Units.WEEK);
+ babyAgeDays = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day]).diff(Jiffy([selectedDateTime.year, selectedDateTime.month, dateTo.day]), Units.DAY);
});
}
diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart
index 68781795..1eef56c5 100644
--- a/lib/pages/MyAppointments/AppointmentDetails.dart
+++ b/lib/pages/MyAppointments/AppointmentDetails.dart
@@ -2,6 +2,7 @@ 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';
+import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@@ -9,6 +10,7 @@ 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/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
@@ -29,8 +31,7 @@ class AppointmentDetails extends StatefulWidget {
_AppointmentDetailsState createState() => _AppointmentDetailsState();
}
-class _AppointmentDetailsState extends State
- with SingleTickerProviderStateMixin {
+class _AppointmentDetailsState extends State with SingleTickerProviderStateMixin {
static TabController _tabController;
List doctorDetailsList = List();
@@ -56,6 +57,9 @@ class _AppointmentDetailsState extends State
return AppScaffold(
appBarTitle: widget.appo.doctorNameObj,
isShowAppBar: true,
+ showNewAppBar: true,
+ backgroundColor: Color(0xffF8F8F8),
+ showNewAppBarTitle: true,
bottomSheet: AppointmentDetails.showFooterButton
? Container(
width: MediaQuery.of(context).size.width,
@@ -73,15 +77,15 @@ class _AppointmentDetailsState extends State
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: goToBookConfirm,
- child: Text(TranslationBase.of(context).bookNow,
- style: TextStyle(fontSize: 18.0)),
+ child: Text(TranslationBase.of(context).bookNow, style: TextStyle(fontSize: 18.0)),
),
),
)
: null,
body: Container(
- color: new Color(0xFFf6f6f6),
+ color: new Color(0xFFf8f8f8),
child: SingleChildScrollView(
+ physics: BouncingScrollPhysics(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -90,100 +94,99 @@ class _AppointmentDetailsState extends State
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Container(
- margin: EdgeInsets.only(top: 20.0),
- alignment: Alignment.center,
- child: ClipRRect(
- borderRadius: BorderRadius.circular(100.0),
- child: Image.network(widget.appo.doctorImageURL,
- fit: BoxFit.fill, height: 120.0, width: 120.0),
- ),
- ),
- Container(
- margin:
- EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
- alignment: Alignment.center,
- child: Text(
- widget.appo.doctorTitle +
- " " +
- widget.appo.doctorNameObj,
- textAlign: TextAlign.center,
- style: TextStyle(
- fontSize: 20.0,
- color: Colors.grey[900],
- letterSpacing: 1.0)),
- ),
- Container(
- margin: EdgeInsets.only(top: 10.0),
- alignment: Alignment.center,
- child: Text(
- getDoctorSpeciality(widget.appo.doctorSpeciality),
- style: TextStyle(
- fontSize: 12.0,
- color: Colors.grey[900],
- letterSpacing: 1.0)),
- ),
- Container(
- margin: EdgeInsets.only(top: 5.0),
- alignment: Alignment.center,
- child: RatingBar.readOnly(
- initialRating: widget.appo.actualDoctorRate.toDouble(),
- size: 35.0,
- filledColor: Colors.yellow[700],
- emptyColor: Colors.grey[500],
- isHalfAllowed: true,
- halfFilledIcon: Icons.star_half,
- filledIcon: Icons.star,
- emptyIcon: Icons.star,
- ),
- ),
- InkWell(
- onTap: () {
- getDoctorRatingsDetails();
- },
- child: Container(
- margin: EdgeInsets.only(top: 5.0),
- alignment: Alignment.center,
- child: Text(
- "(" +
- widget.appo.noOfPatientsRate.toString() +
- " " +
- TranslationBase.of(context).reviews +
- ")",
- style: TextStyle(
- fontSize: 14.0,
- color: Colors.blue[800],
- letterSpacing: 1.0,
- decoration: TextDecoration.underline,
- )),
- ),
- ),
- 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.substring(0, 5)),
- ),
- Container(
- margin: EdgeInsets.only(top: 10.0),
- child: Divider(
- color: Colors.grey[500],
+ // Container(
+ // margin: EdgeInsets.only(top: 20.0),
+ // alignment: Alignment.center,
+ // child: ClipRRect(
+ // borderRadius: BorderRadius.circular(100.0),
+ // child: Image.network(widget.appo.doctorImageURL, fit: BoxFit.fill, height: 120.0, width: 120.0),
+ // ),
+ // ),
+ // Container(
+ // margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
+ // alignment: Alignment.center,
+ // child:
+ // Text(widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, color: Colors.grey[900], letterSpacing: 1.0)),
+ // ),
+ // Container(
+ // margin: EdgeInsets.only(top: 10.0),
+ // alignment: Alignment.center,
+ // child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality), style: TextStyle(fontSize: 12.0, color: Colors.grey[900], letterSpacing: 1.0)),
+ // ),
+ // Container(
+ // margin: EdgeInsets.only(top: 5.0),
+ // alignment: Alignment.center,
+ // child: RatingBar.readOnly(
+ // initialRating: widget.appo.actualDoctorRate.toDouble(),
+ // size: 35.0,
+ // filledColor: Colors.yellow[700],
+ // emptyColor: Colors.grey[500],
+ // isHalfAllowed: true,
+ // halfFilledIcon: Icons.star_half,
+ // filledIcon: Icons.star,
+ // emptyIcon: Icons.star,
+ // ),
+ // ),
+ // InkWell(
+ // onTap: () {
+ // getDoctorRatingsDetails();
+ // },
+ // child: Container(
+ // margin: EdgeInsets.only(top: 5.0),
+ // alignment: Alignment.center,
+ // child: Text("(" + widget.appo.noOfPatientsRate.toString() + " " + TranslationBase.of(context).reviews + ")",
+ // style: TextStyle(
+ // fontSize: 14.0,
+ // color: Colors.blue[800],
+ // letterSpacing: 1.0,
+ // decoration: TextDecoration.underline,
+ // )),
+ // ),
+ // ),
+ // 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.substring(0, 5)),
+ // ),
+ // Container(
+ // margin: EdgeInsets.only(top: 10.0),
+ // child: Divider(
+ // color: Colors.grey[500],
+ // ),
+ // ),
+ DoctorHeader(
+ headerModel: HeaderModel(
+ widget.appo.doctorTitle + " " + widget.appo.doctorNameObj,
+ widget.appo.doctorImageURL,
+ widget.appo.doctorSpeciality,
+ "",
+ widget.appo.projectName,
+ DateUtil.convertStringToDate(widget.appo.appointmentDate),
+ widget.appo.startTime.substring(0, 5),
+ null,
+ widget.appo.doctorRate,
+ widget.appo.actualDoctorRate,
+ widget.appo.noOfPatientsRate,
+ "",
+ //model.user.emailAddress,
),
+ isNeedToShowButton: _tabController.index == 1,
+ buttonTitle: TranslationBase.of(context).schedule,
+ buttonIcon: 'assets/images/new/Boo_ Appointment.svg',
+ showConfirmMessageDialog: false,
+ onRatingAndReviewTap: getDoctorRatingsDetails,
+ onTap: (){},
),
+ SizedBox(height: 10),
TabBar(
onTap: (index) {
setState(() {
if (index == 1) {
- if (widget.appo.clinicID == 17 ||
- widget.appo.clinicID == 23 ||
- widget.appo.isExecludeDoctor) {
- _tabController.index =
- _tabController.previousIndex;
+ if (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor) {
+ _tabController.index = _tabController.previousIndex;
AppointmentDetails.showFooterButton = false;
} else {
AppointmentDetails.showFooterButton = true;
@@ -192,21 +195,13 @@ class _AppointmentDetailsState extends State
});
},
tabs: [
- Tab(
- child: Text(TranslationBase.of(context).appoActions,
- style: TextStyle(color: Colors.black))),
- widget.appo.clinicID == 17 ||
- widget.appo.clinicID == 23 ||
- widget.appo.isExecludeDoctor
+ Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))),
+ widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor
? Tab(
- child: Text(
- TranslationBase.of(context).availableAppo,
- style: TextStyle(color: Colors.grey)),
+ child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)),
)
: Tab(
- child: Text(
- TranslationBase.of(context).availableAppo,
- style: TextStyle(color: Colors.black)),
+ child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.black)),
)
],
controller: _tabController,
@@ -219,14 +214,8 @@ class _AppointmentDetailsState extends State
child: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
- AppointmentActions(
- appo: widget.appo,
- tabController: _tabController,
- enableFooterButton: enableFooterButton),
- DocAvailableAppointments(
- doctor: getDoctorObject(),
- isLiveCareAppointment:
- widget.appo.isLiveCareAppointment)
+ AppointmentActions(appo: widget.appo, tabController: _tabController, enableFooterButton: enableFooterButton),
+ DocAvailableAppointments(doctor: getDoctorObject(), isLiveCareAppointment: widget.appo.isLiveCareAppointment)
],
controller: _tabController,
),
@@ -262,7 +251,7 @@ class _AppointmentDetailsState extends State
selectedTime: DocAvailableAppointments.selectedTime)));
}
- getDoctorRatingsDetails() {
+ void getDoctorRatingsDetails() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getDoctorsRatingDetails(widget.appo.doctorID, context).then((res) {
@@ -308,27 +297,13 @@ class _AppointmentDetailsState extends State
color: Theme.of(context).primaryColor,
margin: EdgeInsets.only(bottom: 5.0),
padding: EdgeInsets.all(10.0),
- child: Text(
- TranslationBase.of(context).doctorRating,
- style: TextStyle(
- fontSize: 22.0, color: Colors.white))),
- Container(
- margin: EdgeInsets.only(top: 0.0),
- child: Text(
- this
- .widget
- .appo
- .actualDoctorRate
- .ceilToDouble()
- .toString(),
- style: TextStyle(
- fontSize: 32.0, color: Colors.black))),
+ child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.white))),
+ Container(margin: EdgeInsets.only(top: 0.0), child: Text(this.widget.appo.actualDoctorRate.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: RatingBar.readOnly(
- initialRating:
- this.widget.appo.actualDoctorRate.toDouble(),
+ initialRating: this.widget.appo.actualDoctorRate.toDouble(),
size: 35.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
@@ -340,30 +315,19 @@ class _AppointmentDetailsState extends State
),
Container(
margin: EdgeInsets.only(top: 10.0),
- child: Text(
- this.widget.appo.noOfPatientsRate.toString() +
- " " +
- TranslationBase.of(context).reviews,
- style: TextStyle(
- fontSize: 14.0, color: Colors.black))),
+ child: Text(this.widget.appo.noOfPatientsRate.toString() + " " + TranslationBase.of(context).reviews, style: TextStyle(fontSize: 14.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Container(
width: 100.0,
- margin: EdgeInsets.only(
- top: 10.0, left: 15.0, right: 15.0),
- child: Text(
- TranslationBase.of(context).excellent,
- style: TextStyle(
- fontSize: 13.0,
- color: Colors.black))),
+ margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
+ child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
- width: getRatingWidth(
- doctorDetailsList[0].patientNumber),
+ width: getRatingWidth(doctorDetailsList[0].patientNumber),
height: 6.0,
child: Container(
color: Colors.green[700],
@@ -378,18 +342,12 @@ class _AppointmentDetailsState extends State
children: [
Container(
width: 100.0,
- margin: EdgeInsets.only(
- top: 10.0, left: 15.0, right: 15.0),
- child: Text(
- TranslationBase.of(context).v_good,
- style: TextStyle(
- fontSize: 13.0,
- color: Colors.black))),
+ margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
+ child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
- width: getRatingWidth(
- doctorDetailsList[1].patientNumber),
+ width: getRatingWidth(doctorDetailsList[1].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffB7B723),
@@ -404,18 +362,12 @@ class _AppointmentDetailsState extends State
children: [
Container(
width: 100.0,
- margin: EdgeInsets.only(
- top: 10.0, left: 15.0, right: 15.0),
- child: Text(
- TranslationBase.of(context).good,
- style: TextStyle(
- fontSize: 13.0,
- color: Colors.black))),
+ margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
+ child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
- width: getRatingWidth(
- doctorDetailsList[2].patientNumber),
+ width: getRatingWidth(doctorDetailsList[2].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEBA727),
@@ -430,18 +382,12 @@ class _AppointmentDetailsState extends State
children: [
Container(
width: 100.0,
- margin: EdgeInsets.only(
- top: 10.0, left: 15.0, right: 15.0),
- child: Text(
- TranslationBase.of(context).average,
- style: TextStyle(
- fontSize: 13.0,
- color: Colors.black))),
+ margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
+ child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
- width: getRatingWidth(
- doctorDetailsList[3].patientNumber),
+ width: getRatingWidth(doctorDetailsList[3].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEB7227),
@@ -456,19 +402,12 @@ class _AppointmentDetailsState extends State
children: [
Container(
width: 100.0,
- margin: EdgeInsets.only(
- top: 10.0, left: 15.0, right: 15.0),
- child: Text(
- TranslationBase.of(context)
- .below_average,
- style: TextStyle(
- fontSize: 13.0,
- color: Colors.black))),
+ margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
+ child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
- width: getRatingWidth(
- doctorDetailsList[4].patientNumber),
+ width: getRatingWidth(doctorDetailsList[4].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffE20C0C),
@@ -478,9 +417,7 @@ class _AppointmentDetailsState extends State
],
),
),
- Container(
- margin: EdgeInsets.only(top: 40.0),
- child: Divider()),
+ Container(margin: EdgeInsets.only(top: 40.0), child: Divider()),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Align(
@@ -502,9 +439,7 @@ class _AppointmentDetailsState extends State
onPressed: () {
Navigator.of(context).pop();
},
- child: Text(
- TranslationBase.of(context).cancel,
- style: TextStyle(fontSize: 18.0)),
+ child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)),
),
),
),
@@ -532,13 +467,7 @@ class _AppointmentDetailsState extends State
String getDate(String date) {
DateTime dateObj = DateUtil.convertStringToDate(date);
- return DateUtil.getWeekDay(dateObj.weekday) +
- ", " +
- dateObj.day.toString() +
- " " +
- DateUtil.getMonth(dateObj.month) +
- " " +
- dateObj.year.toString();
+ return DateUtil.getWeekDay(dateObj.weekday) + ", " + dateObj.day.toString() + " " + DateUtil.getMonth(dateObj.month) + " " + dateObj.year.toString();
}
String getDoctorSpeciality(List docSpecial) {
diff --git a/lib/pages/MyAppointments/models/ArrivedButtons.dart b/lib/pages/MyAppointments/models/ArrivedButtons.dart
index dc3ff3f9..302c7211 100644
--- a/lib/pages/MyAppointments/models/ArrivedButtons.dart
+++ b/lib/pages/MyAppointments/models/ArrivedButtons.dart
@@ -6,50 +6,50 @@ class ArrivedButtons {
{
"title": TranslationBase.of(AppGlobal.context).medicines,
"subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle,
- "icon": "assets/images/new-design/medicine_prescriptions_icon.png",
- "caller": "prescriptions"
+ "icon": "medicine_prescription.svg",
+ "caller": "prescriptions",
},
{
"title": TranslationBase.of(AppGlobal.context).radiology,
"subtitle": TranslationBase.of(AppGlobal.context).radiologySubtitle,
- "icon": "assets/images/new-design/radiology_service_icon.png",
- "caller": "radiology"
+ "icon": 'radiology.svg',
+ "caller": "radiology",
},
{
"title": TranslationBase.of(AppGlobal.context).lab,
"subtitle": TranslationBase.of(AppGlobal.context).labSubtitle,
- "icon": "assets/images/new-design/lab_result_icon.png",
- "caller": "labResult"
+ "icon": 'lab_result.svg',
+ "caller": "labResult",
},
{
"title": TranslationBase.of(AppGlobal.context).vitalSigns,
"subtitle": TranslationBase.of(AppGlobal.context).vitalSignsSubtitle,
- "icon": "assets/images/new-design/vital_signs.png",
- "caller": "VitalSigns"
+ "icon": 'vital_signs.svg',
+ "caller": "VitalSigns",
},
{
"title": TranslationBase.of(AppGlobal.context).raise,
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
- "icon": "assets/images/new-design/feedback_icon.png",
- "caller": "insertComplaint"
+ "icon": "raise_comp.svg",
+ "caller": "insertComplaint",
},
{
"title": TranslationBase.of(AppGlobal.context).insuranceApproval,
"subtitle": TranslationBase.of(AppGlobal.context).insuranceSubtitle,
- "icon": "assets/images/new-design/insurance_approvals_icon.png",
- "caller": "Insurance"
+ "icon": 'insurance_approval.svg',
+ "caller": "Insurance",
},
{
"title": TranslationBase.of(AppGlobal.context).askDoctor,
"subtitle": TranslationBase.of(AppGlobal.context).askYourSubtitle,
- "icon": "assets/images/new-design/ask_doctor_icon.png",
- "caller": "askDoc"
+ "icon": 'ask_doctor.svg',
+ "caller": "askDoc",
},
{
"title": TranslationBase.of(AppGlobal.context).appoSurvey,
"subtitle": TranslationBase.of(AppGlobal.context).service,
- "icon": "assets/images/new-design/survey.png",
- "caller": "Survey"
+ "icon": "survey.svg",
+ "caller": "Survey",
}
];
-}
\ No newline at end of file
+}
diff --git a/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart b/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart
index 9548b7c8..a5334f9e 100644
--- a/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart
+++ b/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart
@@ -7,43 +7,43 @@ class BookedButtonsAllowCheckIn {
"title": TranslationBase.of(AppGlobal.context).confirm,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/confirm_icon.png",
- "caller": "confirmAppointment"
+ "caller": "confirmAppointment",
},
{
"title": TranslationBase.of(AppGlobal.context).reschedule,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
- "icon": "assets/images/new-design/reschedule_icon.png",
- "caller": "openReschedule"
+ "icon": "reschedule.svg",
+ "caller": "openReschedule",
},
{
"title": TranslationBase.of(AppGlobal.context).cancel_nocaps,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/cancel_icon.png",
- "caller": "onCancelAppointment"
+ "caller": "onCancelAppointment",
},
{
"title": TranslationBase.of(AppGlobal.context).raise,
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
"icon": "assets/images/new-design/Complaint_icon.png",
- "caller": "insertComplaint"
+ "caller": "insertComplaint",
},
{
"title": TranslationBase.of(AppGlobal.context).add,
"subtitle": TranslationBase.of(AppGlobal.context).reminder,
"icon": "assets/images/new-design/reminder_icon.png",
- "caller": "addReminder"
+ "caller": "addReminder",
},
{
"title": TranslationBase.of(AppGlobal.context).hospital,
"subtitle": TranslationBase.of(AppGlobal.context).location,
"icon": "assets/images/new-design/location_icon.png",
- "caller": "navigateToProject"
+ "caller": "navigateToProject",
},
{
"title": TranslationBase.of(AppGlobal.context).online,
"subtitle": TranslationBase.of(AppGlobal.context).payment,
"icon": "assets/images/new-design/check-in.png",
- "caller": "goToTodoList"
+ "caller": "goToTodoList",
}
];
}
diff --git a/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart b/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart
index 07ba333e..effd3722 100644
--- a/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart
+++ b/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart
@@ -6,38 +6,38 @@ class ConfirmedButtonsAllowCheckIn {
{
"title": TranslationBase.of(AppGlobal.context).reschedule,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
- "icon": "assets/images/new-design/reschedule_icon.png",
- "caller": "openReschedule"
+ "icon": "reschedule.svg",
+ "caller": "openReschedule",
},
{
"title": TranslationBase.of(AppGlobal.context).cancel_nocaps,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/cancel_icon.png",
- "caller": "onCancelAppointment"
+ "caller": "onCancelAppointment",
},
{
"title": TranslationBase.of(AppGlobal.context).raise,
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
- "icon": "assets/images/new-design/Complaint_icon.png",
- "caller": "insertComplaint"
+ "icon": "raise_comp.svg",
+ "caller": "insertComplaint",
},
{
"title": TranslationBase.of(AppGlobal.context).add,
"subtitle": TranslationBase.of(AppGlobal.context).reminder,
"icon": "assets/images/new-design/reminder_icon.png",
- "caller": "addReminder"
+ "caller": "addReminder",
},
{
"title": TranslationBase.of(AppGlobal.context).hospital,
"subtitle": TranslationBase.of(AppGlobal.context).location,
- "icon": "assets/images/new-design/location_icon.png",
- "caller": "navigateToProject"
+ "icon": "hosp_location.svg",
+ "caller": "navigateToProject",
},
{
"title": TranslationBase.of(AppGlobal.context).online,
"subtitle": TranslationBase.of(AppGlobal.context).payment,
- "icon": "assets/images/new-design/check-in.png",
- "caller": "goToTodoList"
+ "icon": "online_payment.svg",
+ "caller": "goToTodoList",
}
];
}
diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart
index ff133d80..2a929f93 100644
--- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart
+++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart
@@ -27,6 +27,7 @@ import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
@@ -41,10 +42,7 @@ class AppointmentActions extends StatefulWidget {
final Function enableFooterButton;
MyInAppBrowser browser;
- AppointmentActions(
- {@required this.appo,
- @required this.tabController,
- @required this.enableFooterButton});
+ AppointmentActions({@required this.appo, @required this.tabController, @required this.enableFooterButton});
@override
_AppointmentActionsState createState() => _AppointmentActionsState();
@@ -66,11 +64,31 @@ class _AppointmentActionsState extends State {
ProjectViewModel projectViewModel = Provider.of(context);
toDoProvider = Provider.of(context);
var size = MediaQuery.of(context).size;
- final double itemHeight = projectViewModel.isArabic
- ? ((size.height - kToolbarHeight - 24) * 0.5) / 2
- : ((size.height - kToolbarHeight - 24) * 0.45) / 2;
+ final double itemHeight = projectViewModel.isArabic ? ((size.height - kToolbarHeight - 24) * 0.5) / 2 : ((size.height - kToolbarHeight - 24) * 0.45) / 2;
final double itemWidth = size.width / 2;
+ return GridView.builder(
+ gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, crossAxisSpacing: 13, mainAxisSpacing: 9),
+ physics: NeverScrollableScrollPhysics(),
+ padding: EdgeInsets.all(21),
+ shrinkWrap: true,
+ itemBuilder: (context, index) {
+ return InkWell(
+ onTap: () {
+ _handleButtonClicks(appoButtonsList[index]);
+ },
+ child: MedicalProfileItem(
+ title: appoButtonsList[index].title,
+ imagePath: appoButtonsList[index].icon,
+ subTitle: appoButtonsList[index].subtitle,
+ hasBadge: true,
+ isEnable: projectViewModel.havePrivilege(5),
+ ),
+ );
+ },
+ itemCount: appoButtonsList.length,
+ );
+
return Container(
margin: EdgeInsets.all(5.0),
child: CustomScrollView(
@@ -90,15 +108,7 @@ class _AppointmentActionsState extends State {
child: Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.only(bottom: 4.0),
- decoration: BoxDecoration(
- boxShadow: [
- BoxShadow(
- color: Colors.grey[400],
- blurRadius: 2.0,
- spreadRadius: 0.0)
- ],
- borderRadius: BorderRadius.circular(10),
- color: Colors.white),
+ decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)], borderRadius: BorderRadius.circular(10), color: Colors.white),
child: Row(
children: [
Expanded(
@@ -107,8 +117,7 @@ class _AppointmentActionsState extends State {
mainAxisSize: MainAxisSize.max,
children: [
Container(
- margin:
- EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 5.0),
+ margin: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 5.0),
child: Texts(
e.title,
color: Color(0xffB8382C),
@@ -117,8 +126,7 @@ class _AppointmentActionsState extends State {
),
),
Container(
- margin:
- EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
+ margin: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
child: Texts(
e.subtitle,
color: Colors.black,
@@ -130,16 +138,9 @@ class _AppointmentActionsState extends State {
),
),
Container(
- alignment: projectViewModel.isArabic
- ? Alignment.bottomLeft
- : Alignment.bottomRight,
- margin: projectViewModel.isArabic
- ? EdgeInsets.fromLTRB(
- 10.0, 7.0, 0.0, 8.0)
- : EdgeInsets.fromLTRB(
- 0.0, 7.0, 10.0, 8.0),
- child: Image.asset(e.icon,
- width: 40.0, height: 40.0),
+ alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
+ margin: projectViewModel.isArabic ? EdgeInsets.fromLTRB(10.0, 7.0, 0.0, 8.0) : EdgeInsets.fromLTRB(0.0, 7.0, 10.0, 8.0),
+ child: Image.asset(e.icon, width: 40.0, height: 40.0),
),
],
),
@@ -181,8 +182,7 @@ class _AppointmentActionsState extends State {
break;
case "navigateToProject":
- openMap(double.parse(widget.appo.latitude),
- double.parse(widget.appo.longitude));
+ openMap(double.parse(widget.appo.latitude), double.parse(widget.appo.longitude));
break;
case "addReminder":
@@ -297,8 +297,7 @@ class _AppointmentActionsState extends State {
Future> _getBookedCheckInAppoActionsList() async {
print("_getBookedCheckInAppoActionsList");
- BookedButtonsAllowCheckIn bookedButtonsAllowCheckIn =
- new BookedButtonsAllowCheckIn();
+ BookedButtonsAllowCheckIn bookedButtonsAllowCheckIn = new BookedButtonsAllowCheckIn();
print(bookedButtonsAllowCheckIn.buttons);
List buttonsList = [];
for (var i = 0; i < bookedButtonsAllowCheckIn.buttons.length; i++) {
@@ -334,8 +333,7 @@ class _AppointmentActionsState extends State {
Future> _getConfirmedCheckInAppoActionsList() async {
print("_getConfirmedAllowCheckInAppoActionsList");
- ConfirmedButtonsAllowCheckIn confirmedButtonsAllowCheckIn =
- new ConfirmedButtonsAllowCheckIn();
+ ConfirmedButtonsAllowCheckIn confirmedButtonsAllowCheckIn = new ConfirmedButtonsAllowCheckIn();
print(confirmedButtonsAllowCheckIn.buttons);
List buttonsList = [];
for (var i = 0; i < confirmedButtonsAllowCheckIn.buttons.length; i++) {
@@ -423,17 +421,12 @@ class _AppointmentActionsState extends State {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
PatientLabOrders patientLabOrders = new PatientLabOrders();
- service
- .getPatientLabOrdersByAppoNo(widget.appo.appointmentNo,
- widget.appo.projectID, widget.appo.clinicID, context)
- .then((res) {
+ service.getPatientLabOrdersByAppoNo(widget.appo.appointmentNo, widget.appo.projectID, widget.appo.clinicID, context).then((res) {
print(res['ListLabResultsByAppNo']);
GifLoaderDialogUtils.hideDialog(context);
if (res['ListLabResultsByAppNo'] != null) {
- patientLabOrders.orderNo =
- res['ListLabResultsByAppNo'][0]['OrderNo'].toString();
- patientLabOrders.invoiceNo =
- res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
+ patientLabOrders.orderNo = res['ListLabResultsByAppNo'][0]['OrderNo'].toString();
+ patientLabOrders.invoiceNo = res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
patientLabOrders.clinicID = widget.appo.clinicID;
patientLabOrders.projectID = widget.appo.projectID.toString();
print(patientLabOrders.invoiceNo);
@@ -453,14 +446,11 @@ class _AppointmentActionsState extends State {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
FinalRadiology finalRadiology = new FinalRadiology();
- service
- .getPatientRadOrders(widget.appo.appointmentNo.toString(), context)
- .then((res) {
+ service.getPatientRadOrders(widget.appo.appointmentNo.toString(), context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['FinalRadiologyList'] != null) {
print(res['FinalRadiologyList']);
- finalRadiology =
- new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
+ finalRadiology = new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
print(finalRadiology.reportData);
navigateToRadiologyDetails(finalRadiology);
} else {
@@ -484,8 +474,7 @@ class _AppointmentActionsState extends State {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
});
print(prescriptionReportEnhList.length);
- navigateToMedicinePrescriptionReport(
- prescriptionReportEnhList, res['ListPRM']);
+ navigateToMedicinePrescriptionReport(prescriptionReportEnhList, res['ListPRM']);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
}
@@ -496,37 +485,20 @@ class _AppointmentActionsState extends State {
});
}
- Future navigateToMedicinePrescriptionReport(
- List prescriptionReportEnhList,
- dynamic listPres) async {
- Navigator.push(
- context,
- FadePage(
- page: PrescriptionReportPage(
- prescriptionReportEnhList: prescriptionReportEnhList,
- listPres: listPres,
- appo: widget.appo)));
+ Future navigateToMedicinePrescriptionReport(List prescriptionReportEnhList, dynamic listPres) async {
+ Navigator.push(context, FadePage(page: PrescriptionReportPage(prescriptionReportEnhList: prescriptionReportEnhList, listPres: listPres, appo: widget.appo)));
}
Future navigateToLabResults(PatientLabOrders patientLabOrders) async {
- Navigator.push(
- context,
- FadePage(
- page: LaboratoryResultPage(patientLabOrders: patientLabOrders)))
- .then((value) {});
+ Navigator.push(context, FadePage(page: LaboratoryResultPage(patientLabOrders: patientLabOrders))).then((value) {});
}
Future navigateToRadiologyDetails(FinalRadiology finalRadiology) async {
- Navigator.push(
- context,
- FadePage(
- page: RadiologyDetailsPage(finalRadiology: finalRadiology)))
- .then((value) {});
+ Navigator.push(context, FadePage(page: RadiologyDetailsPage(finalRadiology: finalRadiology))).then((value) {});
}
static Future openMap(double latitude, double longitude) async {
- String googleUrl =
- 'https://www.google.com/maps/search/?api=1&query=$latitude,$longitude';
+ String googleUrl = 'https://www.google.com/maps/search/?api=1&query=$latitude,$longitude';
if (await canLaunch(googleUrl)) {
await launch(googleUrl);
} else {
@@ -546,10 +518,7 @@ class _AppointmentActionsState extends State {
child: ReminderDialog(
eventId: appo.appointmentNo.toString(),
title: "Doctor Appointment",
- description: "You have an appointment with " +
- appo.doctorTitle +
- " " +
- appo.doctorNameObj,
+ description: "You have an appointment with " + appo.doctorTitle + " " + appo.doctorNameObj,
startDate: appo.appointmentDate,
endDate: appo.appointmentDate,
location: appo.projectName,
@@ -573,8 +542,7 @@ class _AppointmentActionsState extends State {
if (res['PatientDoctorAppointmentResultList'].length != 0) {
getCallRequestType();
} else {
- AppToast.showErrorToast(
- message: TranslationBase.of(context).askDocNotAllowed);
+ AppToast.showErrorToast(message: TranslationBase.of(context).askDocNotAllowed);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@@ -605,11 +573,9 @@ class _AppointmentActionsState extends State {
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
- final curvedValue =
- Curves.easeInOutBack.transform(a1.value) - 1.0;
+ final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
- transform:
- Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
+ transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: AskDocDialog(requestData: requestData),
@@ -633,9 +599,7 @@ class _AppointmentActionsState extends State {
sendAskDocRequest(int requestType) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
- service
- .sendAskDocCallRequest(widget.appo, requestType.toString(), context)
- .then((res) {
+ service.sendAskDocCallRequest(widget.appo, requestType.toString(), context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Request Sent Successfully");
@@ -652,10 +616,7 @@ class _AppointmentActionsState extends State {
confirmAppointment() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
- service
- .confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID,
- widget.appo.projectID, widget.appo.isLiveCareAppointment, context)
- .then((res) {
+ service.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID, widget.appo.projectID, widget.appo.isLiveCareAppointment, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
@@ -670,8 +631,7 @@ class _AppointmentActionsState extends State {
}
navigateToInsuranceApprovals(int appoNo) {
- Navigator.push(
- context, FadePage(page: InsuranceApproval(appointmentNo: appoNo)));
+ Navigator.push(context, FadePage(page: InsuranceApproval(appointmentNo: appoNo)));
}
navigateToVitalSigns(int appoNo, int projectID) {
@@ -686,15 +646,17 @@ class _AppointmentActionsState extends State {
}
navigateToInsertComplaint() {
- Navigator.push(context, FadePage(page: FeedbackHomePage(messageType: MessageType.ComplaintOnAnAppointment,appointment: widget.appo,)));
+ Navigator.push(
+ context,
+ FadePage(
+ page: FeedbackHomePage(
+ messageType: MessageType.ComplaintOnAnAppointment,
+ appointment: widget.appo,
+ )));
}
rateAppointment() {
widget.browser = new MyInAppBrowser();
- widget.browser.openBrowser('http://hmg.com/SitePages/pso.aspx?p=' +
- widget.appo.projectID.toString() +
- '.' +
- widget.appo.appointmentNo.toString() +
- '&c=1');
+ widget.browser.openBrowser('http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1');
}
}
diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart
index 4b57f364..d46676c3 100644
--- a/lib/pages/medical/prescriptions/prescription_items_page.dart
+++ b/lib/pages/medical/prescriptions/prescription_items_page.dart
@@ -53,9 +53,11 @@ class PrescriptionItemsPage extends StatelessWidget {
"",
prescriptions.name,
DateUtil.convertStringToDate(prescriptions.appointmentDate),
+ null,
prescriptions.nationalityFlagURL,
prescriptions.doctorRate,
prescriptions.actualDoctorRate,
+ prescriptions.noOfPatientsRate,
model.user.emailAddress,
),
isNeedToShowButton: projectViewModel.havePrivilege(13),
diff --git a/lib/pages/medical/radiology/radiology_details_page.dart b/lib/pages/medical/radiology/radiology_details_page.dart
index 0441d3c1..951c9709 100644
--- a/lib/pages/medical/radiology/radiology_details_page.dart
+++ b/lib/pages/medical/radiology/radiology_details_page.dart
@@ -41,8 +41,20 @@ class RadiologyDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
DoctorHeader(
- headerModel: new HeaderModel(finalRadiology.doctorName, finalRadiology.doctorImageURL, finalRadiology.speciality, finalRadiology.invoiceNo.toString(), finalRadiology.projectName,
- finalRadiology.orderDate, finalRadiology.nationalityFlagURL, finalRadiology.doctorRate, finalRadiology.actualDoctorRate, model.user.emailAddress),
+ headerModel: new HeaderModel(
+ finalRadiology.doctorName,
+ finalRadiology.doctorImageURL,
+ finalRadiology.speciality,
+ finalRadiology.invoiceNo.toString(),
+ finalRadiology.projectName,
+ finalRadiology.orderDate,
+ null,
+ finalRadiology.nationalityFlagURL,
+ finalRadiology.doctorRate,
+ finalRadiology.actualDoctorRate,
+ finalRadiology.noOfPatientsRate,
+ model.user.emailAddress,
+ ),
onTap: () {
showConfirmMessage(finalRadiology: finalRadiology, model: model);
},
diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart
index 8e1234d8..0767ac4d 100644
--- a/lib/uitl/translations_delegate_base.dart
+++ b/lib/uitl/translations_delegate_base.dart
@@ -38,6 +38,8 @@ class TranslationBase {
String get mySchedule => localizedValues['mySchedule'][locale.languageCode];
+ String get schedule => localizedValues['schedule'][locale.languageCode];
+
String get replay2 => localizedValues['replay2'][locale.languageCode];
String get logout => localizedValues['logout'][locale.languageCode];
@@ -1185,6 +1187,8 @@ class TranslationBase {
String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode];
+ String get invoiceDate => localizedValues['InvoiceDate'][locale.languageCode];
+
String get specialResult => localizedValues['SpecialResult'][locale.languageCode];
String get generalResult => localizedValues['GeneralResult'][locale.languageCode];
diff --git a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart
index 880be43c..c646c1f5 100644
--- a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart
+++ b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart
@@ -60,9 +60,11 @@ class _LaboratoryResultWidgetState extends State {
widget.billNo,
widget.patientLabOrder.projectName,
widget.patientLabOrder.orderDate,
+ null,
widget.patientLabOrder.nationalityFlagURL,
widget.patientLabOrder.doctorRate,
widget.patientLabOrder.actualDoctorRate,
+ widget.patientLabOrder.noOfPatientsRate,
model.user.emailAddress),
onTap: widget.onTap,
),
diff --git a/lib/widgets/data_display/medical/doctor_card.dart b/lib/widgets/data_display/medical/doctor_card.dart
index e60632d1..8e320c66 100644
--- a/lib/widgets/data_display/medical/doctor_card.dart
+++ b/lib/widgets/data_display/medical/doctor_card.dart
@@ -58,10 +58,10 @@ class DoctorCard extends StatelessWidget {
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: isLiveCareAppointment
- ? Color(0xff404545)
+ ? Color(0xff2E303A)
: !isInOutPatient
- ? Colors.red[900]
- : Theme.of(context).primaryColor,
+ ? Color(0xffD02127)
+ : Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10),
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10),
@@ -161,14 +161,12 @@ class DoctorCard extends StatelessWidget {
// todo 'sikander' move this widget to separate file
Widget myRichText(String title, String value) {
return RichText(
- text: TextSpan(
- text: title,
- style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10),
- children: [
- TextSpan(
- text: " $value",
- style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
- )
- ]),
+ maxLines: 1,
+ text: TextSpan(text: title, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10), children: [
+ TextSpan(
+ text: " $value",
+ style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
+ )
+ ]),
);
-}
\ No newline at end of file
+}
diff --git a/lib/widgets/data_display/medical/medical_profile_item.dart b/lib/widgets/data_display/medical/medical_profile_item.dart
index fb017e04..99dd937a 100644
--- a/lib/widgets/data_display/medical/medical_profile_item.dart
+++ b/lib/widgets/data_display/medical/medical_profile_item.dart
@@ -33,7 +33,7 @@ class MedicalProfileItem extends StatelessWidget {
height: double.infinity,
width: double.infinity,
margin: EdgeInsets.all(0),
- decoration: containerColorRadiusBorderWidth(Colors.white, 20, CustomColors.pharmacyGreyColor, 1),
+ decoration: containerColorRadiusBorderWidth(Colors.white, 15, CustomColors.pharmacyGreyColor, 1),
clipBehavior: Clip.antiAlias,
child: Stack(
children: [
diff --git a/lib/widgets/new_design/doctor_header.dart b/lib/widgets/new_design/doctor_header.dart
index d37417ec..bb4a06f9 100644
--- a/lib/widgets/new_design/doctor_header.dart
+++ b/lib/widgets/new_design/doctor_header.dart
@@ -13,10 +13,22 @@ import 'package:rating_bar/rating_bar.dart';
class DoctorHeader extends StatelessWidget {
final HeaderModel headerModel;
final VoidCallback onTap;
+ final VoidCallback onRatingAndReviewTap;
+ final bool showConfirmMessageDialog;
final String buttonTitle;
+ final String buttonIcon;
final bool isNeedToShowButton;
- DoctorHeader({Key key, @required this.headerModel, @required this.buttonTitle, @required this.onTap, this.isNeedToShowButton = true}) : super(key: key);
+ DoctorHeader(
+ {Key key,
+ @required this.headerModel,
+ @required this.buttonTitle,
+ @required this.onTap,
+ this.isNeedToShowButton = true,
+ this.buttonIcon,
+ this.showConfirmMessageDialog = true,
+ this.onRatingAndReviewTap})
+ : super(key: key);
@override
Widget build(BuildContext context) {
@@ -59,11 +71,11 @@ class DoctorHeader extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
- DateUtil.formatDateToDate(headerModel.orderDate),
+ DateUtil.formatDateToDate(headerModel.date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
Text(
- DateUtil.formatDateToTime(headerModel.orderDate),
+ headerModel.time ?? DateUtil.formatDateToTime(headerModel.date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
// Padding(
@@ -78,32 +90,45 @@ class DoctorHeader extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- SizedBox(width: 21),
- RatingBar.readOnly(
- initialRating: headerModel.doctorRate + 0.0,
- size: 15.0,
- filledColor: Color(0XFFD02127),
- emptyColor: Color(0XFFD02127),
- isHalfAllowed: true,
- halfFilledIcon: Icons.star_half,
- filledIcon: Icons.star,
- emptyIcon: Icons.star_border,
- ),
- SizedBox(width: 6),
- Text(
- "${headerModel.actualDoctorRate} ${TranslationBase.of(context).reviews}",
- style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
- ),
- ],
+ InkWell(
+ onTap: onRatingAndReviewTap,
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ SizedBox(width: 21),
+ RatingBar.readOnly(
+ initialRating: headerModel.actualDoctorRate + 0.0,
+ size: 15.0,
+ filledColor: Color(0XFFD02127),
+ emptyColor: Color(0XFFD02127),
+ isHalfAllowed: true,
+ halfFilledIcon: Icons.star_half,
+ filledIcon: Icons.star,
+ emptyIcon: Icons.star_border,
+ ),
+ SizedBox(width: 6),
+ Text(
+ "${headerModel.totalReviews} ${TranslationBase.of(context).reviews}",
+ style: TextStyle(
+ fontSize: 12,
+ fontWeight: FontWeight.w600,
+ color: Color(0xff2B353E),
+ letterSpacing: -0.48,
+ height: 18 / 12,
+ decoration: onRatingAndReviewTap != null ? TextDecoration.underline : null,
+ ),
+ ),
+ ],
+ ),
),
isNeedToShowButton
? InkWell(
onTap: () {
- showConfirmMessage(context, onTap, headerModel.email);
+ if (showConfirmMessageDialog)
+ showConfirmMessage(context, onTap, headerModel.email);
+ else
+ onTap();
},
child: Container(
padding: EdgeInsets.only(top: 10, bottom: 10, right: 21, left: 15),
@@ -111,7 +136,7 @@ class DoctorHeader extends StatelessWidget {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
- SvgPicture.asset('assets/images/new/email.svg', width: 19.0),
+ SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0),
SizedBox(width: 6),
Text(
buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle,