cancel and listing request added
parent
1ca39e1332
commit
5b0a8ad898
@ -0,0 +1,5 @@
|
|||||||
|
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.88966 2.26044H6.1556C6.54339 2.26042 6.87763 2.2604 7.1452 2.29638C7.43199 2.33494 7.7069 2.42189 7.92987 2.64486C8.15285 2.86784 8.2398 3.14275 8.27836 3.42953C8.30096 3.59766 8.30936 3.79206 8.31247 4.00954C8.31248 4.01004 8.31288 4.01044 8.31338 4.01044C8.31369 4.01044 8.31396 4.0106 8.31413 4.01083C8.31413 4.01063 8.31423 4.01098 8.31413 4.01083L8.31429 6.19794C8.31429 6.43957 8.51017 6.63544 8.75179 6.63544C8.99342 6.63544 9.18929 6.43957 9.18929 6.19794V4.20362C9.18929 4.10493 9.2722 4.02578 9.37041 4.03551C9.63863 4.06206 9.88036 4.11895 10.1131 4.2507C10.3443 4.38162 10.5211 4.56074 10.6893 4.77855C10.8614 5.00128 11.0127 5.23986 11.1635 5.47761L11.164 5.4784C11.1889 5.51758 11.2137 5.55673 11.2386 5.59579C11.5034 6.01096 11.8302 6.35342 12.2362 6.63158C12.6288 6.90049 12.9411 7.11434 13.1141 7.46714C13.2034 7.64923 13.24 7.83466 13.2568 8.03171C13.2597 8.06529 13.2329 8.09377 13.1992 8.09377H12.6893C12.4477 8.09377 12.2518 8.28965 12.2518 8.53127C12.2518 8.7729 12.4477 8.96877 12.6893 8.96877H12.9207C13.0883 8.96877 13.1722 8.96877 13.2238 9.02251C13.2755 9.07625 13.2722 9.15762 13.2658 9.32036C13.2616 9.42578 13.2549 9.52356 13.244 9.61307C13.2135 9.86447 13.1447 10.1138 12.9593 10.3235C12.7687 10.5391 12.5059 10.6479 12.2248 10.6872C12.1439 10.6985 12.0789 10.625 12.0886 10.5439C12.0989 10.4578 12.1042 10.3701 12.1042 10.2813C12.1042 9.07315 11.1249 8.09377 9.91675 8.09377C8.71731 8.09377 7.72602 9.09672 7.72928 10.2935C7.73046 10.5082 7.73105 10.6156 7.67973 10.6672C7.62842 10.7188 7.53389 10.7188 7.34482 10.7188H6.65534C6.46628 10.7188 6.37175 10.7188 6.32043 10.6672C6.26912 10.6156 6.26971 10.5082 6.27088 10.2935C6.27415 9.09672 5.28286 8.09377 4.08342 8.09377C2.87529 8.09377 1.89592 9.07315 1.89592 10.2813C1.89592 10.4083 1.90675 10.5328 1.92753 10.6539C1.93036 10.6704 1.9166 10.6851 1.90005 10.6828C1.61327 10.6443 1.33836 10.5573 1.11539 10.3344C0.892408 10.1114 0.805457 9.83647 0.766899 9.54969C0.730924 9.28211 0.73094 8.94798 0.730958 8.56018V4.41914C0.73094 4.03135 0.730924 3.69711 0.766899 3.42953C0.805457 3.14275 0.892408 2.86784 1.11539 2.64486C1.33836 2.42189 1.61327 2.33494 1.90005 2.29638C2.16763 2.2604 2.50187 2.26042 2.88966 2.26044ZM5.10596 4.44794C5.10596 4.20631 4.91008 4.01044 4.66846 4.01044C4.42683 4.01044 4.23096 4.20631 4.23096 4.44794V5.17711H3.50179C3.26017 5.17711 3.06429 5.37298 3.06429 5.61461C3.06429 5.85623 3.26017 6.05211 3.50179 6.05211H4.23096V6.78127C4.23096 7.0229 4.42683 7.21877 4.66846 7.21877C4.91008 7.21877 5.10596 7.0229 5.10596 6.78127V6.05211H5.83513C6.07675 6.05211 6.27263 5.85623 6.27263 5.61461C6.27263 5.37298 6.07675 5.17711 5.83513 5.17711H5.10596V4.44794Z" fill="#2E3039"/>
|
||||||
|
<path d="M11.3757 10.2813C11.3757 11.0867 10.7227 11.7396 9.91732 11.7396C9.1119 11.7396 8.45898 11.0867 8.45898 10.2813C8.45898 9.47586 9.1119 8.82294 9.91732 8.82294C10.7227 8.82294 11.3757 9.47586 11.3757 10.2813Z" fill="#2E3039"/>
|
||||||
|
<path d="M4.08399 11.7396C4.8894 11.7396 5.54232 11.0867 5.54232 10.2813C5.54232 9.47586 4.8894 8.82294 4.08399 8.82294C3.27857 8.82294 2.62565 9.47586 2.62565 10.2813C2.62565 11.0867 3.27857 11.7396 4.08399 11.7396Z" fill="#2E3039"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.2 KiB |
@ -0,0 +1,346 @@
|
|||||||
|
class AmbulanceRequestOrdersModel {
|
||||||
|
String? statusText;
|
||||||
|
num? paymentStatus;
|
||||||
|
dynamic clientRequestid;
|
||||||
|
dynamic paymentStatusText;
|
||||||
|
dynamic projectName;
|
||||||
|
String? nearestProjectName;
|
||||||
|
num? paymentAmount;
|
||||||
|
WFOrder? wFOrder;
|
||||||
|
String? serviceText;
|
||||||
|
bool? isSentForApproval;
|
||||||
|
num? exaCartOrderId;
|
||||||
|
String? exaCartGUID;
|
||||||
|
bool? isTimer;
|
||||||
|
num? timeSeconds;
|
||||||
|
num? totalPendingSeconds;
|
||||||
|
num? timeMinute;
|
||||||
|
num? timeHour;
|
||||||
|
num? timeTotalSeconds;
|
||||||
|
num? timeTotalMinute;
|
||||||
|
num? timeTotalHour;
|
||||||
|
dynamic approvalStatus;
|
||||||
|
bool? isActive;
|
||||||
|
num? clickButton;
|
||||||
|
dynamic orderHistory;
|
||||||
|
String? pickupLocation;
|
||||||
|
String? dropOffLocation;
|
||||||
|
String? clinicName;
|
||||||
|
String? doctorName;
|
||||||
|
String? branch;
|
||||||
|
String? time;
|
||||||
|
String? notes;
|
||||||
|
int? iD;
|
||||||
|
num? patientId;
|
||||||
|
num? patientOutSa;
|
||||||
|
bool? isOutPatient;
|
||||||
|
num? projectId;
|
||||||
|
num? nearestProjectId;
|
||||||
|
dynamic longitude;
|
||||||
|
dynamic latitude;
|
||||||
|
dynamic appointmentNo;
|
||||||
|
dynamic dischargeId;
|
||||||
|
int? statusId;
|
||||||
|
num? serviceId;
|
||||||
|
num? channel;
|
||||||
|
Orderpayment? orderpayment;
|
||||||
|
dynamic wforder;
|
||||||
|
dynamic orderapprovalobj;
|
||||||
|
String? created;
|
||||||
|
dynamic createdBy;
|
||||||
|
dynamic modified;
|
||||||
|
dynamic modifiedBy;
|
||||||
|
bool? isDeleted;
|
||||||
|
|
||||||
|
AmbulanceRequestOrdersModel(
|
||||||
|
{this.statusText,
|
||||||
|
this.paymentStatus,
|
||||||
|
this.clientRequestid,
|
||||||
|
this.paymentStatusText,
|
||||||
|
this.projectName,
|
||||||
|
this.nearestProjectName,
|
||||||
|
this.paymentAmount,
|
||||||
|
this.wFOrder,
|
||||||
|
this.serviceText,
|
||||||
|
this.isSentForApproval,
|
||||||
|
this.exaCartOrderId,
|
||||||
|
this.exaCartGUID,
|
||||||
|
this.isTimer,
|
||||||
|
this.timeSeconds,
|
||||||
|
this.totalPendingSeconds,
|
||||||
|
this.timeMinute,
|
||||||
|
this.timeHour,
|
||||||
|
this.timeTotalSeconds,
|
||||||
|
this.timeTotalMinute,
|
||||||
|
this.timeTotalHour,
|
||||||
|
this.approvalStatus,
|
||||||
|
this.isActive,
|
||||||
|
this.clickButton,
|
||||||
|
this.orderHistory,
|
||||||
|
this.pickupLocation,
|
||||||
|
this.dropOffLocation,
|
||||||
|
this.clinicName,
|
||||||
|
this.doctorName,
|
||||||
|
this.branch,
|
||||||
|
this.time,
|
||||||
|
this.notes,
|
||||||
|
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.wforder,
|
||||||
|
this.orderapprovalobj,
|
||||||
|
this.created,
|
||||||
|
this.createdBy,
|
||||||
|
this.modified,
|
||||||
|
this.modifiedBy,
|
||||||
|
this.isDeleted});
|
||||||
|
|
||||||
|
AmbulanceRequestOrdersModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
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'];
|
||||||
|
exaCartGUID = json['ExaCart_GUID'];
|
||||||
|
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'];
|
||||||
|
orderHistory = json['OrderHistory'];
|
||||||
|
pickupLocation = json['PickupLocation'];
|
||||||
|
dropOffLocation = json['DropOffLocation'];
|
||||||
|
clinicName = json['clinicName'];
|
||||||
|
doctorName = json['DoctorName'];
|
||||||
|
branch = json['Branch'];
|
||||||
|
time = json['Time'];
|
||||||
|
notes = json['Notes'];
|
||||||
|
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;
|
||||||
|
wforder = json['wforder'];
|
||||||
|
orderapprovalobj = json['orderapprovalobj'];
|
||||||
|
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['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['ExaCart_GUID'] = this.exaCartGUID;
|
||||||
|
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['OrderHistory'] = this.orderHistory;
|
||||||
|
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;
|
||||||
|
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['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;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WFOrder {
|
||||||
|
dynamic wfButtonsDTO;
|
||||||
|
num? iD;
|
||||||
|
num? orderId;
|
||||||
|
num? previousStep;
|
||||||
|
num? nextStep;
|
||||||
|
num? 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Orderpayment {
|
||||||
|
num? iD;
|
||||||
|
num? orderId;
|
||||||
|
dynamic clientRequestId;
|
||||||
|
num? totalAmount;
|
||||||
|
num? 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,92 +1,54 @@
|
|||||||
// import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
// import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
|
||||||
// import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
||||||
// import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
|
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
|
||||||
// import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
|
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
|
||||||
// import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart';
|
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart';
|
||||||
// import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/doctor_card.dart';
|
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_doctor_card.dart';
|
||||||
// import 'package:hmg_patient_app_new/theme/colors.dart';
|
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/doctor_card.dart';
|
||||||
// import 'package:provider/provider.dart';
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||||
//
|
import 'package:provider/provider.dart';
|
||||||
// class AppointmentBottomSheet extends StatelessWidget{
|
|
||||||
// @override
|
class AppointmentBottomSheet extends StatelessWidget{
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
// // TODO: implement build
|
|
||||||
// throw UnimplementedError();
|
final Function(PatientAppointmentHistoryResponseModel) onAppointmentSelection;
|
||||||
// }
|
final List<PatientAppointmentHistoryResponseModel> list;
|
||||||
//
|
|
||||||
// Widget getAppointList(EmergencyServicesViewModel viewmodel, List<PatientAppointmentHistoryResponseModel> filteredAppointmentList) {
|
const AppointmentBottomSheet({super.key, required this.onAppointmentSelection, required this.list});
|
||||||
// return Column(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
@override
|
||||||
// children: [
|
Widget build(BuildContext context) => getAppointList(list);
|
||||||
// ListView.separated(
|
|
||||||
// padding: EdgeInsets.only(top: 24.h),
|
Widget getAppointList( List<PatientAppointmentHistoryResponseModel> list) {
|
||||||
// shrinkWrap: true,
|
return Column(
|
||||||
// physics: NeverScrollableScrollPhysics(),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
// itemCount: viewmodel.isMyAppointmentsLoading
|
children: [
|
||||||
// ? 5
|
Expanded(
|
||||||
// : filteredAppointmentList.isNotEmpty
|
child: ListView.separated(
|
||||||
// ? filteredAppointmentList.length
|
padding: EdgeInsets.only(top: 24.h),
|
||||||
// : 1,
|
shrinkWrap: true,
|
||||||
// itemBuilder: (context, index) {
|
physics: BouncingScrollPhysics(),
|
||||||
// return viewmodel.isMyAppointmentsLoading
|
itemCount: list.length,
|
||||||
// ? Container(
|
itemBuilder: (context, index) {
|
||||||
// decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
|
PatientAppointmentHistoryResponseModel item = list[index];
|
||||||
// child: DoctorCard(doctorsListResponseModel: doctorsListResponseModel, isLoading: viewmodel.isMyAppointmentsLoading, bookAppointmentsViewModel: bookAppointmentsViewModel),
|
return AppointmentDoctorCard(
|
||||||
// ).paddingSymmetrical(24.h, 0.h)
|
renderWidgetForERDisplay: true,
|
||||||
// : filteredAppointmentList.isNotEmpty
|
patientAppointmentHistoryResponseModel: item,
|
||||||
// ? AnimationConfiguration.staggeredList(
|
onAskDoctorTap: () {},
|
||||||
// position: index,
|
onCancelTap: () async {},
|
||||||
// duration: const Duration(milliseconds: 500),
|
onRescheduleTap: () async {},
|
||||||
// child: SlideAnimation(
|
).onPress((){
|
||||||
// verticalOffset: 100.0,
|
onAppointmentSelection(item);
|
||||||
// child: FadeInAnimation(
|
});
|
||||||
// child: AnimatedContainer(
|
},
|
||||||
// duration: Duration(milliseconds: 300),
|
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
|
||||||
// curve: Curves.easeInOut,
|
),
|
||||||
// decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
|
),
|
||||||
// child: AppointmentCard(
|
SizedBox(height: 24.h),
|
||||||
// patientAppointmentHistoryResponseModel: filteredAppointmentList[index],
|
],
|
||||||
// myAppointmentsViewModel: myAppointmentsViewModel,
|
);
|
||||||
// bookAppointmentsViewModel: bookAppointmentsViewModel,
|
}
|
||||||
// isLoading: false,
|
|
||||||
// isFromHomePage: false,
|
|
||||||
// ),
|
}
|
||||||
// ).paddingSymmetrical(24.h, 0.h),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// )
|
|
||||||
// : Utils.getNoDataWidget(
|
|
||||||
// context,
|
|
||||||
// noDataText: "You don't have any appointments yet.".needTranslation,
|
|
||||||
// callToActionButton: CustomButton(
|
|
||||||
// text: LocaleKeys.bookAppo.tr(context: context),
|
|
||||||
// onPressed: () {
|
|
||||||
// Navigator.of(context).push(
|
|
||||||
// CustomPageRoute(
|
|
||||||
// page: BookAppointmentPage(),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// backgroundColor: Color(0xffFEE9EA),
|
|
||||||
// borderColor: Color(0xffFEE9EA),
|
|
||||||
// textColor: Color(0xffED1C2B),
|
|
||||||
// fontSize: 14.f,
|
|
||||||
// fontWeight: FontWeight.w500,
|
|
||||||
// borderRadius: 12.r,
|
|
||||||
// padding: EdgeInsets.fromLTRB(10.w, 0, 10.w, 0),
|
|
||||||
// height: 40.h,
|
|
||||||
// icon: AppAssets.add_icon,
|
|
||||||
// iconColor: AppColors.primaryRedColor,
|
|
||||||
// ).paddingSymmetrical(48.h, 0.h),
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
|
|
||||||
// ),
|
|
||||||
// SizedBox(height: 24.h),
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hmg_patient_app_new/core/app_export.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/emergency_services/emergency_services_view_model.dart';
|
||||||
|
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
||||||
|
import 'package:hmg_patient_app_new/presentation/emergency_services/history/widget/ambulance_history_item.dart';
|
||||||
|
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class ErHistoryListing extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: CollapsingListView(
|
||||||
|
title: "History Log".needTranslation,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
|
child: Column(
|
||||||
|
children: [Visibility(
|
||||||
|
visible: context
|
||||||
|
.read<EmergencyServicesViewModel>()
|
||||||
|
.orders
|
||||||
|
?.isNotEmpty == true,
|
||||||
|
child: ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: NeverScrollableScrollPhysics(),
|
||||||
|
itemCount: context
|
||||||
|
.read<EmergencyServicesViewModel>()
|
||||||
|
.orders
|
||||||
|
?.length ?? 0,
|
||||||
|
itemBuilder: (_, index) =>
|
||||||
|
Consumer<EmergencyServicesViewModel>( builder: (_, vm, __)=>
|
||||||
|
AmbulanceHistoryItem(order: vm.orders![index]),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
),]
|
||||||
|
).paddingAll(16.h)
|
||||||
|
|
||||||
|
))
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
Visibility(
|
||||||
|
visible: context
|
||||||
|
.read<EmergencyServicesViewModel>()
|
||||||
|
.orders
|
||||||
|
?.isEmpty == true,
|
||||||
|
child: Utils.getNoDataWidget(context,
|
||||||
|
noDataText: "You don't have any history"
|
||||||
|
.needTranslation)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
||||||
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||||
|
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
||||||
|
|
||||||
|
class RequestStatus extends StatelessWidget {
|
||||||
|
final int status;
|
||||||
|
|
||||||
|
const RequestStatus({super.key, required this.status});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppCustomChipWidget(
|
||||||
|
labelText: getTitle(status),
|
||||||
|
backgroundColor: getBackgroundColor(status),
|
||||||
|
textColor: getTextColor(status),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String? getTitle(int status) {
|
||||||
|
switch (status) {
|
||||||
|
case 1: //pending
|
||||||
|
case 2: //processing
|
||||||
|
return "Under Processing".needTranslation;
|
||||||
|
case 3: //completed
|
||||||
|
return "Completed".needTranslation;
|
||||||
|
break;
|
||||||
|
case 4: //cancel
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
return "Canceled by patient".needTranslation;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Color? getBackgroundColor(int status) {
|
||||||
|
switch (status) {
|
||||||
|
case 1: //pending
|
||||||
|
case 2: //processing
|
||||||
|
case 3: //completed
|
||||||
|
return AppColors.switchBackgroundColor;
|
||||||
|
break;
|
||||||
|
case 4: //cancel
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
return AppColors.lightRedButtonColor;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Color? getTextColor(int status) {
|
||||||
|
switch (status) {
|
||||||
|
case 1: //pending
|
||||||
|
case 2:
|
||||||
|
return AppColors.successColor;//processing
|
||||||
|
case 3: //completed
|
||||||
|
case 4: //cancel
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
return AppColors.errorColor;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
||||||
|
import 'package:hmg_patient_app_new/core/app_export.dart';
|
||||||
|
import 'package:hmg_patient_app_new/core/utils/date_util.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/emergency_services/emergency_services_view_model.dart';
|
||||||
|
import 'package:hmg_patient_app_new/features/emergency_services/models/resp_model/AmbulanceRequestOrdersModel.dart';
|
||||||
|
import 'package:hmg_patient_app_new/presentation/emergency_services/history/widget/RequestStatus.dart';
|
||||||
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
||||||
|
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
||||||
|
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../../../../core/utils/utils.dart';
|
||||||
|
|
||||||
|
|
||||||
|
class AmbulanceHistoryItem extends StatelessWidget {
|
||||||
|
final AmbulanceRequestOrdersModel order;
|
||||||
|
|
||||||
|
const AmbulanceHistoryItem({super.key, required this.order});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return DecoratedBox(
|
||||||
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
hasShadow: true,
|
||||||
|
customBorder: BorderRadius.all(
|
||||||
|
Radius.circular(20.h),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
spacing: 8.h,
|
||||||
|
children: [
|
||||||
|
RequestStatus(status: order.statusId ?? 0),
|
||||||
|
"Req ID: ${order.iD}".toText16(color: AppColors.textColor, weight: FontWeight.w600),
|
||||||
|
Row(
|
||||||
|
spacing: 4.w,
|
||||||
|
children: [
|
||||||
|
chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.blackBgColor),
|
||||||
|
chip("Ambulance".needTranslation, AppAssets.ambulance, AppColors.blackBgColor),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Flexible(child: chip(order?.dropOffLocation ?? "", (order.dropOffLocation?.toLowerCase().contains("hospital") == true)?AppAssets.hospital:AppAssets.location_pickup, AppColors
|
||||||
|
.blackBgColor),)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
if (order.statusId == 1 || order.statusId == 2)
|
||||||
|
CustomButton(
|
||||||
|
text: "Cancel Request".needTranslation,
|
||||||
|
onPressed: () async {
|
||||||
|
openCancelOrderBottomSheet(context);
|
||||||
|
},
|
||||||
|
backgroundColor: AppColors.primaryRedColor,
|
||||||
|
borderColor: AppColors.primaryRedColor,
|
||||||
|
textColor: Colors.white,
|
||||||
|
icon: AppAssets.cancel,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
).paddingAll(16.h),
|
||||||
|
).paddingOnly(bottom: 16.h);
|
||||||
|
}
|
||||||
|
|
||||||
|
chip(String title, String iconString, Color iconColor) {
|
||||||
|
return AppCustomChipWidget(
|
||||||
|
labelText: title,
|
||||||
|
icon: iconString,
|
||||||
|
iconColor: iconColor,
|
||||||
|
iconSize: 14.h,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
openCancelOrderBottomSheet(BuildContext context) {
|
||||||
|
context.read<EmergencyServicesViewModel>().cancelOrder(order);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue