Appointment screen Changes & improvements.

merge-requests/390/head
Sikander Saleem 5 years ago
parent 3f29bbd6b3
commit 5ab9dd1761

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30.973" height="26.747" viewBox="0 0 30.973 26.747">
<g id="Line" transform="translate(-2 -5.002)">
<path id="Path_4585" data-name="Path 4585" d="M2.7,35.894H32.269a.7.7,0,0,0,.7-.7V30.263a.7.7,0,0,0-.7-.7H30.861a2.112,2.112,0,1,1,0-4.224h1.408a.7.7,0,0,0,.7-.7V19.7a.7.7,0,0,0-.7-.7H2.7a.7.7,0,0,0-.7.7v4.927a.7.7,0,0,0,.7.7H4.112a2.112,2.112,0,0,1,0,4.224H2.7a.7.7,0,0,0-.7.7V35.19a.7.7,0,0,0,.7.7ZM23.118,22.52a.7.7,0,1,1,1.408,0v1.408a.7.7,0,0,1-1.408,0Zm0,4.224a.7.7,0,1,1,1.408,0v1.408a.7.7,0,0,1-1.408,0Zm0,4.224a.7.7,0,1,1,1.408,0v1.408a.7.7,0,1,1-1.408,0ZM11.151,23.224H19.6a.7.7,0,1,1,0,1.408H11.151a.7.7,0,1,1,0-1.408Zm0,3.52H19.6a.7.7,0,0,1,0,1.408H11.151a.7.7,0,1,1,0-1.408Zm0,3.52H19.6a.7.7,0,0,1,0,1.408H11.151a.7.7,0,0,1,0-1.408Z" transform="translate(0 -4.144)" fill="#28323a"/>
<path id="Path_4586" data-name="Path 4586" d="M8.428,5.437,6.556,9.992a.662.662,0,0,0,0,.542.7.7,0,0,0,.38.38l1.323.535a2.112,2.112,0,0,1,1.281,2H29.722L9.35,5.057a.7.7,0,0,0-.922.38Z" transform="translate(-1.332)" fill="#28323a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="21.959" height="28.681" viewBox="0 0 21.959 28.681">
<g id="place_2_" data-name="place (2)" transform="translate(-60)">
<g id="Group_7415" data-name="Group 7415" transform="translate(60)">
<path id="Path_4580" data-name="Path 4580" d="M70.979,0a10.975,10.975,0,0,0-8.749,17.615L70.5,28.681h.954l8.272-11.067A10.98,10.98,0,0,0,70.979,0Zm0,14.621a3.641,3.641,0,1,1,3.641-3.641A3.645,3.645,0,0,1,70.979,14.621Z" transform="translate(-60)" fill="#2b353e"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 535 B

@ -0,0 +1,29 @@
<svg xmlns="http://www.w3.org/2000/svg" width="31" height="22.071" viewBox="0 0 31 22.071">
<g id="credit-card_2_" data-name="credit-card (2)" transform="translate(0 -55.05)">
<g id="Group_7417" data-name="Group 7417" transform="translate(0 55.05)">
<g id="Group_7416" data-name="Group 7416" transform="translate(0 0)">
<path id="Path_4581" data-name="Path 4581" d="M24.7,55.05H1.791A1.818,1.818,0,0,0,0,56.881v14.09a1.775,1.775,0,0,0,1.791,1.751h.928V61.231a3.4,3.4,0,0,1,3.415-3.383H26.477v-.968A1.8,1.8,0,0,0,24.7,55.05Z" transform="translate(0 -55.05)" fill="#28323a"/>
</g>
</g>
<g id="Group_7419" data-name="Group 7419" transform="translate(21.863 71.291)">
<g id="Group_7418" data-name="Group 7418" transform="translate(0 0)">
<path id="Path_4582" data-name="Path 4582" d="M278.733,258.462a1.282,1.282,0,0,0-1.807.16.848.848,0,0,1-.12.12.8.8,0,0,1-1.128-.12,1.288,1.288,0,1,0-.984,2.111,1.251,1.251,0,0,0,.992-.464.794.794,0,0,1,.616-.288.773.773,0,0,1,.616.28,1.114,1.114,0,0,0,.168.168,1.283,1.283,0,1,0,1.647-1.967Z" transform="translate(-273.399 -258.15)" fill="#28323a"/>
</g>
</g>
<g id="Group_7421" data-name="Group 7421" transform="translate(4.318 59.448)">
<g id="Group_7420" data-name="Group 7420" transform="translate(0 0)">
<path id="Path_4583" data-name="Path 4583" d="M78.734,110.049H55.815A1.8,1.8,0,0,0,54,111.833v1.176H80.557v-1.176A1.8,1.8,0,0,0,78.734,110.049Z" transform="translate(-54 -110.049)" fill="#28323a"/>
</g>
</g>
<g id="Group_7423" data-name="Group 7423" transform="translate(4.318 64.006)">
<g id="Group_7422" data-name="Group 7422">
<rect id="Rectangle_17400" data-name="Rectangle 17400" width="27" height="2" transform="translate(-0.318 0.044)" fill="#28323a"/>
</g>
</g>
<g id="Group_7425" data-name="Group 7425" transform="translate(4.318 67.685)">
<g id="Group_7424" data-name="Group 7424" transform="translate(0 0)">
<path id="Path_4584" data-name="Path 4584" d="M54,213.05v7.6a1.828,1.828,0,0,0,1.815,1.831h22.91a1.84,1.84,0,0,0,1.823-1.831v-7.6Zm24.462,6.509a2.894,2.894,0,0,1-4.014.776,2.85,2.85,0,0,1-1.615.5,2.891,2.891,0,0,1,0-5.782,2.85,2.85,0,0,1,1.615.5,2.891,2.891,0,0,1,4.014,4.014Z" transform="translate(-54 -213.05)" fill="#28323a"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28.5" height="24.229" viewBox="0 0 28.5 24.229">
<path id="Path_4503" data-name="Path 4503" d="M28.249,59.946,15.745,39.21a1.746,1.746,0,0,0-2.991,0L.251,59.946a1.746,1.746,0,0,0,1.5,2.648H26.754a1.746,1.746,0,0,0,1.5-2.648ZM14.259,45.538a1.183,1.183,0,0,1,1.326,1.123c0,2.191-.258,5.34-.258,7.531,0,.571-.626.81-1.068.81-.589,0-1.086-.239-1.086-.81,0-2.191-.258-5.34-.258-7.531C12.915,45.943,13.5,45.538,14.259,45.538Zm.018,13.57a1.418,1.418,0,1,1,1.4-1.418A1.439,1.439,0,0,1,14.278,59.108Z" transform="translate(0 -38.365)" fill="#28323a"/>
</svg>

After

Width:  |  Height:  |  Size: 599 B

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="25.689" height="25.695" viewBox="0 0 25.689 25.695">
<g id="Group_7427" data-name="Group 7427" transform="translate(-0.002 0.002)">
<path id="Subtraction_2" data-name="Subtraction 2" d="M20640.422,21049.7h-19.064a3.317,3.317,0,0,1-3.312-3.312v-17.062a3.315,3.315,0,0,1,3.313-3.309h2.3v-1.209a.806.806,0,0,1,1.611,0v1.209h11.236v-1.209a.8.8,0,0,1,1.607,0v1.209h2.307a3.315,3.315,0,0,1,3.313,3.309v17.063A3.317,3.317,0,0,1,20640.422,21049.7Zm-13.744-4.977,0,0a5.611,5.611,0,0,0,9.438-1.666l-1.3-.508a4.219,4.219,0,0,1-7.322.957h1.385v-1.406h-3.6v3.916h1.406v-1.295Zm6.223-6.135V21040h3.6v-3.914h-1.406v1.221a5.615,5.615,0,0,0-9.439,1.668l1.3.508a4.189,4.189,0,0,1,3.924-2.674,4.233,4.233,0,0,1,3.451,1.787h-1.437Zm-13.25-5.752c-.033,0-.051,0-.061.018s0,.047.02.086a.391.391,0,0,1,.041.15v.148c.037.025,6.074.037,11.734.037,5.17,0,10.705-.01,10.744-.037v-.148a.38.38,0,0,1,.033-.137l.006-.014c.018-.039.027-.068.018-.088s-.025-.016-.057-.016Z" transform="translate(-20618.043 -21024.008)" fill="#28323a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -0,0 +1,4 @@
<svg id="survey_1_" data-name="survey (1)" xmlns="http://www.w3.org/2000/svg" width="27.787" height="27.787" viewBox="0 0 27.787 27.787">
<path id="Path_4575" data-name="Path 4575" d="M196.632,144h-5.669a10.809,10.809,0,0,1,.079,1.3,10.678,10.678,0,0,1-1.142,4.816l1.223,1.223,2.111-2.111a.814.814,0,0,1,1.151,1.151l-2.111,2.111,2.111,2.111a.814.814,0,1,1-1.151,1.151l-2.111-2.111-2.111,2.111a.814.814,0,1,1-1.151-1.151l2.111-2.111-.941-.941a10.746,10.746,0,0,1-8.03,4.471V158.6a2.336,2.336,0,0,0,2.334,2.334h9.621l4.77,2.919a.814.814,0,0,0,1.239-.694V146.334A2.337,2.337,0,0,0,196.632,144Z" transform="translate(-171.179 -136.185)" fill="#28323a"/>
<path id="Path_4576" data-name="Path 4576" d="M18.235,9.118A9.118,9.118,0,1,0,1.387,13.952L.051,17.567A.814.814,0,0,0,1.1,18.613l3.809-1.408a9.12,9.12,0,0,0,13.33-8.088ZM13.357,7.441l-4.1,4.1a.814.814,0,0,1-1.151,0L5.964,9.395A.814.814,0,0,1,7.115,8.244L8.683,9.812,12.205,6.29a.814.814,0,0,1,1.151,1.151Z" fill="#28323a"/>
</svg>

After

Width:  |  Height:  |  Size: 985 B

@ -37,6 +37,7 @@ const Map localizedValues = {
'home': {'en': 'Home', 'ar': 'الرئيسية'}, 'home': {'en': 'Home', 'ar': 'الرئيسية'},
'services': {'en': 'SERVICES', 'ar': 'الخدمات'}, 'services': {'en': 'SERVICES', 'ar': 'الخدمات'},
'mySchedule': {'en': 'My Schedule', 'ar': 'جدولي'}, 'mySchedule': {'en': 'My Schedule', 'ar': 'جدولي'},
'schedule': {'en': 'Schedule', 'ar': 'جدول'},
'logout': {'en': 'Logout', 'ar': 'تسجيل خروج'}, 'logout': {'en': 'Logout', 'ar': 'تسجيل خروج'},
'respirationRate': {'en': 'Respiration Rate', 'ar': 'معدل التنفس'}, 'respirationRate': {'en': 'Respiration Rate', 'ar': 'معدل التنفس'},
'bookAppo': {'en': 'Book Appointment', 'ar': 'حجز موعد'}, 'bookAppo': {'en': 'Book Appointment', 'ar': 'حجز موعد'},

@ -1,16 +1,17 @@
class HeaderModel {
class HeaderModel{
String doctorName; String doctorName;
String doctorImageURL; String doctorImageURL;
List<String> speciality; List<String> speciality;
String invoiceNo; String invoiceNo;
String projectName; String projectName;
DateTime orderDate; DateTime date;
String time;
String nationalityFlagURL; String nationalityFlagURL;
int doctorRate; int doctorRate;
int actualDoctorRate; int actualDoctorRate;
int totalReviews;
String email; String email;
HeaderModel(this.doctorName, this.doctorImageURL, this.speciality, this.invoiceNo, this.projectName, this.orderDate, this.nationalityFlagURL, this.doctorRate, this.actualDoctorRate, this.email); 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);
} }

@ -21,8 +21,7 @@ class AnicllaryOrdersDetails extends StatefulWidget {
_AnicllaryOrdersState createState() => _AnicllaryOrdersState(); _AnicllaryOrdersState createState() => _AnicllaryOrdersState();
} }
class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
void initState() { void initState() {
super.initState(); super.initState();
} }
@ -34,8 +33,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<AnciallryOrdersViewModel>( return BaseView<AnciallryOrdersViewModel>(
onModelReady: (model) => onModelReady: (model) => model.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID),
model.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
@ -70,9 +68,12 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
label: TranslationBase.of(context).payNow, label: TranslationBase.of(context).payNow,
backgroundColor: Colors.red[800], backgroundColor: Colors.red[800],
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(
FadePage(page: OrdersPayment(), context,
),); FadePage(
page: OrdersPayment(),
),
);
}, },
) )
], ],
@ -153,10 +154,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
// ), // ),
Texts(" : "), Texts(" : "),
Texts( Texts(
DateUtil.getFormattedDate( DateUtil.getFormattedDate(DateUtil.convertStringToDate(model.ancillaryListsDetails[0].appointmentDate), "MMM dd,yyyy"),
DateUtil.convertStringToDate(
model.ancillaryListsDetails[0].appointmentDate),
"MMM dd,yyyy"),
) )
], ],
), ),
@ -223,50 +221,41 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
Row( Row(
children: [ children: [],
],
), ),
Row( Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
mainAxisAlignment: MainAxisAlignment.spaceEvenly, Texts(
TranslationBase.of(context).price,
children: [ color: Colors.grey[500],
Texts( fontSize: 14,
TranslationBase.of(context).price, ),
color: Colors.grey[500], SizedBox(width: 15),
fontSize: 14, Texts(
), TranslationBase.of(context).vat,
SizedBox(width: 15), color: Colors.grey[500],
Texts( fontSize: 14,
TranslationBase.of(context).vat, ),
color: Colors.grey[500], SizedBox(width: 15),
fontSize: 14, Texts(
), TranslationBase.of(context).total,
SizedBox(width: 15), color: Colors.grey[500],
Texts( fontSize: 14,
TranslationBase.of(context).total, ),
color: Colors.grey[500], ]),
fontSize: 14,
),
] ),
], ],
), ),
Divider( Divider(
color: Colors.black26, color: Colors.black26,
), ),
], ],
)); ));
} }
Widget getAncillaryDetails(model) { Widget getAncillaryDetails(model) {
Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList, Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList, (obj) => obj.procedureCategoryName);
(obj) => obj.procedureCategoryName);
print(newMap); print(newMap);
return Padding( return Padding(padding: EdgeInsets.only(top: 10, bottom: 10), child: getHeaderDetails(newMap));
padding: EdgeInsets.only(top: 10, bottom: 10),
child: getHeaderDetails(newMap));
} }
Widget getHeaderDetails(newMap) { Widget getHeaderDetails(newMap) {
@ -295,8 +284,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
String getTotalValue(value) { String getTotalValue(value) {
double total = 0.0; double total = 0.0;
value.ancillaryListsDetails[0].ancillaryOrderProcDetailsList value.ancillaryListsDetails[0].ancillaryOrderProcDetailsList.forEach((result) => {total += result.companyShareWithTax});
.forEach((result) => {total += result.companyShareWithTax});
return total.toStringAsFixed(2); return total.toStringAsFixed(2);
} }
@ -310,10 +298,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
Expanded( Expanded(flex: 3, child: Text(result.procedureName.toString(), overflow: TextOverflow.ellipsis)),
flex: 3,
child: Text(result.procedureName.toString(),
overflow: TextOverflow.ellipsis)),
Expanded(child: AppText(result.companyShare.toString())), Expanded(child: AppText(result.companyShare.toString())),
Expanded(child: AppText(result.companyTaxAmount.toString())), Expanded(child: AppText(result.companyTaxAmount.toString())),
Expanded( Expanded(
@ -325,6 +310,4 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
}).toList(), }).toList(),
); );
} }
} }

@ -55,10 +55,8 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
deliveryDue = selectedDateTime.add(Duration(days: 280)); deliveryDue = selectedDateTime.add(Duration(days: 280));
// babyAge = Jiffy([DateTime.now()]).diff(Jiffy([date]), Units.WEEK); // babyAge = Jiffy([DateTime.now()]).diff(Jiffy([date]), Units.WEEK);
babyAgeWeeks = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day]) babyAgeWeeks = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day]).diff(Jiffy([selectedDateTime.year, selectedDateTime.month, dateTo.day]), Units.WEEK);
.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);
babyAgeDays = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day])
.diff(Jiffy([selectedDateTime.year, selectedDateTime.month, dateTo.day]), Units.DAY);
}); });
} }

@ -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/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -29,8 +31,7 @@ class AppointmentDetails extends StatefulWidget {
_AppointmentDetailsState createState() => _AppointmentDetailsState(); _AppointmentDetailsState createState() => _AppointmentDetailsState();
} }
class _AppointmentDetailsState extends State<AppointmentDetails> class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
static TabController _tabController; static TabController _tabController;
List<DoctorRateDetails> doctorDetailsList = List(); List<DoctorRateDetails> doctorDetailsList = List();
@ -56,6 +57,9 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
return AppScaffold( return AppScaffold(
appBarTitle: widget.appo.doctorNameObj, appBarTitle: widget.appo.doctorNameObj,
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
backgroundColor: Color(0xffF8F8F8),
showNewAppBarTitle: true,
bottomSheet: AppointmentDetails.showFooterButton bottomSheet: AppointmentDetails.showFooterButton
? Container( ? Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
@ -73,15 +77,15 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), disabledColor: new Color(0xFFbcc2c4),
onPressed: goToBookConfirm, onPressed: goToBookConfirm,
child: Text(TranslationBase.of(context).bookNow, child: Text(TranslationBase.of(context).bookNow, style: TextStyle(fontSize: 18.0)),
style: TextStyle(fontSize: 18.0)),
), ),
), ),
) )
: null, : null,
body: Container( body: Container(
color: new Color(0xFFf6f6f6), color: new Color(0xFFf8f8f8),
child: SingleChildScrollView( child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -90,100 +94,99 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( // Container(
margin: EdgeInsets.only(top: 20.0), // margin: EdgeInsets.only(top: 20.0),
alignment: Alignment.center, // alignment: Alignment.center,
child: ClipRRect( // child: ClipRRect(
borderRadius: BorderRadius.circular(100.0), // borderRadius: BorderRadius.circular(100.0),
child: Image.network(widget.appo.doctorImageURL, // child: Image.network(widget.appo.doctorImageURL, fit: BoxFit.fill, height: 120.0, width: 120.0),
fit: BoxFit.fill, height: 120.0, width: 120.0), // ),
), // ),
), // Container(
Container( // margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
margin: // alignment: Alignment.center,
EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), // child:
alignment: Alignment.center, // Text(widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, color: Colors.grey[900], letterSpacing: 1.0)),
child: Text( // ),
widget.appo.doctorTitle + // Container(
" " + // margin: EdgeInsets.only(top: 10.0),
widget.appo.doctorNameObj, // alignment: Alignment.center,
textAlign: TextAlign.center, // child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality), style: TextStyle(fontSize: 12.0, color: Colors.grey[900], letterSpacing: 1.0)),
style: TextStyle( // ),
fontSize: 20.0, // Container(
color: Colors.grey[900], // margin: EdgeInsets.only(top: 5.0),
letterSpacing: 1.0)), // alignment: Alignment.center,
), // child: RatingBar.readOnly(
Container( // initialRating: widget.appo.actualDoctorRate.toDouble(),
margin: EdgeInsets.only(top: 10.0), // size: 35.0,
alignment: Alignment.center, // filledColor: Colors.yellow[700],
child: Text( // emptyColor: Colors.grey[500],
getDoctorSpeciality(widget.appo.doctorSpeciality), // isHalfAllowed: true,
style: TextStyle( // halfFilledIcon: Icons.star_half,
fontSize: 12.0, // filledIcon: Icons.star,
color: Colors.grey[900], // emptyIcon: Icons.star,
letterSpacing: 1.0)), // ),
), // ),
Container( // InkWell(
margin: EdgeInsets.only(top: 5.0), // onTap: () {
alignment: Alignment.center, // getDoctorRatingsDetails();
child: RatingBar.readOnly( // },
initialRating: widget.appo.actualDoctorRate.toDouble(), // child: Container(
size: 35.0, // margin: EdgeInsets.only(top: 5.0),
filledColor: Colors.yellow[700], // alignment: Alignment.center,
emptyColor: Colors.grey[500], // child: Text("(" + widget.appo.noOfPatientsRate.toString() + " " + TranslationBase.of(context).reviews + ")",
isHalfAllowed: true, // style: TextStyle(
halfFilledIcon: Icons.star_half, // fontSize: 14.0,
filledIcon: Icons.star, // color: Colors.blue[800],
emptyIcon: Icons.star, // letterSpacing: 1.0,
), // decoration: TextDecoration.underline,
), // )),
InkWell( // ),
onTap: () { // ),
getDoctorRatingsDetails(); // Container(
}, // alignment: Alignment.center,
child: Container( // child: Text(DateUtil.getWeekDayMonthDayYearDateFormatted(DateUtil.convertStringToDate(widget.appo.appointmentDate), projectViewModel.isArabic ? "ar" : "en")),
margin: EdgeInsets.only(top: 5.0), // ),
alignment: Alignment.center, // Container(
child: Text( // alignment: Alignment.center,
"(" + // child: Text(widget.appo.startTime.substring(0, 5)),
widget.appo.noOfPatientsRate.toString() + // ),
" " + // Container(
TranslationBase.of(context).reviews + // margin: EdgeInsets.only(top: 10.0),
")", // child: Divider(
style: TextStyle( // color: Colors.grey[500],
fontSize: 14.0, // ),
color: Colors.blue[800], // ),
letterSpacing: 1.0, DoctorHeader(
decoration: TextDecoration.underline, headerModel: HeaderModel(
)), widget.appo.doctorTitle + " " + widget.appo.doctorNameObj,
), widget.appo.doctorImageURL,
), widget.appo.doctorSpeciality,
Container( "",
alignment: Alignment.center, widget.appo.projectName,
child: Text(DateUtil.getWeekDayMonthDayYearDateFormatted( DateUtil.convertStringToDate(widget.appo.appointmentDate),
DateUtil.convertStringToDate( widget.appo.startTime.substring(0, 5),
widget.appo.appointmentDate), null,
projectViewModel.isArabic ? "ar" : "en")), widget.appo.doctorRate,
), widget.appo.actualDoctorRate,
Container( widget.appo.noOfPatientsRate,
alignment: Alignment.center, "",
child: Text(widget.appo.startTime.substring(0, 5)), //model.user.emailAddress,
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Divider(
color: Colors.grey[500],
), ),
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( TabBar(
onTap: (index) { onTap: (index) {
setState(() { setState(() {
if (index == 1) { if (index == 1) {
if (widget.appo.clinicID == 17 || if (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor) {
widget.appo.clinicID == 23 || _tabController.index = _tabController.previousIndex;
widget.appo.isExecludeDoctor) {
_tabController.index =
_tabController.previousIndex;
AppointmentDetails.showFooterButton = false; AppointmentDetails.showFooterButton = false;
} else { } else {
AppointmentDetails.showFooterButton = true; AppointmentDetails.showFooterButton = true;
@ -192,21 +195,13 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
}); });
}, },
tabs: [ tabs: [
Tab( Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))),
child: Text(TranslationBase.of(context).appoActions, widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor
style: TextStyle(color: Colors.black))),
widget.appo.clinicID == 17 ||
widget.appo.clinicID == 23 ||
widget.appo.isExecludeDoctor
? Tab( ? Tab(
child: Text( child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)),
TranslationBase.of(context).availableAppo,
style: TextStyle(color: Colors.grey)),
) )
: Tab( : Tab(
child: Text( child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.black)),
TranslationBase.of(context).availableAppo,
style: TextStyle(color: Colors.black)),
) )
], ],
controller: _tabController, controller: _tabController,
@ -219,14 +214,8 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
child: TabBarView( child: TabBarView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
children: [ children: [
AppointmentActions( AppointmentActions(appo: widget.appo, tabController: _tabController, enableFooterButton: enableFooterButton),
appo: widget.appo, DocAvailableAppointments(doctor: getDoctorObject(), isLiveCareAppointment: widget.appo.isLiveCareAppointment)
tabController: _tabController,
enableFooterButton: enableFooterButton),
DocAvailableAppointments(
doctor: getDoctorObject(),
isLiveCareAppointment:
widget.appo.isLiveCareAppointment)
], ],
controller: _tabController, controller: _tabController,
), ),
@ -262,7 +251,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
selectedTime: DocAvailableAppointments.selectedTime))); selectedTime: DocAvailableAppointments.selectedTime)));
} }
getDoctorRatingsDetails() { void getDoctorRatingsDetails() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.getDoctorsRatingDetails(widget.appo.doctorID, context).then((res) { service.getDoctorsRatingDetails(widget.appo.doctorID, context).then((res) {
@ -308,27 +297,13 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
margin: EdgeInsets.only(bottom: 5.0), margin: EdgeInsets.only(bottom: 5.0),
padding: EdgeInsets.all(10.0), padding: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.white))),
TranslationBase.of(context).doctorRating, Container(margin: EdgeInsets.only(top: 0.0), child: Text(this.widget.appo.actualDoctorRate.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black))),
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( Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center, alignment: Alignment.center,
child: RatingBar.readOnly( child: RatingBar.readOnly(
initialRating: initialRating: this.widget.appo.actualDoctorRate.toDouble(),
this.widget.appo.actualDoctorRate.toDouble(),
size: 35.0, size: 35.0,
filledColor: Colors.yellow[700], filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500], emptyColor: Colors.grey[500],
@ -340,30 +315,19 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text( child: Text(this.widget.appo.noOfPatientsRate.toString() + " " + TranslationBase.of(context).reviews, style: TextStyle(fontSize: 14.0, color: Colors.black))),
this.widget.appo.noOfPatientsRate.toString() +
" " +
TranslationBase.of(context).reviews,
style: TextStyle(
fontSize: 14.0, color: Colors.black))),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Row( child: Row(
children: [ children: [
Container( Container(
width: 100.0, width: 100.0,
margin: EdgeInsets.only( margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
top: 10.0, left: 15.0, right: 15.0), child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))),
child: Text(
TranslationBase.of(context).excellent,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: SizedBox( child: SizedBox(
width: getRatingWidth( width: getRatingWidth(doctorDetailsList[0].patientNumber),
doctorDetailsList[0].patientNumber),
height: 6.0, height: 6.0,
child: Container( child: Container(
color: Colors.green[700], color: Colors.green[700],
@ -378,18 +342,12 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
children: [ children: [
Container( Container(
width: 100.0, width: 100.0,
margin: EdgeInsets.only( margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
top: 10.0, left: 15.0, right: 15.0), child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
child: Text(
TranslationBase.of(context).v_good,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: SizedBox( child: SizedBox(
width: getRatingWidth( width: getRatingWidth(doctorDetailsList[1].patientNumber),
doctorDetailsList[1].patientNumber),
height: 6.0, height: 6.0,
child: Container( child: Container(
color: Color(0xffB7B723), color: Color(0xffB7B723),
@ -404,18 +362,12 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
children: [ children: [
Container( Container(
width: 100.0, width: 100.0,
margin: EdgeInsets.only( margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
top: 10.0, left: 15.0, right: 15.0), child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
child: Text(
TranslationBase.of(context).good,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: SizedBox( child: SizedBox(
width: getRatingWidth( width: getRatingWidth(doctorDetailsList[2].patientNumber),
doctorDetailsList[2].patientNumber),
height: 6.0, height: 6.0,
child: Container( child: Container(
color: Color(0xffEBA727), color: Color(0xffEBA727),
@ -430,18 +382,12 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
children: [ children: [
Container( Container(
width: 100.0, width: 100.0,
margin: EdgeInsets.only( margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
top: 10.0, left: 15.0, right: 15.0), child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
child: Text(
TranslationBase.of(context).average,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: SizedBox( child: SizedBox(
width: getRatingWidth( width: getRatingWidth(doctorDetailsList[3].patientNumber),
doctorDetailsList[3].patientNumber),
height: 6.0, height: 6.0,
child: Container( child: Container(
color: Color(0xffEB7227), color: Color(0xffEB7227),
@ -456,19 +402,12 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
children: [ children: [
Container( Container(
width: 100.0, width: 100.0,
margin: EdgeInsets.only( margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
top: 10.0, left: 15.0, right: 15.0), child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
child: Text(
TranslationBase.of(context)
.below_average,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: SizedBox( child: SizedBox(
width: getRatingWidth( width: getRatingWidth(doctorDetailsList[4].patientNumber),
doctorDetailsList[4].patientNumber),
height: 6.0, height: 6.0,
child: Container( child: Container(
color: Color(0xffE20C0C), color: Color(0xffE20C0C),
@ -478,9 +417,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
], ],
), ),
), ),
Container( Container(margin: EdgeInsets.only(top: 40.0), child: Divider()),
margin: EdgeInsets.only(top: 40.0),
child: Divider()),
Container( Container(
margin: EdgeInsets.only(top: 0.0), margin: EdgeInsets.only(top: 0.0),
child: Align( child: Align(
@ -502,9 +439,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: Text( child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)),
TranslationBase.of(context).cancel,
style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -532,13 +467,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
String getDate(String date) { String getDate(String date) {
DateTime dateObj = DateUtil.convertStringToDate(date); DateTime dateObj = DateUtil.convertStringToDate(date);
return DateUtil.getWeekDay(dateObj.weekday) + return DateUtil.getWeekDay(dateObj.weekday) + ", " + dateObj.day.toString() + " " + DateUtil.getMonth(dateObj.month) + " " + dateObj.year.toString();
", " +
dateObj.day.toString() +
" " +
DateUtil.getMonth(dateObj.month) +
" " +
dateObj.year.toString();
} }
String getDoctorSpeciality(List<String> docSpecial) { String getDoctorSpeciality(List<String> docSpecial) {

@ -6,50 +6,50 @@ class ArrivedButtons {
{ {
"title": TranslationBase.of(AppGlobal.context).medicines, "title": TranslationBase.of(AppGlobal.context).medicines,
"subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle, "subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle,
"icon": "assets/images/new-design/medicine_prescriptions_icon.png", "icon": "medicine_prescription.svg",
"caller": "prescriptions" "caller": "prescriptions",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).radiology, "title": TranslationBase.of(AppGlobal.context).radiology,
"subtitle": TranslationBase.of(AppGlobal.context).radiologySubtitle, "subtitle": TranslationBase.of(AppGlobal.context).radiologySubtitle,
"icon": "assets/images/new-design/radiology_service_icon.png", "icon": 'radiology.svg',
"caller": "radiology" "caller": "radiology",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).lab, "title": TranslationBase.of(AppGlobal.context).lab,
"subtitle": TranslationBase.of(AppGlobal.context).labSubtitle, "subtitle": TranslationBase.of(AppGlobal.context).labSubtitle,
"icon": "assets/images/new-design/lab_result_icon.png", "icon": 'lab_result.svg',
"caller": "labResult" "caller": "labResult",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).vitalSigns, "title": TranslationBase.of(AppGlobal.context).vitalSigns,
"subtitle": TranslationBase.of(AppGlobal.context).vitalSignsSubtitle, "subtitle": TranslationBase.of(AppGlobal.context).vitalSignsSubtitle,
"icon": "assets/images/new-design/vital_signs.png", "icon": 'vital_signs.svg',
"caller": "VitalSigns" "caller": "VitalSigns",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).raise, "title": TranslationBase.of(AppGlobal.context).raise,
"subtitle": TranslationBase.of(AppGlobal.context).complaint, "subtitle": TranslationBase.of(AppGlobal.context).complaint,
"icon": "assets/images/new-design/feedback_icon.png", "icon": "raise_comp.svg",
"caller": "insertComplaint" "caller": "insertComplaint",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).insuranceApproval, "title": TranslationBase.of(AppGlobal.context).insuranceApproval,
"subtitle": TranslationBase.of(AppGlobal.context).insuranceSubtitle, "subtitle": TranslationBase.of(AppGlobal.context).insuranceSubtitle,
"icon": "assets/images/new-design/insurance_approvals_icon.png", "icon": 'insurance_approval.svg',
"caller": "Insurance" "caller": "Insurance",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).askDoctor, "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": 'ask_doctor.svg',
"caller": "askDoc" "caller": "askDoc",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).appoSurvey, "title": TranslationBase.of(AppGlobal.context).appoSurvey,
"subtitle": TranslationBase.of(AppGlobal.context).service, "subtitle": TranslationBase.of(AppGlobal.context).service,
"icon": "assets/images/new-design/survey.png", "icon": "survey.svg",
"caller": "Survey" "caller": "Survey",
} }
]; ];
} }

@ -7,43 +7,43 @@ class BookedButtonsAllowCheckIn {
"title": TranslationBase.of(AppGlobal.context).confirm, "title": TranslationBase.of(AppGlobal.context).confirm,
"subtitle": TranslationBase.of(AppGlobal.context).appointment, "subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/confirm_icon.png", "icon": "assets/images/new-design/confirm_icon.png",
"caller": "confirmAppointment" "caller": "confirmAppointment",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).reschedule, "title": TranslationBase.of(AppGlobal.context).reschedule,
"subtitle": TranslationBase.of(AppGlobal.context).appointment, "subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/reschedule_icon.png", "icon": "reschedule.svg",
"caller": "openReschedule" "caller": "openReschedule",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).cancel_nocaps, "title": TranslationBase.of(AppGlobal.context).cancel_nocaps,
"subtitle": TranslationBase.of(AppGlobal.context).appointment, "subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/cancel_icon.png", "icon": "assets/images/new-design/cancel_icon.png",
"caller": "onCancelAppointment" "caller": "onCancelAppointment",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).raise, "title": TranslationBase.of(AppGlobal.context).raise,
"subtitle": TranslationBase.of(AppGlobal.context).complaint, "subtitle": TranslationBase.of(AppGlobal.context).complaint,
"icon": "assets/images/new-design/Complaint_icon.png", "icon": "assets/images/new-design/Complaint_icon.png",
"caller": "insertComplaint" "caller": "insertComplaint",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).add, "title": TranslationBase.of(AppGlobal.context).add,
"subtitle": TranslationBase.of(AppGlobal.context).reminder, "subtitle": TranslationBase.of(AppGlobal.context).reminder,
"icon": "assets/images/new-design/reminder_icon.png", "icon": "assets/images/new-design/reminder_icon.png",
"caller": "addReminder" "caller": "addReminder",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).hospital, "title": TranslationBase.of(AppGlobal.context).hospital,
"subtitle": TranslationBase.of(AppGlobal.context).location, "subtitle": TranslationBase.of(AppGlobal.context).location,
"icon": "assets/images/new-design/location_icon.png", "icon": "assets/images/new-design/location_icon.png",
"caller": "navigateToProject" "caller": "navigateToProject",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).online, "title": TranslationBase.of(AppGlobal.context).online,
"subtitle": TranslationBase.of(AppGlobal.context).payment, "subtitle": TranslationBase.of(AppGlobal.context).payment,
"icon": "assets/images/new-design/check-in.png", "icon": "assets/images/new-design/check-in.png",
"caller": "goToTodoList" "caller": "goToTodoList",
} }
]; ];
} }

@ -6,38 +6,38 @@ class ConfirmedButtonsAllowCheckIn {
{ {
"title": TranslationBase.of(AppGlobal.context).reschedule, "title": TranslationBase.of(AppGlobal.context).reschedule,
"subtitle": TranslationBase.of(AppGlobal.context).appointment, "subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/reschedule_icon.png", "icon": "reschedule.svg",
"caller": "openReschedule" "caller": "openReschedule",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).cancel_nocaps, "title": TranslationBase.of(AppGlobal.context).cancel_nocaps,
"subtitle": TranslationBase.of(AppGlobal.context).appointment, "subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/cancel_icon.png", "icon": "assets/images/new-design/cancel_icon.png",
"caller": "onCancelAppointment" "caller": "onCancelAppointment",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).raise, "title": TranslationBase.of(AppGlobal.context).raise,
"subtitle": TranslationBase.of(AppGlobal.context).complaint, "subtitle": TranslationBase.of(AppGlobal.context).complaint,
"icon": "assets/images/new-design/Complaint_icon.png", "icon": "raise_comp.svg",
"caller": "insertComplaint" "caller": "insertComplaint",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).add, "title": TranslationBase.of(AppGlobal.context).add,
"subtitle": TranslationBase.of(AppGlobal.context).reminder, "subtitle": TranslationBase.of(AppGlobal.context).reminder,
"icon": "assets/images/new-design/reminder_icon.png", "icon": "assets/images/new-design/reminder_icon.png",
"caller": "addReminder" "caller": "addReminder",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).hospital, "title": TranslationBase.of(AppGlobal.context).hospital,
"subtitle": TranslationBase.of(AppGlobal.context).location, "subtitle": TranslationBase.of(AppGlobal.context).location,
"icon": "assets/images/new-design/location_icon.png", "icon": "hosp_location.svg",
"caller": "navigateToProject" "caller": "navigateToProject",
}, },
{ {
"title": TranslationBase.of(AppGlobal.context).online, "title": TranslationBase.of(AppGlobal.context).online,
"subtitle": TranslationBase.of(AppGlobal.context).payment, "subtitle": TranslationBase.of(AppGlobal.context).payment,
"icon": "assets/images/new-design/check-in.png", "icon": "online_payment.svg",
"caller": "goToTodoList" "caller": "goToTodoList",
} }
]; ];
} }

@ -27,6 +27,7 @@ import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
@ -41,10 +42,7 @@ class AppointmentActions extends StatefulWidget {
final Function enableFooterButton; final Function enableFooterButton;
MyInAppBrowser browser; MyInAppBrowser browser;
AppointmentActions( AppointmentActions({@required this.appo, @required this.tabController, @required this.enableFooterButton});
{@required this.appo,
@required this.tabController,
@required this.enableFooterButton});
@override @override
_AppointmentActionsState createState() => _AppointmentActionsState(); _AppointmentActionsState createState() => _AppointmentActionsState();
@ -66,11 +64,31 @@ class _AppointmentActionsState extends State<AppointmentActions> {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context); toDoProvider = Provider.of<ToDoCountProviderModel>(context);
var size = MediaQuery.of(context).size; var size = MediaQuery.of(context).size;
final double itemHeight = projectViewModel.isArabic final double itemHeight = projectViewModel.isArabic ? ((size.height - kToolbarHeight - 24) * 0.5) / 2 : ((size.height - kToolbarHeight - 24) * 0.45) / 2;
? ((size.height - kToolbarHeight - 24) * 0.5) / 2
: ((size.height - kToolbarHeight - 24) * 0.45) / 2;
final double itemWidth = size.width / 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( return Container(
margin: EdgeInsets.all(5.0), margin: EdgeInsets.all(5.0),
child: CustomScrollView( child: CustomScrollView(
@ -90,15 +108,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
child: Container( child: Container(
margin: EdgeInsets.all(8.0), margin: EdgeInsets.all(8.0),
padding: EdgeInsets.only(bottom: 4.0), padding: EdgeInsets.only(bottom: 4.0),
decoration: BoxDecoration( decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)], borderRadius: BorderRadius.circular(10), color: Colors.white),
boxShadow: [
BoxShadow(
color: Colors.grey[400],
blurRadius: 2.0,
spreadRadius: 0.0)
],
borderRadius: BorderRadius.circular(10),
color: Colors.white),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
@ -107,8 +117,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: margin: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 5.0),
EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 5.0),
child: Texts( child: Texts(
e.title, e.title,
color: Color(0xffB8382C), color: Color(0xffB8382C),
@ -117,8 +126,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
), ),
), ),
Container( Container(
margin: margin: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
child: Texts( child: Texts(
e.subtitle, e.subtitle,
color: Colors.black, color: Colors.black,
@ -130,16 +138,9 @@ class _AppointmentActionsState extends State<AppointmentActions> {
), ),
), ),
Container( Container(
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
? Alignment.bottomLeft margin: projectViewModel.isArabic ? EdgeInsets.fromLTRB(10.0, 7.0, 0.0, 8.0) : EdgeInsets.fromLTRB(0.0, 7.0, 10.0, 8.0),
: Alignment.bottomRight, child: Image.asset(e.icon, width: 40.0, height: 40.0),
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<AppointmentActions> {
break; break;
case "navigateToProject": case "navigateToProject":
openMap(double.parse(widget.appo.latitude), openMap(double.parse(widget.appo.latitude), double.parse(widget.appo.longitude));
double.parse(widget.appo.longitude));
break; break;
case "addReminder": case "addReminder":
@ -297,8 +297,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Future<List<AppoDetailsButton>> _getBookedCheckInAppoActionsList() async { Future<List<AppoDetailsButton>> _getBookedCheckInAppoActionsList() async {
print("_getBookedCheckInAppoActionsList"); print("_getBookedCheckInAppoActionsList");
BookedButtonsAllowCheckIn bookedButtonsAllowCheckIn = BookedButtonsAllowCheckIn bookedButtonsAllowCheckIn = new BookedButtonsAllowCheckIn();
new BookedButtonsAllowCheckIn();
print(bookedButtonsAllowCheckIn.buttons); print(bookedButtonsAllowCheckIn.buttons);
List<AppoDetailsButton> buttonsList = []; List<AppoDetailsButton> buttonsList = [];
for (var i = 0; i < bookedButtonsAllowCheckIn.buttons.length; i++) { for (var i = 0; i < bookedButtonsAllowCheckIn.buttons.length; i++) {
@ -334,8 +333,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Future<List<AppoDetailsButton>> _getConfirmedCheckInAppoActionsList() async { Future<List<AppoDetailsButton>> _getConfirmedCheckInAppoActionsList() async {
print("_getConfirmedAllowCheckInAppoActionsList"); print("_getConfirmedAllowCheckInAppoActionsList");
ConfirmedButtonsAllowCheckIn confirmedButtonsAllowCheckIn = ConfirmedButtonsAllowCheckIn confirmedButtonsAllowCheckIn = new ConfirmedButtonsAllowCheckIn();
new ConfirmedButtonsAllowCheckIn();
print(confirmedButtonsAllowCheckIn.buttons); print(confirmedButtonsAllowCheckIn.buttons);
List<AppoDetailsButton> buttonsList = []; List<AppoDetailsButton> buttonsList = [];
for (var i = 0; i < confirmedButtonsAllowCheckIn.buttons.length; i++) { for (var i = 0; i < confirmedButtonsAllowCheckIn.buttons.length; i++) {
@ -423,17 +421,12 @@ class _AppointmentActionsState extends State<AppointmentActions> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
PatientLabOrders patientLabOrders = new PatientLabOrders(); PatientLabOrders patientLabOrders = new PatientLabOrders();
service service.getPatientLabOrdersByAppoNo(widget.appo.appointmentNo, widget.appo.projectID, widget.appo.clinicID, context).then((res) {
.getPatientLabOrdersByAppoNo(widget.appo.appointmentNo,
widget.appo.projectID, widget.appo.clinicID, context)
.then((res) {
print(res['ListLabResultsByAppNo']); print(res['ListLabResultsByAppNo']);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['ListLabResultsByAppNo'] != null) { if (res['ListLabResultsByAppNo'] != null) {
patientLabOrders.orderNo = patientLabOrders.orderNo = res['ListLabResultsByAppNo'][0]['OrderNo'].toString();
res['ListLabResultsByAppNo'][0]['OrderNo'].toString(); patientLabOrders.invoiceNo = res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
patientLabOrders.invoiceNo =
res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
patientLabOrders.clinicID = widget.appo.clinicID; patientLabOrders.clinicID = widget.appo.clinicID;
patientLabOrders.projectID = widget.appo.projectID.toString(); patientLabOrders.projectID = widget.appo.projectID.toString();
print(patientLabOrders.invoiceNo); print(patientLabOrders.invoiceNo);
@ -453,14 +446,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
FinalRadiology finalRadiology = new FinalRadiology(); FinalRadiology finalRadiology = new FinalRadiology();
service service.getPatientRadOrders(widget.appo.appointmentNo.toString(), context).then((res) {
.getPatientRadOrders(widget.appo.appointmentNo.toString(), context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['FinalRadiologyList'] != null) { if (res['FinalRadiologyList'] != null) {
print(res['FinalRadiologyList']); print(res['FinalRadiologyList']);
finalRadiology = finalRadiology = new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
print(finalRadiology.reportData); print(finalRadiology.reportData);
navigateToRadiologyDetails(finalRadiology); navigateToRadiologyDetails(finalRadiology);
} else { } else {
@ -484,8 +474,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report)); prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
}); });
print(prescriptionReportEnhList.length); print(prescriptionReportEnhList.length);
navigateToMedicinePrescriptionReport( navigateToMedicinePrescriptionReport(prescriptionReportEnhList, res['ListPRM']);
prescriptionReportEnhList, res['ListPRM']);
} else { } else {
AppToast.showErrorToast(message: TranslationBase.of(context).noRecords); AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
} }
@ -496,37 +485,20 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}); });
} }
Future navigateToMedicinePrescriptionReport( Future navigateToMedicinePrescriptionReport(List<PrescriptionReportEnh> prescriptionReportEnhList, dynamic listPres) async {
List<PrescriptionReportEnh> prescriptionReportEnhList, Navigator.push(context, FadePage(page: PrescriptionReportPage(prescriptionReportEnhList: prescriptionReportEnhList, listPres: listPres, appo: widget.appo)));
dynamic listPres) async {
Navigator.push(
context,
FadePage(
page: PrescriptionReportPage(
prescriptionReportEnhList: prescriptionReportEnhList,
listPres: listPres,
appo: widget.appo)));
} }
Future navigateToLabResults(PatientLabOrders patientLabOrders) async { Future navigateToLabResults(PatientLabOrders patientLabOrders) async {
Navigator.push( Navigator.push(context, FadePage(page: LaboratoryResultPage(patientLabOrders: patientLabOrders))).then((value) {});
context,
FadePage(
page: LaboratoryResultPage(patientLabOrders: patientLabOrders)))
.then((value) {});
} }
Future navigateToRadiologyDetails(FinalRadiology finalRadiology) async { Future navigateToRadiologyDetails(FinalRadiology finalRadiology) async {
Navigator.push( Navigator.push(context, FadePage(page: RadiologyDetailsPage(finalRadiology: finalRadiology))).then((value) {});
context,
FadePage(
page: RadiologyDetailsPage(finalRadiology: finalRadiology)))
.then((value) {});
} }
static Future<void> openMap(double latitude, double longitude) async { static Future<void> openMap(double latitude, double longitude) async {
String googleUrl = String googleUrl = 'https://www.google.com/maps/search/?api=1&query=$latitude,$longitude';
'https://www.google.com/maps/search/?api=1&query=$latitude,$longitude';
if (await canLaunch(googleUrl)) { if (await canLaunch(googleUrl)) {
await launch(googleUrl); await launch(googleUrl);
} else { } else {
@ -546,10 +518,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
child: ReminderDialog( child: ReminderDialog(
eventId: appo.appointmentNo.toString(), eventId: appo.appointmentNo.toString(),
title: "Doctor Appointment", title: "Doctor Appointment",
description: "You have an appointment with " + description: "You have an appointment with " + appo.doctorTitle + " " + appo.doctorNameObj,
appo.doctorTitle +
" " +
appo.doctorNameObj,
startDate: appo.appointmentDate, startDate: appo.appointmentDate,
endDate: appo.appointmentDate, endDate: appo.appointmentDate,
location: appo.projectName, location: appo.projectName,
@ -573,8 +542,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
if (res['PatientDoctorAppointmentResultList'].length != 0) { if (res['PatientDoctorAppointmentResultList'].length != 0) {
getCallRequestType(); getCallRequestType();
} else { } else {
AppToast.showErrorToast( AppToast.showErrorToast(message: TranslationBase.of(context).askDocNotAllowed);
message: TranslationBase.of(context).askDocNotAllowed);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -605,11 +573,9 @@ class _AppointmentActionsState extends State<AppointmentActions> {
showGeneralDialog( showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5), barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) { transitionBuilder: (context, a1, a2, widget) {
final curvedValue = final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform( return Transform(
transform: transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity( child: Opacity(
opacity: a1.value, opacity: a1.value,
child: AskDocDialog(requestData: requestData), child: AskDocDialog(requestData: requestData),
@ -633,9 +599,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
sendAskDocRequest(int requestType) { sendAskDocRequest(int requestType) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service.sendAskDocCallRequest(widget.appo, requestType.toString(), context).then((res) {
.sendAskDocCallRequest(widget.appo, requestType.toString(), context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Request Sent Successfully"); AppToast.showSuccessToast(message: "Request Sent Successfully");
@ -652,10 +616,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
confirmAppointment() { confirmAppointment() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID, widget.appo.projectID, widget.appo.isLiveCareAppointment, context).then((res) {
.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID,
widget.appo.projectID, widget.appo.isLiveCareAppointment, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
@ -670,8 +631,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
navigateToInsuranceApprovals(int appoNo) { navigateToInsuranceApprovals(int appoNo) {
Navigator.push( Navigator.push(context, FadePage(page: InsuranceApproval(appointmentNo: appoNo)));
context, FadePage(page: InsuranceApproval(appointmentNo: appoNo)));
} }
navigateToVitalSigns(int appoNo, int projectID) { navigateToVitalSigns(int appoNo, int projectID) {
@ -686,15 +646,17 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
navigateToInsertComplaint() { 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() { rateAppointment() {
widget.browser = new MyInAppBrowser(); widget.browser = new MyInAppBrowser();
widget.browser.openBrowser('http://hmg.com/SitePages/pso.aspx?p=' + widget.browser.openBrowser('http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1');
widget.appo.projectID.toString() +
'.' +
widget.appo.appointmentNo.toString() +
'&c=1');
} }
} }

@ -53,9 +53,11 @@ class PrescriptionItemsPage extends StatelessWidget {
"", "",
prescriptions.name, prescriptions.name,
DateUtil.convertStringToDate(prescriptions.appointmentDate), DateUtil.convertStringToDate(prescriptions.appointmentDate),
null,
prescriptions.nationalityFlagURL, prescriptions.nationalityFlagURL,
prescriptions.doctorRate, prescriptions.doctorRate,
prescriptions.actualDoctorRate, prescriptions.actualDoctorRate,
prescriptions.noOfPatientsRate,
model.user.emailAddress, model.user.emailAddress,
), ),
isNeedToShowButton: projectViewModel.havePrivilege(13), isNeedToShowButton: projectViewModel.havePrivilege(13),

@ -41,8 +41,20 @@ class RadiologyDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
DoctorHeader( DoctorHeader(
headerModel: new HeaderModel(finalRadiology.doctorName, finalRadiology.doctorImageURL, finalRadiology.speciality, finalRadiology.invoiceNo.toString(), finalRadiology.projectName, headerModel: new HeaderModel(
finalRadiology.orderDate, finalRadiology.nationalityFlagURL, finalRadiology.doctorRate, finalRadiology.actualDoctorRate, model.user.emailAddress), 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: () { onTap: () {
showConfirmMessage(finalRadiology: finalRadiology, model: model); showConfirmMessage(finalRadiology: finalRadiology, model: model);
}, },

@ -38,6 +38,8 @@ class TranslationBase {
String get mySchedule => localizedValues['mySchedule'][locale.languageCode]; String get mySchedule => localizedValues['mySchedule'][locale.languageCode];
String get schedule => localizedValues['schedule'][locale.languageCode];
String get replay2 => localizedValues['replay2'][locale.languageCode]; String get replay2 => localizedValues['replay2'][locale.languageCode];
String get logout => localizedValues['logout'][locale.languageCode]; String get logout => localizedValues['logout'][locale.languageCode];
@ -1185,6 +1187,8 @@ class TranslationBase {
String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode]; String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode];
String get invoiceDate => localizedValues['InvoiceDate'][locale.languageCode];
String get specialResult => localizedValues['SpecialResult'][locale.languageCode]; String get specialResult => localizedValues['SpecialResult'][locale.languageCode];
String get generalResult => localizedValues['GeneralResult'][locale.languageCode]; String get generalResult => localizedValues['GeneralResult'][locale.languageCode];

@ -60,9 +60,11 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
widget.billNo, widget.billNo,
widget.patientLabOrder.projectName, widget.patientLabOrder.projectName,
widget.patientLabOrder.orderDate, widget.patientLabOrder.orderDate,
null,
widget.patientLabOrder.nationalityFlagURL, widget.patientLabOrder.nationalityFlagURL,
widget.patientLabOrder.doctorRate, widget.patientLabOrder.doctorRate,
widget.patientLabOrder.actualDoctorRate, widget.patientLabOrder.actualDoctorRate,
widget.patientLabOrder.noOfPatientsRate,
model.user.emailAddress), model.user.emailAddress),
onTap: widget.onTap, onTap: widget.onTap,
), ),

@ -58,10 +58,10 @@ class DoctorCard extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545) //Colors.red[900] Color(0xff404545)
color: isLiveCareAppointment color: isLiveCareAppointment
? Color(0xff404545) ? Color(0xff2E303A)
: !isInOutPatient : !isInOutPatient
? Colors.red[900] ? Color(0xffD02127)
: Theme.of(context).primaryColor, : Color(0xffa9a089),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10), topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10),
bottomLeft: 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 // todo 'sikander' move this widget to separate file
Widget myRichText(String title, String value) { Widget myRichText(String title, String value) {
return RichText( return RichText(
text: TextSpan( maxLines: 1,
text: title, text: TextSpan(text: title, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10), children: <TextSpan>[
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10), TextSpan(
children: <TextSpan>[ text: " $value",
TextSpan( style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
text: " $value", )
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), ]),
)
]),
); );
} }

@ -33,7 +33,7 @@ class MedicalProfileItem extends StatelessWidget {
height: double.infinity, height: double.infinity,
width: double.infinity, width: double.infinity,
margin: EdgeInsets.all(0), margin: EdgeInsets.all(0),
decoration: containerColorRadiusBorderWidth(Colors.white, 20, CustomColors.pharmacyGreyColor, 1), decoration: containerColorRadiusBorderWidth(Colors.white, 15, CustomColors.pharmacyGreyColor, 1),
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
child: Stack( child: Stack(
children: [ children: [

@ -13,10 +13,22 @@ import 'package:rating_bar/rating_bar.dart';
class DoctorHeader extends StatelessWidget { class DoctorHeader extends StatelessWidget {
final HeaderModel headerModel; final HeaderModel headerModel;
final VoidCallback onTap; final VoidCallback onTap;
final VoidCallback onRatingAndReviewTap;
final bool showConfirmMessageDialog;
final String buttonTitle; final String buttonTitle;
final String buttonIcon;
final bool isNeedToShowButton; 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -59,11 +71,11 @@ class DoctorHeader extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Text( 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), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
), ),
Text( 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), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
), ),
// Padding( // Padding(
@ -78,32 +90,45 @@ class DoctorHeader extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( InkWell(
mainAxisSize: MainAxisSize.min, onTap: onRatingAndReviewTap,
mainAxisAlignment: MainAxisAlignment.center, child: Row(
children: [ mainAxisSize: MainAxisSize.min,
SizedBox(width: 21), mainAxisAlignment: MainAxisAlignment.center,
RatingBar.readOnly( children: [
initialRating: headerModel.doctorRate + 0.0, SizedBox(width: 21),
size: 15.0, RatingBar.readOnly(
filledColor: Color(0XFFD02127), initialRating: headerModel.actualDoctorRate + 0.0,
emptyColor: Color(0XFFD02127), size: 15.0,
isHalfAllowed: true, filledColor: Color(0XFFD02127),
halfFilledIcon: Icons.star_half, emptyColor: Color(0XFFD02127),
filledIcon: Icons.star, isHalfAllowed: true,
emptyIcon: Icons.star_border, halfFilledIcon: Icons.star_half,
), filledIcon: Icons.star,
SizedBox(width: 6), emptyIcon: Icons.star_border,
Text( ),
"${headerModel.actualDoctorRate} ${TranslationBase.of(context).reviews}", SizedBox(width: 6),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), 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 isNeedToShowButton
? InkWell( ? InkWell(
onTap: () { onTap: () {
showConfirmMessage(context, onTap, headerModel.email); if (showConfirmMessageDialog)
showConfirmMessage(context, onTap, headerModel.email);
else
onTap();
}, },
child: Container( child: Container(
padding: EdgeInsets.only(top: 10, bottom: 10, right: 21, left: 15), padding: EdgeInsets.only(top: 10, bottom: 10, right: 21, left: 15),
@ -111,7 +136,7 @@ class DoctorHeader extends StatelessWidget {
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ 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), SizedBox(width: 6),
Text( Text(
buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle, buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle,

Loading…
Cancel
Save