Merges From 3.3

dev_v3.13.6_voipcall
devamirsaleemahmad 2 years ago
parent d73cc13100
commit 2def9f3744

@ -1,9 +1,9 @@
class ProjectDetailListModel {
int projectID;
String latitude;
String longitude;
int geofenceRadius;
String checkInQrCode;
int? projectID;
String? latitude;
String? longitude;
int? geofenceRadius;
String? checkInQrCode;
ProjectDetailListModel(
{this.projectID,

@ -47,9 +47,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
String? selectedInstallmentPlan;
List<AncillaryOrderProcDetailsList> selectedProcList = [];
List<AncillaryOrdersListProcListModel> _ancillaryProcLists = [];
String? tamaraPaymentStatus;
String? tamaraOrderID;
@ -376,16 +375,11 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
);
}
// Widget getAncillaryDetails() {
// Map newMap = groupBy(_ancillaryProcLists[0].ancillaryOrderProcDetailsList, (obj) => obj.procedureCategoryName);
// return Padding(padding: EdgeInsets.only(top: 0, bottom: 200), child: getHeaderDetails(newMap));
// }
Widget getAncillaryDetails(AnciallryOrdersViewModel model) {
Widget getAncillaryDetails() {
Map<String, List<Object>> newMap = {};
// Grouping the list manually by the 'procedureCategoryName' key
model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList!.forEach((obj) {
_ancillaryProcLists[0].ancillaryOrderProcDetailsList!.forEach((obj) {
String key = obj.procedureCategoryName!;
if (newMap.containsKey(key)) {
newMap[key]!.add(obj);
@ -399,9 +393,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
child: getHeaderDetails(newMap),
);
}
Widget getHeaderDetails(newMap) {
Widget getHeaderDetails(newMap) {
List<Widget> list = [];
newMap.forEach((key, value) {
list.add(
@ -526,15 +519,14 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
onSelectedMethod: (String method, [String? selectedInstallmentPlan]) {
selectedPaymentMethod = method;
this.selectedInstallmentPlan = selectedInstallmentPlan;
openPayment(selectedPaymentMethod, projectViewModel.user, double.parse(getTotalValue()), AppoitmentAllHistoryResultList(), model, selectedInstallmentPlan);
openPayment(selectedPaymentMethod, projectViewModel.user, double.parse(getTotalValue()), AppoitmentAllHistoryResultList(), selectedInstallmentPlan);
},
patientShare: double.parse(getTotalValue()),
isFromAdvancePayment: !projectViewModel.havePrivilege(94),
));
}
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo, [String selectedInstallmentPlan]) {
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo, AnciallryOrdersViewModel model, [String? selectedInstallmentPlan]) {
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo, [String? selectedInstallmentPlan]) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID!);

@ -52,9 +52,8 @@ class _QRCodeState extends State<QRCode> {
late BuildContext _context;
late ProjectViewModel projectViewModel;
LocationUtils locationUtils;
ProjectDetailListModel projectDetailListModel;
late LocationUtils locationUtils;
ProjectDetailListModel projectDetailListModel = ProjectDetailListModel();
@override
void initState() {
@ -99,11 +98,11 @@ class _QRCodeState extends State<QRCode> {
startLocationCheckIn() async {
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
projectDetailListModel = Utils.getProjectDetailObj(projectViewModel, widget.appointment.projectID);
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude), double.parse(projectDetailListModel.longitude)).ceilToDouble() * 1000;
projectDetailListModel = Utils.getProjectDetailObj(projectViewModel, widget.appointment!.projectID);
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000;
print(dist);
if (dist <= projectDetailListModel.geofenceRadius) {
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode);
if (dist <= projectDetailListModel.geofenceRadius!) {
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError);
}

@ -865,7 +865,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}
dataLoaded = true;
if (widget.isFromMyAppointments) {
performNextAction(widget.appointment);
performNextAction(widget.appointment!);
widget.isFromMyAppointments = false;
}
});

@ -821,7 +821,7 @@ class Utils {
static double _toRadians(double degrees) => degrees * pi / 180;
static double _haversin(double radians) => pow(sin(radians / 2), 2);
static num _haversin(double radians) => pow(sin(radians / 2), 2);
static Widget tableColumnValueWithUnderLine(String text, {bool isLast = false, bool isCapitable = true}) {
return Column(
@ -872,7 +872,7 @@ class Utils {
}
static ProjectDetailListModel getProjectDetailObj(ProjectViewModel projectViewModel, int projectID) {
ProjectDetailListModel projectDetailListModel;
ProjectDetailListModel projectDetailListModel = ProjectDetailListModel();
projectViewModel.projectDetailListModel.forEach((element) {
if (element.projectID == projectID) {
projectDetailListModel = element;
@ -881,7 +881,7 @@ class Utils {
return projectDetailListModel;
}
static String generateSignature() {}
//static String generateSignature() {}
}
Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), required Widget child}) {

Loading…
Cancel
Save