prescription delivery implementation contd
parent
bad76059c0
commit
9fd7f71a34
@ -0,0 +1,318 @@
|
|||||||
|
class PrescriptionDeliveryResponseModel {
|
||||||
|
int? iD;
|
||||||
|
int? patientId;
|
||||||
|
int? patientOutSa;
|
||||||
|
bool? isOutPatient;
|
||||||
|
int? projectId;
|
||||||
|
int? nearestProjectId;
|
||||||
|
dynamic longitude;
|
||||||
|
dynamic latitude;
|
||||||
|
dynamic appointmentNo;
|
||||||
|
dynamic dischargeId;
|
||||||
|
int? statusId;
|
||||||
|
int? serviceId;
|
||||||
|
int? channel;
|
||||||
|
Orderpayment? orderpayment;
|
||||||
|
dynamic orderselectedservice;
|
||||||
|
dynamic wforder;
|
||||||
|
dynamic orderapprovalobj;
|
||||||
|
String? created;
|
||||||
|
dynamic createdBy;
|
||||||
|
dynamic modified;
|
||||||
|
dynamic modifiedBy;
|
||||||
|
bool? isDeleted;
|
||||||
|
String? statusText;
|
||||||
|
int? paymentStatus;
|
||||||
|
dynamic clientRequestid;
|
||||||
|
dynamic paymentStatusText;
|
||||||
|
String? projectName;
|
||||||
|
String? nearestProjectName;
|
||||||
|
dynamic paymentAmount;
|
||||||
|
WFOrder? wFOrder;
|
||||||
|
String? serviceText;
|
||||||
|
bool? isSentForApproval;
|
||||||
|
int? exaCartOrderId;
|
||||||
|
bool? isTimer;
|
||||||
|
int? timeSeconds;
|
||||||
|
int? totalPendingSeconds;
|
||||||
|
int? timeMinute;
|
||||||
|
int? timeHour;
|
||||||
|
int? timeTotalSeconds;
|
||||||
|
int? timeTotalMinute;
|
||||||
|
int? timeTotalHour;
|
||||||
|
dynamic approvalStatus;
|
||||||
|
bool? isActive;
|
||||||
|
int? clickButton;
|
||||||
|
List<dynamic>? procedures;
|
||||||
|
dynamic pickupLocation;
|
||||||
|
dynamic dropOffLocation;
|
||||||
|
dynamic clinicName;
|
||||||
|
dynamic doctorName;
|
||||||
|
dynamic branch;
|
||||||
|
dynamic time;
|
||||||
|
dynamic notes;
|
||||||
|
|
||||||
|
PrescriptionDeliveryResponseModel(
|
||||||
|
{this.iD,
|
||||||
|
this.patientId,
|
||||||
|
this.patientOutSa,
|
||||||
|
this.isOutPatient,
|
||||||
|
this.projectId,
|
||||||
|
this.nearestProjectId,
|
||||||
|
this.longitude,
|
||||||
|
this.latitude,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.dischargeId,
|
||||||
|
this.statusId,
|
||||||
|
this.serviceId,
|
||||||
|
this.channel,
|
||||||
|
this.orderpayment,
|
||||||
|
this.orderselectedservice,
|
||||||
|
this.wforder,
|
||||||
|
this.orderapprovalobj,
|
||||||
|
this.created,
|
||||||
|
this.createdBy,
|
||||||
|
this.modified,
|
||||||
|
this.modifiedBy,
|
||||||
|
this.isDeleted,
|
||||||
|
this.statusText,
|
||||||
|
this.paymentStatus,
|
||||||
|
this.clientRequestid,
|
||||||
|
this.paymentStatusText,
|
||||||
|
this.projectName,
|
||||||
|
this.nearestProjectName,
|
||||||
|
this.paymentAmount,
|
||||||
|
this.wFOrder,
|
||||||
|
this.serviceText,
|
||||||
|
this.isSentForApproval,
|
||||||
|
this.exaCartOrderId,
|
||||||
|
this.isTimer,
|
||||||
|
this.timeSeconds,
|
||||||
|
this.totalPendingSeconds,
|
||||||
|
this.timeMinute,
|
||||||
|
this.timeHour,
|
||||||
|
this.timeTotalSeconds,
|
||||||
|
this.timeTotalMinute,
|
||||||
|
this.timeTotalHour,
|
||||||
|
this.approvalStatus,
|
||||||
|
this.isActive,
|
||||||
|
this.clickButton,
|
||||||
|
this.procedures,
|
||||||
|
this.pickupLocation,
|
||||||
|
this.dropOffLocation,
|
||||||
|
this.clinicName,
|
||||||
|
this.doctorName,
|
||||||
|
this.branch,
|
||||||
|
this.time,
|
||||||
|
this.notes});
|
||||||
|
|
||||||
|
PrescriptionDeliveryResponseModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
iD = json['ID'];
|
||||||
|
patientId = json['PatientId'];
|
||||||
|
patientOutSa = json['PatientOutSa'];
|
||||||
|
isOutPatient = json['IsOutPatient'];
|
||||||
|
projectId = json['ProjectId'];
|
||||||
|
nearestProjectId = json['NearestProjectId'];
|
||||||
|
longitude = json['Longitude'];
|
||||||
|
latitude = json['Latitude'];
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
dischargeId = json['DischargeId'];
|
||||||
|
statusId = json['StatusId'];
|
||||||
|
serviceId = json['ServiceId'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
orderpayment = json['orderpayment'] != null ? new Orderpayment.fromJson(json['orderpayment']) : null;
|
||||||
|
orderselectedservice = json['orderselectedservice'];
|
||||||
|
wforder = json['wforder'];
|
||||||
|
orderapprovalobj = json['orderapprovalobj'];
|
||||||
|
created = json['Created'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
modified = json['Modified'];
|
||||||
|
modifiedBy = json['ModifiedBy'];
|
||||||
|
isDeleted = json['IsDeleted'];
|
||||||
|
statusText = json['StatusText'];
|
||||||
|
paymentStatus = json['PaymentStatus'];
|
||||||
|
clientRequestid = json['ClientRequestid'];
|
||||||
|
paymentStatusText = json['PaymentStatusText'];
|
||||||
|
projectName = json['ProjectName'];
|
||||||
|
nearestProjectName = json['NearestProjectName'];
|
||||||
|
paymentAmount = json['PaymentAmount'];
|
||||||
|
wFOrder = json['WF_order'] != null ? new WFOrder.fromJson(json['WF_order']) : null;
|
||||||
|
serviceText = json['ServiceText'];
|
||||||
|
isSentForApproval = json['isSentForApproval'];
|
||||||
|
exaCartOrderId = json['ExaCart_OrderId'];
|
||||||
|
isTimer = json['isTimer'];
|
||||||
|
timeSeconds = json['TimeSeconds'];
|
||||||
|
totalPendingSeconds = json['TotalPendingSeconds'];
|
||||||
|
timeMinute = json['TimeMinute'];
|
||||||
|
timeHour = json['TimeHour'];
|
||||||
|
timeTotalSeconds = json['TimeTotalSeconds'];
|
||||||
|
timeTotalMinute = json['TimeTotalMinute'];
|
||||||
|
timeTotalHour = json['TimeTotalHour'];
|
||||||
|
approvalStatus = json['ApprovalStatus'];
|
||||||
|
isActive = json['isActive'];
|
||||||
|
clickButton = json['ClickButton'];
|
||||||
|
pickupLocation = json['PickupLocation'];
|
||||||
|
dropOffLocation = json['DropOffLocation'];
|
||||||
|
clinicName = json['clinicName'];
|
||||||
|
doctorName = json['DoctorName'];
|
||||||
|
branch = json['Branch'];
|
||||||
|
time = json['Time'];
|
||||||
|
notes = json['Notes'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ID'] = this.iD;
|
||||||
|
data['PatientId'] = this.patientId;
|
||||||
|
data['PatientOutSa'] = this.patientOutSa;
|
||||||
|
data['IsOutPatient'] = this.isOutPatient;
|
||||||
|
data['ProjectId'] = this.projectId;
|
||||||
|
data['NearestProjectId'] = this.nearestProjectId;
|
||||||
|
data['Longitude'] = this.longitude;
|
||||||
|
data['Latitude'] = this.latitude;
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['DischargeId'] = this.dischargeId;
|
||||||
|
data['StatusId'] = this.statusId;
|
||||||
|
data['ServiceId'] = this.serviceId;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
if (this.orderpayment != null) {
|
||||||
|
data['orderpayment'] = this.orderpayment!.toJson();
|
||||||
|
}
|
||||||
|
data['orderselectedservice'] = this.orderselectedservice;
|
||||||
|
|
||||||
|
data['wforder'] = this.wforder;
|
||||||
|
data['orderapprovalobj'] = this.orderapprovalobj;
|
||||||
|
data['Created'] = this.created;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['Modified'] = this.modified;
|
||||||
|
data['ModifiedBy'] = this.modifiedBy;
|
||||||
|
data['IsDeleted'] = this.isDeleted;
|
||||||
|
data['StatusText'] = this.statusText;
|
||||||
|
data['PaymentStatus'] = this.paymentStatus;
|
||||||
|
data['ClientRequestid'] = this.clientRequestid;
|
||||||
|
data['PaymentStatusText'] = this.paymentStatusText;
|
||||||
|
data['ProjectName'] = this.projectName;
|
||||||
|
data['NearestProjectName'] = this.nearestProjectName;
|
||||||
|
data['PaymentAmount'] = this.paymentAmount;
|
||||||
|
if (this.wFOrder != null) {
|
||||||
|
data['WF_order'] = this.wFOrder!.toJson();
|
||||||
|
}
|
||||||
|
data['ServiceText'] = this.serviceText;
|
||||||
|
data['isSentForApproval'] = this.isSentForApproval;
|
||||||
|
data['ExaCart_OrderId'] = this.exaCartOrderId;
|
||||||
|
data['isTimer'] = this.isTimer;
|
||||||
|
data['TimeSeconds'] = this.timeSeconds;
|
||||||
|
data['TotalPendingSeconds'] = this.totalPendingSeconds;
|
||||||
|
data['TimeMinute'] = this.timeMinute;
|
||||||
|
data['TimeHour'] = this.timeHour;
|
||||||
|
data['TimeTotalSeconds'] = this.timeTotalSeconds;
|
||||||
|
data['TimeTotalMinute'] = this.timeTotalMinute;
|
||||||
|
data['TimeTotalHour'] = this.timeTotalHour;
|
||||||
|
data['ApprovalStatus'] = this.approvalStatus;
|
||||||
|
data['isActive'] = this.isActive;
|
||||||
|
data['ClickButton'] = this.clickButton;
|
||||||
|
data['PickupLocation'] = this.pickupLocation;
|
||||||
|
data['DropOffLocation'] = this.dropOffLocation;
|
||||||
|
data['clinicName'] = this.clinicName;
|
||||||
|
data['DoctorName'] = this.doctorName;
|
||||||
|
data['Branch'] = this.branch;
|
||||||
|
data['Time'] = this.time;
|
||||||
|
data['Notes'] = this.notes;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Orderpayment {
|
||||||
|
int? iD;
|
||||||
|
int? orderId;
|
||||||
|
dynamic clientRequestId;
|
||||||
|
dynamic totalAmount;
|
||||||
|
int? paymentStatus;
|
||||||
|
dynamic order;
|
||||||
|
String? created;
|
||||||
|
dynamic createdBy;
|
||||||
|
dynamic modified;
|
||||||
|
dynamic modifiedBy;
|
||||||
|
bool? isDeleted;
|
||||||
|
|
||||||
|
Orderpayment({this.iD, this.orderId, this.clientRequestId, this.totalAmount, this.paymentStatus, this.order, this.created, this.createdBy, this.modified, this.modifiedBy, this.isDeleted});
|
||||||
|
|
||||||
|
Orderpayment.fromJson(Map<String, dynamic> json) {
|
||||||
|
iD = json['ID'];
|
||||||
|
orderId = json['OrderId'];
|
||||||
|
clientRequestId = json['ClientRequestId'];
|
||||||
|
totalAmount = json['TotalAmount'];
|
||||||
|
paymentStatus = json['PaymentStatus'];
|
||||||
|
order = json['Order'];
|
||||||
|
created = json['Created'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
modified = json['Modified'];
|
||||||
|
modifiedBy = json['ModifiedBy'];
|
||||||
|
isDeleted = json['IsDeleted'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ID'] = this.iD;
|
||||||
|
data['OrderId'] = this.orderId;
|
||||||
|
data['ClientRequestId'] = this.clientRequestId;
|
||||||
|
data['TotalAmount'] = this.totalAmount;
|
||||||
|
data['PaymentStatus'] = this.paymentStatus;
|
||||||
|
data['Order'] = this.order;
|
||||||
|
data['Created'] = this.created;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['Modified'] = this.modified;
|
||||||
|
data['ModifiedBy'] = this.modifiedBy;
|
||||||
|
data['IsDeleted'] = this.isDeleted;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WFOrder {
|
||||||
|
dynamic wfButtonsDTO;
|
||||||
|
int? iD;
|
||||||
|
int? orderId;
|
||||||
|
int? previousStep;
|
||||||
|
int? nextStep;
|
||||||
|
int? serviceId;
|
||||||
|
dynamic order;
|
||||||
|
String? created;
|
||||||
|
dynamic createdBy;
|
||||||
|
dynamic modified;
|
||||||
|
dynamic modifiedBy;
|
||||||
|
bool? isDeleted;
|
||||||
|
|
||||||
|
WFOrder({this.wfButtonsDTO, this.iD, this.orderId, this.previousStep, this.nextStep, this.serviceId, this.order, this.created, this.createdBy, this.modified, this.modifiedBy, this.isDeleted});
|
||||||
|
|
||||||
|
WFOrder.fromJson(Map<String, dynamic> json) {
|
||||||
|
wfButtonsDTO = json['wf_ButtonsDTO'];
|
||||||
|
iD = json['ID'];
|
||||||
|
orderId = json['OrderId'];
|
||||||
|
previousStep = json['PreviousStep'];
|
||||||
|
nextStep = json['NextStep'];
|
||||||
|
serviceId = json['ServiceId'];
|
||||||
|
order = json['Order'];
|
||||||
|
created = json['Created'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
modified = json['Modified'];
|
||||||
|
modifiedBy = json['ModifiedBy'];
|
||||||
|
isDeleted = json['IsDeleted'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['wf_ButtonsDTO'] = this.wfButtonsDTO;
|
||||||
|
data['ID'] = this.iD;
|
||||||
|
data['OrderId'] = this.orderId;
|
||||||
|
data['PreviousStep'] = this.previousStep;
|
||||||
|
data['NextStep'] = this.nextStep;
|
||||||
|
data['ServiceId'] = this.serviceId;
|
||||||
|
data['Order'] = this.order;
|
||||||
|
data['Created'] = this.created;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['Modified'] = this.modified;
|
||||||
|
data['ModifiedBy'] = this.modifiedBy;
|
||||||
|
data['IsDeleted'] = this.isDeleted;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,258 @@
|
|||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
|
||||||
|
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||||
|
import 'package:hmg_patient_app_new/core/utils/utils.dart';
|
||||||
|
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||||
|
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||||
|
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
|
||||||
|
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||||
|
import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart';
|
||||||
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||||
|
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class PrescriptionDeliveryOrdersListPage extends StatelessWidget {
|
||||||
|
const PrescriptionDeliveryOrdersListPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColors.bgScaffoldColor,
|
||||||
|
body: CollapsingListView(
|
||||||
|
title: LocaleKeys.orders.tr(context: context),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Consumer<PrescriptionsViewModel>(builder: (context, model, child) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
ListView.builder(
|
||||||
|
itemCount: model.isPrescriptionsOrdersLoading
|
||||||
|
? 4
|
||||||
|
: model.patientPrescriptionOrders.isNotEmpty
|
||||||
|
? model.patientPrescriptionOrdersViewList.length
|
||||||
|
: 1,
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
|
shrinkWrap: true,
|
||||||
|
padding: const EdgeInsets.only(left: 0, right: 8),
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return model.isPrescriptionsDeliveryOrdersLoading
|
||||||
|
? LabResultItemView(
|
||||||
|
onTap: () {},
|
||||||
|
labOrder: null,
|
||||||
|
index: index,
|
||||||
|
isLoading: true,
|
||||||
|
)
|
||||||
|
: model.prescriptionsOrderList.isNotEmpty
|
||||||
|
? AnimationConfiguration.staggeredList(
|
||||||
|
position: index,
|
||||||
|
duration: const Duration(milliseconds: 500),
|
||||||
|
child: SlideAnimation(
|
||||||
|
verticalOffset: 100.0,
|
||||||
|
child: FadeInAnimation(
|
||||||
|
child: AnimatedContainer(
|
||||||
|
duration: Duration(milliseconds: 300),
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 8.h),
|
||||||
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.h, hasShadow: true),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
// setState(() {
|
||||||
|
// expandedIndex = isExpanded ? null : index;
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(16.h),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
// CustomButton(
|
||||||
|
// text: "${model.patientPrescriptionOrdersViewList[index].prescriptionsList!.length} Prescriptions Available",
|
||||||
|
// onPressed: () {},
|
||||||
|
// backgroundColor: AppColors.greyColor,
|
||||||
|
// borderColor: AppColors.greyColor,
|
||||||
|
// textColor: AppColors.blackColor,
|
||||||
|
// fontSize: 10,
|
||||||
|
// fontWeight: FontWeight.w500,
|
||||||
|
// borderRadius: 8,
|
||||||
|
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
||||||
|
// height: 30.h,
|
||||||
|
// ),
|
||||||
|
// Icon(isExpanded ? Icons.expand_less : Icons.expand_more),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 8.h),
|
||||||
|
// model.patientPrescriptionOrdersViewList[index].filterName!.toText16(isBold: true)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// AnimatedSwitcher(
|
||||||
|
// duration: Duration(milliseconds: 500),
|
||||||
|
// switchInCurve: Curves.easeIn,
|
||||||
|
// switchOutCurve: Curves.easeOut,
|
||||||
|
// transitionBuilder: (Widget child, Animation<double> animation) {
|
||||||
|
// return FadeTransition(
|
||||||
|
// opacity: animation,
|
||||||
|
// child: SizeTransition(
|
||||||
|
// sizeFactor: animation,
|
||||||
|
// axisAlignment: 0.0,
|
||||||
|
// child: child,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// },
|
||||||
|
// child: isExpanded
|
||||||
|
// ? Container(
|
||||||
|
// key: ValueKey<int>(index),
|
||||||
|
// padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 8.h),
|
||||||
|
// child: Column(
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// ...model.patientPrescriptionOrdersViewList[index].prescriptionsList!.map((prescription) {
|
||||||
|
// return Column(
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// Row(
|
||||||
|
// mainAxisSize: MainAxisSize.min,
|
||||||
|
// children: [
|
||||||
|
// Image.network(
|
||||||
|
// prescription.doctorImageURL!,
|
||||||
|
// width: 24.h,
|
||||||
|
// height: 24.h,
|
||||||
|
// fit: BoxFit.fill,
|
||||||
|
// ).circle(100),
|
||||||
|
// SizedBox(width: 8.h),
|
||||||
|
// Expanded(child: prescription.doctorName!.toText14(weight: FontWeight.w500)),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// SizedBox(height: 8.h),
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// CustomButton(
|
||||||
|
// text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(prescription.appointmentDate), false),
|
||||||
|
// onPressed: () {},
|
||||||
|
// backgroundColor: AppColors.greyColor,
|
||||||
|
// borderColor: AppColors.greyColor,
|
||||||
|
// textColor: AppColors.blackColor,
|
||||||
|
// fontSize: 10,
|
||||||
|
// fontWeight: FontWeight.w500,
|
||||||
|
// borderRadius: 8,
|
||||||
|
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
||||||
|
// height: 24.h,
|
||||||
|
// ),
|
||||||
|
// SizedBox(width: 8.h),
|
||||||
|
// CustomButton(
|
||||||
|
// text: model.isSortByClinic ? prescription.name! : prescription.clinicDescription!,
|
||||||
|
// onPressed: () {},
|
||||||
|
// backgroundColor: AppColors.greyColor,
|
||||||
|
// borderColor: AppColors.greyColor,
|
||||||
|
// textColor: AppColors.blackColor,
|
||||||
|
// fontSize: 10,
|
||||||
|
// fontWeight: FontWeight.w500,
|
||||||
|
// borderRadius: 8,
|
||||||
|
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
||||||
|
// height: 24.h,
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// SizedBox(height: 8.h),
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// Expanded(
|
||||||
|
// flex: 6,
|
||||||
|
// child: CustomButton(
|
||||||
|
// text: prescription.isHomeMedicineDeliverySupported!
|
||||||
|
// ? LocaleKeys.resendOrder.tr(context: context)
|
||||||
|
// : LocaleKeys.prescriptionDeliveryError.tr(context: context),
|
||||||
|
// onPressed: () async {
|
||||||
|
// if (prescription.isHomeMedicineDeliverySupported!) {
|
||||||
|
// LoaderBottomSheet.showLoader(loadingText: "Fetching prescription details...".needTranslation);
|
||||||
|
// await prescriptionsViewModel.getPrescriptionDetails(prescriptionsViewModel.patientPrescriptionOrders[index],
|
||||||
|
// onSuccess: (val) {
|
||||||
|
// LoaderBottomSheet.hideLoader();
|
||||||
|
// prescriptionsViewModel.initiatePrescriptionDelivery();
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// backgroundColor:
|
||||||
|
// prescription.isHomeMedicineDeliverySupported! ? AppColors.successColor.withOpacity(0.15) : AppColors.greyF7Color,
|
||||||
|
// borderColor: AppColors.successColor.withOpacity(0.01),
|
||||||
|
// textColor: prescription.isHomeMedicineDeliverySupported! ? AppColors.successColor : AppColors.textColor.withOpacity(0.35),
|
||||||
|
// fontSize: prescription.isHomeMedicineDeliverySupported! ? 14 : 12,
|
||||||
|
// fontWeight: FontWeight.w500,
|
||||||
|
// borderRadius: 12,
|
||||||
|
// padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
||||||
|
// height: 40.h,
|
||||||
|
// icon: AppAssets.prescription_refill_icon,
|
||||||
|
// iconColor: prescription.isHomeMedicineDeliverySupported! ? AppColors.successColor : AppColors.textColor.withOpacity(0.35),
|
||||||
|
// iconSize: 14.h,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// SizedBox(width: 8.h),
|
||||||
|
// Expanded(
|
||||||
|
// flex: 1,
|
||||||
|
// child: Container(
|
||||||
|
// height: 40.h,
|
||||||
|
// width: 40.w,
|
||||||
|
// decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||||
|
// color: AppColors.textColor,
|
||||||
|
// borderRadius: 12,
|
||||||
|
// ),
|
||||||
|
// child: Padding(
|
||||||
|
// padding: EdgeInsets.all(12.h),
|
||||||
|
// child: Transform.flip(
|
||||||
|
// flipX: appState.isArabic(),
|
||||||
|
// child: Utils.buildSvgWithAssets(
|
||||||
|
// icon: AppAssets.forward_arrow_icon_small,
|
||||||
|
// iconColor: AppColors.whiteColor,
|
||||||
|
// fit: BoxFit.contain,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ).onPress(() {
|
||||||
|
// model.setPrescriptionsDetailsLoading();
|
||||||
|
// Navigator.of(context).push(
|
||||||
|
// CustomPageRoute(
|
||||||
|
// page: PrescriptionDetailPage(
|
||||||
|
// prescriptionsResponseModel: prescription,
|
||||||
|
// isFromAppointments: false,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// SizedBox(height: 12.h),
|
||||||
|
// Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.05), height: 1.h),
|
||||||
|
// SizedBox(height: 12.h),
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
// }).toList(),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// )
|
||||||
|
// : SizedBox.shrink(),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Utils.getNoDataWidget(context, noDataText: "You don't have any prescription orders yet.".needTranslation);
|
||||||
|
},
|
||||||
|
).paddingSymmetrical(24.h, 0.h),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue