Updates & fixes

merge-requests/400/head
haroon amjad 3 years ago
parent e5a636b704
commit b1128be94f

@ -132,7 +132,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
onTap: (index) {
setState(() {
if (index == 1) {
if (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor) {
if (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) {
_tabController.index = _tabController.previousIndex;
AppointmentDetails.showFooterButton = false;
} else {
@ -143,7 +143,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
},
tabs: [
Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))),
widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor
widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment
? Tab(
child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)),
)

@ -1,5 +1,5 @@
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -13,11 +13,11 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtons.d
import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtons.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/PrescriptionReport.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -391,29 +391,24 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
openPrescriptionReport() {
GifLoaderDialogUtils.showMyDialog(context);
List<PrescriptionReportEnh> prescriptionReportEnhList = List();
DoctorsListService service = new DoctorsListService();
service.getPatientPrescriptionReports(widget.appo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['ListPRM'].length != 0) {
res['ListPRM'].forEach((report) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
});
print(prescriptionReportEnhList.length);
navigateToMedicinePrescriptionReport(prescriptionReportEnhList, res['ListPRM']);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
});
Prescriptions prescriptions = new Prescriptions();
prescriptions.doctorName = widget.appo.doctorNameObj;
prescriptions.doctorImageURL = widget.appo.doctorImageURL;
prescriptions.speciality = widget.appo.doctorSpeciality;
prescriptions.name = widget.appo.projectName;
prescriptions.appointmentDate = widget.appo.appointmentDate;
prescriptions.nationalityFlagURL = null;
prescriptions.doctorRate = widget.appo.doctorRate;
prescriptions.actualDoctorRate = widget.appo.actualDoctorRate;
prescriptions.noOfPatientsRate = widget.appo.noOfPatientsRate;
prescriptions.isInOutPatient = widget.appo.isInOutPatient;
navigateToMedicinePrescriptionReport(prescriptions);
}
Future navigateToMedicinePrescriptionReport(List<PrescriptionReportEnh> prescriptionReportEnhList, dynamic listPres) async {
Navigator.push(context, FadePage(page: PrescriptionReportPage(prescriptionReportEnhList: prescriptionReportEnhList, listPres: listPres, appo: widget.appo)));
Future navigateToMedicinePrescriptionReport(Prescriptions prescriptions) async {
Navigator.push(context, FadePage(page: PrescriptionItemsPage(prescriptions: prescriptions)));
}
Future navigateToLabResults(PatientLabOrders patientLabOrders) async {
@ -557,6 +552,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
rateAppointment() {
widget.browser = new MyInAppBrowser();
widget.browser.openBrowser('http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1');
var url = 'http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1';
print(url);
launch(url);
}
}

@ -202,7 +202,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
fontWeight: FontWeight.w600,
),
Texts(
convertDateFormat(model.insuranceApproval[index].receiptOn),
model.insuranceApproval[index].receiptOn != null ? convertDateFormat(model.insuranceApproval[index].receiptOn) : "",
fontSize: 17.5,
fontWeight: FontWeight.w600,
),

@ -545,7 +545,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController.jumpToPage(0);
},
),
notificationCount != ''
projectViewModel.isLogin && notificationCount != ''
? new Positioned(
right: projectViewModel.isArabic ? 35 : 0,
top: 5,

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
@ -182,7 +183,17 @@ class InvoiceDetail extends StatelessWidget {
width: MediaQuery.of(context).size.width,
// height: 70.0,
margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0, bottom: 20.0),
child: DefaultButton(TranslationBase.of(context).sendEmail, () => {sendInvoiceEmail()}),
child: DefaultButton(TranslationBase.of(context).sendEmail, () {
showDialog(
context: context,
child: ConfirmSendEmailDialog(
email: projectViewModel.user.emailAddress,
onTapSendEmail: () {
sendInvoiceEmail();
},
),
);
}),
),
);
}

@ -0,0 +1,38 @@
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:http/io_client.dart';
import 'package:signalr_core/signalr_core.dart';
class SignalRUtil {
String hubName;
BuildContext context;
SignalRUtil({@required this.hubName, @required this.context});
HubConnection connectionBuilder;
void startSignalRConnection() async {
connectionBuilder = HubConnectionBuilder()
.withUrl(
hubName,
HttpConnectionOptions(
client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true),
logging: (level, message) => print(message),
))
.build();
await connectionBuilder.start();
connectionBuilder.on('ReceiveMessage', (message) {
print(message.toString());
});
await connectionBuilder.invoke('SendMessage', args: ['Bob', 'Says hi!']);
}
bool getConnectionState() {
if (connectionBuilder.state == HubConnectionState.connected) return true;
if (connectionBuilder.state == HubConnectionState.connected) return true;
}
}

@ -292,7 +292,7 @@ class Utils {
title: TranslationBase.of(context).myMedical,
imagePath: 'active_medication.svg',
subTitle: TranslationBase.of(context).myMedicalSubtitle,
isEnable: false,
isEnable: projectViewModel.havePrivilege(48),
),
));

Loading…
Cancel
Save