Merge branch 'development_v3.3' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan_v3.3

# Conflicts:
#	lib/config/config.dart
merge-update-with-lab-changes
Sultan khan 3 years ago
commit 47702b5c01

@ -23,6 +23,7 @@ var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// Pharmacy UAT URLs
// var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// var PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';

@ -484,7 +484,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
onSelectedMethod: (String method, [String selectedInstallmentPlan]) {
selectedPaymentMethod = method;
this.selectedInstallmentPlan = selectedInstallmentPlan;
openPayment(selectedPaymentMethod, projectViewModel.authenticatedUserObject.user, double.parse(getTotalValue()), null, model, selectedInstallmentPlan);
openPayment(selectedPaymentMethod, projectViewModel.user, double.parse(getTotalValue()), null, model, selectedInstallmentPlan);
},
patientShare: double.parse(getTotalValue()),
isFromAdvancePayment: !projectViewModel.havePrivilege(94),
@ -494,18 +494,18 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo, AnciallryOrdersViewModel model, [String selectedInstallmentPlan]) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.authenticatedUserObject.user.patientID);
transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID);
browser.openPaymentBrowser(
amount,
"Ancillary Orders Payment",
transID,
widget.projectID.toString(),
projectViewModel.authenticatedUserObject.user.emailAddress,
projectViewModel.user.emailAddress,
paymentMethod,
projectViewModel.authenticatedUserObject.user.patientType,
projectViewModel.authenticatedUserObject.user.firstName + " " + projectViewModel.authenticatedUserObject.user.lastName,
projectViewModel.authenticatedUserObject.user.patientID,
projectViewModel.user.patientType,
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
projectViewModel.user.patientID,
authenticatedUser,
browser,
false,
@ -628,9 +628,9 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
res['Amount'],
res['Fort_id'],
res['PaymentMethod'],
projectViewModel.authenticatedUserObject.user.patientType,
projectViewModel.authenticatedUserObject.user.firstName + " " + projectViewModel.authenticatedUserObject.user.lastName,
projectViewModel.authenticatedUserObject.user.patientID,
projectViewModel.user.patientType,
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
projectViewModel.user.patientID,
localContext)
.then((res) {
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, 0, appo);

@ -46,7 +46,7 @@ class BookSuccess extends StatefulWidget {
class _BookSuccessState extends State<BookSuccess> {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser;
// AuthenticatedUser authUser;
ProjectViewModel projectViewModel;
String selectedPaymentMethod = "";
@ -535,13 +535,6 @@ class _BookSuccessState extends State<BookSuccess> {
}
Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse) async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});
}
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientShareResponse.projectID;
appo.clinicID = widget.patientShareResponse.clinicID;
@ -563,7 +556,7 @@ class _BookSuccessState extends State<BookSuccess> {
patientShare: widget.patientShareResponse.patientShareWithTax)))
.then((value) {
if (value != null) {
openPayment(value, authUser, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
projectViewModel.analytics.appointment.payment_method(appointment_type: 'regular', clinic: widget.docObject.clinicName, payment_method: value[0], payment_type: 'appointment');
}
});

@ -298,24 +298,28 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
if (_selected == 0) {
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
} else {
askVideoCallPermission().then((value) async {
if (value == true) {
locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
print(value);
});
if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
await drawOverAppsMessageDialog(context).then((value) {
return false;
if (widget.isPharmaLiveCare) {
Navigator.pop(context, true);
} else {
askVideoCallPermission().then((value) async {
if (value == true) {
locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
print(value);
});
if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
await drawOverAppsMessageDialog(context).then((value) {
return false;
});
} else {
Navigator.pop(context, true);
projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName);
}
} else {
Navigator.pop(context, true);
projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName);
openPermissionsDialog();
}
} else {
openPermissionsDialog();
}
});
});
}
}
},
color: CustomColors.green,
@ -332,7 +336,7 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
@override
void dispose() {
cancelAPI();
// cancelAPI();
super.dispose();
}

@ -462,7 +462,10 @@ class _clinic_listState extends State<ClinicList> {
final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed';
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.checkPaymentStatus(widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode : Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), widget.isPharmacyLiveCare, context).then((res) {
service
.checkPaymentStatus(
widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode : Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), widget.isPharmacyLiveCare, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
String paymentInfo = res['Response_Message'];
amount = res['Amount'].toString();
@ -595,7 +598,7 @@ class _clinic_listState extends State<ClinicList> {
widget.isPharmacyLiveCare = true;
widget.pharmacyLiveCareQRCode = value.split("/")[1];
liveCareClinicIDs = await sharedPref.getString(LIVECARE_CLINIC_DATA);
selectedClinicID = 7;
selectedClinicID = 1;
selectedClinicName = TranslationBase.of(context).pharmaLiveCare;
sharedPref.remove(LIVECARE_CLINIC_DATA);
startLiveCare();

@ -247,58 +247,63 @@ class PushNotificationHandler {
} else {
final fcmToken = await FirebaseMessaging.instance.getToken();
if (fcmToken != null) onToken(fcmToken);
try {
FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage message) async {
if (message != null) {
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
if (message != null) newMessage(message);
});
else if (message != null) newMessage(message);
}
});
} catch (ex) {}
FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
print("Firebase onMessage!!!");
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
newMessage(message);
});
else
newMessage(message);
});
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) async {
print("Firebase onMessageOpenedApp!!!");
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
newMessage(message);
});
else
newMessage(message);
});
FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) {
print("Push Notification onTokenRefresh: " + fcm_token);
onToken(fcm_token);
});
FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String token) {
print("Push Notification getToken: " + token);
onToken(token);
});
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
}
} catch (ex) {}
}
if (Platform.isIOS) {
await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions(
alert: true, // Required to display a heads up notification
badge: true,
sound: true,
);
final permission = await FirebaseMessaging.instance.requestPermission();
if (permission.authorizationStatus == AuthorizationStatus.denied) return;
} else {}
try {
FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage message) async {
if (message != null) {
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
if (message != null) newMessage(message);
});
else if (message != null) newMessage(message);
}
});
} catch (ex) {}
FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
print("Firebase onMessage!!!");
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
newMessage(message);
});
else
newMessage(message);
});
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) async {
print("Firebase onMessageOpenedApp!!!");
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
newMessage(message);
});
else
newMessage(message);
});
FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) {
print("Push Notification onTokenRefresh: " + fcm_token);
onToken(fcm_token);
});
FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String token) {
print("Push Notification getToken: " + token);
onToken(token);
});
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
}
newMessage(RemoteMessage remoteMessage) async {

@ -37,9 +37,9 @@ class MyInAppBrowser extends InAppBrowser {
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // 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/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 SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';
@ -63,7 +63,7 @@ class MyInAppBrowser extends InAppBrowser {
AuthProvider authProvider = new AuthProvider();
InAppBrowser browser = new InAppBrowser();
AuthenticatedUser authUser;
// AuthenticatedUser authUser;
AppoitmentAllHistoryResultList appo;
String deviceToken;
@ -125,16 +125,16 @@ class MyInAppBrowser extends InAppBrowser {
this.deviceToken = deviceToken;
}
getPatientData() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
lat = await this.sharedPref.getDouble(USER_LAT);
long = await this.sharedPref.getDouble(USER_LONG);
}
}
// getPatientData() async {
// if (await this.sharedPref.getObject(USER_PROFILE) != null) {
// var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
// authUser = data;
// }
// if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
// lat = await this.sharedPref.getDouble(USER_LAT);
// long = await this.sharedPref.getDouble(USER_LONG);
// }
// }
openPackagesPaymentBrowser({@required int customer_id, @required int order_id}) {
paymentType = _PAYMENT_TYPE.PACKAGES;
@ -146,7 +146,7 @@ class MyInAppBrowser extends InAppBrowser {
AuthenticatedUser authenticatedUser, InAppBrowser browser, bool isLiveCareAppo, var servID, var LiveServID, BuildContext context,
[var appoDate, var appoNo, var clinicID, var doctorID, var installments]) async {
this.browser = browser;
await getPatientData();
// await getPatientData();
if (paymentMethod == "ApplePay") {
getDeviceToken();
MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo);
@ -213,7 +213,7 @@ class MyInAppBrowser extends InAppBrowser {
tamaraRequestModel.orderDescription = orderDesc;
tamaraRequestModel.isInstallment = true;
tamaraRequestModel.projectID = num.parse(projId);
tamaraRequestModel.accessCode = authUser.mobileNumber;
tamaraRequestModel.accessCode = authenticatedUser.mobileNumber;
tamaraRequestModel.appointmentNo = (appoNo != null && appoNo != "") ? appoNo.toString() : "0";
tamaraRequestModel.customerName = patientName;
tamaraRequestModel.fileNumber = patientID.toString();
@ -254,7 +254,7 @@ class MyInAppBrowser extends InAppBrowser {
AuthenticatedUser authenticatedUser, InAppBrowser browser) {
this.browser = browser;
MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo);
getPatientData();
// getPatientData();
generatePharmacyURL(order, amount, orderDesc, transactionID, emailId, paymentMethod, patientName, patientID, authenticatedUser).then((value) {
if (order.customValuesXml.contains("ApplePay")) {
safariBrowser.open(url: Uri.parse(value));
@ -300,7 +300,7 @@ class MyInAppBrowser extends InAppBrowser {
// if (servID == "4")
// form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.PREAUTH_SERVICE_URL);
// else
form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.SERVICE_URL);
form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.SERVICE_URL);
if (servID != null) {
form = form.replaceFirst('SERV_ID', servID);

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.5.015+4050015
version: 4.5.61+1
environment:
sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save