updates & fixes

merge-update-with-lab-changes
haroon amjad 4 years ago
parent 46d800c0c6
commit fa8c739b2c

@ -1511,4 +1511,9 @@ const Map localizedValues = {
"serviceNotAvailable": { "en": "Dear, this service is not available now, please try again later", "ar": "عزيزي المراجع, هذه الخدمة غير متوفرة الان يرجى المحاوله لاحقا"}, "serviceNotAvailable": { "en": "Dear, this service is not available now, please try again later", "ar": "عزيزي المراجع, هذه الخدمة غير متوفرة الان يرجى المحاوله لاحقا"},
"doctorScheduleNot": {"en": "Doctor schedule not available", "ar": "جدول الطبيب غير متوفر"}, "doctorScheduleNot": {"en": "Doctor schedule not available", "ar": "جدول الطبيب غير متوفر"},
"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": "معدل الدكتور والتعيين" },
"invoice": { "en": "Invoice", "ar": "الفاتورة" },
"requestedDate": { "en": "Reqeusted Date", "ar": "التاريخ " },
"callDuration": { "en": "Call Duration", "ar": "مدة الاتصال" },
"alreadyRated": { "en": "This appointment has been previously evaluated.", "ar": "تم تقييم هذا الموعد مسبقاً" },
}; };

@ -21,6 +21,7 @@ class DoctorList {
bool isDoctorAllowVedioCall; bool isDoctorAllowVedioCall;
bool isDoctorDummy; bool isDoctorDummy;
bool isLiveCare; bool isLiveCare;
bool isLiveCareClinic;
bool isDoctorHasPrePostImages; bool isDoctorHasPrePostImages;
String latitude; String latitude;
String longitude; String longitude;
@ -63,6 +64,7 @@ class DoctorList {
this.isDoctorAllowVedioCall, this.isDoctorAllowVedioCall,
this.isDoctorDummy, this.isDoctorDummy,
this.isLiveCare, this.isLiveCare,
this.isLiveCareClinic,
this.isDoctorHasPrePostImages, this.isDoctorHasPrePostImages,
this.latitude, this.latitude,
this.longitude, this.longitude,
@ -105,6 +107,7 @@ class DoctorList {
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isDoctorDummy = json['IsDoctorDummy']; isDoctorDummy = json['IsDoctorDummy'];
isLiveCare = json['IsLiveCare']; isLiveCare = json['IsLiveCare'];
isLiveCareClinic = json['IsLiveCareClinic'];
isDoctorHasPrePostImages = json['IsDoctorHasPrePostImages']; isDoctorHasPrePostImages = json['IsDoctorHasPrePostImages'];
latitude = json['Latitude']; latitude = json['Latitude'];
longitude = json['Longitude']; longitude = json['Longitude'];
@ -150,6 +153,7 @@ class DoctorList {
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
data['IsDoctorDummy'] = this.isDoctorDummy; data['IsDoctorDummy'] = this.isDoctorDummy;
data['IsLiveCare'] = this.isLiveCare; data['IsLiveCare'] = this.isLiveCare;
data['IsLiveCareClinic'] = this.isLiveCareClinic;
data['IsDoctorHasPrePostImages'] = this.isDoctorHasPrePostImages; data['IsDoctorHasPrePostImages'] = this.isDoctorHasPrePostImages;
data['Latitude'] = this.latitude; data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude; data['Longitude'] = this.longitude;

@ -171,7 +171,7 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
child: Text( child: Text(
TranslationBase.of(context).availableAppo, TranslationBase.of(context).availableAppo,
style: TextStyle( style: TextStyle(
color: Colors.black, color: widget.isLiveCareAppointment ? Colors.grey : Colors.black,
fontSize: 12, fontSize: 12,
letterSpacing: -0.36, letterSpacing: -0.36,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
@ -8,8 +9,10 @@ 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/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.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';
import 'package:provider/provider.dart';
class LiveCareHistoryCard extends StatefulWidget { class LiveCareHistoryCard extends StatefulWidget {
ErRequestHistoryList erRequestHistoryList; ErRequestHistoryList erRequestHistoryList;
@ -24,6 +27,8 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
AuthenticatedUser authUser = new AuthenticatedUser(); AuthenticatedUser authUser = new AuthenticatedUser();
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
getAuthenticatedUser(); getAuthenticatedUser();
@ -32,6 +37,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return Container( return Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Card( child: Card(
@ -48,23 +54,14 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Text("Requested date:", Text(TranslationBase.of(context).requestedDate, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
style:
TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 0.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Text(widget.erRequestHistoryList.sArrivalTime, Text(widget.erRequestHistoryList.sArrivalTime, style: TextStyle(fontSize: 14.0)),
style: TextStyle(fontSize: 14.0)), Text(TranslationBase.of(context).callDuration + "\n" + getCallTime(widget.erRequestHistoryList.callDuration), textAlign: TextAlign.center, style: TextStyle(fontSize: 14.0, color: Colors.grey[600])),
Text(
"Call Duration\n" +
getCallTime(
widget.erRequestHistoryList.callDuration),
textAlign: TextAlign.center,
style:
TextStyle(fontSize: 14.0, color: Colors.grey[600])),
], ],
), ),
), ),
@ -76,8 +73,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
color: Colors.green, color: Colors.green,
), ),
margin: EdgeInsets.only(top: 5.0, bottom: 5.0), margin: EdgeInsets.only(top: 5.0, bottom: 5.0),
child: Text(widget.erRequestHistoryList.stringCallStatus, child: Text(widget.erRequestHistoryList.stringCallStatus, style: TextStyle(fontSize: 14.0, color: Colors.white)),
style: TextStyle(fontSize: 14.0, color: Colors.white)),
), ),
Divider( Divider(
color: Colors.grey[500], color: Colors.grey[500],
@ -90,17 +86,15 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
print("Invoice");
openInvoice(); openInvoice();
}, },
child: Container( child: Container(
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Icon(Icons.content_paste, color: Colors.blue), Icon(Icons.content_paste, color: Colors.red),
Container( Container(
margin: EdgeInsets.only(left: 10.0), margin: EdgeInsets.only(left: 10.0),
child: Text("Invoice", child: Text(TranslationBase.of(context).invoice, textAlign: TextAlign.center, style: TextStyle(fontSize: 12.0)),
textAlign: TextAlign.center),
), ),
], ],
), ),
@ -110,7 +104,6 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
print("Complaints");
openComplaint(); openComplaint();
}, },
child: Container( child: Container(
@ -119,8 +112,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
Icon(Icons.add, size: 24.0, color: Colors.red), Icon(Icons.add, size: 24.0, color: Colors.red),
Container( Container(
margin: EdgeInsets.only(left: 10.0), margin: EdgeInsets.only(left: 10.0),
child: Text("Complaints", child: Text(TranslationBase.of(context).complaint, textAlign: TextAlign.center, style: TextStyle(fontSize: 12.0)),
textAlign: TextAlign.center),
), ),
], ],
), ),
@ -130,19 +122,16 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
print("Rate Dr & Appointment"); rateLiveCareAppo();
}, },
child: Container( child: Container(
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Icon(Icons.star, Icon(Icons.star, size: 24.0, color: Colors.yellow[700]),
size: 24.0, color: Colors.yellow[700]),
Container( Container(
width: MediaQuery.of(context).size.width * 0.2, width: MediaQuery.of(context).size.width * 0.2,
margin: EdgeInsets.only(left: 10.0), margin: EdgeInsets.only(left: 10.0),
child: Text("Rate Dr & Appointment", child: Text(TranslationBase.of(context).rateDoctorAppo, overflow: TextOverflow.clip, textAlign: TextAlign.center, style: TextStyle(fontSize: 12.0)),
overflow: TextOverflow.clip,
textAlign: TextAlign.center),
), ),
], ],
), ),
@ -159,16 +148,25 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
); );
} }
rateLiveCareAppo() {
if(widget.erRequestHistoryList.isAppointmentHaveRating) {
AppToast.showErrorToast(message: TranslationBase.of(context).alreadyRated);
} else {
}
}
openInvoice() { openInvoice() {
ConfirmDialog dialog = new ConfirmDialog( showDialog(
context: context, context: context,
confirmMessage: "Send a copy of this invoice to the email: " + child: ConfirmSendEmailDialog(
authUser.emailAddress, email: projectViewModel.user.emailAddress,
okText: TranslationBase.of(context).confirm, onTapSendEmail: () {
cancelText: TranslationBase.of(context).cancel_nocaps, sendInvoiceEmail(context);
okFunction: () => {sendInvoiceEmail(context)}, },
cancelFunction: () => {}); ),
dialog.showAlertDialog(context); );
} }
openComplaint() { openComplaint() {
@ -176,17 +174,10 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
} }
sendInvoiceEmail(context) { sendInvoiceEmail(context) {
ConfirmDialog.closeAlertDialog(context);
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service.sendLiveCareInvoiceEmail(widget.erRequestHistoryList.appointmentNo.toString(), widget.erRequestHistoryList.projectID, authUser.emailAddress, context).then((res) {
.sendLiveCareInvoiceEmail( AppToast.showSuccessToast(message: TranslationBase(context).emailSentSuccessfully);
widget.erRequestHistoryList.appointmentNo.toString(),
widget.erRequestHistoryList.projectID,
authUser.emailAddress,
context)
.then((res) {
AppToast.showSuccessToast(message: "LiveCare invoice sent successfully");
}).catchError((err) { }).catchError((err) {
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
print(err); print(err);
@ -195,8 +186,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
getAuthenticatedUser() async { getAuthenticatedUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
setState(() { setState(() {
authUser = data; authUser = data;
}); });

@ -78,6 +78,9 @@ class _clinic_listState extends State<ClinicList> {
print("LiveCare Type Selected"); print("LiveCare Type Selected");
setState(() { setState(() {
currentSelectedLiveCareType = "immediate"; currentSelectedLiveCareType = "immediate";
// isDataLoaded = true;
// print(liveCareOnlineClinicsListResponse.length);
getLiveCareClinicsList();
}); });
} }
}); });

@ -80,7 +80,7 @@ class DoctorHomePage extends StatelessWidget {
nationalityFlagURL: _doctorList.nationalityFlagURL); nationalityFlagURL: _doctorList.nationalityFlagURL);
return DoctorView( return DoctorView(
doctor: doctorList, doctor: doctorList,
isLiveCareAppointment: false, isLiveCareAppointment: _doctorList.isLiveCareClinic,
); );
}, },
separatorBuilder: (context, index) => SizedBox(height: 14), separatorBuilder: (context, index) => SizedBox(height: 14),

@ -2260,8 +2260,21 @@ class TranslationBase {
String get emptySchedule => localizedValues["emptySchedule"][locale.languageCode]; String get emptySchedule => localizedValues["emptySchedule"][locale.languageCode];
String get serviceNotAvailable => localizedValues["serviceNotAvailable"][locale.languageCode]; String get serviceNotAvailable => localizedValues["serviceNotAvailable"][locale.languageCode];
String get doctorScheduleNot => localizedValues["doctorScheduleNot"][locale.languageCode]; String get doctorScheduleNot => localizedValues["doctorScheduleNot"][locale.languageCode];
String get RRTRequestSuccess => localizedValues["RRTRequestSuccess"][locale.languageCode]; String get RRTRequestSuccess => localizedValues["RRTRequestSuccess"][locale.languageCode];
String get rateDoctorAppo => localizedValues["rateDoctorAppo"][locale.languageCode];
String get invoice => localizedValues["invoice"][locale.languageCode];
String get requestedDate => localizedValues["requestedDate"][locale.languageCode];
String get callDuration => localizedValues["callDuration"][locale.languageCode];
String get alreadyRated => localizedValues["alreadyRated"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save