Merge branch 'haroon-new-design' into 'development_new_design_2.0'

Haroon new design

See merge request Cloud_Solution/diplomatic-quarter!565
merge-requests/566/merge
haroon amjad 3 years ago
commit f2001e9877

@ -68,7 +68,9 @@ const GET_DOCTOR_RATING_DETAILS =
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
// const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async';
const GET_PRESCRIPTIONS_ALL_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT =
@ -570,7 +572,10 @@ const TRANSFER_YAHALA_LOYALITY_POINTS =
"Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
const LAKUM_GET_USER_TERMS_AND_CONDITIONS =
"Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
// const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async';
const GET_RECOMMENDED_PRODUCT = 'alsoProduct/';
const GET_MOST_VIEWED_PRODUCTS = "mostview";
const GET_NEW_PRODUCTS = "newproducts";

@ -1,11 +1,11 @@
import 'PointsAmountPerday.dart';
class PointsAmountPerMonth {
double amountPerMonth;
String month;
dynamic amountPerMonth;
dynamic month;
int monthNumber;
List<PointsAmountPerday> pointsAmountPerday;
double pointsPerMonth;
dynamic pointsPerMonth;
PointsAmountPerMonth(
{this.amountPerMonth,

@ -31,6 +31,7 @@ class Orders {
String orderStatusn;
bool canCancel;
bool canRefund;
String orderGuid;
dynamic customerId;
dynamic orderSubtotalExclTax;
dynamic orderShippingExclTax;
@ -47,6 +48,7 @@ class Orders {
this.orderStatusn,
this.canCancel,
this.canRefund,
this.orderGuid,
this.customerId,
this.orderShippingExclTax,
this.orderSubtotalExclTax,
@ -63,6 +65,7 @@ class Orders {
orderStatusn = json['order_statusn'];
canCancel = json['can_cancel'];
canRefund = json['can_refund'];
orderGuid = json['order_guid'];
customerId = json['customer_id'];
orderSubtotalExclTax= json["order_subtotal_excl_tax"];
orderShippingExclTax= json["order_shipping_excl_tax"];

@ -49,9 +49,9 @@ class OrderModelViewModel extends BaseViewModel {
}
}
Future<OrderDetailModel> getOrderDetails(OrderId) async {
Future<OrderDetailModel> getOrderDetails(OrderId, orderGUID) async {
setState(ViewState.Busy);
await _orderDetailsService.getOrderDetails(OrderId);
await _orderDetailsService.getOrderDetails(OrderId, orderGUID);
if (_orderDetailsService.hasError) {
error = _orderDetailsService.error;
setState(ViewState.Error);

@ -201,9 +201,9 @@ class _BookConfirmState extends State<BookConfirm> {
disabledColor: new Color(0xFFbcc2c4),
onPressed: () async {
if (await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) != null && !await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) {
insertAppointment(context, widget.doctor);
} else {
insertLiveCareScheduledAppointment(context, widget.doctor);
} else {
insertAppointment(context, widget.doctor);
}
},
child: Text(TranslationBase.of(context).bookAppo, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48)),
@ -249,7 +249,7 @@ class _BookConfirmState extends State<BookConfirm> {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
Future.delayed(new Duration(milliseconds: 1500), () async {
if (!await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) {
if (await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) != null && !await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) {
insertAppointment(context, widget.doctor);
} else {
insertLiveCareScheduledAppointment(context, widget.doctor);
@ -376,7 +376,6 @@ class _BookConfirmState extends State<BookConfirm> {
getLiveCareAppointmentPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {
widget.service.getLiveCareAppointmentPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
GifLoaderDialogUtils.hideDialog(context);
navigateToBookSuccess(context, docObject, widget.patientShareResponse);

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart';
@ -14,6 +15,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtonsAl
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtons.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart';
@ -57,6 +59,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
ToDoCountProviderModel model = Provider.of<ToDoCountProviderModel>(context);
var size = MediaQuery.of(context).size;
final double itemHeight = projectViewModel.isArabic ? ((size.height - kToolbarHeight - 24) * 0.5) / 2 : ((size.height - kToolbarHeight - 24) * 0.45) / 2;
final double itemWidth = size.width / 2;
@ -72,7 +75,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
onTap: shouldEnable
? null
: () {
_handleButtonClicks(appoButtonsList[index]);
_handleButtonClicks(appoButtonsList[index], model);
},
child: MedicalProfileItem(
title: appoButtonsList[index].title,
@ -88,7 +91,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
);
}
_handleButtonClicks(AppoDetailsButton) {
_handleButtonClicks(AppoDetailsButton, ToDoCountProviderModel model) {
switch (AppoDetailsButton.caller) {
case "openReschedule":
widget.tabController.animateTo((widget.tabController.index + 1) % 2);
@ -113,7 +116,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
);
break;
case "goToTodoList":
Navigator.of(context).pop();
// Navigator.of(context).pop();
navigateToToDoPage(context, model);
break;
case "askDoc":
askYourDoc();
@ -556,6 +560,18 @@ class _AppointmentActionsState extends State<AppointmentActions> {
)));
}
navigateToToDoPage(BuildContext context, ToDoCountProviderModel model) {
if (widget.projectViewModel.isLogin) {
if (model.count != 0) {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty);
}
} else {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
}
}
rateAppointment() {
widget.browser = new MyInAppBrowser();
var url = 'http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1';

@ -65,12 +65,12 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage> with Sing
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle(
fontSize: 16,
fontSize: 15,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontSize: 16,
fontSize: 15,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),

@ -137,8 +137,10 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
});
generateWeekData();
setState(() {
weeklyStatsAvgValue = avgWeeklyStepsValue ~/ weeklyDataLength;
weeklyStatsAvgValue = weeklyStatsAvgValue / 1000;
if (avgWeeklyStepsValue != 0) {
weeklyStatsAvgValue = avgWeeklyStepsValue ~/ weeklyDataLength;
weeklyStatsAvgValue = weeklyStatsAvgValue / 1000;
}
isWeeklyDataLoaded = true;
});
}).catchError((err) {
@ -165,8 +167,10 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
});
generateMonthData();
setState(() {
monthlyStatsAvgValue = avgMonthlyStepsValue ~/ monthlyDataLength;
monthlyStatsAvgValue = monthlyStatsAvgValue / 1000;
if (avgMonthlyStepsValue != 0) {
monthlyStatsAvgValue = avgMonthlyStepsValue ~/ monthlyDataLength;
monthlyStatsAvgValue = monthlyStatsAvgValue / 1000;
}
isMonthlyDataLoaded = true;
});
}).catchError((err) {
@ -193,8 +197,10 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
});
generateYearData();
setState(() {
yearlyStatsAvgValue = avgYearlyStepsValue ~/ yearlyDataLength;
yearlyStatsAvgValue = yearlyStatsAvgValue / 1000;
if (avgYearlyStepsValue != 0) {
yearlyStatsAvgValue = avgYearlyStepsValue ~/ yearlyDataLength;
yearlyStatsAvgValue = yearlyStatsAvgValue / 1000;
}
isYearlyDataLoaded = true;
});
}).catchError((err) {
@ -457,16 +463,16 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
children: <Widget>[
yearlyStepsList.isEmpty
? Container(
child: Center(
child: Text(TranslationBase.of(context).noDataAvailable),
),
)
child: Center(
child: Text(TranslationBase.of(context).noDataAvailable),
),
)
: Table(
columnWidths: {
0: FlexColumnWidth(2.5),
},
children: fullData(context),
),
columnWidths: {
0: FlexColumnWidth(2.5),
},
children: fullData(context),
),
],
),
)
@ -549,7 +555,7 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
),
);
yearlyStepsList.forEach(
(step) {
(step) {
tableRow.add(
TableRow(
children: [
@ -559,7 +565,8 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
)} ',
isCapitable: false,
mProjectViewModel: projectViewModel),
Utils.tableColumnValue(step.valueSum != null ? (step.valueSum / 1000).toString() + " " + TranslationBase.of(context).km_ : "0.0 " + TranslationBase.of(context).km_ , isCapitable: false, mProjectViewModel: projectViewModel),
Utils.tableColumnValue(step.valueSum != null ? (step.valueSum / 1000).toString() + " " + TranslationBase.of(context).km_ : "0.0 " + TranslationBase.of(context).km_,
isCapitable: false, mProjectViewModel: projectViewModel),
],
),
);
@ -567,5 +574,4 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
);
return tableRow;
}
}

@ -171,7 +171,9 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
});
generateMonthData();
setState(() {
monthlyStatsAvgValue = avgMonthlyHearRateValue ~/ monthlyDataLength;
if (avgMonthlyHearRateValue != 0) {
monthlyStatsAvgValue = avgMonthlyHearRateValue ~/ monthlyDataLength;
}
isMonthlyDataLoaded = true;
});
}).catchError((err) {
@ -198,7 +200,9 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
});
generateYearData();
setState(() {
yearlyStatsAvgValue = avgYearlyHearRateValue ~/ yearlyDataLength;
if (avgYearlyHearRateValue != 0) {
yearlyStatsAvgValue = avgYearlyHearRateValue ~/ yearlyDataLength;
}
isYearlyDataLoaded = true;
});
}).catchError((err) {

@ -136,7 +136,9 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
});
generateWeekData();
setState(() {
weeklyStatsAvgValue = avgWeeklyStepsValue ~/ weeklyDataLength;
if (avgWeeklyStepsValue != 0) {
weeklyStatsAvgValue = avgWeeklyStepsValue ~/ weeklyDataLength;
}
isWeeklyDataLoaded = true;
});
}).catchError((err) {
@ -163,7 +165,9 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
});
generateMonthData();
setState(() {
monthlyStatsAvgValue = avgMonthlyStepsValue ~/ monthlyDataLength;
if (avgMonthlyStepsValue != 0) {
monthlyStatsAvgValue = avgMonthlyStepsValue ~/ monthlyDataLength;
}
isMonthlyDataLoaded = true;
});
}).catchError((err) {
@ -190,7 +194,9 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
});
generateYearData();
setState(() {
yearlyStatsAvgValue = avgYearlyStepsValue ~/ yearlyDataLength;
if (avgYearlyStepsValue != 0) {
yearlyStatsAvgValue = avgYearlyStepsValue ~/ yearlyDataLength;
}
isYearlyDataLoaded = true;
});
}).catchError((err) {

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:collection/collection.dart';
import 'package:diplomaticquarterapp/models/SmartWatch/HealthData.dart';
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart';
@ -8,6 +10,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:fit_kit/fit_kit.dart';
import 'package:flutter/material.dart';
import 'package:health/health.dart';
import 'package:intl/intl.dart';
class syncHealthDataButton extends StatefulWidget {
@ -26,6 +29,8 @@ class syncHealthDataButton extends StatefulWidget {
class _syncHealthDataButtonState extends State<syncHealthDataButton> {
List<DataType> dataTypes = List();
List<HealthDataPoint> _healthDataList = [];
List<healthData> Med_InsertTransactionsInputsList = new List();
List<healthData> Med_InsertTransactionsInputsList2 = new List();
@ -56,12 +61,53 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
padding: const EdgeInsets.all(20.0),
child: DefaultButton(TranslationBase.of(context).syncHealthData, () {
print("ReadAll");
readAll();
fetchData();
// readAll();
}),
),
);
}
Future fetchData() async {
// get everything from midnight until now
DateTime startDate = DateTime(2021, 11, 01, 0, 0, 0);
DateTime endDate = DateTime(2021, 12, 06, 23, 59, 59);
HealthFactory health = HealthFactory();
// define the types to get
List<HealthDataType> types = [
HealthDataType.STEPS,
HealthDataType.HEART_RATE,
Platform.isAndroid ? HealthDataType.DISTANCE_DELTA : HealthDataType.DISTANCE_WALKING_RUNNING
];
// you MUST request access to the data types before reading them
// bool accessWasGranted = await health.requestAuthorization(types);
await health.requestAuthorization(types);
int steps = 0;
try {
List<HealthDataPoint> healthData = await health.getHealthDataFromTypes(startDate, endDate, types);
_healthDataList.addAll(healthData);
} catch (e) {
print("Caught exception in getHealthDataFromTypes: $e");
}
// filter out duplicates
_healthDataList = HealthFactory.removeDuplicates(_healthDataList);
// print the results
_healthDataList.forEach((x) {
if(x.type == HealthDataType.STEPS) {
print("Data point: $x");
steps += x.value.round();
}
});
print("Steps: $steps");
}
void readAll() async {
TransactionsListID = 1;
var MedSubCategoryID = 0;
@ -160,7 +206,6 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
void getAllHealthDataLists() {
var totalSteps = 0.0;
var totalDistance = 0.0;
// double totalCalories = 0.0 ;
double totalHeartRate = 0.0;
double avgTotalHeartRate = 0.0;
var counter = 0;
@ -190,7 +235,6 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
value.forEach((element) {
if (element['MedCategoryID'] == 6) {
MedCategoryID = 6;
totalSteps += element['Value'];
} else if (element['MedCategoryID'] == 7) {
MedCategoryID = 7;
@ -209,10 +253,6 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
Med_InsertTransactionsInputsList2.add(new healthData(
MedCategoryID: 4, MedSubCategoryID: element['MedSubCategoryID'], MachineDate: DateUtil.convertDateToString(date), Value: element['Value'], TransactionsListID: TransactionsListID++));
}
// else if(element['MedCategoryID'] == 8){
//
// totalCalories += element['Value'] ;
// }
});
if (counter == 0) {

@ -66,7 +66,7 @@ class _LakumPointsYearPageState extends State<LakumPointsYearPage> {
(index) => LakumPointTableRowWidget(
false,
widget.pointsAmountPerYear[widget.selectedIndexYear]
.pointsAmountPerMonth[index].month,
.pointsAmountPerMonth[index].month.toString(),
widget.pointsAmountPerYear[widget.selectedIndexYear]
.pointsAmountPerMonth[index].pointsPerMonth,
widget.pointsAmountPerYear[widget.selectedIndexYear]

@ -1,15 +1,16 @@
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:map_launcher/map_launcher.dart';
import 'dart:io' show Platform;
import 'package:url_launcher/url_launcher.dart';
class AvailabilityInfo extends StatelessWidget {
final ProductDetailViewModel previousModel;
const AvailabilityInfo({Key key, this.previousModel}) : super(key: key);
final InAppBrowser browser = new InAppBrowser();
AvailabilityInfo({Key key, this.previousModel}) : super(key: key);
@override
Widget build(BuildContext context) {
@ -22,8 +23,8 @@ class AvailabilityInfo extends StatelessWidget {
),
)
: Container(
margin: EdgeInsets.only(bottom: 40),
child: ListView.builder(
margin: EdgeInsets.only(bottom: 40),
child: ListView.builder(
physics: ScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
@ -55,20 +56,12 @@ class AvailabilityInfo extends StatelessWidget {
child: IconButton(
icon: Icon(Icons.location_on),
color: Colors.red,
onPressed: () {
if (Platform.isIOS) { MapLauncher.showMarker(
mapType: MapType.apple,
coords: Coords(double.parse(previousModel.productLocationService[index].latitude),
double.parse(previousModel.productLocationService[index].longitude)),
title: previousModel.productLocationService[index].locationDescription,);
} else { MapLauncher.showMarker(
onPressed: () async {
await MapLauncher.showMarker(
mapType: MapType.google,
coords: Coords(double.parse(previousModel.productLocationService[index].latitude),
double.parse(previousModel.productLocationService[index].longitude)),
title: previousModel.productLocationService[index].locationDescription,
// description: location.locationName,
); }
// MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude), previousModel.productLocationService[index].locationDescription);
coords: Coords(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude)),
title: previousModel.productLocationService[index].locationDescription,
);
},
),
),
@ -90,7 +83,7 @@ class AvailabilityInfo extends StatelessWidget {
);
},
),
);
);
}
convertCityName(txt) {

@ -104,7 +104,8 @@ class _BannerPagerState extends State<BannerPager> {
}
break;
case 2: {
Navigator.push(context, FadePage(page: LakumActivationVidaPage()));
// Navigator.push(context, FadePage(page: LakumActivationVidaPage()));
Navigator.push(context, FadePage(page: LakumMainPage()));
}
break;
case 5: {

@ -74,7 +74,7 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
this.context = context;
return BaseView<OrderModelViewModel>(
onModelReady: (model) {
model.getOrderDetails(widget.orderModel.id).then((value) {
model.getOrderDetails(widget.orderModel.id, widget.orderModel.orderGuid).then((value) {
setState(() {
isActiveDelivery = (value.orderStatusId == 995 && (value.driverID != null && value.driverID.isNotEmpty));
});
@ -533,10 +533,6 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
model.orderListModel[0].orderStatusId == 10
? InkWell(
onTap: () {
print(widget.orderModel.toString());
print(model.orderListModel.toString());
print("calc = ${5.9 * 3}");
// TODO MOSA
openPayment(model.orderListModel[0], model.user);
},
child: Container(
@ -672,11 +668,6 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
}
}
/***
*
* Online payment methods
*/
openPayment(
OrderDetailModel order,
AuthenticatedUser authenticatedUser,

@ -280,7 +280,7 @@ class _ProfileSettings extends State<ProfileSettings> with TickerProviderStateMi
TextField(
enabled: isEnable,
scrollPadding: EdgeInsets.zero,
keyboardType: TextInputType.number,
keyboardType: TextInputType.emailAddress,
controller: _controller,
// onChanged: (value) => {validateForm()},
style: TextStyle(

@ -20,10 +20,10 @@ class OrderDetailsService extends BaseService{
List<OrderDetailModel> get orderList => _orderList;
Future getOrderDetails(OrderId) async {
Future getOrderDetails(OrderId, orderGUID) async {
var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID);
hasError = false;
await baseAppClient.getPharmacy(GET_ORDER_DETAILS+OrderId + "/$customerGUID",
await baseAppClient.getPharmacy(GET_ORDER_DETAILS+OrderId + "/$orderGUID",
onSuccess: (dynamic response, int statusCode) {
_orderList.clear();
response['orders'].forEach((item) {

@ -20,7 +20,7 @@ class OrderService extends BaseService {
hasError = false;
// url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=1&limit=200&customer_id=1367368";
// url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=$pageId&limit=200&customer_id=$customerId";
url = GET_ORDER + "customer=1&fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc,product_count,can_cancel,can_refund&page=$pageId&limit=200&customer_id=$customerId&CustomerguId=$customerGUID";
url = GET_ORDER + "customer=1&fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc,product_count,can_cancel,can_refund,order_guid&page=$pageId&limit=200&customer_id=$customerId&CustomerguId=$customerGUID";
print(url);
await baseAppClient.getPharmacy(url, onSuccess: (dynamic response, int statusCode) {

@ -4,11 +4,11 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/pharmacy/Wishlist.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
class WishListService extends BaseService {
AppSharedPreferences sharedPref = AppSharedPreferences();
bool isLogin = false;
List<Wishlist> _wishListProducts = List();
List<Wishlist> get wishListProducts => _wishListProducts;
// Future<Map> getWishlist() async {
@ -52,18 +52,17 @@ class WishListService extends BaseService {
Future getWishlist() async {
//TODO we need to check why the customer id comes null
String customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID)?? "0";
String customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID) ?? "0";
var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID);
hasError = false;
await baseAppClient.getPharmacy(GET_WISHLIST+customerId +"?shopping_cart_type=2",
onSuccess: (dynamic response, int statusCode) {
_wishListProducts.clear();
response['shopping_carts'].forEach((item) {
_wishListProducts.add(Wishlist.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
});
await baseAppClient.getPharmacy(GET_WISHLIST + customerId + "/$customerGUID/" + "?shopping_cart_type=2", onSuccess: (dynamic response, int statusCode) {
_wishListProducts.clear();
response['shopping_carts'].forEach((item) {
_wishListProducts.add(Wishlist.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
});
}
}

@ -187,7 +187,7 @@ class LabResultWidget extends StatelessWidget {
),
Utils.tableColumnValue(labResultList[i].resultValue + " " + labResultList[i].uOM, isLast: true),
Utils.tableColumnValue(labResultList[i].referanceRange, isLast: true, isCapitable: false),
InkWell(
!checkIfCovidLab(patientLabResultList) ? InkWell(
onTap: () {
Navigator.push(
context,
@ -203,7 +203,7 @@ class LabResultWidget extends StatelessWidget {
padding: EdgeInsets.only(left: !projectViewModel.isArabic ? 0 : 12, right: !projectViewModel.isArabic ? 12 : 0),
child: Utils.tableColumnValueWithUnderLine(TranslationBase.of(context).viewFlowChart, isLast: true, isCapitable: false),
),
),
) : Container(),
],
),
);

@ -2,21 +2,18 @@ import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:map_launcher/map_launcher.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:map_launcher/map_launcher.dart';
import 'avatar/large_avatar.dart';
import 'my_rich_text.dart';
import 'dart:io' show Platform;
class HospitalLocation extends StatelessWidget {
final GetHMGLocationsModel location;
final bool showCity;
final String waitingTime;
HospitalLocation(this.location, {Key key, this.showCity = false, this.waitingTime}) : super(key: key);
@override
@ -76,20 +73,17 @@ class HospitalLocation extends StatelessWidget {
),
Column(
children: [
contactButton(Icons.location_on, TranslationBase.of(context).locationa, () {
// MapsLauncher.launchCoordinates(double.parse(location.latitude), double.parse(location.longitude), location.locationName);
if (Platform.isIOS) { MapLauncher.showMarker(
// mapType: MapType.google,
mapType: MapType.apple,
coords: Coords(double.parse(location.latitude), double.parse(location.longitude)),
title: location.locationName,);
} else { MapLauncher.showMarker(
mapType: MapType.google,
coords: Coords(double.parse(location.latitude), double.parse(location.longitude)),
title: location.locationName,
// description: location.locationName,
); }}
),
contactButton(
Icons.location_on,
TranslationBase.of(context).locationa,
() async {
await MapLauncher.showMarker(
mapType: MapType.google,
coords: Coords(double.parse(location.latitude), double.parse(location.longitude)),
title: location.locationName,
);
},
),
SizedBox(height: 10),
contactButton(Icons.call, TranslationBase.of(context).callNow, () {
launch("tel://" + location.phoneNumber);
@ -121,6 +115,4 @@ class HospitalLocation extends StatelessWidget {
),
);
}
}

@ -28,13 +28,11 @@ var _InAppBrowserOptions = InAppBrowserClassOptions(
class MyInAppBrowser extends InAppBrowser {
_PAYMENT_TYPE paymentType;
static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
@ -204,9 +202,14 @@ class MyInAppBrowser extends InAppBrowser {
openPharmacyPaymentBrowser(OrderDetailModel order, double amount, String orderDesc, String transactionID, String emailId, String paymentMethod, String patientName, dynamic patientID,
AuthenticatedUser authenticatedUser, InAppBrowser browser) {
this.browser = browser;
MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo);
getPatientData();
generatePharmacyURL(order, amount, orderDesc, transactionID, emailId, paymentMethod, patientName, patientID, authenticatedUser).then((value) {
this.browser.openUrl(url: value);
if (order.customValuesXml.contains("ApplePay")) {
safariBrowser.open(url: value);
} else {
this.browser.openUrl(url: value);
}
});
}

Loading…
Cancel
Save