merge-update-with-lab-changes
haroon amjad 5 years ago
parent 22c6a8ce42
commit 89e1aa70c0

@ -1516,7 +1516,7 @@ const Map localizedValues = {
"RRTRequestSuccess": { "en": "Request has been sent successfully, You will be contacted soon.", "ar": "تم إرسال الطلب بنجاح ، وسيتم الاتصال بك باسرع وقت ممكن" }, "RRTRequestSuccess": { "en": "Request has been sent successfully, You will be contacted soon.", "ar": "تم إرسال الطلب بنجاح ، وسيتم الاتصال بك باسرع وقت ممكن" },
"rateDoctorAppo": { "en": "Rate DR & Appointment", "ar": "معدل الدكتور والتعيين" }, "rateDoctorAppo": { "en": "Rate DR & Appointment", "ar": "معدل الدكتور والتعيين" },
"invoice": { "en": "Invoice", "ar": "الفاتورة" }, "invoice": { "en": "Invoice", "ar": "الفاتورة" },
"requestedDate": { "en": "Reqeusted Date", "ar": "التاريخ " }, "requestedDate": { "en": "Requested Date", "ar": "التاريخ " },
"callDuration": { "en": "Call Duration", "ar": "مدة الاتصال" }, "callDuration": { "en": "Call Duration", "ar": "مدة الاتصال" },
"alreadyRated": { "en": "This appointment has been previously evaluated.", "ar": "تم تقييم هذا الموعد مسبقاً" }, "alreadyRated": { "en": "This appointment has been previously evaluated.", "ar": "تم تقييم هذا الموعد مسبقاً" },
"insuranceCompany": { "en": "Insurance Company", "ar": "شركة تأمين" }, "insuranceCompany": { "en": "Insurance Company", "ar": "شركة تأمين" },
@ -1526,4 +1526,5 @@ const Map localizedValues = {
"otherInfo": {"en": "Other details", "ar": "تفاصيل أخرى"}, "otherInfo": {"en": "Other details", "ar": "تفاصيل أخرى"},
"medicalReport": {"en": "Medical Report", "ar": "تقرير طبي"}, "medicalReport": {"en": "Medical Report", "ar": "تقرير طبي"},
"insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المريض تامين؟"}, "insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المريض تامين؟"},
"rateDoctor": {"en": "Rate Doctor", "ar": "تقييم الطبيب"},
}; };

@ -307,7 +307,7 @@ class _BookConfirmState extends State<BookConfirm> {
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
widget.service.insertLiveCareScheduleAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, widget.selectedTime, widget.selectedDate, context).then((res) { widget.service.insertLiveCareScheduleAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, widget.selectedTime, widget.selectedDate, context).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
print(res['AppointmentNo']); print(res['AppointmentNo']);
Future.delayed(new Duration(milliseconds: 500), () { Future.delayed(new Duration(milliseconds: 500), () {

@ -451,7 +451,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots> with TickerProviderStat
.insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, CovidTimeSlots.selectedTime, CovidTimeSlots.selectedDate, context, widget.selectedProcedure.procedureID) .insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, CovidTimeSlots.selectedTime, CovidTimeSlots.selectedDate, context, widget.selectedProcedure.procedureID)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
getToDoCount(); getToDoCount();
getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject); getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject);
} else { } else {

@ -75,13 +75,14 @@ class _ErOptionsState extends State<ErOptions> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push(context, FadePage(page: DdServicesPage())); // Navigator.push(context, FadePage(page: DdServicesPage()));
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: "ED", title: "ED",
imagePath: 'assets/images/new-design/AM.PNG', imagePath: 'assets/images/new-design/AM.PNG',
subTitle: TranslationBase.of(context).service, subTitle: TranslationBase.of(context).service,
isPngImage: true, isPngImage: true,
isEnable: false,
), ),
), ),
InkWell( InkWell(

@ -162,13 +162,19 @@ class _SchedulePageState extends State<SchedulePage> {
weeks[index][index2]['WorkingHours'], weeks[index][index2]['WorkingHours'],
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
) ),
Icon(projectViewModel.isArabic
? Icons
.arrow_back_ios_outlined
: Icons
.arrow_forward_ios_outlined, size: 16.0),
], ],
) )
]))), ]))),
) ),
], ],
)))); )
)));
}, },
)), )),
PageViewIndicator( PageViewIndicator(

@ -179,33 +179,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess);
}, },
); );
return; return;
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: PrescriptionReminderDialog(
eventId: prescriptionReport.itemID.toString(),
title: "${prescriptionReport.itemDescriptionN} Prescription Reminder",
description: "${prescriptionReport.itemDescriptionN} ${prescriptionReport.frequencyN} ${prescriptionReport.routeN} ",
startDate: startDate,
endDate: endDate,
location: prescriptionReport.remarks,
days: 1,
),
),
);
},
transitionDuration: Duration(milliseconds: 500),
barrierDismissible: true,
barrierLabel: '',
context: context,
pageBuilder: (context, animation1, animation2) {});
}, },
iconData: Icons.notifications_active, iconData: Icons.notifications_active,
color: Color(0xffEAEAEA), color: Color(0xffEAEAEA),

@ -1,20 +1,16 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.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:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class RateAppointmentDoctor extends StatefulWidget { class RateAppointmentDoctor extends StatefulWidget {
@override @override
@ -30,214 +26,172 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<AppointmentRateViewModel>( return BaseView<AppointmentRateViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
baseViewModel: model, baseViewModel: model,
body: Scaffold( appBarTitle: TranslationBase.of(context).rateDoctor,
backgroundColor: Colors.grey[200], body: SingleChildScrollView(
appBar: AppBar( child: Container(
elevation: 0, padding: EdgeInsets.all(12),
textTheme: TextTheme( child: Column(
headline6: crossAxisAlignment: CrossAxisAlignment.start,
TextStyle(color: Colors.white, fontWeight: FontWeight.bold), children: <Widget>[
), SizedBox(
title: Text(TranslationBase.of(context).rate), height: 25, //5598
leading: Builder( ),
builder: (BuildContext context) { Text(
return IconButton( TranslationBase.of(context).lastVisit,
icon: Icon(Icons.menu), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
color: Colors.white, ),
onPressed: () => Scaffold.of(context).openDrawer(), SizedBox(
); height: 25,
}, ),
), Container(
centerTitle: true, child: DoctorView(
), doctor: getDoctorObject(model),
drawer: SafeArea(child: AppDrawer()), isLiveCareAppointment: false,
body: FractionallySizedBox( isShowFlag: false,
widthFactor: 1, ),
child: SingleChildScrollView( ),
child: Container( SizedBox(
padding: EdgeInsets.all(12), height: 12,
child: Column( ),
children: <Widget>[ Container(
SizedBox( width: double.infinity,
height: 25, //5598 child: Card(
), elevation: 0,
Texts( shape: cardRadius(10),
TranslationBase.of(context).lastVisit, child: Padding(
bold: true, padding: const EdgeInsets.all(12.0),
color: Colors.black,
),
SizedBox(
height: 25,
),
Container(
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
),
child: Column( child: Column(
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.start,
SizedBox( children: [
height: 8, Text(
), TranslationBase.of(context).tapTitle,
LargeAvatar( style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
name: model.appointmentDetails.doctorName,
url: model.appointmentDetails.doctorImageURL,
width: 110,
height: 110,
),
SizedBox(
height: 22,
),
Texts(
TranslationBase.of(context).dr + " " + model.appointmentDetails.doctorName,
bold: true,
), ),
SizedBox( SizedBox(
height: 4, height: 12,
), ),
Texts( Row(
model.appointmentDetails.clinicName != null ? model.appointmentDetails.clinicName : "", mainAxisAlignment: MainAxisAlignment.center,
bold: true, children: <Widget>[
...List.generate(
5,
(index) => AnimatedSwitcher(
duration: Duration(milliseconds: 1000),
switchInCurve: Curves.elasticOut,
switchOutCurve: Curves.elasticIn,
transitionBuilder: (Widget child, Animation<double> animation) {
return ScaleTransition(child: child, scale: animation);
},
child: Container(
key: ValueKey<int>(rating),
child: IconButton(
iconSize: 45.0,
onPressed: () {
setState(() {
rating = index + 1;
});
},
color: rating >= (index + 1) ? Color.fromRGBO(255, 186, 0, 1.0) : Colors.grey[400],
// Theme.of(context).hintColor,
icon: Icon(rating >= (index + 1) ? Icons.star : Icons.star)),
),
),
)
],
), ),
SizedBox(
height: 8,
)
], ],
), ),
), ),
SizedBox( ),
height: 12, ),
), SizedBox(
Center( height: 12,
child: Texts( ),
TranslationBase.of(context).tapTitle, Card(
textAlign: TextAlign.center, elevation: 0,
)), shape: cardRadius(10),
SizedBox( child: Padding(
height: 12, padding: EdgeInsets.all(8.0),
), child: TextField(
Row( maxLines: 5,
mainAxisAlignment: MainAxisAlignment.center, decoration: InputDecoration.collapsed(
children: <Widget>[ hintText: TranslationBase.of(context).notes,
...List.generate( hintStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16)),
5, onChanged: (value) {
(index) => AnimatedSwitcher( setState(() {
duration: Duration(milliseconds: 1000), note = value;
switchInCurve: Curves.elasticOut, });
switchOutCurve: Curves.elasticIn, },
transitionBuilder: ))),
(Widget child, Animation<double> animation) { ],
return ScaleTransition( ),
child: child, scale: animation); ),
}, ),
child: Container( bottomSheet: Container(
key: ValueKey<int>(rating), color: Colors.white,
child: IconButton( padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
iconSize: 45.0, child: Row(
onPressed: () { mainAxisSize: MainAxisSize.min,
setState(() { children: [
rating = index + 1; Expanded(
}); child: DefaultButton(
}, TranslationBase.of(context).later,
color: rating >= (index + 1) () {
? Color.fromRGBO(255, 186, 0, 1.0) Navigator.pushReplacement(
: Colors.grey[400], context,
// Theme.of(context).hintColor, FadePage(
icon: Icon(rating >= (index + 1) page: LandingPage(),
? EvaIcons.star
: EvaIcons.star)),
),
),
)
],
),
SizedBox(
height: 12,
),
Form(
key: formKey,
child: TextFields(
hintText: TranslationBase.of(context).notes,
minLines: 4,
maxLines: 4,
// validator: (value) {
// if (value.isEmpty)
// return 'Please enter your note';
// else if (rating == 0) return 'Rating cannot be \"0\"';
// return null;
// },
onChanged: (value) {
setState(() {
note = value;
});
},
), ),
), );
SizedBox( },
height: 12, color: Color(0xffEAEAEA),
), textColor: Color(0xff2B353E),
Container( ),
width: double.infinity, ),
child: Column( SizedBox(width: 10),
children: <Widget>[ Expanded(
Container( child: DefaultButton(
width: MediaQuery.of(context).size.width * 0.9, TranslationBase.of(context).next,
child: SecondaryButton( () {
onTap: () async { final form = formKey.currentState;
final form = formKey.currentState; if (form.validate() && rating > 0) {
if (form.validate() && rating>0 ) { form.save();
form.save(); Navigator.push(
Navigator.push( context,
context, FadePage(
FadePage( page: RateAppointmentClinic(
page: RateAppointmentClinic( appointmentDetails: model.appointmentDetails,
appointmentDetails: doctorNote: note,
model.appointmentDetails, doctorRate: rating,
doctorNote: note,
doctorRate: rating,
),
),
);
}
},
label: TranslationBase.of(context).next,
disabled: (model.state == ViewState.BusyLocal || rating==0),
loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor),
),
SizedBox(
height: 12,
), ),
InkWell( ),
onTap: () { );
Navigator.pushReplacement( }
context, },
FadePage( // iconData: Icons.notifications_active,
page: LandingPage(), color: Color(0xff359846),
),
);
},
child: Texts(
TranslationBase.of(context).later,
decoration: TextDecoration.underline,
color: HexColor('#151DFE'),
fontSize: 18,
),
)
],
),
)
],
), ),
), ),
), ],
), ),
), ),
), ),
); );
} }
DoctorList getDoctorObject(AppointmentRateViewModel model) {
DoctorList doctor = new DoctorList();
doctor.name = model.appointmentDetails.doctorName;
doctor.doctorImageURL = model.appointmentDetails.doctorImageURL;
doctor.clinicName = model.appointmentDetails.clinicName;
doctor.projectName = model.appointmentDetails.projectName;
doctor.actualDoctorRate = 5;
return doctor;
}
} }

@ -2322,6 +2322,8 @@ class TranslationBase {
String get insuredPatientReferral => localizedValues["insuredPatient"][locale.languageCode]; String get insuredPatientReferral => localizedValues["insuredPatient"][locale.languageCode];
String get rateDoctor => localizedValues["rateDoctor"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save