updates & fixes

merge-update-with-lab-changes
haroon amjad 2 years ago
parent de5317ae55
commit 88d79367ba

@ -24,7 +24,7 @@ class _EROnlineCheckInBookAppointmentState extends State<EROnlineCheckInBookAppo
late ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
List<HospitalsModel> projectsList = []; List<HospitalsModel> projectsList = [];
final GlobalKey projectDropdownKey = GlobalKey(); final GlobalKey projectDropdownKey = GlobalKey();
late HospitalsModel selectedHospital; HospitalsModel? selectedHospital;
String projectDropdownValue = ""; String projectDropdownValue = "";
@override @override
@ -145,9 +145,9 @@ class _EROnlineCheckInBookAppointmentState extends State<EROnlineCheckInBookAppo
context, context,
FadePage( FadePage(
page: EROnlineCheckInPaymentDetails( page: EROnlineCheckInPaymentDetails(
projectID: selectedHospital.iD, projectID: selectedHospital?.iD,
isERBookAppointment: true, isERBookAppointment: true,
projectName: selectedHospital.name!, projectName: selectedHospital!.name!,
), ),
), ),
); );

@ -41,7 +41,7 @@ class EROnlineCheckInPaymentDetails extends StatefulWidget {
class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDetails> with SingleTickerProviderStateMixin { class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDetails> with SingleTickerProviderStateMixin {
late ProjectViewModel projectViewModel; late ProjectViewModel projectViewModel;
late EROnlineCheckInPaymentDetailsResponse erOnlineCheckInPaymentDetailsResponse; EROnlineCheckInPaymentDetailsResponse? erOnlineCheckInPaymentDetailsResponse;
String? selectedPaymentMethod; String? selectedPaymentMethod;
String? selectedInstallmentPlan; String? selectedInstallmentPlan;
String transID = ""; String transID = "";
@ -277,7 +277,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
width: MediaQuery.of(context).size.width * 0.75, width: MediaQuery.of(context).size.width * 0.75,
child: getPaymentMethods(), child: getPaymentMethods(),
), ),
_amountView(TranslationBase.of(context).patientShareTotalToDo, erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString() + " " + TranslationBase.of(context).sar, _amountView(TranslationBase.of(context).patientShareTotalToDo, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax.toString() + " " + TranslationBase.of(context).sar,
isBold: true, isTotal: true), isBold: true, isTotal: true),
SizedBox(height: 12), SizedBox(height: 12),
DefaultButton( DefaultButton(
@ -308,13 +308,13 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
if (projectViewModel.havePrivilege(103)) { if (projectViewModel.havePrivilege(103)) {
startApplePay(); startApplePay();
} else { } else {
openPayment(selectedPaymentMethod!, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!, appo); openPayment(selectedPaymentMethod!, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax!, appo);
} }
} else { } else {
openPayment(selectedPaymentMethod!, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse.patientShareWithTax!, appo); openPayment(selectedPaymentMethod!, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax!, appo);
} }
}, },
patientShare: erOnlineCheckInPaymentDetailsResponse.patientShareWithTax, patientShare: erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax,
isFromAdvancePayment: false, isFromAdvancePayment: false,
), ),
); );
@ -391,7 +391,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
applePayInsertRequest.liveServiceID = "0"; applePayInsertRequest.liveServiceID = "0";
applePayInsertRequest.latitude = "0.0"; applePayInsertRequest.latitude = "0.0";
applePayInsertRequest.longitude = "0.0"; applePayInsertRequest.longitude = "0.0";
applePayInsertRequest.amount = erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString(); applePayInsertRequest.amount = erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax.toString();
applePayInsertRequest.isSchedule = "0"; applePayInsertRequest.isSchedule = "0";
applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en';
applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2;
@ -417,7 +417,7 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "ER Online Check-In Payment", orderDescription: "ER Online Check-In Payment",
orderAmount: erOnlineCheckInPaymentDetailsResponse.patientShareWithTax, orderAmount: erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax,
merchantReference: transID, merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",

Loading…
Cancel
Save