|
|
|
|
@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
|
import 'package:smart_progress_bar/smart_progress_bar.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
@ -16,7 +16,10 @@ class PrescriptionReportPage extends StatefulWidget {
|
|
|
|
|
dynamic listPres;
|
|
|
|
|
AppoitmentAllHistoryResultList appo;
|
|
|
|
|
|
|
|
|
|
PrescriptionReportPage({@required this.prescriptionReportEnhList, @required this.listPres, @required this.appo});
|
|
|
|
|
PrescriptionReportPage(
|
|
|
|
|
{@required this.prescriptionReportEnhList,
|
|
|
|
|
@required this.listPres,
|
|
|
|
|
@required this.appo});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_PrescriptionReportState createState() => _PrescriptionReportState();
|
|
|
|
|
@ -113,12 +116,18 @@ class _PrescriptionReportState extends State<PrescriptionReportPage> {
|
|
|
|
|
|
|
|
|
|
sendPrescriptionReportEmail() {
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
service.sendPrescriptionEmail(widget.appo.appointmentDate, widget.appo.setupID, widget.listPres, context).then((res) {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
service
|
|
|
|
|
.sendPrescriptionEmail(widget.appo.appointmentDate, widget.appo.setupID,
|
|
|
|
|
widget.listPres, context)
|
|
|
|
|
.then((res) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
AppToast.showSuccessToast(message: 'A copy has been sent to the e-mail');
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
print(err);
|
|
|
|
|
AppToast.showErrorToast(message: err);
|
|
|
|
|
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
navigateToPrescriptionDetails(PrescriptionReportEnh prescriptionReportEnh) {
|
|
|
|
|
|