Merge branch 'development_v2.5' into 'zik_development_v2.5'

# Conflicts:
#   lib/pages/login/confirm-login.dart
merge-update-with-lab-changes
haroon amjad 4 years ago
commit 72654757c4

@ -274,10 +274,10 @@ class Appointment{
// R053
// Note : - Payment flow beyond this step are same as listed under Advance Payment section of this document
appointment_details_cancel({@required AppoitmentAllHistoryResultList appointment}){
appointment_details_cancel({@required AppoitmentAllHistoryResultList appointment, appointment_type}){
logger('cancel_appointment', parameters: {
'flow_type' : GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE,
'appointment_type' : appointment.appointmentType,
'appointment_type' : appointment_type,
'clinic_type_online' : appointment.clinicName,
'hospital_name' : appointment.projectName,
'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName

@ -46,6 +46,7 @@ class _BookSuccessState extends State<BookSuccess> {
AuthenticatedUser authUser;
ProjectViewModel projectViewModel;
String selectedPaymentMethod = "";
@override
initState() {
@ -546,7 +547,7 @@ class _BookSuccessState extends State<BookSuccess> {
openPayment(List<String> paymentMethod, AuthenticatedUser authenticatedUser, double amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
selectedPaymentMethod = paymentMethod[0];
widget.browser.openPaymentBrowser(
amount,
"Appointment check in",
@ -615,10 +616,10 @@ class _BookSuccessState extends State<BookSuccess> {
AppToast.showErrorToast(message: res['Response_Message']);
projectViewModel.analytics.appointment.payment_fail(
appointment_type: 'regular',
payment_method: payment_method,
payment_method: selectedPaymentMethod,
clinic: appo.clinicName,
hospital: appo.projectName,
txn_amount: "$amount",
txn_amount: widget.patientShareResponse.patientShareWithTax.toString(),
txn_currency: currency,
error_type: res['Response_Message']);
}

@ -614,7 +614,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo);
projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo, appointment_type: widget.appo.isLiveCareAppointment ? "livecare" : "regular");
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);

@ -895,15 +895,32 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
String txn_ref;
String amount;
String payment_method;
final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed';
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {
txn_ref = res['Merchant_Reference'];
amount = res['Amount'];
payment_method = res['PaymentMethod'];
createAdvancePayment(res, appo);
projectViewModel.analytics.appointment.payment_success(
appointment_type: 'regular', payment_method: payment_method, clinic: appo.clinicName, hospital: appo.projectName, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref);
} else {
AppToast.showErrorToast(message: res['Response_Message']);
projectViewModel.analytics.appointment.payment_fail(
appointment_type: 'regular',
payment_method: payment_method,
clinic: appo.clinicName,
hospital: appo.projectName,
txn_amount: "$amount",
txn_currency: currency,
error_type: res['Response_Message']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);

@ -42,6 +42,7 @@ import 'package:provider/provider.dart';
class ConfirmLogin extends StatefulWidget {
final Function changePageViewIndex;
final fromRegistration;
const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false}) : super(key: key);
@override
@ -301,6 +302,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
int login_method = 0;
authenticateUser(int type, {int isActive}) {
GifLoaderDialogUtils.showMyDialog(context);
if (type == 2 || type == 3) {
@ -311,7 +313,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
login_method = type;
LoginRegistration.verificationMethod = type;
// if(!widget.fromRegistration)
projectViewModel.analytics.loginRegistration.login_verfication(forRegistration: widget.fromRegistration);
projectViewModel.analytics.loginRegistration.login_verfication(forRegistration: widget.fromRegistration);
switch (type) {
case 1:

@ -57,7 +57,7 @@ class PrescriptionItemsPage extends StatelessWidget {
"",
prescriptions.name,
DateUtil.convertStringToDate(prescriptions.appointmentDate),
DateUtil.formatDateToTime(DateUtil.convertStringToDate(model.prescriptionReportEnhList[0].orderDate)),
DateUtil.formatDateToTime(DateUtil.convertStringToDate(model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate : model.prescriptionReportListINP[0].orderDate)),
prescriptions.nationalityFlagURL,
prescriptions.doctorRate,
prescriptions.actualDoctorRate,

@ -202,8 +202,6 @@ dependencies:
sms_otp_auto_verify: ^2.1.0
flutter_ios_voip_kit: ^0.0.5
# payfort_plugin: ^0.3.1
dependency_overrides:
provider : ^5.0.0
permission_handler : ^6.0.1+1

Loading…
Cancel
Save