done Prescriptions
parent
ec09721869
commit
940b327561
@ -0,0 +1,108 @@
|
||||
class PharmacyPrescriptions {
|
||||
String expiryDate;
|
||||
double sellingPrice;
|
||||
int quantity;
|
||||
int itemID;
|
||||
int locationID;
|
||||
int projectID;
|
||||
String setupID;
|
||||
String locationDescription;
|
||||
Null locationDescriptionN;
|
||||
String itemDescription;
|
||||
Null itemDescriptionN;
|
||||
String alias;
|
||||
int locationTypeID;
|
||||
int barcode;
|
||||
Null companybarcode;
|
||||
int cityID;
|
||||
String cityName;
|
||||
int distanceInKilometers;
|
||||
String latitude;
|
||||
int locationType;
|
||||
String longitude;
|
||||
String phoneNumber;
|
||||
String projectImageURL;
|
||||
Null sortOrder;
|
||||
|
||||
PharmacyPrescriptions(
|
||||
{this.expiryDate,
|
||||
this.sellingPrice,
|
||||
this.quantity,
|
||||
this.itemID,
|
||||
this.locationID,
|
||||
this.projectID,
|
||||
this.setupID,
|
||||
this.locationDescription,
|
||||
this.locationDescriptionN,
|
||||
this.itemDescription,
|
||||
this.itemDescriptionN,
|
||||
this.alias,
|
||||
this.locationTypeID,
|
||||
this.barcode,
|
||||
this.companybarcode,
|
||||
this.cityID,
|
||||
this.cityName,
|
||||
this.distanceInKilometers,
|
||||
this.latitude,
|
||||
this.locationType,
|
||||
this.longitude,
|
||||
this.phoneNumber,
|
||||
this.projectImageURL,
|
||||
this.sortOrder});
|
||||
|
||||
PharmacyPrescriptions.fromJson(Map<String, dynamic> json) {
|
||||
expiryDate = json['ExpiryDate'];
|
||||
sellingPrice = json['SellingPrice'];
|
||||
quantity = json['Quantity'];
|
||||
itemID = json['ItemID'];
|
||||
locationID = json['LocationID'];
|
||||
projectID = json['ProjectID'];
|
||||
setupID = json['SetupID'];
|
||||
locationDescription = json['LocationDescription'];
|
||||
locationDescriptionN = json['LocationDescriptionN'];
|
||||
itemDescription = json['ItemDescription'];
|
||||
itemDescriptionN = json['ItemDescriptionN'];
|
||||
alias = json['Alias'];
|
||||
locationTypeID = json['LocationTypeID'];
|
||||
barcode = json['Barcode'];
|
||||
companybarcode = json['Companybarcode'];
|
||||
cityID = json['CityID'];
|
||||
cityName = json['CityName'];
|
||||
distanceInKilometers = json['DistanceInKilometers'];
|
||||
latitude = json['Latitude'];
|
||||
locationType = json['LocationType'];
|
||||
longitude = json['Longitude'];
|
||||
phoneNumber = json['PhoneNumber'];
|
||||
projectImageURL = json['ProjectImageURL'];
|
||||
sortOrder = json['SortOrder'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ExpiryDate'] = this.expiryDate;
|
||||
data['SellingPrice'] = this.sellingPrice;
|
||||
data['Quantity'] = this.quantity;
|
||||
data['ItemID'] = this.itemID;
|
||||
data['LocationID'] = this.locationID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['LocationDescription'] = this.locationDescription;
|
||||
data['LocationDescriptionN'] = this.locationDescriptionN;
|
||||
data['ItemDescription'] = this.itemDescription;
|
||||
data['ItemDescriptionN'] = this.itemDescriptionN;
|
||||
data['Alias'] = this.alias;
|
||||
data['LocationTypeID'] = this.locationTypeID;
|
||||
data['Barcode'] = this.barcode;
|
||||
data['Companybarcode'] = this.companybarcode;
|
||||
data['CityID'] = this.cityID;
|
||||
data['CityName'] = this.cityName;
|
||||
data['DistanceInKilometers'] = this.distanceInKilometers;
|
||||
data['Latitude'] = this.latitude;
|
||||
data['LocationType'] = this.locationType;
|
||||
data['Longitude'] = this.longitude;
|
||||
data['PhoneNumber'] = this.phoneNumber;
|
||||
data['ProjectImageURL'] = this.projectImageURL;
|
||||
data['SortOrder'] = this.sortOrder;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,144 @@
|
||||
class PrescriptionReportEnh {
|
||||
String address;
|
||||
int appointmentNo;
|
||||
String clinic;
|
||||
Null companyName;
|
||||
int days;
|
||||
String doctorName;
|
||||
int doseDailyQuantity;
|
||||
String frequency;
|
||||
int frequencyNumber;
|
||||
Null image;
|
||||
Null imageExtension;
|
||||
String imageSRCUrl;
|
||||
Null imageString;
|
||||
String imageThumbUrl;
|
||||
String isCovered;
|
||||
String itemDescription;
|
||||
int itemID;
|
||||
String orderDate;
|
||||
int patientID;
|
||||
String patientName;
|
||||
String phoneOffice1;
|
||||
Null prescriptionQR;
|
||||
int prescriptionTimes;
|
||||
Null productImage;
|
||||
Null productImageBase64;
|
||||
String productImageString;
|
||||
int projectID;
|
||||
String projectName;
|
||||
String remarks;
|
||||
String route;
|
||||
String sKU;
|
||||
int scaleOffset;
|
||||
String startDate;
|
||||
|
||||
PrescriptionReportEnh(
|
||||
{this.address,
|
||||
this.appointmentNo,
|
||||
this.clinic,
|
||||
this.companyName,
|
||||
this.days,
|
||||
this.doctorName,
|
||||
this.doseDailyQuantity,
|
||||
this.frequency,
|
||||
this.frequencyNumber,
|
||||
this.image,
|
||||
this.imageExtension,
|
||||
this.imageSRCUrl,
|
||||
this.imageString,
|
||||
this.imageThumbUrl,
|
||||
this.isCovered,
|
||||
this.itemDescription,
|
||||
this.itemID,
|
||||
this.orderDate,
|
||||
this.patientID,
|
||||
this.patientName,
|
||||
this.phoneOffice1,
|
||||
this.prescriptionQR,
|
||||
this.prescriptionTimes,
|
||||
this.productImage,
|
||||
this.productImageBase64,
|
||||
this.productImageString,
|
||||
this.projectID,
|
||||
this.projectName,
|
||||
this.remarks,
|
||||
this.route,
|
||||
this.sKU,
|
||||
this.scaleOffset,
|
||||
this.startDate});
|
||||
|
||||
PrescriptionReportEnh.fromJson(Map<String, dynamic> json) {
|
||||
address = json['Address'];
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
clinic = json['Clinic'];
|
||||
companyName = json['CompanyName'];
|
||||
days = json['Days'];
|
||||
doctorName = json['DoctorName'];
|
||||
doseDailyQuantity = json['DoseDailyQuantity'];
|
||||
frequency = json['Frequency'];
|
||||
frequencyNumber = json['FrequencyNumber'];
|
||||
image = json['Image'];
|
||||
imageExtension = json['ImageExtension'];
|
||||
imageSRCUrl = json['ImageSRCUrl'];
|
||||
imageString = json['ImageString'];
|
||||
imageThumbUrl = json['ImageThumbUrl'];
|
||||
isCovered = json['IsCovered'];
|
||||
itemDescription = json['ItemDescription'];
|
||||
itemID = json['ItemID'];
|
||||
orderDate = json['OrderDate'];
|
||||
patientID = json['PatientID'];
|
||||
patientName = json['PatientName'];
|
||||
phoneOffice1 = json['PhoneOffice1'];
|
||||
prescriptionQR = json['PrescriptionQR'];
|
||||
prescriptionTimes = json['PrescriptionTimes'];
|
||||
productImage = json['ProductImage'];
|
||||
productImageBase64 = json['ProductImageBase64'];
|
||||
productImageString = json['ProductImageString'];
|
||||
projectID = json['ProjectID'];
|
||||
projectName = json['ProjectName'];
|
||||
remarks = json['Remarks'];
|
||||
route = json['Route'];
|
||||
sKU = json['SKU'];
|
||||
scaleOffset = json['ScaleOffset'];
|
||||
startDate = json['StartDate'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Address'] = this.address;
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['Clinic'] = this.clinic;
|
||||
data['CompanyName'] = this.companyName;
|
||||
data['Days'] = this.days;
|
||||
data['DoctorName'] = this.doctorName;
|
||||
data['DoseDailyQuantity'] = this.doseDailyQuantity;
|
||||
data['Frequency'] = this.frequency;
|
||||
data['FrequencyNumber'] = this.frequencyNumber;
|
||||
data['Image'] = this.image;
|
||||
data['ImageExtension'] = this.imageExtension;
|
||||
data['ImageSRCUrl'] = this.imageSRCUrl;
|
||||
data['ImageString'] = this.imageString;
|
||||
data['ImageThumbUrl'] = this.imageThumbUrl;
|
||||
data['IsCovered'] = this.isCovered;
|
||||
data['ItemDescription'] = this.itemDescription;
|
||||
data['ItemID'] = this.itemID;
|
||||
data['OrderDate'] = this.orderDate;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['PatientName'] = this.patientName;
|
||||
data['PhoneOffice1'] = this.phoneOffice1;
|
||||
data['PrescriptionQR'] = this.prescriptionQR;
|
||||
data['PrescriptionTimes'] = this.prescriptionTimes;
|
||||
data['ProductImage'] = this.productImage;
|
||||
data['ProductImageBase64'] = this.productImageBase64;
|
||||
data['ProductImageString'] = this.productImageString;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ProjectName'] = this.projectName;
|
||||
data['Remarks'] = this.remarks;
|
||||
data['Route'] = this.route;
|
||||
data['SKU'] = this.sKU;
|
||||
data['ScaleOffset'] = this.scaleOffset;
|
||||
data['StartDate'] = this.startDate;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
class RequestGetListPharmacyForPrescriptions {
|
||||
int latitude;
|
||||
int longitude;
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
String sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
int itemID;
|
||||
|
||||
RequestGetListPharmacyForPrescriptions(
|
||||
{this.latitude,
|
||||
this.longitude,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.itemID});
|
||||
|
||||
RequestGetListPharmacyForPrescriptions.fromJson(Map<String, dynamic> json) {
|
||||
latitude = json['Latitude'];
|
||||
longitude = json['Longitude'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
itemID = json['ItemID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Latitude'] = this.latitude;
|
||||
data['Longitude'] = this.longitude;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['ItemID'] = this.itemID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
class RequestPrescriptionReportEnh {
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
String sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
int patientID;
|
||||
String tokenID;
|
||||
int patientTypeID;
|
||||
int patientType;
|
||||
int appointmentNo;
|
||||
String setupID;
|
||||
int episodeID;
|
||||
int clinicID;
|
||||
int projectID;
|
||||
|
||||
RequestPrescriptionReportEnh(
|
||||
{this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.patientID,
|
||||
this.tokenID,
|
||||
this.patientTypeID,
|
||||
this.patientType,
|
||||
this.appointmentNo,
|
||||
this.setupID,
|
||||
this.episodeID,
|
||||
this.clinicID,
|
||||
this.projectID});
|
||||
|
||||
RequestPrescriptionReportEnh.fromJson(Map<String, dynamic> json) {
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
patientID = json['PatientID'];
|
||||
tokenID = json['TokenID'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
patientType = json['PatientType'];
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
setupID = json['SetupID'];
|
||||
episodeID = json['EpisodeID'];
|
||||
clinicID = json['ClinicID'];
|
||||
projectID = json['ProjectID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['EpisodeID'] = this.episodeID;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:maps_launcher/maps_launcher.dart';
|
||||
|
||||
class PharmacyForPrescriptionsPage extends StatelessWidget {
|
||||
final PrescriptionReport prescriptionReport;
|
||||
|
||||
PharmacyForPrescriptionsPage({Key key, this.prescriptionReport});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<PrescriptionsViewModel>(
|
||||
onModelReady: (model) => model.getListPharmacyForPrescriptions(itemId: prescriptionReport.itemID),
|
||||
builder: (_, model, widget) => AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: 'Title',
|
||||
baseViewModel: model,
|
||||
body: ListView.builder(
|
||||
itemBuilder: (context, index) => Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
|
||||
padding: EdgeInsets.all(8.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10.0),
|
||||
),
|
||||
border: Border.all(color: Colors.grey[200], width: 0.5),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||
child: Image.network(
|
||||
model.pharmacyPrescriptionsList[index].projectImageURL,
|
||||
fit: BoxFit.cover,
|
||||
width: 60,
|
||||
height: 70,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Texts(model.pharmacyPrescriptionsList[index]
|
||||
.locationDescription),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Texts(model.pharmacyPrescriptionsList[index].cityName),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
MapsLauncher.launchCoordinates(
|
||||
double.parse(
|
||||
model.pharmacyPrescriptionsList[index].latitude),
|
||||
double.parse(
|
||||
model.pharmacyPrescriptionsList[index].longitude));
|
||||
},
|
||||
child: Icon(
|
||||
Icons.pin_drop,
|
||||
size: 18,
|
||||
color: Colors.red[900],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 15,
|
||||
),
|
||||
InkWell(
|
||||
onTap: Feedback.wrapForTap((){
|
||||
launch("tel://${model.pharmacyPrescriptionsList[index].phoneNumber}");
|
||||
},context),
|
||||
child: Container(
|
||||
child: Icon(
|
||||
Icons.call,
|
||||
size: 18,
|
||||
color: Colors.red[900],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
itemCount: model.pharmacyPrescriptionsList.length,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class PrescriptionsHistory extends StatefulWidget {
|
||||
@override
|
||||
_PrescriptionsHistoryState createState() => _PrescriptionsHistoryState();
|
||||
}
|
||||
|
||||
class _PrescriptionsHistoryState extends State<PrescriptionsHistory> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/BottomButton.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PrescriptionsHistoryDetailsPage extends StatelessWidget {
|
||||
final PrescriptionsOrder prescriptionsOrder;
|
||||
|
||||
PrescriptionsHistoryDetailsPage({Key key,this.prescriptionsOrder});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<PrescriptionsViewModel>(
|
||||
onModelReady: (model) => model.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder),
|
||||
builder: (_,model,widget) => AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: 'Order History',
|
||||
baseViewModel: model,
|
||||
body: SingleChildScrollView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(15.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Table(
|
||||
border: TableBorder.symmetric(
|
||||
inside: BorderSide(width: 0.5),
|
||||
outside: BorderSide(width: 0.5)),
|
||||
children: [
|
||||
TableRow(
|
||||
children: [
|
||||
Container(
|
||||
height: 50,
|
||||
color: Colors.white,
|
||||
child: Center(child: Texts('Order No'),),
|
||||
),
|
||||
Container(
|
||||
height: 50,
|
||||
color: Colors.white,
|
||||
child: Center(child: Texts('Date'),),
|
||||
),
|
||||
]
|
||||
),
|
||||
TableRow(
|
||||
children: [
|
||||
Container(
|
||||
height: 50,
|
||||
color: Colors.white,
|
||||
child: Center(child: Texts('12655'),),
|
||||
),
|
||||
Container(
|
||||
height: 50,
|
||||
color: Colors.white,
|
||||
child: Center(child: Texts('2020-7-15'),),
|
||||
),
|
||||
]
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(height: 15,),
|
||||
...List.generate(model.prescriptionReportEnhList.length, (index) => Container(
|
||||
margin: EdgeInsets.all(8.0),
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||
child: Image.network(
|
||||
model.prescriptionReportEnhList[index].imageSRCUrl,
|
||||
fit: BoxFit.cover,
|
||||
width: 60,
|
||||
height: 70,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Texts(model.prescriptionReportEnhList[index]
|
||||
.itemDescription),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
bottomSheet: Container(
|
||||
//padding: EdgeInsets.all(8.0),
|
||||
// margin: EdgeInsets.all(8.0),
|
||||
child: BottomButton(label: 'Cancel order',color: Colors.red[300],),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PrescriptionsHistoryPage extends StatelessWidget {
|
||||
final PrescriptionsViewModel prescriptionsViewModel;
|
||||
|
||||
PrescriptionsHistoryPage({Key key, this.prescriptionsViewModel});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
baseViewModel: prescriptionsViewModel,
|
||||
body: ListView.builder(
|
||||
physics: BouncingScrollPhysics(),
|
||||
itemBuilder: (context, index) => InkWell(
|
||||
onTap: () => Navigator.push(
|
||||
context,
|
||||
FadePage(
|
||||
page: PrescriptionsHistoryDetailsPage(
|
||||
prescriptionsOrder:
|
||||
prescriptionsViewModel.prescriptionsHistory[index],
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(15.0),
|
||||
margin: EdgeInsets.all(8.0),
|
||||
decoration:
|
||||
BoxDecoration(shape: BoxShape.rectangle, color: Colors.white),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Texts(
|
||||
DateUtil.getDayMonthYearHourMinuteDateFormatted(
|
||||
prescriptionsViewModel
|
||||
.prescriptionsHistory[index].createdOn),
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Texts(
|
||||
'Order No ${prescriptionsViewModel.prescriptionsHistory[index].iD}'),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Texts(
|
||||
'${prescriptionsViewModel.prescriptionsHistory[index].descriptionN}'),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Texts(
|
||||
'Order Details',
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 25,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
itemCount: prescriptionsViewModel.prescriptionsHistory.length,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue