diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 6912f223..7812c5e7 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/ReceiverInfoV3Model.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/ReceiverInfoV3Model.java index a1fefc7f..f47828af 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/ReceiverInfoV3Model.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/ReceiverInfoV3Model.java @@ -342,6 +342,7 @@ public class ReceiverInfoV3Model implements Parcelable { this.countryId = selectedCountry.getCountryId(); this.countryCode = selectedCountry.getCountryCode(); + printLog(); } diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/presenter/recipientaddeditV3/edit/RecipientEditV3Presenter.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/presenter/recipientaddeditV3/edit/RecipientEditV3Presenter.java index 7a2712c5..23787515 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/presenter/recipientaddeditV3/edit/RecipientEditV3Presenter.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/presenter/recipientaddeditV3/edit/RecipientEditV3Presenter.java @@ -63,16 +63,8 @@ public class RecipientEditV3Presenter extends RecipientAddEditBaseV3Presenter im @Override public void onCountryServiceSelected(CountryServiceModel selectedCountry) { -// validator.updateSelectedCountryServiceData(selectedCountry); -// -// view.updateValueToWidgetSelectedCountry(selectedCountry.getCountryName()); -// view.showSelectedCountryFlag(CountryFlagMapper.getFlagFromCountryCode(selectedCountry.getCountryCode())); -// -// this.showMobilePrefixAndFlag(selectedCountry.getCountryCode()); -// -// flushCountryRelatedDataOnCountryServiceSelected(); - flushCountryRelatedDataOnCountryServiceSelected(); + validator.getRecipientDetail().updateSelectedCountry(validator.getSelectedCountryServiceData()); validator.updateSelectedCountryServiceData(selectedCountry); @@ -95,23 +87,10 @@ public class RecipientEditV3Presenter extends RecipientAddEditBaseV3Presenter im @Override public void onServiceTypeSelected(ServiceTypeModel selectedServiceType) { -// validator.getRecipientDetail().updateSelectedCountry(validator.getSelectedCountryServiceData()); -// validator.getRecipientDetail().setPaymentMethod(new PaymentMethodV3Model(selectedServiceType.getId(), selectedServiceType.getText(), selectedServiceType.getDescription(), selectedServiceType.getCurrency())); -// -// -// view.updateValueToWidgetSelectedPaymentMethod(selectedServiceType.getDescription()); -// -// flushPaymentMethodRelatedDataOnServiceTypeSelected(); -// -// -// //TODO Right now mock -// getDynamicValidationAndDropDownList(validator.getSelectedCountryServiceData().getCountryId(),selectedServiceType.getId()); -// mockDynamicValidationList(); - flushPaymentMethodRelatedDataOnServiceTypeSelected(); +// flushPaymentMethodRelatedDataOnServiceTypeSelected(); - validator.getRecipientDetail().updateSelectedCountry(validator.getSelectedCountryServiceData()); validator.getRecipientDetail().setPaymentMethod(new PaymentMethodV3Model(selectedServiceType.getId(), selectedServiceType.getText(), selectedServiceType.getDescription(), selectedServiceType.getCurrency())); view.updateValueToWidgetSelectedPaymentMethod(selectedServiceType.getDescription()); @@ -351,8 +330,8 @@ public class RecipientEditV3Presenter extends RecipientAddEditBaseV3Presenter im //Map existing data to view and validator - view.showCountrySelectionView(true); - view.showPaymentSelectionView(true); +// view.showCountrySelectionView(true); +// view.showPaymentSelectionView(true); applyValidationRulesToView(data.getData().getValidationRuleList()); validator.validateAllRequiredFieldsExplicitly(); @@ -389,9 +368,17 @@ public class RecipientEditV3Presenter extends RecipientAddEditBaseV3Presenter im protected void onSuccess(GenericResponseDataModel> t) { if (t.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { validator.updateAvailableCountryServiceData(t.getData()); + seedExistingDatatoView(); if (validator.getRecipientDetail().getPaymentMethod() == null) { //Since payment method is not available at the moment we cannot show his existing mapped data - view.showCountrySelectionView(true); + + view.updateValueToWidgetSelectedCountry(validator.getRecipientDetail().getCountry()); + view.updateValueToWidgetSelectedPaymentMethod(""); + + + view.showSelectedCountryFlag(CountryFlagMapper.getFlagFromCountryCode(validator.getRecipientDetail().getCountryCode())); + + } else { seedExistingDatatoView(); @@ -400,6 +387,9 @@ public class RecipientEditV3Presenter extends RecipientAddEditBaseV3Presenter im getDynamicValidationAndDropDownList(countryId, serviceTypeID); } + view.showCountrySelectionView(true); + view.showPaymentSelectionView(true); + } else { view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.FAILED, alertType -> view.exitView());