Browse Source

removed source of fund and purpose of remittance from kyc and add recepient layout and adding in new screen

new_design
Santosh Bhandary 3 years ago
parent
commit
cb990d062c
  1. 1
      app/src/main/AndroidManifest.xml
  2. 3
      app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/existingCustomer/gateway/ExistingExistingKYCV3Gateway.java
  3. 32
      app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/existingCustomer/model/ExistingPersonalInfoDTO.java
  4. 37
      app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/existingCustomer/presenter/ExistingKYCV3ViewModel.java
  5. 9
      app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/existingCustomer/view/ExistingKYCV3Activity.java
  6. 47
      app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/existingCustomer/view/personal/ExistingCustomerDetailFragment.java
  7. 12
      app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/existingCustomer/view/personal/ExistingCustomerDetailViewLiveData.java
  8. 3
      app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/newCustomer/gateway/KYCV3Gateway.java
  9. 30
      app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/newCustomer/model/PersonalInfoDTO.java
  10. 39
      app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/newCustomer/presenter/KYCV3ViewModel.java
  11. 8
      app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/newCustomer/view/KYCV3Activity.java
  12. 43
      app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/newCustomer/view/personal/CustomerDetailFragment.java
  13. 26
      app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/newCustomer/view/personal/CustomerDetailViewLiveData.java
  14. 2
      app/src/main/java/com/swifttech/remit/jmecustomer/features/notice/view/NoticeDetailFragment.java
  15. 21
      app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientlisting/view/recipientaddedit/BeneficiaryAddEditFragment.java
  16. 6
      app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/model/recipientlistingV3/ReceiverInfoV3Model.java
  17. 52
      app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/RecipientAddEditBaseV3ViewModel.java
  18. 5
      app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/RecipientAddV3ContractInterface.java
  19. 16
      app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/RecipientDetailValidatorV3.java
  20. 4
      app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/RecipientPresenterInterface.java
  21. 26
      app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/edit/RecipientEditV3ViewModel.java
  22. 46
      app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/view/recipientaddeditV3/BeneficiaryAddEditV3Fragment.java
  23. 10
      app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/view/recipientaddeditV3/BeneficiaryAddEditV3TermsFragment.java
  24. 4
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/SendMoneyViewModelFactory.java
  25. 5
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/gateway/SendMoneyV2Gateway.java
  26. 24
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/model/SendMoneyAPIRequestBody.java
  27. 91
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/model/ccdi/CCDIDataDto.java
  28. 2
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/presenter/SendMoneyV2InteractorInterface.java
  29. 21
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/presenter/SendMoneyV2PresenterInterface.java
  30. 250
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/presenter/SendMoneyV2ViewModel.java
  31. 2
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/SendMoneyActionListener.java
  32. 5
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/SendMoneyScreenManager.java
  33. 63
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/SendMoneyV2Activity.java
  34. 14
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/amountdetail/AmountDetailSendMoneyFragment.java
  35. 216
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/ccdi/CCDISendMoneyFragment.java
  36. 54
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/ccdi/CCIDDetailViewLiveData.java
  37. 4
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/consent/UserConsentSendMoneyFragment.java
  38. 7
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/payoutmode/PayoutModeBranchListingDialog.java
  39. 8
      app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/verification/VerificationSendMoneyFragment.java
  40. 2
      app/src/main/java/com/swifttech/remit/jmecustomer/features/termsandcondition/view/TermsAndConditionFragment.java
  41. 1
      app/src/main/java/com/swifttech/remit/jmecustomer/utils/https/API_URL.java
  42. 4
      app/src/main/java/com/swifttech/remit/jmecustomer/utils/https/ApiEndpoints.java
  43. 2
      app/src/main/res/layout/activity_send_money_v2.xml
  44. 13
      app/src/main/res/layout/fragment_beneficiary_add_edit_v3.xml
  45. 68
      app/src/main/res/layout/fragment_ccdi_send_money_v2.xml
  46. 16
      app/src/main/res/layout/fragment_existing_kyc_customer_detail.xml
  47. 15
      app/src/main/res/layout/fragment_kyc_customer_detail.xml
  48. 6
      app/src/main/res/layout/fragment_web_browser_v2.xml
  49. 40
      app/src/main/res/layout/kyc_header.xml
  50. 74
      app/src/main/res/layout/send_money_header.xml
  51. 2
      app/src/main/res/values/strings.xml

1
app/src/main/AndroidManifest.xml

@ -8,7 +8,6 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />

3
app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/existingCustomer/gateway/ExistingExistingKYCV3Gateway.java

@ -64,8 +64,6 @@ public class ExistingExistingKYCV3Gateway extends PrivilegedGateway implements E
map.put("employeerName", createStringUploadValue(existingPersonalInfoDTO.getEmployeerName()));
map.put("occupation", createStringUploadValue(existingPersonalInfoDTO.getOccupation()));
map.put("otherOccupation", createStringUploadValue(existingPersonalInfoDTO.getOtherOccupation()));
map.put("sourceOfFund", createStringUploadValue(existingPersonalInfoDTO.getSourceOfFund()));
map.put("otherSourceOfFund", createStringUploadValue(existingPersonalInfoDTO.getOtherSourceOfFund()));
map.put("monthlyIncome", createStringUploadValue(existingPersonalInfoDTO.getMonthlyIncome()));
map.put("businessType", createStringUploadValue(existingPersonalInfoDTO.getBusinessType()));
map.put("mobile", createStringUploadValue(existingPersonalInfoDTO.getMobile()));
@ -147,7 +145,6 @@ public class ExistingExistingKYCV3Gateway extends PrivilegedGateway implements E
"1",
"John Doe",
"2",
"2",
"3",
"123134123",
"asdf@asd.com",

32
app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/existingCustomer/model/ExistingPersonalInfoDTO.java

@ -22,13 +22,6 @@ public class ExistingPersonalInfoDTO {
@Expose
private String otherOccupation="";
@SerializedName("sourceOfFund")
@Expose
private String sourceOfFund;
@SerializedName("otherSourceOfFund")
@Expose
private String otherSourceOfFund="";
@SerializedName("monthlyIncome")
@Expose
@ -69,7 +62,6 @@ public class ExistingPersonalInfoDTO {
String visaStatus,
String employeerName,
String occupation,
String sourceOfFund,
String monthlyIncome,
String mobile,
String email,
@ -81,7 +73,6 @@ public class ExistingPersonalInfoDTO {
this.visaStatus = visaStatus;
this.employeerName = employeerName;
this.occupation = occupation;
this.sourceOfFund = sourceOfFund;
this.monthlyIncome = monthlyIncome;
this.mobile = mobile;
this.email = email;
@ -100,13 +91,6 @@ public class ExistingPersonalInfoDTO {
this.otherOccupation = otherOccupation;
}
public String getOtherSourceOfFund() {
return otherSourceOfFund;
}
public void setOtherSourceOfFund(String otherSourceOfFund) {
this.otherSourceOfFund = otherSourceOfFund;
}
public String getOtherIdType() {
return otherIdType;
@ -132,13 +116,6 @@ public class ExistingPersonalInfoDTO {
this.employeerName = employeerName;
}
public String getSourceOfFund() {
return sourceOfFund;
}
public void setSourceOfFund(String sourceOfFund) {
this.sourceOfFund = sourceOfFund;
}
public String getMonthlyIncome() {
return monthlyIncome;
@ -247,7 +224,6 @@ public class ExistingPersonalInfoDTO {
this.visaStatus,
this.employeerName,
this.occupation,
this.sourceOfFund,
this.monthlyIncome,
this.mobile,
this.email,
@ -265,7 +241,6 @@ public class ExistingPersonalInfoDTO {
this.visaStatus,
Utils.formatToUpperCaseSafely(this.employeerName),
this.occupation,
this.sourceOfFund,
this.monthlyIncome,
Utils.formatToUpperCaseSafely(this.mobile),
Utils.formatToUpperCaseSafely(this.email),
@ -282,12 +257,7 @@ public class ExistingPersonalInfoDTO {
}
public boolean isSourceOfFundValid() {
return Utils.isStringNotNullOrEmpty(this.sourceOfFund);
}
public boolean isOtherSourceOfFundValid() {
return Utils.isStringNotNullOrEmpty(this.otherSourceOfFund);
}
public boolean isOccupationValid() {
return Utils.isStringNotNullOrEmpty(this.occupation);
}

37
app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/existingCustomer/presenter/ExistingKYCV3ViewModel.java

@ -120,7 +120,6 @@ public class ExistingKYCV3ViewModel extends BaseViewModel implements ExistingKYC
viewBindings = mViewBindings;
List<Observable<Boolean>> list = Arrays.asList(
viewBindings.getOccupationObservable().map(validator::validateOccupation),
viewBindings.getSourceOfFundObservable().map(validator::validateSourceOfFund),
viewBindings.getAddressObservable().map(validator::validateAddress),
viewBindings.getBusinessTypeObservable().map(validator::validateBusinessType),
viewBindings.getIdTypeObservable().map(validator::validateSelectedIDType),
@ -215,11 +214,6 @@ public class ExistingKYCV3ViewModel extends BaseViewModel implements ExistingKYC
mobileNumber = mobileNumber.substring(3);
}
String sourceOfFundText = existingPersonalInfoDTO.getSourceOfFund();
ExistingIDTextDTO sourceOfFund = data.getSourceOfFundFromId(sourceOfFundText);
if (sourceOfFund == null && sourceOfFundText != null) {
sourceOfFund = new ExistingIDTextDTO(sourceOfFundText, sourceOfFundText);
}
String selectedIdTypeText=existingPersonalInfoDTO.getIdType();
ExistingIDTextDTO selectedIdType=data.getIDTypeFromId(selectedIdTypeText);
@ -243,7 +237,6 @@ public class ExistingKYCV3ViewModel extends BaseViewModel implements ExistingKYC
customerDetailLiveData.getEmployerNameLiveData().postValue(new FormInputStateDTO<>(true, null, existingPersonalInfoDTO.getEmployeerName()));
customerDetailLiveData.getOccupationsLiveData().postValue(new FormInputStateDTO<>(true, null, occupation));
customerDetailLiveData.getPurposeOfRegistrationLiveData().postValue(new FormInputStateDTO<>(true, null, purposeOfRegistration));
customerDetailLiveData.getSourceOfFundLiveData().postValue(new FormInputStateDTO<>(true, null, sourceOfFund));
customerDetailLiveData.getMonthlyIncomeLiveData().postValue(new FormInputStateDTO<>(true, null, existingPersonalInfoDTO.getMonthlyIncome()));
customerDetailLiveData.getBusinessTypeLiveData().postValue(new FormInputStateDTO<>(true, null, data.getBusinessTypeFromId(existingPersonalInfoDTO.getBusinessType())));
customerDetailLiveData.getIdTypeLiveData().postValue(new FormInputStateDTO<>(true, null,selectedIdType));
@ -675,36 +668,6 @@ public class ExistingKYCV3ViewModel extends BaseViewModel implements ExistingKYC
}
}
boolean validateSourceOfFund(ExistingIDTextDTO data) {
if (existingKycRelatedDataDTO.getPersonalInformation() == null)
existingKycRelatedDataDTO.setPersonalInformation(new ExistingPersonalInfoDTO());
if (shouldPromptToInputAnswer(data)) {
view.promptToInputAnswer(view.getContext().getResources().getString(R.string.specifySourceOfFund_text), new AnswerInputDialog.AnswerInputDialogListener() {
@Override
public void onAnswerSubmitted(String answer) {
existingKycRelatedDataDTO.getPersonalInformation().setSourceOfFund("");
existingKycRelatedDataDTO.getPersonalInformation().setOtherSourceOfFund(answer);
customerDetailLiveData.getSourceOfFundLiveData().postValue(new FormInputStateDTO<>(true, null, ExistingIDTextDTO.createFromUserAnswerInput(answer)));
}
});
} else {
if(!data.getId().equalsIgnoreCase(data.getText())){
existingKycRelatedDataDTO.getPersonalInformation().setOtherSourceOfFund("");
existingKycRelatedDataDTO.getPersonalInformation().setSourceOfFund(data.getId());
}else{
existingKycRelatedDataDTO.getPersonalInformation().setOtherSourceOfFund(data.getId());
existingKycRelatedDataDTO.getPersonalInformation().setSourceOfFund("");
}
}
if (existingKycRelatedDataDTO.getPersonalInformation().isSourceOfFundValid() || existingKycRelatedDataDTO.getPersonalInformation().isOtherSourceOfFundValid()) {
return true;
} else {
customerDetailLiveData.getSourceOfFundLiveData().setValue(new FormInputStateDTO<>(false, view.getContext().getResources().getString(R.string.InvalidSourceOfFund_text), null));
return false;
}
}
boolean validateAddress(CharSequence data) {
if (existingKycRelatedDataDTO.getPersonalInformation() == null)

9
app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/existingCustomer/view/ExistingKYCV3Activity.java

@ -16,7 +16,6 @@ import androidx.viewpager.widget.ViewPager;
import com.swifttech.remit.jmecustomer.R;
import com.swifttech.remit.jmecustomer.base.BaseActivity;
import com.swifttech.remit.jmecustomer.common.customwidgets.CustomAlertDialog;
import com.swifttech.remit.jmecustomer.common.customwidgets.GenericViewPagerAdapter;
import com.swifttech.remit.jmecustomer.common.customwidgets.GmeTextView;
import com.swifttech.remit.jmecustomer.common.customwidgets.common.GenericEditTextPromptDialog;
@ -54,10 +53,10 @@ public class ExistingKYCV3Activity extends BaseActivity implements ExistingKYCV3
@BindView(R.id.page1TxtView)
TextView page1TxtView;
@BindView(R.id.page2TxtView)
@BindView(R.id.page3TxtView)
TextView page2TxtView;
@BindView(R.id.page3TxtView)
@BindView(R.id.page4TxtView)
TextView page3TxtView;
@ -212,13 +211,13 @@ public class ExistingKYCV3Activity extends BaseActivity implements ExistingKYCV3
}
@OnClick({R.id.page1TxtView, R.id.page2TxtView})
@OnClick({R.id.page1TxtView, R.id.page3TxtView})
public void onPageIndextClicked(View view) {
switch (view.getId()) {
case R.id.page1TxtView:
changePageIndexTo(0);
break;
case R.id.page2TxtView:
case R.id.page3TxtView:
changePageIndexTo(1);
break;

47
app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/existingCustomer/view/personal/ExistingCustomerDetailFragment.java

@ -58,9 +58,6 @@ public class ExistingCustomerDetailFragment extends BaseFragment implements Exis
EditText ed_occupation;
@BindView(R.id.ed_sourceOfFund)
EditText ed_sourceOfFund;
@BindView(R.id.ed_visaStatus)
EditText ed_visaStatus;
@ -94,7 +91,6 @@ public class ExistingCustomerDetailFragment extends BaseFragment implements Exis
private GenericTextListingDialog<ExistingIDTextDTO> occupationSelectionDialog;
private GenericTextListingDialog<ExistingIDTextDTO> sourceOfFundSelectionDialog;
private GenericTextListingDialog<ExistingIDTextDTO> businessTypeSelectionDialog;
private GenericTextListingDialog<ExistingIDTextDTO> purposeOfRegistrationDialog;
@ -102,7 +98,6 @@ public class ExistingCustomerDetailFragment extends BaseFragment implements Exis
private GenericTextListingDialog<ExistingIDTextDTO> visaStatusSelectionDialog;
private PublishSubject<ExistingIDTextDTO> occupationSelectSubject;
private PublishSubject<ExistingIDTextDTO> sourceOfFundSelectSubject;
private PublishSubject<ExistingIDTextDTO> businessTypeSelectSubject;
private PublishSubject<ExistingIDTextDTO> idTypeSelectSubject;
private PublishSubject<ExistingIDTextDTO> visaStatusSelectionSubject;
@ -129,7 +124,6 @@ public class ExistingCustomerDetailFragment extends BaseFragment implements Exis
private void init() {
occupationSelectSubject = PublishSubject.create();
sourceOfFundSelectSubject = PublishSubject.create();
businessTypeSelectSubject = PublishSubject.create();
idTypeSelectSubject = PublishSubject.create();
visaStatusSelectionSubject = PublishSubject.create();
@ -141,7 +135,6 @@ public class ExistingCustomerDetailFragment extends BaseFragment implements Exis
new ExistingCustomerDetailViewLiveData.CustomerDetailViewBinding(
RxTextView.textChanges(ed_employerName),
occupationSelectSubject,
sourceOfFundSelectSubject,
RxTextView.textChanges(ed_monthlyIncome).skipInitialValue(),
RxTextView.textChanges(ed_mobileNumber).skipInitialValue(),
businessTypeSelectSubject,
@ -163,7 +156,6 @@ public class ExistingCustomerDetailFragment extends BaseFragment implements Exis
existingCustomerDetailViewLiveData.getMobileNumberLiveData().observe(getViewLifecycleOwner(), this::onMobileNumberSelected);
existingCustomerDetailViewLiveData.getMonthlyIncomeLiveData().observe(getViewLifecycleOwner(), this::onMonthlyIncomeSelected);
existingCustomerDetailViewLiveData.getEmployerNameLiveData().observe(getViewLifecycleOwner(), this::onEmployerNameSelected);
existingCustomerDetailViewLiveData.getSourceOfFundLiveData().observe(getViewLifecycleOwner(), this::onSourceOfFundSelected);
existingCustomerDetailViewLiveData.getOccupationsLiveData().observe(getViewLifecycleOwner(), this::onOccupationSelected);
existingCustomerDetailViewLiveData.getVisaStatusLiveData().observe(getViewLifecycleOwner(), this::onVisaStatusSelected);
existingCustomerDetailViewLiveData.getPurposeOfRegistrationLiveData().observe(getViewLifecycleOwner(), this::onPurposeOfRegistrationSelected);
@ -181,19 +173,6 @@ public class ExistingCustomerDetailFragment extends BaseFragment implements Exis
}
}
private void onSourceOfFundSelected(FormInputStateDTO<ExistingIDTextDTO> data) {
if (data.isValid()) {
if (data.hasData()) {
if (!data.getData().getText().equalsIgnoreCase(getString(R.string.othersSpecify))
&& !data.getData().getText().equalsIgnoreCase(getString(R.string.othersSpecify1))
&& !data.getData().getText().equalsIgnoreCase(getString(R.string.othersSpecify2))
) {
ed_sourceOfFund.setText(data.getData().getText());
sourceOfFundSelectSubject.onNext(data.getData());
}
}
}
}
private void onEmployerNameSelected(FormInputStateDTO<String> data) {
if (data.isValid()) {
@ -405,33 +384,7 @@ public class ExistingCustomerDetailFragment extends BaseFragment implements Exis
visaStatusSelectionDialog.show(getActivity().getSupportFragmentManager(), "VISASTATUSCHOOSER");
}
@OnClick(R.id.ed_sourceOfFund)
public void promptSourceOfFund() {
hideKeyBoard();
if (sourceOfFundSelectionDialog == null)
sourceOfFundSelectionDialog = new GenericTextListingDialog<>();
sourceOfFundSelectionDialog.setData(kycv3ViewModel.getSourceOfFundList());
sourceOfFundSelectionDialog.disableSearch(true);
sourceOfFundSelectionDialog.setListener(sourceOfFund ->
{
sourceOfFundSelectionDialog.dismiss();
if (
!sourceOfFund.toString().equalsIgnoreCase(getString(R.string.othersSpecify))
&& !sourceOfFund.toString().equalsIgnoreCase(getString(R.string.othersSpecify1))
&& !sourceOfFund.toString().equalsIgnoreCase(getString(R.string.othersSpecify2))
) {
ed_sourceOfFund.setText(sourceOfFund.toString());
}
sourceOfFundSelectSubject.onNext(sourceOfFund);
});
sourceOfFundSelectionDialog.setHintAndTitle(getActivity().getResources().getString(R.string.search_source_of_fund_text), getString(R.string.selectSourceOfFund_text), getString(R.string.no_result_found_text));
if (!sourceOfFundSelectionDialog.isAdded())
sourceOfFundSelectionDialog.show(getActivity().getSupportFragmentManager(), "SOURCEOFFUNDTYPECHOOSER");
}
@OnClick(R.id.ed_occupation)
public void promptOccupation() {

12
app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/existingCustomer/view/personal/ExistingCustomerDetailViewLiveData.java

@ -11,7 +11,6 @@ import io.reactivex.Observable;
public class ExistingCustomerDetailViewLiveData {
private MutableLiveData<FormInputStateDTO<String>> employerNameLiveData;
private MutableLiveData<FormInputStateDTO<ExistingIDTextDTO>> occupationsLiveData;
private MutableLiveData<FormInputStateDTO<ExistingIDTextDTO>> sourceOfFundLiveData;
private MutableLiveData<FormInputStateDTO<String>> monthlyIncomeLiveData;
private MutableLiveData<FormInputStateDTO<String>> mobileNumberLiveData;
private MutableLiveData<FormInputStateDTO<ExistingIDTextDTO>> businessTypeLiveData;
@ -24,7 +23,6 @@ public class ExistingCustomerDetailViewLiveData {
public ExistingCustomerDetailViewLiveData() {
employerNameLiveData = new MutableLiveData<>();
occupationsLiveData = new MutableLiveData<>();
sourceOfFundLiveData = new MutableLiveData<>();
monthlyIncomeLiveData = new MutableLiveData<>();
mobileNumberLiveData = new MutableLiveData<>();
businessTypeLiveData = new MutableLiveData<>();
@ -43,9 +41,6 @@ public class ExistingCustomerDetailViewLiveData {
return employerNameLiveData;
}
public MutableLiveData<FormInputStateDTO<ExistingIDTextDTO>> getSourceOfFundLiveData() {
return sourceOfFundLiveData;
}
public MutableLiveData<FormInputStateDTO<ExistingIDTextDTO>> getPurposeOfRegistrationLiveData() {
return purposeOfRegistrationLiveData;
@ -82,7 +77,6 @@ public class ExistingCustomerDetailViewLiveData {
public static class CustomerDetailViewBinding {
private Observable<CharSequence> employerNameObservable;
private Observable<ExistingIDTextDTO> occupationObservable;
private Observable<ExistingIDTextDTO> sourceOfFundObservable;
private Observable<CharSequence> monthlyIncomeObservable;
private Observable<CharSequence> mobileNumberObservable;
private Observable<ExistingIDTextDTO> businessTypeObservable;
@ -94,7 +88,6 @@ public class ExistingCustomerDetailViewLiveData {
public CustomerDetailViewBinding(
Observable<CharSequence> employerNameObservable,
Observable<ExistingIDTextDTO> occupationObservable,
Observable<ExistingIDTextDTO> sourceOfFundObservable,
Observable<CharSequence> monthlyIncomeObservable,
Observable<CharSequence> mobileNumberObservable,
Observable<ExistingIDTextDTO> businessTypeObservable,
@ -106,7 +99,6 @@ public class ExistingCustomerDetailViewLiveData {
) {
this.employerNameObservable = employerNameObservable;
this.sourceOfFundObservable = sourceOfFundObservable;
this.occupationObservable = occupationObservable;
this.monthlyIncomeObservable = monthlyIncomeObservable;
this.mobileNumberObservable = mobileNumberObservable;
@ -121,9 +113,7 @@ public class ExistingCustomerDetailViewLiveData {
return employerNameObservable;
}
public Observable<ExistingIDTextDTO> getSourceOfFundObservable() {
return sourceOfFundObservable;
}
public Observable<CharSequence> getMonthlyIncomeObservable() {
return monthlyIncomeObservable;

3
app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/newCustomer/gateway/KYCV3Gateway.java

@ -65,8 +65,6 @@ public class KYCV3Gateway extends PrivilegedGateway implements KYCV3GatewayInter
map.put("employeerName", createStringUploadValue(personalInfoDTO.getEmployeerName()));
map.put("occupation", createStringUploadValue(personalInfoDTO.getOccupation()));
map.put("otherOccupation", createStringUploadValue(personalInfoDTO.getOtherOccupation()));
map.put("sourceOfFund", createStringUploadValue(personalInfoDTO.getSourceOfFund()));
map.put("otherSourceOfFund", createStringUploadValue(personalInfoDTO.getOtherSourceOfFund()));
map.put("monthlyIncome", createStringUploadValue(personalInfoDTO.getMonthlyIncome()));
map.put("businessType", createStringUploadValue(personalInfoDTO.getBusinessType()));
map.put("mobile", createStringUploadValue(personalInfoDTO.getMobile()));
@ -157,7 +155,6 @@ public class KYCV3Gateway extends PrivilegedGateway implements KYCV3GatewayInter
"John Doe",
"2",
"3",
"3",
"123134123",
"NP",
"3",

30
app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/newCustomer/model/PersonalInfoDTO.java

@ -22,13 +22,6 @@ public class PersonalInfoDTO {
@Expose
private String otherOccupation="";
@SerializedName("sourceOfFund")
@Expose
private String sourceOfFund;
@SerializedName("otherSourceOfFund")
@Expose
private String otherSourceOfFund="";
@SerializedName("monthlyIncome")
@Expose
@ -63,7 +56,6 @@ public class PersonalInfoDTO {
public PersonalInfoDTO(String employeerName,
String occupation,
String sourceOfFund,
String monthlyIncome,
String mobile,
String additionalAddress,
@ -76,7 +68,6 @@ public class PersonalInfoDTO {
) {
this.employeerName = employeerName;
this.occupation = occupation;
this.sourceOfFund = sourceOfFund;
this.monthlyIncome = monthlyIncome;
this.mobile = mobile;
this.additionalAddress = additionalAddress;
@ -95,13 +86,7 @@ public class PersonalInfoDTO {
this.otherIdType = otherIdType;
}
public String getOtherSourceOfFund() {
return otherSourceOfFund;
}
public void setOtherSourceOfFund(String otherSourceOfFund) {
this.otherSourceOfFund = otherSourceOfFund;
}
public String getOtherOccupation() {
return otherOccupation;
@ -119,13 +104,7 @@ public class PersonalInfoDTO {
this.employeerName = employeerName;
}
public String getSourceOfFund() {
return sourceOfFund;
}
public void setSourceOfFund(String sourceOfFund) {
this.sourceOfFund = sourceOfFund;
}
public String getMonthlyIncome() {
return monthlyIncome;
@ -222,7 +201,6 @@ public class PersonalInfoDTO {
return new PersonalInfoDTO(
this.employeerName,
this.occupation,
this.sourceOfFund,
this.monthlyIncome,
this.mobile,
this.additionalAddress,
@ -239,7 +217,6 @@ public class PersonalInfoDTO {
return new PersonalInfoDTO(
Utils.formatToUpperCaseSafely(this.employeerName),
this.occupation,
this.sourceOfFund,
this.monthlyIncome,
Utils.formatToUpperCaseSafely(this.mobile),
Utils.formatToUpperCaseSafely(this.additionalAddress),
@ -256,13 +233,6 @@ public class PersonalInfoDTO {
}
public boolean isSourceOfFundValid() {
return Utils.isStringNotNullOrEmpty(this.sourceOfFund);
}
public boolean isOtherSourceOfFundValid() {
return Utils.isStringNotNullOrEmpty(this.otherSourceOfFund);
}
public boolean isOccupationValid() {
return Utils.isStringNotNullOrEmpty(this.occupation);
}

39
app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/newCustomer/presenter/KYCV3ViewModel.java

@ -120,7 +120,6 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
viewBindings.getAdditionalIdTypeObservable().map(validator::validateAdditionalIdType),
viewBindings.getOccupationObservable().map(validator::validateOccupation),
viewBindings.getPurposeOfRegistrationObservable().map(validator::validatePurposeOfRegistration),
viewBindings.getSourceOfFundObservable().map(validator::validateSourceOfFund),
viewBindings.getAddressObservable().map(validator::validateAddress),
viewBindings.getBusinessTypeObservable().map(validator::validateBusinessType),
viewBindings.getIdTypeObservable().map(validator::validateSelectedIDType),
@ -244,11 +243,7 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
mobileNumber = mobileNumber.substring(3);
}
String sourceOfFuntText = personalInfoDTO.getSourceOfFund();
IDTextDTO sourceOfFund = data.getSourceOfFundFromId(sourceOfFuntText);
if (sourceOfFund == null && sourceOfFuntText != null) {
sourceOfFund = new IDTextDTO(sourceOfFuntText, sourceOfFuntText);
}
String selectedIdTypeText=personalInfoDTO.getIdType();
IDTextDTO selectedIdType=data.getIDTypeFromId(selectedIdTypeText);
@ -274,7 +269,6 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
}
customerDetailLiveData.getEmployerNameLiveData().postValue(new FormInputStateDTO<>(true, null, personalInfoDTO.getEmployeerName()));
customerDetailLiveData.getOccupationsLiveData().postValue(new FormInputStateDTO<>(true, null, occupation));
customerDetailLiveData.getSourceOfFundLiveData().postValue(new FormInputStateDTO<>(true, null, sourceOfFund));
customerDetailLiveData.getPurposeOfRegistrationLiveData().postValue(new FormInputStateDTO<>(true, null, purposeOfRegistration));
customerDetailLiveData.getMonthlyIncomeLiveData().postValue(new FormInputStateDTO<>(true, null, personalInfoDTO.getMonthlyIncome()));
customerDetailLiveData.getBusinessTypeLiveData().postValue(new FormInputStateDTO<>(true, null, data.getBusinessTypeFromId(personalInfoDTO.getBusinessType())));
@ -864,37 +858,6 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
}
}
boolean validateSourceOfFund(IDTextDTO data) {
if (kycRelatedDataDTO.getPersonalInformation() == null)
kycRelatedDataDTO.setPersonalInformation(new PersonalInfoDTO());
if (shouldPromptToInputAnswer(data)) {
view.promptToInputAnswer(view.getContext().getResources().getString(R.string.specifySourceOfFund_text), new AnswerInputDialog.AnswerInputDialogListener() {
@Override
public void onAnswerSubmitted(String answer) {
kycRelatedDataDTO.getPersonalInformation().setSourceOfFund("");
kycRelatedDataDTO.getPersonalInformation().setOtherSourceOfFund(answer);
customerDetailLiveData.getSourceOfFundLiveData().postValue(new FormInputStateDTO<>(true, null, IDTextDTO.createFromUserAnswerInput(answer)));
}
});
} else {
if(!data.getId().equalsIgnoreCase(data.getText())){
kycRelatedDataDTO.getPersonalInformation().setSourceOfFund(data.getId());
kycRelatedDataDTO.getPersonalInformation().setOtherSourceOfFund("");
}else{
kycRelatedDataDTO.getPersonalInformation().setSourceOfFund("");
kycRelatedDataDTO.getPersonalInformation().setOtherSourceOfFund(data.getId());
}
}
if (kycRelatedDataDTO.getPersonalInformation().isSourceOfFundValid()||kycRelatedDataDTO.getPersonalInformation().isOtherSourceOfFundValid()) {
return true;
} else {
customerDetailLiveData.getSourceOfFundLiveData().setValue(new FormInputStateDTO<>(false, view.getContext().getResources().getString(R.string.InvalidSourceOfFund_text), null));
return false;
}
}
boolean validateAddress(CharSequence data) {
if (kycRelatedDataDTO.getPersonalInformation() == null)
kycRelatedDataDTO.setPersonalInformation(new PersonalInfoDTO());

8
app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/newCustomer/view/KYCV3Activity.java

@ -53,10 +53,10 @@ public class KYCV3Activity extends BaseActivity implements KYCV3PresenterInterfa
@BindView(R.id.page1TxtView)
TextView page1TxtView;
@BindView(R.id.page2TxtView)
@BindView(R.id.page3TxtView)
TextView page2TxtView;
@BindView(R.id.page3TxtView)
@BindView(R.id.page4TxtView)
TextView page3TxtView;
@BindView(R.id.toolbar_title)
@ -202,13 +202,13 @@ public class KYCV3Activity extends BaseActivity implements KYCV3PresenterInterfa
}
@OnClick({R.id.page1TxtView, R.id.page2TxtView})
@OnClick({R.id.page1TxtView, R.id.page3TxtView})
public void onPageIndextClicked(View view) {
switch (view.getId()) {
case R.id.page1TxtView:
changePageIndexTo(0);
break;
case R.id.page2TxtView:
case R.id.page3TxtView:
changePageIndexTo(1);
break;

43
app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/newCustomer/view/personal/CustomerDetailFragment.java

@ -59,8 +59,7 @@ public class CustomerDetailFragment extends BaseFragment implements KYCV3Present
@BindView(R.id.ed_occupation)
EditText ed_occupation;
@BindView(R.id.ed_sourceOfFund)
EditText ed_sourceOfFund;
@BindView(R.id.ed_monthlyIncome)
EditText ed_monthlyIncome;
@ -105,7 +104,6 @@ public class CustomerDetailFragment extends BaseFragment implements KYCV3Present
private GenericTextListingDialog<IDTextDTO> idTypeSelectionDialog;
private GenericTextListingDialog<IDTextDTO> additionalIdTypeSelectionDialog;
private PublishSubject<IDTextDTO> occupationSelectSubject;
private PublishSubject<IDTextDTO> sourceOfFundSelectSubject;
private PublishSubject<IDTextDTO> businessTypeSelectSubject;
private PublishSubject<IDTextDTO> idTypeSelectSubject;
private PublishSubject<IDTextDTO> additionalIdTypeSelectSubject;
@ -146,7 +144,6 @@ public class CustomerDetailFragment extends BaseFragment implements KYCV3Present
private void init() {
occupationSelectSubject = PublishSubject.create();
sourceOfFundSelectSubject = PublishSubject.create();
businessTypeSelectSubject = PublishSubject.create();
idTypeSelectSubject = PublishSubject.create();
additionalIdTypeSelectSubject = PublishSubject.create();
@ -157,7 +154,6 @@ public class CustomerDetailFragment extends BaseFragment implements KYCV3Present
customerDetailViewBinding = new CustomerDetailViewLiveData.CustomerDetailViewBinding(
RxTextView.textChanges(ed_employerName),
occupationSelectSubject,
sourceOfFundSelectSubject,
RxTextView.textChanges(ed_monthlyIncome).skipInitialValue(),
RxTextView.textChanges(ed_mobileNumber).skipInitialValue(),
businessTypeSelectSubject,
@ -183,7 +179,6 @@ public class CustomerDetailFragment extends BaseFragment implements KYCV3Present
customerDetailViewLiveData.getMonthlyIncomeLiveData().observe(getViewLifecycleOwner(), this::onMonthlyIncomeSelected);
customerDetailViewLiveData.getEmployerNameLiveData().observe(getViewLifecycleOwner(), this::onEmployerNameSelected);
customerDetailViewLiveData.getOccupationsLiveData().observe(getViewLifecycleOwner(), this::onOccupationSelected);
customerDetailViewLiveData.getSourceOfFundLiveData().observe(getViewLifecycleOwner(), this::onSourceOfFundSelected);
customerDetailViewLiveData.getAllFieldsValidLiveData().observe(getViewLifecycleOwner(), areAllFieldsValid -> btnSubmit1.setEnabled(areAllFieldsValid));
@ -198,18 +193,7 @@ public class CustomerDetailFragment extends BaseFragment implements KYCV3Present
}
}
private void onSourceOfFundSelected(FormInputStateDTO<IDTextDTO> data) {
if (data.isValid()) {
if (data.hasData()) {
if(!data.getData().getText().equalsIgnoreCase(getString(R.string.othersSpecify))
&& !data.getData().getText().equalsIgnoreCase(getString(R.string.othersSpecify1))
&& !data.getData().getText().equalsIgnoreCase(getString(R.string.othersSpecify2))){
ed_sourceOfFund.setText(data.getData().getText());
sourceOfFundSelectSubject.onNext(data.getData());
}
}
}
}
private void onEmployerNameSelected(FormInputStateDTO<String> data) {
if (data.isValid()) {
@ -448,30 +432,7 @@ public class CustomerDetailFragment extends BaseFragment implements KYCV3Present
}
@OnClick(R.id.ed_sourceOfFund)
public void promptSourceOfFund() {
hideKeyBoard();
if (sourceOfFundSelectionDialog == null)
sourceOfFundSelectionDialog = new GenericTextListingDialog<>();
sourceOfFundSelectionDialog.setData(kycv3ViewModel.getSourceOfFundList());
sourceOfFundSelectionDialog.disableSearch(true);
sourceOfFundSelectionDialog.setListener(sourceOfFund ->
{
sourceOfFundSelectionDialog.dismiss();
if( !sourceOfFund.toString().equalsIgnoreCase(getString(R.string.othersSpecify))
&& !sourceOfFund.toString().equalsIgnoreCase(getString(R.string.othersSpecify1))
&& !sourceOfFund.toString().equalsIgnoreCase(getString(R.string.othersSpecify2))){
ed_sourceOfFund.setText(sourceOfFund.toString());
}
sourceOfFundSelectSubject.onNext(sourceOfFund);
});
sourceOfFundSelectionDialog.setHintAndTitle(getActivity().getResources().getString(R.string.search_source_of_fund_text), getString(R.string.selectSourceOfFund_text), getString(R.string.no_result_found_text));
if (!sourceOfFundSelectionDialog.isAdded())
sourceOfFundSelectionDialog.show(getActivity().getSupportFragmentManager(), "SOURCEOFFUNDTYPECHOOSER");
}
@OnClick(R.id.ed_businesstype)
public void promptBusinessType() {

26
app/src/main/java/com/swifttech/remit/jmecustomer/features/kyc/newCustomer/view/personal/CustomerDetailViewLiveData.java

@ -12,7 +12,6 @@ public class CustomerDetailViewLiveData {
private MutableLiveData<FormInputStateDTO<String>> employerNameLiveData;
private MutableLiveData<FormInputStateDTO<IDTextDTO>> occupationsLiveData;
private MutableLiveData<FormInputStateDTO<IDTextDTO>> sourceOfFundLiveData;
private MutableLiveData<FormInputStateDTO<String>> monthlyIncomeLiveData;
private MutableLiveData<FormInputStateDTO<String>> mobileNumberLiveData;
private MutableLiveData<FormInputStateDTO<IDTextDTO>> businessTypeLiveData;
@ -25,7 +24,6 @@ public class CustomerDetailViewLiveData {
public CustomerDetailViewLiveData() {
employerNameLiveData = new MutableLiveData<>();
occupationsLiveData = new MutableLiveData<>();
sourceOfFundLiveData = new MutableLiveData<>();
monthlyIncomeLiveData = new MutableLiveData<>();
mobileNumberLiveData = new MutableLiveData<>();
businessTypeLiveData = new MutableLiveData<>();
@ -44,17 +42,7 @@ public class CustomerDetailViewLiveData {
this.employerNameLiveData = employerNameLiveData;
}
public MutableLiveData<Boolean> getAllFieldsValid() {
return allFieldsValid;
}
public void setAllFieldsValid(MutableLiveData<Boolean> allFieldsValid) {
this.allFieldsValid = allFieldsValid;
}
public void setAllFieldsValid(boolean allFieldsValid) {
this.allFieldsValid.setValue(allFieldsValid);
}
public MutableLiveData<FormInputStateDTO<IDTextDTO>> getOccupationsLiveData() {
return occupationsLiveData;
@ -72,13 +60,7 @@ public class CustomerDetailViewLiveData {
this.purposeOfRegistrationLiveData = purposeOfRegistrationLiveData;
}
public MutableLiveData<FormInputStateDTO<IDTextDTO>> getSourceOfFundLiveData() {
return sourceOfFundLiveData;
}
public void setSourceOfFundLiveData(MutableLiveData<FormInputStateDTO<IDTextDTO>> sourceOfFundLiveData) {
this.sourceOfFundLiveData = sourceOfFundLiveData;
}
public MutableLiveData<FormInputStateDTO<String>> getMonthlyIncomeLiveData() {
return monthlyIncomeLiveData;
@ -135,7 +117,6 @@ public class CustomerDetailViewLiveData {
public static class CustomerDetailViewBinding {
private Observable<CharSequence> employerNameObservable;
private Observable<IDTextDTO> sourceOfFundObservable;
private Observable<CharSequence> monthlyIncomeObservable;
private Observable<CharSequence> mobileNumberObservable;
private Observable<IDTextDTO> businessTypeObservable;
@ -148,7 +129,6 @@ public class CustomerDetailViewLiveData {
public CustomerDetailViewBinding(
Observable<CharSequence> employerNameObservable,
Observable<IDTextDTO> occupationObservable,
Observable<IDTextDTO> sourceOfFundObservable,
Observable<CharSequence> monthlyIncomeObservable,
Observable<CharSequence> mobileNumberObservable,
Observable<IDTextDTO> businessTypeObservable,
@ -159,7 +139,6 @@ public class CustomerDetailViewLiveData {
) {
this.employerNameObservable = employerNameObservable;
this.occupationObservable = occupationObservable;
this.sourceOfFundObservable = sourceOfFundObservable;
this.monthlyIncomeObservable = monthlyIncomeObservable;
this.mobileNumberObservable = mobileNumberObservable;
this.businessTypeObservable = businessTypeObservable;
@ -173,11 +152,6 @@ public class CustomerDetailViewLiveData {
return employerNameObservable;
}
public Observable<IDTextDTO>getSourceOfFundObservable() {
return sourceOfFundObservable;
}
public Observable<CharSequence> getMonthlyIncomeObservable() {
return monthlyIncomeObservable;

2
app/src/main/java/com/swifttech/remit/jmecustomer/features/notice/view/NoticeDetailFragment.java

@ -13,7 +13,6 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelProviders;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.target.CustomTarget;
@ -22,7 +21,6 @@ import com.swifttech.remit.jmecustomer.R;
import com.swifttech.remit.jmecustomer.base.BaseFragment;
import com.swifttech.remit.jmecustomer.features.notice.model.NoticeDetailDTO;
import com.swifttech.remit.jmecustomer.features.notice.presenter.NoticeViewModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2Presenter;
import butterknife.BindView;
import butterknife.ButterKnife;

21
app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientlisting/view/recipientaddedit/BeneficiaryAddEditFragment.java

@ -193,7 +193,6 @@ public class BeneficiaryAddEditFragment extends BaseFragment implements Recipie
binding.edReceiverStateSelection.setOnClickListener(new StateSelectionClickListener());
binding.edReceiverDistrictSelection.setOnClickListener(new DistrictSelectionClickListener());
binding.edReceiverRelationSelection.setOnClickListener(new RelationSelectionClickListener());
binding.edReceiverTransferReasonSelection.setOnClickListener(new TransferReasonSelectionClickListener());
binding.edReceiverIDTypeSelection.setOnClickListener(new IDTypeSelectionClickListener());
} else {
binding.edReceiverCountrySelection.setOnClickListener(null);
@ -204,7 +203,6 @@ public class BeneficiaryAddEditFragment extends BaseFragment implements Recipie
binding.edReceiverStateSelection.setOnClickListener(null);
binding.edReceiverDistrictSelection.setOnClickListener(null);
binding.edReceiverRelationSelection.setOnClickListener(null);
binding.edReceiverTransferReasonSelection.setOnClickListener(null);
binding.edReceiverIDTypeSelection.setOnClickListener(null);
}
}
@ -390,25 +388,6 @@ public class BeneficiaryAddEditFragment extends BaseFragment implements Recipie
}
}
public class TransferReasonSelectionClickListener implements View.OnClickListener {
@Override
public void onClick(View v) {
hideKeyBoard();
if (transferListingDialog == null)
transferListingDialog = new GenericTextListingDialog<>();
transferListingDialog.setData(viewModel.getTransferReasonList());
transferListingDialog.setListener(selectedTransferReason ->
{
viewModel.onTransferReasonSelected(selectedTransferReason);
transferListingDialog.dismiss();
});
transferListingDialog.setHintAndTitle(getString(R.string.searchPurposeOfRemit_text), getResources().getString(R.string.selectPurposeOfRemit_text), getString(R.string.noPurposeOfRemit_text));
transferListingDialog.disableSearch(false);
if (!transferListingDialog.isAdded())
transferListingDialog.show(getActivity().getSupportFragmentManager(), this.getClass().getSimpleName());
}
}
public class IDTypeSelectionClickListener implements View.OnClickListener {

6
app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/model/recipientlistingV3/ReceiverInfoV3Model.java

@ -118,13 +118,13 @@ public class ReceiverInfoV3Model implements Parcelable {
@SerializedName("hasVerifiedOTP")
@Expose
private Boolean hasVerifiedOTP;
private boolean hasVerifiedOTP;
public Boolean getHasVerifiedOTP() {
public boolean getHasVerifiedOTP() {
return hasVerifiedOTP;
}
public void setHasVerifiedOTP(Boolean hasVerifiedOTP) {
public void setHasVerifiedOTP(boolean hasVerifiedOTP) {
this.hasVerifiedOTP = hasVerifiedOTP;
}

52
app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/RecipientAddEditBaseV3ViewModel.java

@ -8,7 +8,6 @@ import com.swifttech.remit.jmecustomer.common.customwidgets.CustomAlertDialog;
import com.swifttech.remit.jmecustomer.common.customwidgets.common.GenericPromptDialog;
import com.swifttech.remit.jmecustomer.common.view.AnswerInputDialog;
import com.swifttech.remit.jmecustomer.features.kyc.newCustomer.model.NativeCountry;
import com.swifttech.remit.jmecustomer.features.kyc.newCustomer.presenter.KYCV3ViewModel;
import com.swifttech.remit.jmecustomer.features.recipientmanagement.model.recipientaddeditV3.countryservice.CountryServiceModel;
import com.swifttech.remit.jmecustomer.features.recipientmanagement.model.recipientaddeditV3.countryservice.ServiceTypeModel;
import com.swifttech.remit.jmecustomer.features.recipientmanagement.model.recipientaddeditV3.dynamicvalidation.DropDownDTO;
@ -17,7 +16,6 @@ import com.swifttech.remit.jmecustomer.features.recipientmanagement.model.recipi
import com.swifttech.remit.jmecustomer.features.recipientmanagement.model.recipientaddeditV3.dynamicvalidation.ValidationRuleModel;
import com.swifttech.remit.jmecustomer.features.recipientmanagement.model.recipientlistingV3.AgentV3Model;
import com.swifttech.remit.jmecustomer.features.recipientmanagement.model.recipientlistingV3.ReceiverInfoV3Model;
import com.swifttech.remit.jmecustomer.features.recipientmanagement.presenter.recipientlistingV3.RecipientListingV3Presenter;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.SendMoneyRequiredDataV3;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.payoutmode.BankBranchDTO;
import com.swifttech.remit.jmecustomer.utils.Constants;
@ -38,10 +36,10 @@ public abstract class RecipientAddEditBaseV3ViewModel extends BaseViewModel impl
protected final RecipientAddV3ContractInterface view;
protected RecipientDetailValidatorV3 validator;
protected String successMessage =null;
protected String receiverId=null;
protected String successMessage = null;
protected String receiverId = null;
protected SendMoneyRequiredDataV3 sendMoneyRequiredDataV3;
protected CompositeDisposable compositeDisposable;
protected CompositeDisposable compositeDisposable;
public RecipientAddEditBaseV3ViewModel(
@ -72,7 +70,6 @@ public abstract class RecipientAddEditBaseV3ViewModel extends BaseViewModel impl
}
private void init() {
view.getRecipientAddEditV3ContractInterface().hideAllViewExceptCountry();
}
@ -290,14 +287,13 @@ public abstract class RecipientAddEditBaseV3ViewModel extends BaseViewModel impl
}
@Override
public void proceedToEditSucess() {
public void proceedToEditSuccess() {
requestForOtp();
}
@Override
public void proceedToAddSucess() {
if(successMessage !=null ){
public void proceedToAddSuccess() {
if (successMessage != null) {
view.getRecipientAddEditV3ContractInterface().promptToSendMoney(new GenericPromptDialog.GenericDialogPromptListener() {
@Override
public void onNegativeBtnPressed() {
@ -306,7 +302,7 @@ public abstract class RecipientAddEditBaseV3ViewModel extends BaseViewModel impl
@Override
public void onPositiveBtnPressed() {
if(sendMoneyRequiredDataV3!=null){
if (sendMoneyRequiredDataV3 != null) {
view.getRecipientAddEditV3ContractInterface().redirectToSendMoney(sendMoneyRequiredDataV3);
}
@ -317,24 +313,24 @@ public abstract class RecipientAddEditBaseV3ViewModel extends BaseViewModel impl
}
@Override
public void showEmailCodePopUp(){
public void showEmailCodePopUp() {
view.getRecipientTermsAndConditionsContract().showEmailCodePromptDialog();
}
@Override
public void verifyEmailCode(String OTP){
public void verifyEmailCode(String OTP) {
compositeDisposable.add(
validator.getGateway().verifyEmailCode(
validator.getGateway().getAuth(),
validator.getGateway().getUserID(),
OTP,
Constants.REQUEST_FOR_REC_VALUE,
receiverId)
.doOnSubscribe(subs -> view.showProgressBar(true, ""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doFinally(() -> view.showProgressBar(false, ""))
.subscribeWith(new UploadEmailCodeObserver(view.getRecipientTermsAndConditionsContract()::onEmailVerifySuccess)));
validator.getGateway().getAuth(),
validator.getGateway().getUserID(),
OTP,
Constants.REQUEST_FOR_REC_VALUE,
receiverId)
.doOnSubscribe(subs -> view.showProgressBar(true, ""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doFinally(() -> view.showProgressBar(false, ""))
.subscribeWith(new UploadEmailCodeObserver(view.getRecipientTermsAndConditionsContract()::onEmailVerifySuccess)));
}
@Override
@ -355,7 +351,7 @@ public abstract class RecipientAddEditBaseV3ViewModel extends BaseViewModel impl
}
private boolean shouldPromptToInputAnswer(DropDownDTO data) {
return (data != null && (view.getContext().getString(R.string.othersSpecify).equalsIgnoreCase(data.getText()) || view.getContext().getString(R.string.othersSpecify1).equalsIgnoreCase(data.getText())|| view.getContext().getString(R.string.othersSpecify2).equalsIgnoreCase(data.getText())));
return (data != null && (view.getContext().getString(R.string.othersSpecify).equalsIgnoreCase(data.getText()) || view.getContext().getString(R.string.othersSpecify1).equalsIgnoreCase(data.getText()) || view.getContext().getString(R.string.othersSpecify2).equalsIgnoreCase(data.getText())));
}
public class UploadEmailCodeObserver extends GenericApiObserverResponseV2<MessageResponseDataModel> {
@ -375,9 +371,9 @@ public abstract class RecipientAddEditBaseV3ViewModel extends BaseViewModel impl
} else {
if(t.getErrorCode().equalsIgnoreCase(Constants.OPT_EXPIRED_CODE_V2)){
if (t.getErrorCode().equalsIgnoreCase(Constants.OPT_EXPIRED_CODE_V2)) {
view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.FAILED, alertType -> requestForOtp());
}else{
} else {
view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.FAILED, null);
}
@ -407,7 +403,7 @@ public abstract class RecipientAddEditBaseV3ViewModel extends BaseViewModel impl
Runnable task;
public RequestEmailCodeObserver(Runnable task) {
this.task=task;
this.task = task;
}
@Override

5
app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/RecipientAddV3ContractInterface.java

@ -39,6 +39,8 @@ public interface RecipientAddV3ContractInterface extends BaseContractInterface
void promptToSendMoney(GenericPromptDialog.GenericDialogPromptListener listener, String message);
void onEditSuccess();
void hideAllFormFieldsExceptCountryAndPaymentMethod();
void redirectToSendMoney(SendMoneyRequiredDataV3 sendMoneyRequiredDataV3);
@ -96,7 +98,6 @@ public interface RecipientAddV3ContractInterface extends BaseContractInterface
void updateValueToWidgetRelation(String value);
void updateValueToWidgetTransferReason(String value);
void updateValueToWidgetNativeCountry(String nativeCountry);
@ -143,7 +144,6 @@ public interface RecipientAddV3ContractInterface extends BaseContractInterface
void updateValidationRuleToWidgetRelation(boolean fieldRequired, EditTextConfigurationFactory.EditTextConfiguration keyboardTypeFromKeyword);
void updateValidationRuleToWidgetTransferReason(boolean fieldRequired, EditTextConfigurationFactory.EditTextConfiguration keyboardTypeFromKeyword);
void updateValidationRuleToWidgetEmail(boolean isFieldRequired, EditTextConfigurationFactory.EditTextConfiguration keyboardTypeFromKeyword);
@ -236,7 +236,6 @@ public interface RecipientAddV3ContractInterface extends BaseContractInterface
void addOptionalAsHintToWidgetRelation(Boolean isOptional);
void addOptionalAsHintToWidgetTransferReason(Boolean isOptional);
void addOptionalAsHintToWidgetEmail(Boolean isOptional);

16
app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/RecipientDetailValidatorV3.java

@ -614,7 +614,6 @@ public class RecipientDetailValidatorV3 {
return;
ValidationRuleModel validationRuleModel = validationRuleModelMap.get(FIELD_TRANSFER_REASON);
if (validationRuleModel != null) {
view.getRecipientAddEditV3ContractInterface().updateValueToWidgetTransferReason(selectedTransferReason.toString());
recipientInfo.updateTransferReason(selectedTransferReason);
validationRuleModel.updateValidity(true);
validateAll();
@ -998,22 +997,7 @@ public class RecipientDetailValidatorV3 {
view.getRecipientAddEditV3ContractInterface().addOptionalAsHintToWidgetRelation(rule.isOptional());
break;
case FIELD_TRANSFER_REASON:
view.getRecipientAddEditV3ContractInterface().updateValidationRuleToWidgetTransferReason(isFieldRequired,
EditTextConfigurationFactory.getKeyboardTypeFromKeyword(rule.getKeyboardType(), rule.isLocalKeyboardAllowed(),
rule.getMaxFieldLengthInt()));
if (isFieldRequired) {
if (checkStringNotEmpty(recipientInfo.getPurposeOfRemitId()) || checkStringNotEmpty(recipientInfo.getPurposeOfRemit()) || rule.isOptional())
rule.updateValidity(true);
validationRuleModelMap.put(FIELD_TRANSFER_REASON, rule);
} else {
recipientInfo.setPurposeOfRemitId(null);
recipientInfo.setPurposeOfRemit(null);
view.getRecipientAddEditV3ContractInterface().updateValueToWidgetTransferReason(null);
}
view.getRecipientAddEditV3ContractInterface().addOptionalAsHintToWidgetTransferReason(rule.isOptional());
break;
case FIELD_EMAIL:
view.getRecipientAddEditV3ContractInterface().updateValidationRuleToWidgetEmail(isFieldRequired,

4
app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/RecipientPresenterInterface.java

@ -29,8 +29,8 @@ public interface RecipientPresenterInterface extends BasePresenterInterface {
void onIDTypeSelected(DropDownDTO selectedIDType);
void onRelationSelected(DropDownDTO selectedRelation);
void proceedToEditSucess();
void proceedToAddSucess();
void proceedToEditSuccess();
void proceedToAddSuccess();
void showEmailCodePopUp();
void verifyEmailCode(String emailCode);

26
app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/presenter/recipientaddeditV3/edit/RecipientEditV3ViewModel.java

@ -280,7 +280,6 @@ public class RecipientEditV3ViewModel extends RecipientAddEditBaseV3ViewModel {
view.getRecipientAddEditV3ContractInterface().updateValueToWidgetProvince(validator.getRecipientDetail().getState());
view.getRecipientAddEditV3ContractInterface().updateValueToWidgetDistrict(validator.getRecipientDetail().getDistrict());
view.getRecipientAddEditV3ContractInterface().updateValueToWidgetRelation(validator.getRecipientDetail().getRelationship());
view.getRecipientAddEditV3ContractInterface().updateValueToWidgetTransferReason(validator.getRecipientDetail().getPurposeOfRemit());
}
@ -436,16 +435,21 @@ public class RecipientEditV3ViewModel extends RecipientAddEditBaseV3ViewModel {
successMessage = t.getMsg() + " \n " + getStringfromStringId(R.string.recipient_add_success_message_text).replace("xxx", getReceiverName(t.getData()));
receiverId = t.getData().getReceiverId();
sendMoneyRequiredDataV3 = new SendMoneyRequiredDataV3(t.getData());
view.getRecipientAddEditV3ContractInterface().promptToSendMoney(new GenericPromptDialog.GenericDialogPromptListener() {
@Override
public void onNegativeBtnPressed() {
view.onEditSuccess(receiverId);
}
@Override
public void onPositiveBtnPressed() {
view.getRecipientAddEditV3ContractInterface().redirectToSendMoney(sendMoneyRequiredDataV3);
}
}, successMessage);
if(sendMoneyRequiredDataV3.getRecipientInfoModel().getHasVerifiedOTP()){
view.getRecipientAddEditV3ContractInterface().promptToSendMoney(new GenericPromptDialog.GenericDialogPromptListener() {
@Override
public void onNegativeBtnPressed() {
view.onEditSuccess(receiverId);
}
@Override
public void onPositiveBtnPressed() {
view.getRecipientAddEditV3ContractInterface().redirectToSendMoney(sendMoneyRequiredDataV3);
}
}, successMessage);
}else{
view.showTermsAndConditionScreen();
}
} else {
view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.FAILED, null);
}

46
app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/view/recipientaddeditV3/BeneficiaryAddEditV3Fragment.java

@ -212,6 +212,11 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
genericPromptDialog.show(getActivity().getSupportFragmentManager(), "PROMPTSENDMONEY");
}
@Override
public void onEditSuccess() {
}
@Override
public void hideAllFormFieldsExceptCountryAndPaymentMethod() {
binding.recieverCountryViewContainer.setVisibility(View.VISIBLE);
@ -336,10 +341,7 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
binding.edReceiverRelationSelection.setText(value);
}
@Override
public void updateValueToWidgetTransferReason(String value) {
binding.edReceiverTransferReasonSelection.setText(value);
}
@Override
public void updateValueToWidgetNativeCountry(String nativeCountry) {
@ -539,7 +541,6 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
binding.edReceiverStateSelection.setText("");
binding.edReceiverDistrictSelection.setText("");
binding.edReceiverRelationSelection.setText("");
binding.edReceiverTransferReasonSelection.setText("");
binding.edReceiverIDTypeSelection.setText("");
}
@ -610,14 +611,7 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
binding.receiverRelationSelectionWrapper.setVisibility(GONE);
}
@Override
public void updateValidationRuleToWidgetTransferReason(boolean fieldRequired, EditTextConfigurationFactory.EditTextConfiguration editTextConfiguration) {
// editTextConfiguration.applyConfigurationSetting(recieverTransferReasonSelectionFormInputField.getEditTextView());
if (fieldRequired) {
binding.receiverTransferReasonSelectionWrapper.setVisibility(View.VISIBLE);
} else
binding.receiverTransferReasonSelectionWrapper.setVisibility(GONE);
}
@Override
public void updateValidationRuleToWidgetEmail(boolean isFieldRequired, EditTextConfigurationFactory.EditTextConfiguration editTextConfiguration) {
@ -812,10 +806,7 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
ValidationUtils.updateHint(binding.receiverRelationSelectionWrapper, isOptional);
}
@Override
public void addOptionalAsHintToWidgetTransferReason(Boolean isOptional) {
ValidationUtils.updateHint(binding.receiverTransferReasonSelectionWrapper, isOptional);
}
@Override
public void addOptionalAsHintToWidgetEmail(Boolean isOptional) {
@ -1031,7 +1022,6 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
binding.edReceiverStateSelection.setOnClickListener(new StateSelectionClickListener());
binding.edReceiverDistrictSelection.setOnClickListener(new DistrictSelectionClickListener());
binding.edReceiverRelationSelection.setOnClickListener(new RelationSelectionClickListener());
binding.edReceiverTransferReasonSelection.setOnClickListener(new TransferReasonSelectionClickListener());
binding.edReceiverIDTypeSelection.setOnClickListener(new IDTypeSelectionClickListener());
} else {
binding.edReceiverCountrySelection.setOnClickListener(null);
@ -1042,7 +1032,6 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
binding.edReceiverStateSelection.setOnClickListener(null);
binding.edReceiverDistrictSelection.setOnClickListener(null);
binding.edReceiverRelationSelection.setOnClickListener(null);
binding.edReceiverTransferReasonSelection.setOnClickListener(null);
binding.edReceiverIDTypeSelection.setOnClickListener(null);
}
}
@ -1227,25 +1216,6 @@ public class BeneficiaryAddEditV3Fragment extends BaseFragment implements Recipi
}
}
public class TransferReasonSelectionClickListener implements View.OnClickListener {
@Override
public void onClick(View v) {
hideKeyBoard();
if (transferListingDialog == null)
transferListingDialog = new GenericTextListingDialog<>();
transferListingDialog.setData(viewModel.getTransferReasonList());
transferListingDialog.setListener(selectedTransferReason ->
{
viewModel.onTransferReasonSelected(selectedTransferReason);
transferListingDialog.dismiss();
});
transferListingDialog.setHintAndTitle(getString(R.string.searchPurposeOfRemit_text), getResources().getString(R.string.selectPurposeOfRemit_text), getString(R.string.noPurposeOfRemit_text));
transferListingDialog.disableSearch(false);
if (!transferListingDialog.isAdded())
transferListingDialog.show(getActivity().getSupportFragmentManager(), this.getClass().getSimpleName());
}
}
public class IDTypeSelectionClickListener implements View.OnClickListener {

10
app/src/main/java/com/swifttech/remit/jmecustomer/features/recipientmanagement/view/recipientaddeditV3/BeneficiaryAddEditV3TermsFragment.java

@ -20,12 +20,9 @@ import com.swifttech.remit.jmecustomer.features.recipientmanagement.view.Recipie
import com.swifttech.remit.jmecustomer.features.recipientmanagement.view.RecipientEditV3ViewModelFactory;
import com.swifttech.remit.jmecustomer.features.webbrowser.WebBrowserFragmentV2;
import com.swifttech.remit.jmecustomer.features.webbrowser.model.WebRequestModel;
import com.swifttech.remit.jmecustomer.utils.Constants;
import static com.swifttech.remit.jmecustomer.features.recipientmanagement.view.recipientaddeditV3.RecipientAddEditV3Activity.RECIPIENT_INFO_BUNDLE_KEY_v3;
import static com.swifttech.remit.jmecustomer.utils.Constants.JME_BENEFICIARY_TERMS;
import static com.swifttech.remit.jmecustomer.utils.Constants.JME_REGISTER_TERMS;
import static com.swifttech.remit.jmecustomer.utils.Constants.JME_TERMS_N_CONDITIONS;
public class BeneficiaryAddEditV3TermsFragment extends WebBrowserFragmentV2 implements RecipientAddV3ContractInterface.RecipientTermsAndConditionsContract, GenericEditTextPromptDialog.GenericEditTextPromptListener {
private RecipientAddEditBaseV3ViewModel viewModel;
@ -49,8 +46,9 @@ public class BeneficiaryAddEditV3TermsFragment extends WebBrowserFragmentV2 impl
@Override
protected void proceedButtonClicked() {
if (recipientToBeEdited != null) {
viewModel.proceedToEditSucess();
if (recipientToBeEdited != null && !recipientToBeEdited.getHasVerifiedOTP()) {
viewModel.proceedToEditSuccess();
} else {
viewModel.requestForOtp();
}
@ -86,7 +84,7 @@ public class BeneficiaryAddEditV3TermsFragment extends WebBrowserFragmentV2 impl
@Override
public void onEmailVerifySuccess() {
viewModel.proceedToAddSucess();
viewModel.proceedToAddSuccess();
}
@Override

4
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/SendMoneyViewModelFactory.java

@ -6,7 +6,7 @@ import androidx.lifecycle.ViewModelProvider;
import com.swifttech.remit.jmecustomer.features.sendmoney.gateway.SendMoneyV2Gateway;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.SendMoneyRequiredDataV3;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2Presenter;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2ViewModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2PresenterInterface;
public class SendMoneyViewModelFactory implements ViewModelProvider.Factory {
@ -22,6 +22,6 @@ public class SendMoneyViewModelFactory implements ViewModelProvider.Factory {
@NonNull
@Override
public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
return (T) new SendMoneyV2Presenter(view,new SendMoneyV2Gateway(), sendMoneyRequiredData);
return (T) new SendMoneyV2ViewModel(view,new SendMoneyV2Gateway(), sendMoneyRequiredData);
}
}

5
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/gateway/SendMoneyV2Gateway.java

@ -13,6 +13,7 @@ import com.swifttech.remit.jmecustomer.utils.https.HttpClientV2;
import com.google.gson.JsonObject;
import io.reactivex.Observable;
import okhttp3.ResponseBody;
public class SendMoneyV2Gateway extends PrivilegedGateway implements SendMoneyV2InteractorInterface.SendMoneyV2GatewayInterface {
@ -86,6 +87,10 @@ public class SendMoneyV2Gateway extends PrivilegedGateway implements SendMoneyV2
return HttpClientV2.getInstance().performSendMoneyTransactionV2(auth,requestBody);
}
@Override
public Observable<ResponseBody> getCDDI(String auth, String userId) {
return HttpClientV2.getInstance().getCDDI(auth,userId);
}
@Override

24
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/model/SendMoneyAPIRequestBody.java

@ -53,9 +53,18 @@ public class SendMoneyAPIRequestBody {
@SerializedName("PurposeOfRemittance")
@Expose
private String purposeOfRemittance;
@SerializedName("otherPurposeOfRemittance")
@Expose
private String otherPurposeOfRemittance;
@SerializedName("SourceOfFund")
@Expose
private String sourceOfFund;
@SerializedName("otherSourceOfFund")
@Expose
private String otherSourceOfFund;
@SerializedName("RelWithSender")
@Expose
private String relWithSender;
@ -109,6 +118,21 @@ public class SendMoneyAPIRequestBody {
@Expose
private String schemeId;
public String getOtherPurposeOfRemittance() {
return otherPurposeOfRemittance;
}
public void setOtherPurposeOfRemittance(String otherPurposeOfRemittance) {
this.otherPurposeOfRemittance = otherPurposeOfRemittance;
}
public String getOtherSourceOfFund() {
return otherSourceOfFund;
}
public void setOtherSourceOfFund(String otherSourceOfFund) {
this.otherSourceOfFund = otherSourceOfFund;
}
public String getUser() {
return user;

91
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/model/ccdi/CCDIDataDto.java

@ -0,0 +1,91 @@
package com.swifttech.remit.jmecustomer.features.sendmoney.model.ccdi;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.swifttech.remit.jmecustomer.features.kyc.newCustomer.model.IDTextDTO;
import java.util.List;
public class CCDIDataDto {
@SerializedName("UserId")
@Expose
private String userId;
@SerializedName("SourceOfFund")
@Expose
private List<IDTextDTO> sourceOfFundList = null;
@SerializedName("PurposeOfRemittance")
@Expose
private List<IDTextDTO> purposeOfRemittanceList = null;
@SerializedName("sourceOfFund")
@Expose
private String sourceOfFund;
@SerializedName("otherSourceOfFund")
@Expose
private String otherSourceOfFund="";
@SerializedName("purposeOfRemittance")
@Expose
private String purposeOfRemittance;
@SerializedName("otherPurposeOfRemittance")
@Expose
private String otherPurposeOfRemittance="";
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public List<IDTextDTO> getSourceOfFundList() {
return sourceOfFundList;
}
public void setSourceOfFundList(List<IDTextDTO> sourceOfFundList) {
this.sourceOfFundList = sourceOfFundList;
}
public List<IDTextDTO> getPurposeOfRemittanceList() {
return purposeOfRemittanceList;
}
public void setPurposeOfRemittanceList(List<IDTextDTO> purposeOfRemittanceList) {
this.purposeOfRemittanceList = purposeOfRemittanceList;
}
public String getSourceOfFund() {
return sourceOfFund;
}
public void setSourceOfFund(String sourceOfFund) {
this.sourceOfFund = sourceOfFund;
}
public String getOtherSourceOfFund() {
return otherSourceOfFund;
}
public void setOtherSourceOfFund(String otherSourceOfFund) {
this.otherSourceOfFund = otherSourceOfFund;
}
public String getPurposeOfRemittance() {
return purposeOfRemittance;
}
public void setPurposeOfRemittance(String purposeOfRemittance) {
this.purposeOfRemittance = purposeOfRemittance;
}
public String getOtherPurposeOfRemittance() {
return otherPurposeOfRemittance;
}
public void setOtherPurposeOfRemittance(String otherPurposeOfRemittance) {
this.otherPurposeOfRemittance = otherPurposeOfRemittance;
}
}

2
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/presenter/SendMoneyV2InteractorInterface.java

@ -10,6 +10,7 @@ import com.swifttech.remit.jmecustomer.features.sendmoney.model.payoutmode.Accou
import com.swifttech.remit.jmecustomer.features.sendmoney.model.payoutmode.PayoutModeApiResponse;
import io.reactivex.Observable;
import okhttp3.ResponseBody;
public interface SendMoneyV2InteractorInterface extends BaseInteractorInterface {
@ -47,6 +48,7 @@ public interface SendMoneyV2InteractorInterface extends BaseInteractorInterface
String deliveryMethodID);
Observable<SendMoneyTransactionResponseBody> performSendMoneyTransaction(String auth, SendMoneyAPIRequestBody requestBody);
Observable<ResponseBody> getCDDI(String auth,String userId);

21
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/presenter/SendMoneyV2PresenterInterface.java

@ -3,6 +3,10 @@ package com.swifttech.remit.jmecustomer.features.sendmoney.presenter;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.LiveData;
import com.swifttech.remit.jmecustomer.common.view.AnswerInputDialog;
import com.swifttech.remit.jmecustomer.features.kyc.newCustomer.model.IDTextDTO;
import com.swifttech.remit.jmecustomer.features.kyc.newCustomer.view.personal.CustomerDetailViewLiveData;
import com.swifttech.remit.jmecustomer.features.sendmoney.view.ccdi.CCIDDetailViewLiveData;
import com.swifttech.remit.jmecustomer.features.webbrowser.model.WebRequestModel;
import com.swifttech.remit.jmecustomer.base.BaseContractInterface;
import com.swifttech.remit.jmecustomer.base.BasePresenterInterface;
@ -14,6 +18,8 @@ import com.swifttech.remit.jmecustomer.features.sendmoney.model.payoutmode.BankL
import com.swifttech.remit.jmecustomer.features.sendmoney.model.payoutmode.PayoutModeApiResponse;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.verification.VerificationViewModel;
import java.util.List;
import io.reactivex.Observable;
@ -24,8 +30,21 @@ public interface SendMoneyV2PresenterInterface extends BasePresenterInterface {
void getForex(String recieveAmount, String sendMoneyEditTextText, boolean shouldCaulatedByRecipient, String recieverCurrency);
LiveData<AmountDetailRelatedDataModel> subscribeToAmountRelatedData();
LiveData<ExchangeCalculationModel> subscribeToExRateData();
List<IDTextDTO> getSourceOfFundList();
void setSourceOfFundList(List<IDTextDTO> sourceOfFundList);
List<IDTextDTO> getPurposeOfRemittanceList();
void setPurposeOfRemittanceList(List<IDTextDTO> purposeOfRemittanceList);
void getCCidRelatedData();
CCIDDetailViewLiveData getCCIDRelatedViewEvents(CCIDDetailViewLiveData.CCIDViewBinding ccidViewBinding);
@ -58,5 +77,7 @@ public interface SendMoneyV2PresenterInterface extends BasePresenterInterface {
void updateFinalTransitionToValid(boolean action);
AppCompatActivity getContext();
void promptToInputAnswer(String question, AnswerInputDialog.AnswerInputDialogListener listener);
}
}

250
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/presenter/SendMoneyV2Presenter.java → app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/presenter/SendMoneyV2ViewModel.java

@ -1,52 +1,68 @@
package com.swifttech.remit.jmecustomer.features.sendmoney.presenter;
import android.util.Log;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import com.google.gson.reflect.TypeToken;
import com.swifttech.remit.jmecustomer.R;
import com.swifttech.remit.jmecustomer.features.security.model.RemitTxnParam;
import com.swifttech.remit.jmecustomer.features.webbrowser.model.WebRequestModel;
import com.swifttech.remit.jmecustomer.base.BaseViewModel;
import com.swifttech.remit.jmecustomer.common.customwidgets.CustomAlertDialog;
import com.swifttech.remit.jmecustomer.common.model.FormInputStateDTO;
import com.swifttech.remit.jmecustomer.common.view.AnswerInputDialog;
import com.swifttech.remit.jmecustomer.features.exrate.model.datav2.ExchangeCalculationApiResponse;
import com.swifttech.remit.jmecustomer.features.exrate.model.datav2.ExchangeCalculationModel;
import com.swifttech.remit.jmecustomer.features.home.model.UserInfoModelV2;
import com.swifttech.remit.jmecustomer.features.kyc.newCustomer.model.IDTextDTO;
import com.swifttech.remit.jmecustomer.features.kyc.newCustomer.model.KYCRelatedDataDTO;
import com.swifttech.remit.jmecustomer.features.recipientmanagement.model.recipientlistingV3.ReceiverInfoV3Model;
import com.swifttech.remit.jmecustomer.features.security.RemitAuthManager;
import com.swifttech.remit.jmecustomer.features.security.model.RemitAuthFailedResult;
import com.swifttech.remit.jmecustomer.features.security.model.RemitAuthSuccessResult;
import com.swifttech.remit.jmecustomer.features.security.model.RemitTxnParam;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.SendMoneyAPIRequestBody;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.SendMoneyRequiredDataV3;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.SendMoneyTransactionResponseBody;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.amountdetail.AmountDetailRelatedDataModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.amountdetail.BranchListApiResponse;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.amountdetail.RecipientCurrencyModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.ccdi.CCDIDataDto;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.payoutmode.AccountValidationApiResponse;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.payoutmode.BankList;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.payoutmode.PayoutModeApiResponse;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.verification.VerificationViewModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.view.ccdi.CCIDDetailViewLiveData;
import com.swifttech.remit.jmecustomer.features.webbrowser.model.WebRequestModel;
import com.swifttech.remit.jmecustomer.utils.Constants;
import com.swifttech.remit.jmecustomer.utils.Utils;
import com.swifttech.remit.jmecustomer.utils.https.GenericApiObserverResponse;
import com.swifttech.remit.jmecustomer.utils.https.GenericApiObserverResponseV2;
import com.swifttech.remit.jmecustomer.utils.https.GenericResponseDataModel;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.observers.DisposableObserver;
import io.reactivex.schedulers.Schedulers;
import static com.swifttech.remit.jmecustomer.utils.Constants.JME_TERMS_N_CONDITIONS;
public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2PresenterInterface, SendMoneyV2InteractorInterface {
public class SendMoneyV2ViewModel extends BaseViewModel implements SendMoneyV2PresenterInterface, SendMoneyV2InteractorInterface {
private static String TAG = SendMoneyV2ViewModel.class.getSimpleName();
private final ReceiverInfoV3Model selectedRecipient;
private final CompositeDisposable compositeObservable;
private final SendMoneyV2ContractInterface view;
private final SendMoneyV2GatewayInterface gateway;
private final CCIDDetailViewLiveData ccidDetailViewLiveData;
private final CompositeDisposable viewSubscriptions;
private final CompositeDisposable compositeDisposable;
//Exrate data
private String selectedSendingAmount = null;
private String selectedExRate = null;
@ -56,23 +72,31 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
private String selectedCalcBy = null;
private String selectedForexId = null;
private String selectedTransferAmount = null;
private MutableLiveData<AmountDetailRelatedDataModel> amountDetailRelatedDataModelLiveData;
private MutableLiveData<ExchangeCalculationModel> exchangeCalculationModelMutableLiveData;
private List<IDTextDTO> sourceOfFundList = new ArrayList<>();
private List<IDTextDTO> purposeOfRemittanceList = new ArrayList<>();
private CCIDDetailViewLiveData.CCIDViewBinding ccidViewBinding;
private CCDIValidator ccdiValidator;
public SendMoneyV2Presenter(SendMoneyV2ContractInterface view, SendMoneyV2GatewayInterface gateway, SendMoneyRequiredDataV3 sendMoneyRequiredData) {
public SendMoneyV2ViewModel(SendMoneyV2ContractInterface view, SendMoneyV2GatewayInterface gateway, SendMoneyRequiredDataV3 sendMoneyRequiredData) {
this.view = view;
this.selectedRecipient = sendMoneyRequiredData.getRecipientInfoModel();
this.gateway = gateway;
this.compositeObservable = new CompositeDisposable();
amountDetailRelatedDataModelLiveData = null;
exchangeCalculationModelMutableLiveData = null;
this.ccidDetailViewLiveData = new CCIDDetailViewLiveData();
this.viewSubscriptions = new CompositeDisposable();
this.compositeDisposable = new CompositeDisposable();
}
public static void log(String message) {
Log.d(TAG, message);
}
@Override
public Observable<BranchListApiResponse> getBranchListFromNetwork(BankList selectedBank, String searchKeyword) {
@ -97,7 +121,7 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
String pMode = this.selectedRecipient.getPaymentMethod().getName().toUpperCase();
String pAmount = Utils.formatCurrencyWithoutTruncatingDecimal(this.selectedRecievingAmount) + " " + selectedSendingCurrency;
String exRate = this.selectedExRate;
String serviceCharge = Utils.formatCurrency(calculatedDiscountedServiceFee()) +" "+ Constants.MONGOLIA_CURRENCY;
String serviceCharge = Utils.formatCurrency(calculatedDiscountedServiceFee()) + " " + Constants.MONGOLIA_CURRENCY;
String accNo = null;
String pAgent = null;
@ -130,8 +154,6 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
this.selectedTransferAmount = transferAmount;
}
@Override
public void promptPinAndPerformTransaction() {
RemitAuthManager.getGmeAuthManager(view.getContext()).fromPaymentSource(
@ -155,7 +177,6 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
}
@Override
public WebRequestModel getWebRequestDataForTermsAndCondition() {
return new WebRequestModel(getStringfromStringId(R.string.terms_and_condition_title_text), JME_TERMS_N_CONDITIONS, null);
@ -166,13 +187,10 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
return new WebRequestModel("", JME_TERMS_N_CONDITIONS, null);
}
private String calculatedDiscountedServiceFee() {
return selectedTransferFee;
}
private void performSendMoneyTransaction(String password, boolean isBiometricUsed) {
SendMoneyAPIRequestBody sendMoneyAPIRequestBody = new SendMoneyAPIRequestBody();
@ -183,7 +201,6 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
sendMoneyAPIRequestBody.setReceiverId(selectedRecipient.getReceiverId());
sendMoneyAPIRequestBody.setDeliveryMethodId(selectedRecipient.getPaymentMethod().getId());
String pAgent = "";
String branchId = "";
String accNo = "";
@ -219,8 +236,10 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
sendMoneyAPIRequestBody.setTpPCurr(selectedSendingCurrency);
sendMoneyAPIRequestBody.setForeXSESSIONID(selectedForexId);
sendMoneyAPIRequestBody.setPurposeOfRemittance(selectedRecipient.getPurposeOfRemitId());
sendMoneyAPIRequestBody.setSourceOfFund("128");
sendMoneyAPIRequestBody.setPurposeOfRemittance(ccdiValidator.getCcdiDataDto().getPurposeOfRemittance());
sendMoneyAPIRequestBody.setOtherPurposeOfRemittance(ccdiValidator.getCcdiDataDto().getOtherPurposeOfRemittance());
sendMoneyAPIRequestBody.setSourceOfFund(ccdiValidator.getCcdiDataDto().getSourceOfFund());//128
sendMoneyAPIRequestBody.setOtherSourceOfFund(ccdiValidator.getCcdiDataDto().getOtherSourceOfFund());//128
sendMoneyAPIRequestBody.setRelWithSender(selectedRecipient.getRelationshipId());
sendMoneyAPIRequestBody.setOccupation("");
sendMoneyAPIRequestBody.setIpAddress("");
@ -234,7 +253,7 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
sendMoneyAPIRequestBody.setTxnPassword(password);
sendMoneyAPIRequestBody.setUseBiometric(isBiometricUsed);
sendMoneyAPIRequestBody.setSchemeId( "");
sendMoneyAPIRequestBody.setSchemeId("");
compositeObservable.add(
gateway.performSendMoneyTransaction(gateway.getAuth(), sendMoneyAPIRequestBody)
@ -258,7 +277,6 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
// }
}
@Override
public void onViewReady() {
@ -275,10 +293,11 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
if (compositeObservable != null && !compositeObservable.isDisposed()) {
compositeObservable.dispose();
}
if (viewSubscriptions != null && !viewSubscriptions.isDisposed())
viewSubscriptions.dispose();
}
@Override
public Observable<PayoutModeApiResponse> getAllPayoutMode() {
return gateway.getAgentInfoListFromNetwork(gateway.getAuth(), selectedRecipient.getCountryCode(), selectedRecipient.getReceiverId())
@ -349,11 +368,125 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
return exchangeCalculationModelMutableLiveData;
}
@Override
public List<IDTextDTO> getSourceOfFundList() {
return sourceOfFundList;
}
@Override
public void setSourceOfFundList(List<IDTextDTO> sourceOfFundList) {
this.sourceOfFundList = sourceOfFundList;
}
@Override
public List<IDTextDTO> getPurposeOfRemittanceList() {
return purposeOfRemittanceList;
}
@Override
public void setPurposeOfRemittanceList(List<IDTextDTO> purposeOfRemittanceList) {
this.purposeOfRemittanceList = purposeOfRemittanceList;
}
@Override
public void getCCidRelatedData() {
compositeDisposable.add(
this.gateway.getCDDI(gateway.getBasicAuth(view.getContext()), gateway.getUserID())
.doOnSubscribe(sub -> view.showProgressBar(true, ""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doFinally(() -> view.showProgressBar(false, ""))
.subscribeWith(new CCDIRelatedDataObserver())
);
}
@Override
public CCIDDetailViewLiveData getCCIDRelatedViewEvents(CCIDDetailViewLiveData.CCIDViewBinding ccidViewBinding) {
bindCCIDDetailView(ccidViewBinding);
return ccidDetailViewLiveData;
}
private void bindCCIDDetailView(CCIDDetailViewLiveData.CCIDViewBinding viewBinding) {
this.ccidViewBinding = viewBinding;
try {
List<Observable<Boolean>> list = Arrays.asList(
ccidViewBinding.getSourceOfFundObservable().map(ccdiValidator::validateSourceOfFund),
ccidViewBinding.getPurposeOfRemittanceObservable().map(ccdiValidator::validatePurposeOfRemit)
);
viewSubscriptions.add(
Observable.combineLatest(list, objects -> {
for (Object value : objects) {
if (!(value instanceof Boolean)) return false;
if (!((Boolean) value)) return false;
}
return true;
}).subscribeWith(new DisposableObserver<Boolean>() {
@Override
public void onNext(Boolean isFormValid) {
ccidDetailViewLiveData.getAllFieldsValidLiveData().setValue(isFormValid);
}
@Override
public void onError(Throwable e) {
ccidDetailViewLiveData.getAllFieldsValidLiveData().setValue(false);
}
@Override
public void onComplete() {
}
})
);
} catch (Exception e) {
log(e.getMessage());
}
}
private boolean shouldPromptToInputAnswer(IDTextDTO data) {
return (data != null && (view.getContext().getString(R.string.othersSpecify).equalsIgnoreCase(data.getText()) || view.getContext().getString(R.string.othersSpecify1).equalsIgnoreCase(data.getText()) || view.getContext().getString(R.string.othersSpecify2).equalsIgnoreCase(data.getText())));
}
public class CCDIRelatedDataObserver extends GenericApiObserverResponseV2<CCDIDataDto> {
@Override
protected Type getDataType() {
return TypeToken.getParameterized(KYCRelatedDataDTO.class).getType();
}
@Override
protected void onSuccess(GenericResponseDataModel<CCDIDataDto> t) {
if (t.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) {
ccdiValidator = new CCDIValidator();
onReceivingCCDIRelatedData(t.getData());
} else
view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.FAILED, null);
}
private void onReceivingCCDIRelatedData(CCDIDataDto data) {
setSourceOfFundList(data.getSourceOfFundList());
setPurposeOfRemittanceList(data.getPurposeOfRemittanceList());
}
@Override
public void onFailed(String message) {
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, alertType -> view.exitView());
}
@Override
protected void onConnectionNotEstablished(String message) {
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, alertType -> view.exitView());
}
@Override
protected void unauthorizedAccess(String message) {
gateway.clearAllUserData();
view.showPopUpMessage(message, CustomAlertDialog.AlertType.ALERT, alertType -> view.logout());
}
}
public class ExchangeRateCalcObserver extends GenericApiObserverResponse<ExchangeCalculationApiResponse> {
@ -385,7 +518,6 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
}
}
public class SendMoneyTransactionObserver extends GenericApiObserverResponse<SendMoneyTransactionResponseBody> {
@Override
@ -427,4 +559,76 @@ public class SendMoneyV2Presenter extends BaseViewModel implements SendMoneyV2Pr
}
}
private class CCDIValidator {
CCDIDataDto ccdiDataDto;
public CCDIValidator() {
ccdiDataDto = new CCDIDataDto();
}
public CCDIDataDto getCcdiDataDto() {
return ccdiDataDto;
}
boolean validateSourceOfFund(IDTextDTO data) {
if (shouldPromptToInputAnswer(data)) {
view.promptToInputAnswer(view.getContext().getResources().getString(R.string.specifySourceOfFund_text), new AnswerInputDialog.AnswerInputDialogListener() {
@Override
public void onAnswerSubmitted(String answer) {
ccdiDataDto.setOtherSourceOfFund(answer);
ccidDetailViewLiveData.getSourceOfFundLiveData().postValue(new FormInputStateDTO<>(true, null, IDTextDTO.createFromUserAnswerInput(answer)));
}
});
} else {
if (!data.getId().equalsIgnoreCase(data.getText())) {
ccdiDataDto.setSourceOfFund(data.getId());
ccdiDataDto.setOtherSourceOfFund("");
} else {
ccdiDataDto.setSourceOfFund("");
ccdiDataDto.setOtherSourceOfFund(data.getId());
}
}
if (Utils.isStringNotNullOrEmpty(ccdiDataDto.getSourceOfFund()) || Utils.isStringNotNullOrEmpty(ccdiDataDto.getOtherSourceOfFund())) {
return true;
} else {
ccidDetailViewLiveData.getSourceOfFundLiveData().setValue(new FormInputStateDTO<>(false, view.getContext().getResources().getString(R.string.InvalidSourceOfFund_text), null));
return false;
}
}
private boolean validatePurposeOfRemit(IDTextDTO data) {
if (shouldPromptToInputAnswer(data)) {
view.promptToInputAnswer(view.getContext().getResources().getString(R.string.specifyPurposeOfRemit_text), new AnswerInputDialog.AnswerInputDialogListener() {
@Override
public void onAnswerSubmitted(String answer) {
ccdiDataDto.setOtherPurposeOfRemittance(answer);
ccidDetailViewLiveData.getPurposeOfRemittanceLiveData().postValue(new FormInputStateDTO<>(true, null, IDTextDTO.createFromUserAnswerInput(answer)));
}
});
} else {
if (!data.getId().equalsIgnoreCase(data.getText())) {
ccdiDataDto.setPurposeOfRemittance(data.getId());
ccdiDataDto.setOtherPurposeOfRemittance("");
} else {
ccdiDataDto.setPurposeOfRemittance("");
ccdiDataDto.setOtherPurposeOfRemittance(data.getId());
}
}
if (Utils.isStringNotNullOrEmpty(ccdiDataDto.getPurposeOfRemittance()) || Utils.isStringNotNullOrEmpty(ccdiDataDto.getOtherPurposeOfRemittance())) {
return true;
} else {
ccidDetailViewLiveData.getPurposeOfRemittanceLiveData().setValue(new FormInputStateDTO<>(false, view.getContext().getResources().getString(R.string.invalidPurposeOfRemittance), null));
return false;
}
}
}
}

2
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/SendMoneyActionListener.java

@ -11,6 +11,8 @@ public interface SendMoneyActionListener {
void showTransactionReviewPage();
void showCCDIPage();
void showUserConsentPage();
// SendMoneyV2PresenterInterface getPresenter();

5
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/SendMoneyScreenManager.java

@ -5,6 +5,7 @@ import androidx.annotation.LayoutRes;
import com.swifttech.remit.jmecustomer.R;
import com.swifttech.remit.jmecustomer.base.BaseFragment;
import com.swifttech.remit.jmecustomer.features.sendmoney.view.amountdetail.AmountDetailSendMoneyFragment;
import com.swifttech.remit.jmecustomer.features.sendmoney.view.ccdi.CCDISendMoneyFragment;
import com.swifttech.remit.jmecustomer.features.sendmoney.view.consent.UserConsentSendMoneyFragment;
import com.swifttech.remit.jmecustomer.features.sendmoney.view.verification.VerificationSendMoneyFragment;
@ -12,12 +13,14 @@ public class SendMoneyScreenManager
{
AmountDetailSendMoneyFragment amountDetailSendMoneyFragment;
VerificationSendMoneyFragment verificationSendMoneyFragment;
CCDISendMoneyFragment ccdiSendMoneyFragment;
UserConsentSendMoneyFragment userConsentSendMoneyFragment;
public SendMoneyScreenManager() {
}
public void prepareFragmentsLazily() {
amountDetailSendMoneyFragment= new AmountDetailSendMoneyFragment();
ccdiSendMoneyFragment= new CCDISendMoneyFragment();
verificationSendMoneyFragment= new VerificationSendMoneyFragment();
userConsentSendMoneyFragment = new UserConsentSendMoneyFragment();
}
@ -30,6 +33,8 @@ public class SendMoneyScreenManager
// return new PayoutModeSendMoneyFragment();
case R.layout.fragment_amount_detail_send_money_v2:
return (amountDetailSendMoneyFragment==null)?new AmountDetailSendMoneyFragment():amountDetailSendMoneyFragment;
case R.layout.fragment_ccdi_send_money_v2:
return (ccdiSendMoneyFragment==null)?new CCDISendMoneyFragment():ccdiSendMoneyFragment;
case R.layout.fragment_verification_send_money_v2:
return (verificationSendMoneyFragment==null)?new VerificationSendMoneyFragment():verificationSendMoneyFragment;
case R.layout.fragment_user_consent_layout:

63
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/SendMoneyV2Activity.java

@ -15,9 +15,10 @@ import androidx.lifecycle.ViewModelProviders;
import com.swifttech.remit.jmecustomer.R;
import com.swifttech.remit.jmecustomer.base.BaseActivity;
import com.swifttech.remit.jmecustomer.base.BaseFragment;
import com.swifttech.remit.jmecustomer.common.view.AnswerInputDialog;
import com.swifttech.remit.jmecustomer.features.sendmoney.SendMoneyViewModelFactory;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.SendMoneyRequiredDataV3;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2Presenter;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2ViewModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2PresenterInterface;
import com.swifttech.remit.jmecustomer.features.webbrowser.WebBrowserFragmentV2;
@ -42,6 +43,9 @@ public class SendMoneyV2Activity extends BaseActivity implements SendMoneyAction
@BindView(R.id.page3TxtView)
TextView page3TxtView;
@BindView(R.id.page4TxtView)
TextView page4TxtView;
@BindView(R.id.iv_back)
View iv_back;
@ -80,7 +84,7 @@ public class SendMoneyV2Activity extends BaseActivity implements SendMoneyAction
}
SendMoneyViewModelFactory factory=new SendMoneyViewModelFactory(this,sendMoneyRequiredData);
presenter= ViewModelProviders.of(this, factory).get(SendMoneyV2Presenter.class);
presenter= ViewModelProviders.of(this, factory).get(SendMoneyV2ViewModel.class);
addScreenToSendMoneyOnly(R.layout.fragment_amount_detail_send_money_v2, false);
}
@ -170,6 +174,12 @@ public class SendMoneyV2Activity extends BaseActivity implements SendMoneyAction
}
@Override
public void showCCDIPage() {
addScreenToSendMoney(R.layout.fragment_ccdi_send_money_v2, true);
}
@Override
public void showUserConsentPage() {
addScreenToSendMoney(R.layout.fragment_user_consent_layout, true);
@ -190,17 +200,27 @@ public class SendMoneyV2Activity extends BaseActivity implements SendMoneyAction
setBlueBg(page1TxtView);
setDefaultBg(page2TxtView);
setDefaultBg(page3TxtView);
setDefaultBg(page4TxtView);
break;
case R.layout.fragment_verification_send_money_v2:
case R.layout.fragment_ccdi_send_money_v2:
setBlueBg(page1TxtView);
setBlueBg(page2TxtView);
setDefaultBg(page3TxtView);
setDefaultBg(page4TxtView);
break;
case R.layout.fragment_verification_send_money_v2:
setBlueBg(page1TxtView);
setBlueBg(page2TxtView);
setBlueBg(page3TxtView);
setDefaultBg(page4TxtView);
break;
case R.layout.fragment_user_consent_layout:
setBlueBg(page1TxtView);
setBlueBg(page2TxtView);
setBlueBg(page3TxtView);
setBlueBg(page4TxtView);
break;
}
}
@ -230,21 +250,31 @@ public class SendMoneyV2Activity extends BaseActivity implements SendMoneyAction
public void updateCurrentScreenByLayoutId(int layoutId) {
switch (layoutId) {
case R.layout.fragment_verification_send_money_v2:
case R.layout.fragment_ccdi_send_money_v2:
setBlueBg(page1TxtView);
setDefaultBg(page2TxtView);
setDefaultBg(page3TxtView);
setDefaultBg(page4TxtView);
break;
case R.layout.fragment_user_consent_layout:
case R.layout.fragment_verification_send_money_v2:
setBlueBg(page1TxtView);
setBlueBg(page2TxtView);
setDefaultBg(page3TxtView);
setDefaultBg(page4TxtView);
break;
case R.layout.fragment_user_consent_layout:
setBlueBg(page1TxtView);
setBlueBg(page2TxtView);
setBlueBg(page3TxtView);
setDefaultBg(page4TxtView);
break;
default:
setDefaultBg(page1TxtView);
setDefaultBg(page2TxtView);
setDefaultBg(page3TxtView);
setDefaultBg(page4TxtView);
break;
}
}
@ -284,9 +314,9 @@ public class SendMoneyV2Activity extends BaseActivity implements SendMoneyAction
@Override
public void updateFinalTransitionToValid(boolean action) {
if (action){
setBlueBg(page3TxtView);
setBlueBg(page4TxtView);
}else{
setRedBg(page3TxtView);
setRedBg(page4TxtView);
}
}
@ -296,17 +326,32 @@ public class SendMoneyV2Activity extends BaseActivity implements SendMoneyAction
return this;
}
@Override
public void promptToInputAnswer(String question, AnswerInputDialog.AnswerInputDialogListener listener) {
AnswerInputDialog answerInputDialog = new AnswerInputDialog();
answerInputDialog.setQuestionText(question);
answerInputDialog.setAnswerListener(listener);
if (!answerInputDialog.isAdded())
answerInputDialog.show(getSupportFragmentManager(), answerInputDialog.getClass().getSimpleName());
}
@Override
public void updateFinalTranstionToDefault(int layoutId) {
switch (layoutId) {
case R.layout.fragment_verification_send_money_v2:
case R.layout.fragment_ccdi_send_money_v2:
setDefaultBg(page2TxtView);
setDefaultBg(page3TxtView);
setDefaultBg(page4TxtView);
break;
case R.layout.fragment_user_consent_layout:
case R.layout.fragment_verification_send_money_v2:
setDefaultBg(page3TxtView);
setDefaultBg(page4TxtView);
break;
case R.layout.fragment_user_consent_layout:
setDefaultBg(page4TxtView);
break;
default:

14
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/amountdetail/AmountDetailSendMoneyFragment.java

@ -32,7 +32,7 @@ import com.swifttech.remit.jmecustomer.common.customwidgets.GmeTextView;
import com.swifttech.remit.jmecustomer.common.customwidgets.exchangecountrylistingdialog.CountryFlagMapper;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.amountdetail.AmountDetailRelatedDataModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.amountdetail.RecipientCurrencyModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2Presenter;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2ViewModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.view.SendMoneyActionListener;
import com.swifttech.remit.jmecustomer.utils.Utils;
@ -74,9 +74,6 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
ViewGroup rootView;
@BindView(R.id.nestedScrollView)
NestedScrollView nestedScrollView;
@ -100,7 +97,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
private String selectedExRateId;
private String selectedExRateWithoutTrunc;
private String selectedTransferAmount;
private SendMoneyV2Presenter viewmodel;
private SendMoneyV2ViewModel viewmodel;
@Override
@ -117,7 +114,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
}
private void init() {
viewmodel= new ViewModelProvider(requireActivity()).get(SendMoneyV2Presenter.class);
viewmodel= new ViewModelProvider(requireActivity()).get(SendMoneyV2ViewModel.class);
this.sendAmountTextWatcher = new SendAmountTextWatcher();
this.recepientAmountTextWatcher = new RecipientAmountTextWatcher();
interpolator = new AccelerateDecelerateInterpolator();
@ -241,8 +238,6 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
public void onClick(View v) {
switch (v.getId()) {
case R.id.agreeButton:
if (shouldCalculateExRate) {
getForex();
} else {
@ -251,7 +246,8 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
sendMoneyEditText.clearFocus();
recieveMoneyEditText.clearFocus();
viewmodel.setSendingAmount(sendMoneyEditText.getText().toString(), amountDetailRelatedData.getDefaultSelectedCurrency().getCurrencyCode(), selectedExRateWithoutTrunc, selectedRecipientAmount, selectedTransferFeeAmount, shouldCaulatedByRecipient, selectedExRateId, selectedTransferAmount);
((SendMoneyActionListener) getActivity()).showTransactionReviewPage();
// ((SendMoneyActionListener) getActivity()).showTransactionReviewPage();
((SendMoneyActionListener) getActivity()).showCCDIPage();
}
}

216
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/ccdi/CCDISendMoneyFragment.java

@ -0,0 +1,216 @@
package com.swifttech.remit.jmecustomer.features.sendmoney.view.ccdi;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModelProvider;
import com.swifttech.remit.jmecustomer.R;
import com.swifttech.remit.jmecustomer.base.BaseFragment;
import com.swifttech.remit.jmecustomer.common.customwidgets.common.GenericTextListingDialog;
import com.swifttech.remit.jmecustomer.common.model.FormInputStateDTO;
import com.swifttech.remit.jmecustomer.databinding.FragmentCcdiSendMoneyV2Binding;
import com.swifttech.remit.jmecustomer.features.kyc.newCustomer.model.IDTextDTO;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2ViewModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.view.SendMoneyActionListener;
import com.swifttech.remit.jmecustomer.features.sendmoney.view.SendMoneyV2Activity;
import io.reactivex.subjects.PublishSubject;
public class CCDISendMoneyFragment extends BaseFragment implements View.OnClickListener {
FragmentCcdiSendMoneyV2Binding binding;
private SendMoneyV2ViewModel viewModel;
private CCIDDetailViewLiveData.CCIDViewBinding ccidViewBinding;
private GenericTextListingDialog<IDTextDTO> sourceOfFundSelectionDialog;
private GenericTextListingDialog<IDTextDTO> purposeOfRemittanceDialog;
private PublishSubject<IDTextDTO> sourceOfFundSelectSubject;
private PublishSubject<IDTextDTO> purposeOfRemittanceSelectSubject;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
binding = FragmentCcdiSendMoneyV2Binding.inflate(inflater, container, false);
View view = binding.getRoot();
return view;
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
init();
performDefaultAction(savedInstanceState);
}
private void init() {
sourceOfFundSelectSubject = PublishSubject.create();
purposeOfRemittanceSelectSubject = PublishSubject.create();
viewModel = new ViewModelProvider(requireActivity()).get(SendMoneyV2ViewModel.class);
ccidViewBinding = new CCIDDetailViewLiveData.CCIDViewBinding(
sourceOfFundSelectSubject,
purposeOfRemittanceSelectSubject
);
}
private void performDefaultAction(Bundle savedInstanceState) {
CCIDDetailViewLiveData ccidDetailViewLiveData = viewModel.getCCIDRelatedViewEvents(ccidViewBinding);
ccidDetailViewLiveData.getSourceOfFundLiveData().observe(getViewLifecycleOwner(), this::onSourceOfFundSelected);
ccidDetailViewLiveData.getPurposeOfRemittanceLiveData().observe(getViewLifecycleOwner(), this::onPurposeOfRemittSelected);
ccidDetailViewLiveData.getAllFieldsValidLiveData().observe(getViewLifecycleOwner(), result -> binding.btnContinue.setEnabled(result));
viewModel.getCCidRelatedData();
}
@Override
public void onStart() {
super.onStart();
binding.btnContinue.setOnClickListener(this);
binding.sourceOfFundSelectionWrapper.setOnClickListener(this);
binding.receiverTransferReasonSelectionWrapper.setOnClickListener(this);
}
@Override
public void onStop() {
super.onStop();
binding.btnContinue.setOnClickListener(null);
binding.sourceOfFundSelectionWrapper.setOnClickListener(null);
binding.receiverTransferReasonSelectionWrapper.setOnClickListener(null);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
((SendMoneyActionListener) context).updateCurrentIndexFrom(R.layout.fragment_ccdi_send_money_v2);
}
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
((SendMoneyActionListener) activity).updateCurrentIndexFrom(R.layout.fragment_ccdi_send_money_v2);
}
@Override
public void onDetach() {
super.onDetach();
((SendMoneyActionListener) getActivity()).updateCurrentScreenByLayoutId(R.layout.fragment_ccdi_send_money_v2);
}
@Override
public void onDestroy() {
super.onDestroy();
((SendMoneyV2Activity) getActivity()).updateFinalTranstionToDefault(R.layout.fragment_ccdi_send_money_v2);
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.btnContinue:
((SendMoneyActionListener) getActivity()).showTransactionReviewPage();
break;
case R.id.sourceOfFundSelectionWrapper:
if(viewModel.getSourceOfFundList().size()>0){
promptSourceOfFund();
}else{
viewModel.getCCidRelatedData();
}
break;
case R.id.receiverTransferReasonSelectionWrapper:
if(viewModel.getPurposeOfRemittanceList().size()>0){
promptPurposeOfRemittance();
}else{
viewModel.getCCidRelatedData();
}
break;
}
}
private void promptPurposeOfRemittance() {
hideKeyBoard();
if (purposeOfRemittanceDialog == null)
purposeOfRemittanceDialog = new GenericTextListingDialog<>();
purposeOfRemittanceDialog.setData(viewModel.getPurposeOfRemittanceList());
purposeOfRemittanceDialog.disableSearch(true);
purposeOfRemittanceDialog.setListener(sourceOfFund ->
{
purposeOfRemittanceDialog.dismiss();
if (!sourceOfFund.toString().equalsIgnoreCase(getString(R.string.othersSpecify))
&& !sourceOfFund.toString().equalsIgnoreCase(getString(R.string.othersSpecify1))
&& !sourceOfFund.toString().equalsIgnoreCase(getString(R.string.othersSpecify2))) {
binding.edReceiverTransferReasonSelection.setText(sourceOfFund.toString());
}
purposeOfRemittanceSelectSubject.onNext(sourceOfFund);
});
purposeOfRemittanceDialog.setHintAndTitle(getActivity().getResources().getString(R.string.searchPurposeOfRemit_text), getString(R.string.selectPurposeOfRemit_text), getString(R.string.no_result_found_text));
if (!purposeOfRemittanceDialog.isAdded())
purposeOfRemittanceDialog.show(getActivity().getSupportFragmentManager(), "PURPOSEOFREMITTANCECHOOSER");
}
private void promptSourceOfFund() {
hideKeyBoard();
if (sourceOfFundSelectionDialog == null)
sourceOfFundSelectionDialog = new GenericTextListingDialog<>();
sourceOfFundSelectionDialog.setData(viewModel.getSourceOfFundList());
sourceOfFundSelectionDialog.disableSearch(true);
sourceOfFundSelectionDialog.setListener(sourceOfFund ->
{
sourceOfFundSelectionDialog.dismiss();
if (!sourceOfFund.toString().equalsIgnoreCase(getString(R.string.othersSpecify))
&& !sourceOfFund.toString().equalsIgnoreCase(getString(R.string.othersSpecify1))
&& !sourceOfFund.toString().equalsIgnoreCase(getString(R.string.othersSpecify2))) {
binding.edSourceOfFund.setText(sourceOfFund.toString());
}
sourceOfFundSelectSubject.onNext(sourceOfFund);
});
sourceOfFundSelectionDialog.setHintAndTitle(getActivity().getResources().getString(R.string.search_source_of_fund_text), getString(R.string.selectSourceOfFund_text), getString(R.string.no_result_found_text));
if (!sourceOfFundSelectionDialog.isAdded())
sourceOfFundSelectionDialog.show(getActivity().getSupportFragmentManager(), "SOURCEOFFUNDTYPECHOOSER");
}
private void onSourceOfFundSelected(FormInputStateDTO<IDTextDTO> data) {
if (data.isValid()) {
if (data.hasData()) {
if(!data.getData().getText().equalsIgnoreCase(getString(R.string.othersSpecify))
&& !data.getData().getText().equalsIgnoreCase(getString(R.string.othersSpecify1))
&& !data.getData().getText().equalsIgnoreCase(getString(R.string.othersSpecify2))){
binding.edSourceOfFund.setText(data.getData().getText());
sourceOfFundSelectSubject.onNext(data.getData());
}
}
}
}
private void onPurposeOfRemittSelected(FormInputStateDTO<IDTextDTO> data) {
if (data.isValid()) {
if (data.hasData()) {
if(!data.getData().getText().equalsIgnoreCase(getString(R.string.othersSpecify))
&& !data.getData().getText().equalsIgnoreCase(getString(R.string.othersSpecify1))
&& !data.getData().getText().equalsIgnoreCase(getString(R.string.othersSpecify2))){
binding.edReceiverTransferReasonSelection.setText(data.getData().getText());
purposeOfRemittanceSelectSubject.onNext(data.getData());
}
}
}
}
}

54
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/ccdi/CCIDDetailViewLiveData.java

@ -0,0 +1,54 @@
package com.swifttech.remit.jmecustomer.features.sendmoney.view.ccdi;
import androidx.lifecycle.MutableLiveData;
import com.swifttech.remit.jmecustomer.common.model.FormInputStateDTO;
import com.swifttech.remit.jmecustomer.features.kyc.newCustomer.model.IDTextDTO;
import io.reactivex.Observable;
public class CCIDDetailViewLiveData {
private MutableLiveData<FormInputStateDTO<IDTextDTO>> sourceOfFundLiveData;
private MutableLiveData<FormInputStateDTO<IDTextDTO>> purposeOfRemittanceLiveData;
private MutableLiveData<Boolean> allFieldsValid;
public CCIDDetailViewLiveData() {
sourceOfFundLiveData = new MutableLiveData<>();
purposeOfRemittanceLiveData = new MutableLiveData<>();
allFieldsValid = new MutableLiveData<>();
}
public MutableLiveData<FormInputStateDTO<IDTextDTO>> getSourceOfFundLiveData() {
return sourceOfFundLiveData;
}
public MutableLiveData<FormInputStateDTO<IDTextDTO>> getPurposeOfRemittanceLiveData() {
return purposeOfRemittanceLiveData;
}
public MutableLiveData<Boolean> getAllFieldsValidLiveData() {
return allFieldsValid;
}
public static class CCIDViewBinding {
private Observable<IDTextDTO> sourceOfFundObservable;
private Observable<IDTextDTO> purposeOfRemittanceObservable;
public CCIDViewBinding(
Observable<IDTextDTO> sourceOfFundObservable,
Observable<IDTextDTO> purposeOfRemittanceObservable
) {
this.sourceOfFundObservable = sourceOfFundObservable;
this.purposeOfRemittanceObservable = purposeOfRemittanceObservable;
}
public Observable<IDTextDTO> getSourceOfFundObservable() {
return sourceOfFundObservable;
}
public Observable<IDTextDTO> getPurposeOfRemittanceObservable() {
return purposeOfRemittanceObservable;
}
}
}

4
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/consent/UserConsentSendMoneyFragment.java

@ -11,7 +11,7 @@ import androidx.lifecycle.ViewModelProvider;
import com.swifttech.remit.jmecustomer.R;
import com.swifttech.remit.jmecustomer.features.kyc.newCustomer.view.termsAndCondition.NewKycTermsAndConditionFragment;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2Presenter;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2ViewModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.view.SendMoneyV2Activity;
import com.swifttech.remit.jmecustomer.features.webbrowser.WebBrowserFragmentV2;
import com.swifttech.remit.jmecustomer.features.webbrowser.model.WebRequestModel;
@ -39,7 +39,7 @@ public class UserConsentSendMoneyFragment extends WebBrowserFragmentV2 {
@Override
protected void proceedButtonClicked() {
(new ViewModelProvider(getActivity()).get(SendMoneyV2Presenter.class)).promptPinAndPerformTransaction();
(new ViewModelProvider(getActivity()).get(SendMoneyV2ViewModel.class)).promptPinAndPerformTransaction();
}

7
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/payoutmode/PayoutModeBranchListingDialog.java

@ -9,7 +9,6 @@ import androidx.core.view.ViewPropertyAnimatorListenerAdapter;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelProviders;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.RecyclerView;
import android.text.Editable;
@ -32,7 +31,7 @@ import com.swifttech.remit.jmecustomer.features.sendmoney.adapter.PayoutModeBran
import com.swifttech.remit.jmecustomer.features.sendmoney.model.amountdetail.BranchListApiResponse;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.payoutmode.BankList;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.payoutmode.BankBranchDTO;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2Presenter;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2ViewModel;
import com.swifttech.remit.jmecustomer.utils.Constants;
import com.swifttech.remit.jmecustomer.utils.https.GenericApiObserverResponse;
@ -83,7 +82,7 @@ public class PayoutModeBranchListingDialog extends DialogFragment implements Vie
}
compositeDisposable.add(
(new ViewModelProvider(this).get(SendMoneyV2Presenter.class)).getBranchListFromNetwork(selectedBank, "")
(new ViewModelProvider(this).get(SendMoneyV2ViewModel.class)).getBranchListFromNetwork(selectedBank, "")
.doOnSubscribe(d ->{ showErrorMessage(false, "");
hideProgressView(false);
showRecyclerView(false);
@ -231,7 +230,7 @@ public class PayoutModeBranchListingDialog extends DialogFragment implements Vie
compositeDisposable.clear();
compositeDisposable.add(
(new ViewModelProvider(getActivity()).get(SendMoneyV2Presenter.class)).getBranchListFromNetwork(selectedBank, keyword)
(new ViewModelProvider(getActivity()).get(SendMoneyV2ViewModel.class)).getBranchListFromNetwork(selectedBank, keyword)
.doOnSubscribe(d ->{ showErrorMessage(false, "");
hideProgressView(false);
showRecyclerView(false);

8
app/src/main/java/com/swifttech/remit/jmecustomer/features/sendmoney/view/verification/VerificationSendMoneyFragment.java

@ -17,7 +17,7 @@ import com.swifttech.remit.jmecustomer.R;
import com.swifttech.remit.jmecustomer.features.webbrowser.model.WebRequestModel;
import com.swifttech.remit.jmecustomer.base.BaseFragment;
import com.swifttech.remit.jmecustomer.features.sendmoney.model.verification.VerificationViewModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2Presenter;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2ViewModel;
import com.swifttech.remit.jmecustomer.features.sendmoney.view.SendMoneyActionListener;
import com.swifttech.remit.jmecustomer.features.sendmoney.view.SendMoneyV2Activity;
@ -135,7 +135,7 @@ public class VerificationSendMoneyFragment extends BaseFragment implements View
private void performDefaultAction(Bundle savedInstance) {
VerificationViewModel verificationViewModel= (new ViewModelProvider(requireActivity()).get(SendMoneyV2Presenter.class)).getVerificationRelatedData();
VerificationViewModel verificationViewModel= (new ViewModelProvider(requireActivity()).get(SendMoneyV2ViewModel.class)).getVerificationRelatedData();
txt_address.setText(verificationViewModel.getAddress());
txt_country.setText(verificationViewModel.getCountry());
txt_exrate.setText(verificationViewModel.getExRate());
@ -196,7 +196,7 @@ public class VerificationSendMoneyFragment extends BaseFragment implements View
}
private void openFraudWarning() {
WebRequestModel requestModel=(new ViewModelProvider(requireActivity()).get(SendMoneyV2Presenter.class)).getWebRequestDataForFraudWarning();
WebRequestModel requestModel=(new ViewModelProvider(requireActivity()).get(SendMoneyV2ViewModel.class)).getWebRequestDataForFraudWarning();
Intent intent= new Intent(getActivity(),TermsAndConditionV2BrowserActivity.class);
intent.putExtra(WEB_BROWSWER_URL_BUNDLE_KEY,requestModel);
startActivity(intent);
@ -207,7 +207,7 @@ public class VerificationSendMoneyFragment extends BaseFragment implements View
// Intent i = new Intent(Intent.ACTION_VIEW);
// i.setData(Uri.parse(url));
// launchActivity(i);
WebRequestModel requestModel=(new ViewModelProvider(requireActivity()).get(SendMoneyV2Presenter.class)).getWebRequestDataForTermsAndCondition();
WebRequestModel requestModel=(new ViewModelProvider(requireActivity()).get(SendMoneyV2ViewModel.class)).getWebRequestDataForTermsAndCondition();
Intent intent= new Intent(getActivity(),TermsAndConditionV2BrowserActivity.class);
intent.putExtra(WEB_BROWSWER_URL_BUNDLE_KEY,requestModel);
startActivity(intent);

2
app/src/main/java/com/swifttech/remit/jmecustomer/features/termsandcondition/view/TermsAndConditionFragment.java

@ -9,11 +9,9 @@ import android.widget.CheckBox;
import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelProviders;
import com.swifttech.remit.jmecustomer.R;
import com.swifttech.remit.jmecustomer.base.BaseFragment;
import com.swifttech.remit.jmecustomer.features.sendmoney.presenter.SendMoneyV2Presenter;
import com.swifttech.remit.jmecustomer.features.termsandcondition.presenter.TermsAndConditionViewModel;
import com.jakewharton.rxbinding3.widget.RxCompoundButton;

1
app/src/main/java/com/swifttech/remit/jmecustomer/utils/https/API_URL.java

@ -110,5 +110,6 @@ public class API_URL {
public static final String REQUEST_FOR_BANK_DEPOSIT =BuildConfig.API_VERSION + "/mobile/withdrawWalletRequest" ;
public static final String PROCEED_FOR_BANK_DEPOSIT = BuildConfig.API_VERSION + "/mobile/withdrawFromWallet";
public static final String CHANGE_PIN = BuildConfig.API_VERSION + "/mobile/changeTxnPin";
public static final String GET_CCDI = BuildConfig.API_VERSION + "mobile/sendmoney/getcddi/{userId}";
}

4
app/src/main/java/com/swifttech/remit/jmecustomer/utils/https/ApiEndpoints.java

@ -326,7 +326,9 @@ public interface ApiEndpoints {
@Body() JsonObject requestBody
);
@GET(API_URL.GET_CCDI)
@Headers("Content-Type: application/json")
Observable<ResponseBody> getCDDI(@Header("Authorization") String token, @Path("userId") String userId);

2
app/src/main/res/layout/activity_send_money_v2.xml

@ -20,6 +20,8 @@
<include
android:layout_marginTop="13dp"
android:layout_marginBottom="13dp"
android:layout_marginStart="@dimen/_20sdp"
android:layout_marginEnd="@dimen/_20sdp"
layout="@layout/send_money_header"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

13
app/src/main/res/layout/fragment_beneficiary_add_edit_v3.xml

@ -463,19 +463,6 @@
</com.swifttech.remit.jmecustomer.common.view.MTextInputLayout>
<com.swifttech.remit.jmecustomer.common.view.MTextInputLayout
android:id="@+id/receiverTransferReasonSelectionWrapper"
style="@style/MTextInputLayoutFormDropDown"
android:hint="@string/selectPurposeOfRemit_text"
app:endIconDrawable="@drawable/icv_dropdown"
app:errorEnabled="true"
app:errorTextAppearance="@style/MTextInpuLayoutErrorStyle">
<com.swifttech.remit.jmecustomer.common.view.MAutoCompleteTextView
android:id="@+id/ed_receiverTransferReasonSelection"
style="@style/MAutoCompleteDropDown" />
</com.swifttech.remit.jmecustomer.common.view.MTextInputLayout>
<LinearLayout
android:id="@+id/recieverNativeCountryViewContainer"
android:layout_width="match_parent"

68
app/src/main/res/layout/fragment_ccdi_send_money_v2.xml

@ -0,0 +1,68 @@
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:focusableInTouchMode="true"
android:focusable="true"
android:clickable="true"
android:id="@+id/rootView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_10sdp"
android:layout_marginEnd="@dimen/_10sdp"
android:layout_marginTop="@dimen/_5sdp"
android:background="@color/white"
android:orientation="vertical">
<LinearLayout
android:layout_marginBottom="@dimen/_3sdp"
android:id="@+id/form1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/_8sdp">
<com.swifttech.remit.jmecustomer.common.view.MTextInputLayout
android:id="@+id/sourceOfFundSelectionWrapper"
android:hint="@string/select_source_of_fund_text"
style="@style/MTextInputLayoutFormDropDown"
app:endIconMode="dropdown_menu"
app:endIconDrawable="@drawable/icv_dropdown"
app:errorEnabled="true"
app:errorTextAppearance="@style/MTextInpuLayoutErrorStyle"
>
<com.swifttech.remit.jmecustomer.common.view.MAutoCompleteTextView
android:id="@+id/ed_sourceOfFund"
style="@style/MAutoCompleteDropDown"
android:imeOptions="actionDone"
/>
</com.swifttech.remit.jmecustomer.common.view.MTextInputLayout>
<com.swifttech.remit.jmecustomer.common.view.MTextInputLayout
android:id="@+id/receiverTransferReasonSelectionWrapper"
style="@style/MTextInputLayoutFormDropDown"
android:hint="@string/selectPurposeOfRemit_text"
app:endIconDrawable="@drawable/icv_dropdown"
app:errorEnabled="true"
app:errorTextAppearance="@style/MTextInpuLayoutErrorStyle">
<com.swifttech.remit.jmecustomer.common.view.MAutoCompleteTextView
android:id="@+id/ed_receiverTransferReasonSelection"
style="@style/MAutoCompleteDropDown" />
</com.swifttech.remit.jmecustomer.common.view.MTextInputLayout>
<com.swifttech.remit.jmecustomer.common.customwidgets.GmeButton
android:id="@+id/btnContinue"
style="@style/MButton"
android:layout_gravity="center"
android:layout_marginTop="@dimen/_15sdp"
android:layout_marginBottom="@dimen/_15sdp"
android:text="@string/continue_text"
/>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

16
app/src/main/res/layout/fragment_existing_kyc_customer_detail.xml

@ -73,22 +73,6 @@
android:imeOptions="actionDone" />
</com.swifttech.remit.jmecustomer.common.view.MTextInputLayout>
<com.swifttech.remit.jmecustomer.common.view.MTextInputLayout
android:id="@+id/sourceOfFundSelectionWrapper"
android:hint="@string/select_source_of_fund_text"
style="@style/MTextInputLayoutFormDropDown"
app:endIconMode="dropdown_menu"
app:endIconDrawable="@drawable/icv_dropdown"
app:errorEnabled="true"
app:errorTextAppearance="@style/MTextInpuLayoutErrorStyle"
>
<com.swifttech.remit.jmecustomer.common.view.MAutoCompleteTextView
android:id="@+id/ed_sourceOfFund"
style="@style/MAutoCompleteDropDown"
android:imeOptions="actionDone"
/>
</com.swifttech.remit.jmecustomer.common.view.MTextInputLayout>
<com.swifttech.remit.jmecustomer.common.view.MTextInputLayout
android:id="@+id/monthlyIncomeSelectionWrapper"

15
app/src/main/res/layout/fragment_kyc_customer_detail.xml

@ -75,22 +75,7 @@
</com.swifttech.remit.jmecustomer.common.view.MTextInputLayout>
<com.swifttech.remit.jmecustomer.common.view.MTextInputLayout
android:id="@+id/sourceOfFundSelectionWrapper"
android:hint="@string/select_source_of_fund_text"
style="@style/MTextInputLayoutFormDropDown"
app:endIconMode="dropdown_menu"
app:endIconDrawable="@drawable/icv_dropdown"
app:errorEnabled="true"
app:errorTextAppearance="@style/MTextInpuLayoutErrorStyle"
>
<com.swifttech.remit.jmecustomer.common.view.MAutoCompleteTextView
android:id="@+id/ed_sourceOfFund"
style="@style/MAutoCompleteDropDown"
android:imeOptions="actionDone"
/>
</com.swifttech.remit.jmecustomer.common.view.MTextInputLayout>
<com.swifttech.remit.jmecustomer.common.view.MTextInputLayout
android:id="@+id/monthlyIncomeSelectionWrapper"
android:hint="@string/monthlyIncome_text"

6
app/src/main/res/layout/fragment_web_browser_v2.xml

@ -4,6 +4,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/m_layout_bg_color"
android:padding="0dp"
android:layout_margin="0dp"
android:orientation="vertical">
@ -15,13 +17,15 @@
android:layout_width="match_parent"
android:layout_above="@+id/llBottom"
android:scrollbars="none"
android:fillViewport="false"
android:fillViewport="true"
android:layout_height="match_parent">
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:nestedScrollingEnabled="false"
android:padding="0dp"
android:layout_margin="0dp"
android:scrollbars="none" />
</androidx.core.widget.NestedScrollView>

40
app/src/main/res/layout/kyc_header.xml

@ -13,10 +13,10 @@
android:layout_marginTop="@dimen/_6sdp"
android:layout_marginBottom="@dimen/_6sdp"
android:background="@color/gray"
app:layout_constraintBottom_toTopOf="@+id/page2TitleTxtView"
app:layout_constraintEnd_toStartOf="@+id/page2TxtView"
app:layout_constraintBottom_toTopOf="@+id/page3TitleTxtView"
app:layout_constraintEnd_toStartOf="@+id/page3TxtView"
app:layout_constraintStart_toEndOf="@+id/page1TxtView"
app:layout_constraintTop_toTopOf="@+id/page2TxtView" />
app:layout_constraintTop_toTopOf="@+id/page3TxtView" />
<View
android:layout_width="0dp"
@ -25,10 +25,10 @@
android:layout_marginTop="@dimen/_6sdp"
android:layout_marginBottom="@dimen/_6sdp"
android:background="@color/gray"
app:layout_constraintBottom_toTopOf="@+id/page2TitleTxtView"
app:layout_constraintEnd_toStartOf="@+id/page3TxtView"
app:layout_constraintStart_toEndOf="@+id/page2TxtView"
app:layout_constraintTop_toTopOf="@+id/page3TxtView" />
app:layout_constraintBottom_toTopOf="@+id/page3TitleTxtView"
app:layout_constraintEnd_toStartOf="@+id/page4TxtView"
app:layout_constraintStart_toEndOf="@+id/page3TxtView"
app:layout_constraintTop_toTopOf="@+id/page4TxtView" />
@ -43,7 +43,7 @@
android:text="1"
android:textColor="@color/white"
android:textSize="@dimen/_9ssp"
app:layout_constraintEnd_toStartOf="@+id/page2TxtView"
app:layout_constraintEnd_toStartOf="@+id/page3TxtView"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -63,7 +63,7 @@
app:layout_constraintTop_toBottomOf="@+id/page1TxtView" />
<com.swifttech.remit.jmecustomer.common.customwidgets.GmeTextView
android:id="@+id/page2TxtView"
android:id="@+id/page3TxtView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
@ -73,13 +73,13 @@
android:background="@drawable/circular_empty_bg"
android:textColor="@color/black"
android:textSize="@dimen/_9ssp"
app:layout_constraintEnd_toStartOf="@+id/page3TxtView"
app:layout_constraintEnd_toStartOf="@+id/page4TxtView"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/page1TxtView"
app:layout_constraintTop_toTopOf="parent" />
<com.swifttech.remit.jmecustomer.common.customwidgets.GmeTextView
android:id="@+id/page2TitleTxtView"
android:id="@+id/page3TitleTxtView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
@ -88,13 +88,13 @@
android:textColor="@color/darkgray2"
android:textSize="@dimen/_9ssp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/page2TxtView"
app:layout_constraintStart_toStartOf="@+id/page2TxtView"
app:layout_constraintTop_toBottomOf="@+id/page2TxtView" />
app:layout_constraintEnd_toEndOf="@+id/page3TxtView"
app:layout_constraintStart_toStartOf="@+id/page3TxtView"
app:layout_constraintTop_toBottomOf="@+id/page3TxtView" />
<com.swifttech.remit.jmecustomer.common.customwidgets.GmeTextView
android:id="@+id/page3TxtView"
android:id="@+id/page4TxtView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
@ -106,11 +106,11 @@
android:textSize="@dimen/_9ssp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/page2TxtView"
app:layout_constraintStart_toEndOf="@+id/page3TxtView"
app:layout_constraintTop_toTopOf="parent" />
<com.swifttech.remit.jmecustomer.common.customwidgets.GmeTextView
android:id="@+id/page3TitleTxtView"
android:id="@+id/page4TitleTxtView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
@ -119,8 +119,8 @@
android:textColor="@color/darkgray2"
android:textSize="@dimen/_9ssp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/page3TxtView"
app:layout_constraintStart_toStartOf="@+id/page3TxtView"
app:layout_constraintTop_toBottomOf="@+id/page3TxtView" />
app:layout_constraintEnd_toEndOf="@+id/page4TxtView"
app:layout_constraintStart_toStartOf="@+id/page4TxtView"
app:layout_constraintTop_toBottomOf="@+id/page4TxtView" />
</androidx.constraintlayout.widget.ConstraintLayout>

74
app/src/main/res/layout/send_money_header.xml

@ -2,10 +2,11 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
>
<View
android:id="@+id/view25"
android:layout_width="0dp"
android:layout_height="@dimen/_2sdp"
android:layout_gravity="top"
@ -14,22 +15,39 @@
android:background="@color/gray"
app:layout_constraintBottom_toTopOf="@+id/page2TitleTxtView"
app:layout_constraintEnd_toStartOf="@+id/page2TxtView"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/page1TxtView"
app:layout_constraintTop_toTopOf="@+id/page2TxtView" />
<View
android:id="@+id/view27"
android:layout_width="0dp"
android:layout_height="@dimen/_2sdp"
android:layout_gravity="top"
android:layout_marginTop="@dimen/_6sdp"
android:layout_marginBottom="@dimen/_6sdp"
android:background="@color/gray"
app:layout_constraintBottom_toTopOf="@+id/page2TitleTxtView"
app:layout_constraintBottom_toTopOf="@+id/page3TitleTxtView"
app:layout_constraintEnd_toStartOf="@+id/page3TxtView"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/page2TxtView"
app:layout_constraintTop_toTopOf="@+id/page3TxtView" />
<View
android:id="@+id/view26"
android:layout_width="0dp"
android:layout_height="@dimen/_2sdp"
android:layout_gravity="top"
android:layout_marginTop="@dimen/_6sdp"
android:layout_marginBottom="@dimen/_6sdp"
android:background="@color/gray"
app:layout_constraintBottom_toTopOf="@+id/page4TitleTxtView"
app:layout_constraintEnd_toStartOf="@+id/page4TxtView"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/page3TxtView"
app:layout_constraintTop_toTopOf="@+id/page4TxtView" />
<com.swifttech.remit.jmecustomer.common.customwidgets.GmeTextView
android:id="@+id/page1TxtView"
@ -42,8 +60,8 @@
android:text="1"
android:textColor="@color/white"
android:textSize="@dimen/_9ssp"
app:layout_constraintEnd_toStartOf="@+id/page2TxtView"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintEnd_toStartOf="@+id/view25"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -58,6 +76,7 @@
android:textSize="@dimen/_9ssp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/page1TxtView"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/page1TxtView"
app:layout_constraintTop_toBottomOf="@+id/page1TxtView" />
@ -72,9 +91,9 @@
android:text="2"
android:textColor="@color/dark_background_gray"
android:textSize="@dimen/_9ssp"
app:layout_constraintEnd_toStartOf="@+id/page3TxtView"
app:layout_constraintEnd_toStartOf="@+id/view27"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/page1TxtView"
app:layout_constraintStart_toEndOf="@+id/view25"
app:layout_constraintTop_toTopOf="parent" />
<com.swifttech.remit.jmecustomer.common.customwidgets.GmeTextView
@ -83,7 +102,7 @@
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="@dimen/_3sdp"
android:text="@string/verification_detail_text"
android:text="@string/ccdi_text"
android:textColor="@color/darkgray2"
android:textSize="@dimen/_9ssp"
app:layout_constraintBottom_toBottomOf="parent"
@ -91,7 +110,6 @@
app:layout_constraintStart_toStartOf="@+id/page2TxtView"
app:layout_constraintTop_toBottomOf="@+id/page2TxtView" />
<com.swifttech.remit.jmecustomer.common.customwidgets.GmeTextView
android:id="@+id/page3TxtView"
android:layout_width="wrap_content"
@ -103,9 +121,9 @@
android:text="3"
android:textColor="@color/dark_background_gray"
android:textSize="@dimen/_9ssp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toStartOf="@+id/view26"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/page2TxtView"
app:layout_constraintStart_toEndOf="@+id/view27"
app:layout_constraintTop_toTopOf="parent" />
<com.swifttech.remit.jmecustomer.common.customwidgets.GmeTextView
@ -114,7 +132,7 @@
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="@dimen/_3sdp"
android:text="@string/terms_and_condition_title_text"
android:text="@string/verification_detail_text"
android:textColor="@color/darkgray2"
android:textSize="@dimen/_9ssp"
app:layout_constraintBottom_toBottomOf="parent"
@ -123,8 +141,36 @@
app:layout_constraintTop_toBottomOf="@+id/page3TxtView" />
<com.swifttech.remit.jmecustomer.common.customwidgets.GmeTextView
android:id="@+id/page4TxtView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/_4sdp"
android:background="@drawable/circular_valid_bg"
android:gravity="center"
android:text="4"
android:textColor="@color/dark_background_gray"
android:textSize="@dimen/_9ssp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/view26"
app:layout_constraintTop_toTopOf="parent" />
<com.swifttech.remit.jmecustomer.common.customwidgets.GmeTextView
android:id="@+id/page4TitleTxtView"
android:layout_width="@dimen/_70sdp"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="@dimen/_3sdp"
android:text="@string/terms_and_condition_title_text"
android:textColor="@color/darkgray2"
android:textSize="@dimen/_9ssp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/page4TxtView"
app:layout_constraintHorizontal_bias="0.7"
app:layout_constraintStart_toStartOf="@+id/page4TxtView"
app:layout_constraintTop_toBottomOf="@+id/page4TxtView"
app:layout_constraintVertical_bias="0.0" />
</androidx.constraintlayout.widget.ConstraintLayout>

2
app/src/main/res/values/strings.xml

@ -1051,4 +1051,6 @@ All the configurations are done from backend web application system which allows
<string name="othersSpecify1" translatable="false">Others (please specify)</string>
<string name="othersSpecify2" translatable="false">Other ID (Please Specify)</string>
<string name="specifyIdType">Specify Id Type</string>
<string name="ccdi_text">CCDI</string>
<string name="invalidPurposeOfRemittance">Invalid Purpose of Remittance</string>
</resources>
Loading…
Cancel
Save