Browse Source

Edit mode editing for recipient

master
Preyea Regmi 5 years ago
parent
commit
574696056a
  1. BIN
      .idea/caches/build_file_checksums.ser
  2. 1
      app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/model/recipientlistingV3/ReceiverInfoV3Model.java
  3. 42
      app/src/main/java/com/gmeremit/online/gmeremittance_native/recipientV3/presenter/recipientaddeditV3/edit/RecipientEditV3Presenter.java

BIN
.idea/caches/build_file_checksums.ser

1
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();
}

42
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<List<CountryServiceModel>> 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());

Loading…
Cancel
Save