My Invoice fixes, Prescription page fixes

merge-update-with-lab-changes
haroon amjad 5 years ago
parent 2669378da4
commit ec646a7039

@ -267,27 +267,27 @@ class ListConsultation {
dynamic projectID; dynamic projectID;
dynamic doctorID; dynamic doctorID;
dynamic grandTotal; dynamic grandTotal;
int quantity; dynamic quantity;
int total; dynamic total;
dynamic discount; dynamic discount;
int subTotal; dynamic subTotal;
dynamic invoiceNo; dynamic invoiceNo;
dynamic createdOn; dynamic createdOn;
String procedureID; String procedureID;
String procedureName; String procedureName;
dynamic procedureNameN; dynamic procedureNameN;
dynamic procedurePrice; dynamic procedurePrice;
int patientShare; dynamic patientShare;
dynamic companyShare; dynamic companyShare;
int totalPatientShare; dynamic totalPatientShare;
dynamic totalCompanyShare; dynamic totalCompanyShare;
dynamic totalShare; dynamic totalShare;
dynamic discountAmount; dynamic discountAmount;
int vATPercentage; dynamic vATPercentage;
int patientVATAmount; dynamic patientVATAmount;
dynamic companyVATAmount; dynamic companyVATAmount;
dynamic totalVATAmount; dynamic totalVATAmount;
int price; dynamic price;
dynamic patientID; dynamic patientID;
dynamic patientName; dynamic patientName;
dynamic patientNameN; dynamic patientNameN;
@ -316,7 +316,7 @@ class ListConsultation {
dynamic totalPatientShareWithQuantity; dynamic totalPatientShareWithQuantity;
dynamic legalName; dynamic legalName;
dynamic legalNameN; dynamic legalNameN;
int advanceAdjustment; dynamic advanceAdjustment;
ListConsultation( ListConsultation(
{this.projectID, {this.projectID,

@ -112,7 +112,7 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
widget.doctor.nationalityFlagURL, widget.doctor.nationalityFlagURL,
widget.doctor.doctorRate, widget.doctor.doctorRate,
widget.doctor.actualDoctorRate, widget.doctor.actualDoctorRate,
widget.doctor.noOfPatientsRate, widget.docProfileList.noOfPatientsRate,
"", "",
), ),
buttonIcon: 'assets/images/new/Boo_ Appointment.svg', buttonIcon: 'assets/images/new/Boo_ Appointment.svg',

@ -7,7 +7,7 @@ import 'package:diplomaticquarterapp/services/my_invoice_service/my_invoice_serv
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/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -19,14 +19,13 @@ class InvoiceDetail extends StatelessWidget {
final DentalInvoiceDetailResponse dentalInvoiceDetailResponse; final DentalInvoiceDetailResponse dentalInvoiceDetailResponse;
final BuildContext context; final BuildContext context;
int totalServiceRate = 0; dynamic totalServiceRate = 0;
int totalDiscount = 0; dynamic totalDiscount = 0;
int totalVAT = 0; dynamic totalVAT = 0;
int subTotal = 0; dynamic subTotal = 0;
int grandTotal = 0; dynamic grandTotal = 0;
InvoiceDetail(this.doctor, this.listDentalAppointments, InvoiceDetail(this.doctor, this.listDentalAppointments, this.dentalInvoiceDetailResponse, this.context);
this.dentalInvoiceDetailResponse, this.context);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -35,18 +34,16 @@ class InvoiceDetail extends StatelessWidget {
appBarTitle: TranslationBase.of(context).myInvoice, appBarTitle: TranslationBase.of(context).myInvoice,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
DoctorView( DoctorView(doctor: doctor, isLiveCareAppointment: false, isShowFlag: false),
doctor: doctor,
isLiveCareAppointment: false,
isShowFlag: false),
Container( Container(
margin: EdgeInsets.only(left: 10.0, right: 10.0), margin: EdgeInsets.only(left: 10.0, right: 10.0),
padding: EdgeInsets.only( padding: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0, bottom: 10.0),
top: 10.0, left: 10.0, right: 10.0, bottom: 10.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.grey[800], color: Colors.grey[800],
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@ -57,34 +54,17 @@ class InvoiceDetail extends StatelessWidget {
child: Table( child: Table(
children: [ children: [
TableRow(children: [ TableRow(children: [
Text("Description", Text("Description", textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
textAlign: TextAlign.center, Text("Quantity", textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
style: TextStyle( Text("Price", textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
color: Colors.white, Text("Total", textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
fontWeight: FontWeight.bold)),
Text("Quantity",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold)),
Text("Price",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold)),
Text("Total",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold)),
]), ]),
], ],
), ),
), ),
Container( Container(
margin: EdgeInsets.only(top: 0.0, left: 10.0, right: 10.0), margin: EdgeInsets.only(top: 0.0, left: 10.0, right: 10.0),
padding: EdgeInsets.only( padding: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0, bottom: 15.0),
top: 10.0, left: 10.0, right: 10.0, bottom: 15.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@ -102,92 +82,54 @@ class InvoiceDetail extends StatelessWidget {
), ),
Container( Container(
child: AppExpandableNotifier( child: AppExpandableNotifier(
title: "Total Price: " + grandTotal.toString() + " SAR", title: "Total Price: " + dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].grandTotal.toString() + " SAR",
isExpand: true, isExpand: true,
bodyWidget: Column( bodyWidget: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Table( Table(
children: [ children: [
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Discount: ", child: Text("Discount: ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(totalDiscount.toString() + " SAR", child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].discountAmount.toString() + " SAR",
textAlign: TextAlign.center, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
]), ]),
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text( child: Text("VAT (" + dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].vATPercentage.toString() + "%)",
"VAT (" + textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
dentalInvoiceDetailResponse
.listEInvoiceForDental[0]
.listConsultation[0]
.vATPercentage
.toString() +
"%)",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(totalVAT.toString() + " SAR", child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].patientVATAmount.toString() + " SAR",
textAlign: TextAlign.center, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
]), ]),
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Total: ", child: Text("Total: ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(grandTotal.toString() + " SAR", child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].totalPatientShare.toString() + " SAR",
textAlign: TextAlign.center, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
]), ]),
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Paid: ", child: Text("Paid: ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
EdgeInsets.only(top: 10.0, bottom: 10.0), child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].totalPatientShare.toString() + " SAR",
child: Text(grandTotal.toString() + " SAR", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
]), ]),
], ],
@ -204,50 +146,27 @@ class InvoiceDetail extends StatelessWidget {
), ),
Container( Container(
margin: EdgeInsets.only(top: 0.0, left: 10.0, right: 10.0), margin: EdgeInsets.only(top: 0.0, left: 10.0, right: 10.0),
padding: EdgeInsets.only( padding: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0, bottom: 15.0),
top: 10.0, left: 10.0, right: 10.0, bottom: 15.0), decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(8))),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8))),
child: Table(children: [ child: Table(children: [
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Insurance: ", child: Text("Insurance: ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, bottom: 5.0), margin: EdgeInsets.only(top: 10.0, bottom: 5.0),
child: Text( child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].companyName, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
dentalInvoiceDetailResponse
.listEInvoiceForDental[0].companyName,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
]), ]),
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Insurance ID: ", child: Text("Insurance ID: ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, bottom: 10.0), margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
child: Text( child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].insuranceID, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
dentalInvoiceDetailResponse
.listEInvoiceForDental[0].insuranceID,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold)),
), ),
]), ]),
]), ]),
@ -261,15 +180,9 @@ class InvoiceDetail extends StatelessWidget {
), ),
bottomSheet: Container( bottomSheet: Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: 70.0, // height: 70.0,
margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0), margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0, bottom: 20.0),
child: Button( child: DefaultButton(TranslationBase.of(context).sendEmail, () => {sendInvoiceEmail()}),
onTap: () {
sendInvoiceEmail();
},
label: TranslationBase.of(context).sendEmail,
backgroundColor: Colors.red[900],
),
), ),
); );
} }
@ -278,14 +191,10 @@ class InvoiceDetail extends StatelessWidget {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
MyInvoicesService myInvoicesService = new MyInvoicesService(); MyInvoicesService myInvoicesService = new MyInvoicesService();
myInvoicesService myInvoicesService.sendDentalAppointmentInvoiceEmail(listDentalAppointments.projectID, listDentalAppointments.appointmentNo, context).then((res) {
.sendDentalAppointmentInvoiceEmail(
12, listDentalAppointments.appointmentNo, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast( AppToast.showSuccessToast(message: TranslationBase.of(context).emailSentSuccessfully);
message: TranslationBase.of(context).emailSentSuccessfully);
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
@ -299,37 +208,24 @@ class InvoiceDetail extends StatelessWidget {
List<TableRow> fullData(context) { List<TableRow> fullData(context) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.forEach((lab) {
.forEach((lab) {
tableRow.add( tableRow.add(
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(lab.procedureName, child: Text(lab.procedureName, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.w400)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(lab.quantity.toString(), child: Text(lab.quantity.toString(), textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.w400)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(lab.price.toString() + " SAR", child: Text(lab.price.toString() + " SAR", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.w400)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(lab.total.toString() + " SAR", child: Text(lab.total.toString() + " SAR", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400)),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black, fontWeight: FontWeight.w400)),
), ),
]), ]),
); );

@ -46,6 +46,8 @@ class _MyInvoicesState extends State<MyInvoices> {
appBarTitle: TranslationBase.of(context).myInvoice, appBarTitle: TranslationBase.of(context).myInvoice,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: true, isShowDecPage: true,
showNewAppBar: true,
showNewAppBarTitle: true,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
body: Container( body: Container(
child: SingleChildScrollView( child: SingleChildScrollView(
@ -206,17 +208,17 @@ class _MyInvoicesState extends State<MyInvoices> {
doctor.date = listDentalAppointments.appointmentDate; doctor.date = listDentalAppointments.appointmentDate;
doctor.actualDoctorRate = 0; doctor.actualDoctorRate = 0;
doctor.doctorImageURL = listDentalAppointments.doctorImageURL; doctor.doctorImageURL = listDentalAppointments.doctorImageURL;
doctor.projectID = listDentalAppointments.projectID;
doctor.dayName = listDentalAppointments.invoiceNo; doctor.dayName = listDentalAppointments.invoiceNo;
doctor.doctorTitle = "Dr."; doctor.doctorTitle = "Dr.";
doctor.clinicName = "InvoiceNo: " + listDentalAppointments.invoiceNo.toString(); doctor.clinicName = "InvoiceNo: " + listDentalAppointments.invoiceNo.toString();
myInvoicesService.getDentalAppointmentInvoice(12, listDentalAppointments.appointmentNo, context).then((res) { myInvoicesService.getDentalAppointmentInvoice(listDentalAppointments.projectID, listDentalAppointments.appointmentNo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
setState(() { setState(() {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
dentalInvoiceDetailResponse = dentalInvoiceDetailResponse =
DentalInvoiceDetailResponse.fromJson(res); DentalInvoiceDetailResponse.fromJson(res);
print(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation.length);
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
@ -235,7 +237,6 @@ class _MyInvoicesState extends State<MyInvoices> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err.toString()); AppToast.showErrorToast(message: err.toString());
Navigator.of(context).pop();
}); });
} }

@ -1,4 +1,3 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
@ -10,15 +9,14 @@ import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_de
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.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/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../../widgets/dialogs/confirm_send_email_dialog.dart'; import '../../../widgets/dialogs/confirm_send_email_dialog.dart';
import 'PrescriptionIDeliveryAddressPage.dart'; import 'PrescriptionIDeliveryAddressPage.dart';
@ -327,13 +325,12 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 2), padding: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 20),
child: Container( child: Container(
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Button( child: DefaultButton(
label: TranslationBase.of(context).resendOrder, TranslationBase.of(context).resendOrder,
backgroundColor: Colors.green[800], () {
onTap: () {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
@ -345,6 +342,7 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
); );
}, },
color: Colors.green[800],
), ),
), ),
), ),

@ -74,8 +74,8 @@ class PrescriptionsPage extends StatelessWidget {
subName: prescriptions.name, subName: prescriptions.name,
isInOutPatient: prescriptions.isInOutPatient, isInOutPatient: prescriptions.isInOutPatient,
isLiveCareAppointment: prescriptions.isLiveCareAppointment, isLiveCareAppointment: prescriptions.isLiveCareAppointment,
appointmentTime: DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions // appointmentTime: DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions
.appointmentDate)), // .appointmentDate)),
date: DateUtil.convertStringToDate(prescriptions date: DateUtil.convertStringToDate(prescriptions
.appointmentDate) //projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)), .appointmentDate) //projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)),
); );

@ -1,15 +1,12 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.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';
@ -90,13 +87,10 @@ class RadiologyDetailsPage extends StatelessWidget {
(projectViewModel.havePrivilege(9) || projectViewModel.havePrivilege(8)) (projectViewModel.havePrivilege(9) || projectViewModel.havePrivilege(8))
? (finalRadiology.dIAPACSURL != "" && projectViewModel.havePrivilege(9)) ? (finalRadiology.dIAPACSURL != "" && projectViewModel.havePrivilege(9))
? Container( ? Container(
width: MediaQuery.of(context).size.width * 0.8, child: DefaultButton(
child: Button( TranslationBase.of(context).openRad,
onTap: () { () => {launch(model.radImageURL)},
launch(model.radImageURL); textColor: Colors.white,
},
label: TranslationBase.of(context).openRad,
backgroundColor: CustomColors.accentColor,
), ),
) )
: Container() : Container()
@ -109,31 +103,6 @@ class RadiologyDetailsPage extends StatelessWidget {
], ],
), ),
), ),
// bottomSheet: (projectViewModel.havePrivilege(9) || projectViewModel.havePrivilege(8))
// ? Container(
// width: double.infinity,
// height: finalRadiology.dIAPACSURL != "" ? MediaQuery.of(context).size.height * 0.25 : MediaQuery.of(context).size.height * 0.14,
// color: Colors.grey[100],
// child: Column(
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// Divider(),
// if (projectViewModel.havePrivilege(8))
// Container(
// width: MediaQuery.of(context).size.width * 0.8,
// child: Button(
// onTap: () {
// showConfirmMessage(finalRadiology: finalRadiology, model: model);
// },
// label: TranslationBase.of(context).sendCopyRad,
// loading: model.state == ViewState.BusyLocal,
// backgroundColor: Theme.of(context).primaryColor,
// ),
// )
// ],
// ),
// )
// : Container(),
), ),
); );
} }

@ -9,6 +9,7 @@ import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
@ -21,7 +22,6 @@ import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/eye/EyeMeasurementsPage.dart'; import 'package:diplomaticquarterapp/pages/medical/eye/EyeMeasurementsPage.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/pages/medical/my_invoices/my_invoice_page.dart'; import 'package:diplomaticquarterapp/pages/medical/my_invoices/my_invoice_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/my_trackers.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/my_trackers.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
@ -308,6 +308,16 @@ class Utils {
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)), MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
)); ));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myInvoice,
imagePath: 'invoice_list.svg',
subTitle: TranslationBase.of(context).invoicesList,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null, onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(

@ -1,13 +1,10 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.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/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:flutter_countdown_timer/countdown_timer_controller.dart'; import 'package:flutter_countdown_timer/countdown_timer_controller.dart';
import 'package:flutter_countdown_timer/current_remaining_time.dart'; import 'package:flutter_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
@ -138,7 +135,7 @@ class DoctorCard extends StatelessWidget {
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48, height: 18 / 12),
), ),
], ],
) ),
], ],
), ),
Row( Row(
@ -221,7 +218,10 @@ class DoctorCard extends StatelessWidget {
Widget myRichText(String title, String value, bool isArabic) { Widget myRichText(String title, String value, bool isArabic) {
return RichText( return RichText(
maxLines: 1, maxLines: 1,
text: TextSpan(text: title, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10), children: <TextSpan>[ text: TextSpan(
text: title,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10),
children: <TextSpan>[
TextSpan( TextSpan(
text: " $value", text: " $value",
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),

Loading…
Cancel
Save