|
|
|
@ -21,11 +21,7 @@ class PrescriptionOrderOverview extends StatelessWidget {
|
|
|
|
final AddressInfo selectedAddress;
|
|
|
|
final AddressInfo selectedAddress;
|
|
|
|
final double latitude;
|
|
|
|
final double latitude;
|
|
|
|
final double longitude;
|
|
|
|
final double longitude;
|
|
|
|
PrescriptionOrderOverview(
|
|
|
|
PrescriptionOrderOverview({Key key, this.prescriptions, this.prescriptionReportList, this.prescriptionReportEnhList, this.selectedAddress, this.latitude, this.longitude});
|
|
|
|
{Key key,
|
|
|
|
|
|
|
|
this.prescriptions,
|
|
|
|
|
|
|
|
this.prescriptionReportList,
|
|
|
|
|
|
|
|
this.prescriptionReportEnhList, this.selectedAddress, this.latitude, this.longitude});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
@ -50,14 +46,12 @@ class PrescriptionOrderOverview extends StatelessWidget {
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(10.0),
|
|
|
|
Radius.circular(10.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
border:
|
|
|
|
border: Border.all(color: Colors.grey[200], width: 0.5),
|
|
|
|
Border.all(color: Colors.grey[200], width: 0.5),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
ClipRRect(
|
|
|
|
ClipRRect(
|
|
|
|
borderRadius:
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
|
|
BorderRadius.all(Radius.circular(5)),
|
|
|
|
|
|
|
|
child: Image.network(
|
|
|
|
child: Image.network(
|
|
|
|
prescriptionReportList[index].imageSRCUrl,
|
|
|
|
prescriptionReportList[index].imageSRCUrl,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
@ -72,13 +66,8 @@ class PrescriptionOrderOverview extends StatelessWidget {
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
child: Texts(prescriptionReportList[index]
|
|
|
|
child: Texts(
|
|
|
|
.itemDescription
|
|
|
|
prescriptionReportList[index].itemDescription.isNotEmpty ? prescriptionReportList[index].itemDescription : prescriptionReportList[index].itemDescriptionN)),
|
|
|
|
.isNotEmpty
|
|
|
|
|
|
|
|
? prescriptionReportList[index]
|
|
|
|
|
|
|
|
.itemDescription
|
|
|
|
|
|
|
|
: prescriptionReportList[index]
|
|
|
|
|
|
|
|
.itemDescriptionN)),
|
|
|
|
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
Icon(
|
|
|
|
Icon(
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
@ -114,8 +103,7 @@ class PrescriptionOrderOverview extends StatelessWidget {
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Texts(prescriptionReportEnhList[index]
|
|
|
|
Texts(prescriptionReportEnhList[index].itemDescription),
|
|
|
|
.itemDescription),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -138,7 +126,9 @@ class PrescriptionOrderOverview extends StatelessWidget {
|
|
|
|
color: Colors.grey[100],
|
|
|
|
color: Colors.grey[100],
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
SizedBox(height: 12,),
|
|
|
|
SizedBox(
|
|
|
|
|
|
|
|
height: 12,
|
|
|
|
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
|
|
child: SecondaryButton(
|
|
|
|
child: SecondaryButton(
|
|
|
|
@ -152,28 +142,29 @@ class PrescriptionOrderOverview extends StatelessWidget {
|
|
|
|
okTitle: TranslationBase.of(context).ok,
|
|
|
|
okTitle: TranslationBase.of(context).ok,
|
|
|
|
onTap: () async {
|
|
|
|
onTap: () async {
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
await model.insertDeliveryOrder(lineItemNo: 0,
|
|
|
|
await model
|
|
|
|
|
|
|
|
.insertDeliveryOrder(
|
|
|
|
|
|
|
|
lineItemNo: 0,
|
|
|
|
longitude: longitude,
|
|
|
|
longitude: longitude,
|
|
|
|
latitude: latitude,appointmentNo: prescriptions.appointmentNo,
|
|
|
|
latitude: latitude,
|
|
|
|
dischargeID: prescriptions.dischargeNo,createdBy: model.user.patientID)
|
|
|
|
appointmentNo: prescriptions.appointmentNo,
|
|
|
|
|
|
|
|
dischargeID: prescriptions.dischargeNo,
|
|
|
|
|
|
|
|
createdBy: model.user.patientID)
|
|
|
|
.then((value) {
|
|
|
|
.then((value) {
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
if (model.state == ViewState.ErrorLocal)
|
|
|
|
if (model.state == ViewState.ErrorLocal)
|
|
|
|
showErrorDialog(context,model.error);
|
|
|
|
showErrorDialog(context, model.error);
|
|
|
|
else
|
|
|
|
else {
|
|
|
|
{
|
|
|
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
|
|
|
Navigator.pop(context, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}).catchError((e) {
|
|
|
|
}).catchError((e) {
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
))
|
|
|
|
))
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -183,7 +174,7 @@ class PrescriptionOrderOverview extends StatelessWidget {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void showErrorDialog(BuildContext context,String error) {
|
|
|
|
void showErrorDialog(BuildContext context, String error) {
|
|
|
|
showDialog(
|
|
|
|
showDialog(
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
child: ConfirmWithMessageDialog(
|
|
|
|
child: ConfirmWithMessageDialog(
|
|
|
|
@ -192,12 +183,9 @@ class PrescriptionOrderOverview extends StatelessWidget {
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context, true);
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|