merge & improvements

merge-requests/390/head
Sikander Saleem 4 years ago
parent 6191377914
commit ca363adee2

@ -15,7 +15,7 @@ class MainActivity: FlutterFragmentActivity() {
PlatformBridge(flutterEngine.dartExecutor.binaryMessenger, this).create()
val time = timeToMillis("04:00:00", "HH:mm:ss")
print(time)
// val d1 = Logs.list(this)
// val d2 = Logs.raw(this)
@ -23,7 +23,7 @@ class MainActivity: FlutterFragmentActivity() {
// val d4 = Logs.RegisterGeofence.raw(this)
// val d5 = Logs.GeofenceEvent.list(this)
// val d6 = Logs.GeofenceEvent.raw(this)
print("")
}
override fun onResume() {

@ -52,7 +52,7 @@ class PlatformBridge(binaryMessenger: BinaryMessenger, flutterMainActivity: Main
}
val res = channel.invokeMethod("localizedValue","errorConnectingHmgNetwork")
print(res)
}
private fun connectHMGInternetWifi(methodCall: MethodCall, result: MethodChannel.Result){
@ -109,8 +109,8 @@ class PlatformBridge(binaryMessenger: BinaryMessenger, flutterMainActivity: Main
}
}
override fun error(errorCode: String?, errorMessage: String?, errorDetails: Any?) { print(result) }
override fun notImplemented() { print(result) }
override fun error(errorCode: String?, errorMessage: String?, errorDetails: Any?) { }
override fun notImplemented() { }
})
}

@ -13,8 +13,8 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';

@ -37,16 +37,12 @@ class PrescriptionService extends BaseService {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
print("Print PRESCRIPTION url" + url);
await baseAppClient.post(url,
onSuccess: (dynamic response, int statusCode) {
_prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((prescriptions) {
_prescriptionsList.add(Prescriptions.fromJson(prescriptions));
});
print(_prescriptionsList.length);
print("response is -------------"+response);
print(response);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -24,7 +24,6 @@ class WeatherService extends BaseService {
response['GetCityInfo_List'].forEach((data) {
weatherIndicatorData.add(GetCityInfoList.fromJson(data));
});
print(weatherIndicatorData);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -101,7 +101,6 @@ class OrderPreviewViewModel extends BaseViewModel {
setState(ViewState.Error);
return;
}
print(res);
cartResponse.itemCount = res["item_count"];
cartResponse.quantityCount = res["quantity_count"];
cartResponse.subtotal = res["subtotal"];

@ -37,7 +37,6 @@ class OrderModelViewModel extends BaseViewModel {
Future getOrder(customerId, pageID) async {
print("this is customer id" + customerId);
setState(ViewState.Busy);
await _orderService.getOrder(customerId, pageID);
if (_orderService.hasError) {
@ -74,12 +73,10 @@ class OrderModelViewModel extends BaseViewModel {
}
Future getCanceledOrder(order, context) async {
print("this is order id" + order);
setState(ViewState.Busy);
dynamic res;
await _cancelOrderService.getCanceledOrder(order).then((value) {
res = value['success']['SuccessEndUserMsg'];
print(value['success']['SuccessEndUserMsg']);
AppToast.showSuccessToast(message: "Request Sent Successfully");
// Navigator.pop(context);
});

@ -165,7 +165,6 @@ class PharmacyModuleViewModel extends BaseViewModel {
}
getPrescription() async {
print("Print PRESCRIPTION url");
setState(ViewState.Busy);
await _prescriptionService.getPrescription();
if (_prescriptionService.hasError) {

@ -479,7 +479,7 @@ class _H2oSettingState extends State<H2oSetting> {
if (!value) {
_myPlugin.requestPermissions();
} else {
_myPlugin.getCalendars().then((value) => {print(value.length)});
_myPlugin.getCalendars().then((value) => {});
}
});
}

@ -268,7 +268,6 @@ class _BookSuccessState extends State<BookSuccess> {
}
Widget getNextActionWidget() {
print(widget.patientShareResponse.nextAction);
switch (widget.patientShareResponse.nextAction) {
case 0:
return Container();
@ -483,7 +482,6 @@ class _BookSuccessState extends State<BookSuccess> {
appo.appointmentNo = widget.patientShareResponse.appointmentNo;
Navigator.push(context, FadePage(page: PaymentMethod())).then((value) {
print(value);
if (value != null) {
openPayment(value, authUser, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
}
@ -519,7 +517,6 @@ class _BookSuccessState extends State<BookSuccess> {
}
onBrowserLoadStart(String url) {
print("onBrowserLoadStart");
print(url);
MyInAppBrowser.successURLS.forEach((element) {
@ -540,7 +537,6 @@ class _BookSuccessState extends State<BookSuccess> {
}
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
print("onBrowserExit Called!!!!");
if (isPaymentMade) checkPaymentStatus(appo);
}
@ -548,8 +544,7 @@ class _BookSuccessState extends State<BookSuccess> {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
print("Printing Payment Status Reponse!!!!");
print(res);
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {
createAdvancePayment(res, appo);
@ -569,8 +564,7 @@ class _BookSuccessState extends State<BookSuccess> {
DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print("Printing Payment Status Reponse!!!!");
print(res);
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {
createAdvancePayment(res, appo);
@ -588,7 +582,6 @@ class _BookSuccessState extends State<BookSuccess> {
DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString();
service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, appo.appointmentNo.toString());
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);

@ -48,7 +48,6 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
void initState() {
_tabController = new TabController(length: 2, vsync: this);
AppointmentDetails.showFooterButton = false;
print(widget.appo.clinicID);
super.initState();
}
@ -585,7 +584,6 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
DoctorsListService service = new DoctorsListService();
service.cancelAppointment(widget.appo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res);
if (res['MessageStatus'] == 1) {
getToDoCount();
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
@ -603,7 +601,6 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}

@ -148,7 +148,6 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
widget._patientArrivedAppointmentListClinic.clear();
service.getPatientAppointmentHistory(false, context).then((res) {
print(res['AppoimentAllHistoryResultList'].length);
GifLoaderDialogUtils.hideDialog(context);
setState(() {
if (res['MessageStatus'] == 1) {

@ -52,7 +52,6 @@ class _VisitTicketState extends State<VisitTicket> {
GifLoaderDialogUtils.showMyDialog(context);
service.getPatientAppointmentHistory(true, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['AppoimentAllHistoryResultList']);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['AppoimentAllHistoryResultList'].length != 0) {

@ -153,13 +153,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
_handleButtonClicks(AppoDetailsButton) {
print(AppoDetailsButton.caller);
switch (AppoDetailsButton.caller) {
case "openReschedule":
widget.tabController.animateTo((widget.tabController.index + 1) % 2);
setState(() {
print("Reschedule");
widget.enableFooterButton();
});
break;

@ -28,7 +28,6 @@ class PrescriptionReportPage extends StatefulWidget {
class _PrescriptionReportState extends State<PrescriptionReportPage> {
@override
void initState() {
print(widget.prescriptionReportEnhList.length);
super.initState();
}

@ -54,7 +54,6 @@ class CustomRadioState extends State<CustomRadio> {
sampleData[index].isSelected = true;
if (widget.requestData != null) {
AskDocDialog.selectedParameterCode = sampleData[index].duration;
print(AskDocDialog.selectedParameterCode);
} else {
ReminderDialog.selectedDuration = sampleData[index].duration * 60000;
PrescriptionReminderDialog.selectedDuration = sampleData[index].duration * 60000;

@ -74,7 +74,6 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
],
)),
...List.generate(model.insuranceApproval.length, (index) {
print(model.insuranceApproval[index].isLiveCareAppointment);
return RoundedContainer(
backgroundColor: Colors.white,
child: Column(

@ -171,15 +171,11 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var route = ModalRoute.of(context);
if (route != null) {
print(route.settings.name);
}
//setState(() {
print("didChangeAppLifecycleState");
print('state = $state');
AppGlobal.context = context;
if (state == AppLifecycleState.resumed) {
print(LandingPage.isOpenCallPage);
if (LandingPage.isOpenCallPage) {
if (!isPageNavigated) {
isPageNavigated = true;
@ -403,15 +399,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
static Future<dynamic> myBackgroundMessageHandler(Map<String, dynamic> message) async {
Map<String, dynamic> myMap = new Map<String, dynamic>.from(message['data']);
if (message.containsKey('data')) {
print("myBackgroundMessageHandler Inside");
LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
print(LandingPage.incomingCallData.doctorname);
LandingPage.isOpenCallPage = true;
}
if (message.containsKey('notification')) {
final dynamic notification = message['notification'];
print(notification);
}
}
@ -649,7 +642,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (projectViewModel.isLoading == true) {
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) {
authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {print(res)});
authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
authService.getDashboard().then((value) => {
setState(() {
if (value != null) {

@ -386,7 +386,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
},
() => {
Navigator.pop(context),
print('Faild..'),
},
).displayDialog(context);
}
@ -577,7 +576,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}

@ -56,7 +56,6 @@ class _OrderPageState extends State<OrderPage>
@override
Widget build(BuildContext context) {
print("customerID" + widget.customerID);
return BaseView<OrderModelViewModel>(
onModelReady: (model) => model.getOrder(widget.customerID, pageID),
builder: (_, model, wi) => AppScaffold(

@ -53,7 +53,6 @@ class CalendarUtils {
endDate: scheduleDateTime,
);
Event event = Event(writableCalendars.id, recurrenceRule: recurrenceRule, start: scheduleDateTime, end: scheduleDateTime.add(Duration(minutes: 30)), title: title, description: description);
print("object");
deviceCalendarPlugin.createOrUpdateEvent(event);
}

@ -93,7 +93,6 @@ class PlatformBridge {
static const un_register_Hmg_Geofences = "unRegisterHmgGeofences";
Future<Object> connectHMGInternetWifi(String patientId) {
print("Invoking platform method: $hmg_internet_wifi_connect_method");
try {
return platform.invokeMethod(hmg_internet_wifi_connect_method, [patientId]);
} on PlatformException catch (e) {
@ -103,7 +102,6 @@ class PlatformBridge {
}
Future<Object> connectHMGGuestWifi() {
print("Invoking platform method: $hmg_guest_wifi_connect_method");
try {
return platform.invokeMethod(hmg_guest_wifi_connect_method);
} on PlatformException catch (e) {
@ -113,7 +111,6 @@ class PlatformBridge {
}
Future<Object> isHMGNetworkAvailable(String ssid) {
print("Invoking platform method: $is_hmg_network_available_method");
try {
return platform.invokeMethod(is_hmg_network_available_method, ssid);
} on PlatformException catch (e) {
@ -123,7 +120,6 @@ class PlatformBridge {
}
Future<Object> enableWifiIfNot() async {
print("Invoking platform method: $enable_wifi_if_not");
try {
return platform.invokeMethod(enable_wifi_if_not);
} on PlatformException catch (e) {
@ -133,7 +129,6 @@ class PlatformBridge {
}
void showLoading(String message, bool show) async {
print("Invoking platform method: $show_loading_method");
try {
var result = await platform.invokeMethod(show_loading_method, [message, show]);
} on PlatformException catch (e) {

@ -28,7 +28,6 @@ class LocationUtils {
LocationUtils({@required this.isShowConfirmDialog, @required this.context});
void getCurrentLocation({Function(LatLng) callBack}) async {
print("current location");
if (Platform.isAndroid && (await FlutterHmsGmsAvailability.isHmsAvailable)) {
_getHMSCurrentLocation(callBack);
} else {

@ -100,8 +100,6 @@ class LabResultWidget extends StatelessWidget {
);
}
List<TableRow> fullData(List<LabResult> labResultList, context) {
generateCovidCertificate(BuildContext context, String isOutsideKSA) {
LabsService service = new LabsService();
GifLoaderDialogUtils.showMyDialog(context);

@ -100,7 +100,6 @@ class MyInAppBrowser extends InAppBrowser {
@override
void onProgressChanged(int progress) {
print("Progress: $progress");
}
@override
@ -290,8 +289,6 @@ class MyInAppBrowser extends InAppBrowser {
var bytes = utf8.encode(form);
var base64Str = base64.encode(bytes);
print(form);
print('data:text/html;base64,' + base64Str);
return 'data:text/html;base64,' + base64Str;
}
@ -309,7 +306,6 @@ class MyInAppBrowser extends InAppBrowser {
order.orderGuid +
'&&CustomerId=' +
"${order.customerId}";
print(pharmacyURL);
return pharmacyURL;
}

Loading…
Cancel
Save