Merges From 3.3

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

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

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

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

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

@ -821,7 +821,7 @@ class Utils {
static double _toRadians(double degrees) => degrees * pi / 180; 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}) { static Widget tableColumnValueWithUnderLine(String text, {bool isLast = false, bool isCapitable = true}) {
return Column( return Column(
@ -872,7 +872,7 @@ class Utils {
} }
static ProjectDetailListModel getProjectDetailObj(ProjectViewModel projectViewModel, int projectID) { static ProjectDetailListModel getProjectDetailObj(ProjectViewModel projectViewModel, int projectID) {
ProjectDetailListModel projectDetailListModel; ProjectDetailListModel projectDetailListModel = ProjectDetailListModel();
projectViewModel.projectDetailListModel.forEach((element) { projectViewModel.projectDetailListModel.forEach((element) {
if (element.projectID == projectID) { if (element.projectID == projectID) {
projectDetailListModel = element; projectDetailListModel = element;
@ -881,7 +881,7 @@ class Utils {
return projectDetailListModel; 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}) { 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