167 lines
5.9 KiB
Java
167 lines
5.9 KiB
Java
package com.scb.phone.view.fragment.scheduledtransaction;
|
|
|
|
import android.content.DialogInterface;
|
|
import android.os.Bundle;
|
|
import android.os.Parcelable;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.TextView;
|
|
import androidx.fragment.app.FragmentActivity;
|
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import butterknife.OnClick;
|
|
import com.scb.phone.R;
|
|
import com.scb.phone.view.adapter.bulktransfer.RecipientsReviewAdapter;
|
|
import com.scb.phone.view.custom.bulktransfer.CustomEffectiveDate;
|
|
import com.scb.phone.view.custom.common.CustomDialog;
|
|
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPayItem;
|
|
import com.scb.phone.view.custom.transferandpay.CustomTransferAndPaySource;
|
|
import com.scb.phone.view.fragment.scheduledtransaction.ScheduleBulkTransferFragment;
|
|
import o.C10798eP;
|
|
import o.C17079tjn;
|
|
import o.FR;
|
|
import o.InterfaceC13391fZD;
|
|
import o.InterfaceC6636cYn;
|
|
import o.ZI;
|
|
import o.cEU;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public class ScheduleBulkTransferFragment extends Hilt_ScheduleBulkTransferFragment implements InterfaceC6636cYn.jNh {
|
|
|
|
@BindView
|
|
protected CustomTransferAndPayItem amount;
|
|
private FR d;
|
|
|
|
@BindView
|
|
protected CustomEffectiveDate effectiveDate;
|
|
|
|
@BindView
|
|
protected TextView groupHeader;
|
|
|
|
@BindView
|
|
protected TextView groupId;
|
|
|
|
@BindView
|
|
protected RecyclerView recipients;
|
|
|
|
@BindView
|
|
protected TextView refId;
|
|
|
|
@InterfaceC13391fZD
|
|
public cEU scheduleBulkTransferPresenter;
|
|
|
|
@BindView
|
|
protected CustomTransferAndPaySource source;
|
|
|
|
@BindView
|
|
protected CustomTransferAndPayItem totalAmount;
|
|
|
|
@BindView
|
|
protected CustomTransferAndPayItem totalFee;
|
|
|
|
public static ScheduleBulkTransferFragment axx_(Parcelable parcelable) {
|
|
ScheduleBulkTransferFragment scheduleBulkTransferFragment = new ScheduleBulkTransferFragment();
|
|
Bundle bundle = new Bundle();
|
|
bundle.putParcelable("com.scb.phone.EXTRA_REVIEW_DISPLAY", parcelable);
|
|
scheduleBulkTransferFragment.setArguments(bundle);
|
|
return scheduleBulkTransferFragment;
|
|
}
|
|
|
|
@Override // androidx.fragment.app.Fragment
|
|
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
|
View inflate = layoutInflater.inflate(R.layout.2131559899, viewGroup, false);
|
|
ButterKnife.c(this, inflate);
|
|
RecyclerView recyclerView = this.recipients;
|
|
getContext();
|
|
recyclerView.setLayoutManager(new LinearLayoutManager(1, false));
|
|
this.d = (FR) getArguments().getParcelable("com.scb.phone.EXTRA_REVIEW_DISPLAY");
|
|
this.scheduleBulkTransferPresenter.e((cEU) this);
|
|
cEU ceu = this.scheduleBulkTransferPresenter;
|
|
final FR fr = this.d;
|
|
ZI.IeS ieS = new ZI.IeS(fr) { // from class: o.cEV
|
|
private FR a;
|
|
|
|
@Override // o.ZI.IeS
|
|
public final void e(Object obj) {
|
|
((InterfaceC6636cYn.jNh) obj).d(this.a);
|
|
}
|
|
|
|
{
|
|
this.a = fr;
|
|
}
|
|
};
|
|
if (ceu.f != 0) {
|
|
ieS.e(ceu.f);
|
|
}
|
|
return inflate;
|
|
}
|
|
|
|
@Override // o.InterfaceC6636cYn.jNh
|
|
public final void e() {
|
|
FragmentActivity activity = getActivity();
|
|
if (activity != null) {
|
|
activity.setResult(201);
|
|
activity.finish();
|
|
}
|
|
}
|
|
|
|
@OnClick
|
|
public void onConfirmButtonClicked() {
|
|
((CustomDialog) CustomDialog.e(new Object[]{CustomDialog.b(getContext()).c(R.string.schedule_details_delete_007).d(R.string.schedule_details_delete_008).aoT_(R.string.ntb_yes, new DialogInterface.OnClickListener(this) { // from class: o.fzS
|
|
private ScheduleBulkTransferFragment a;
|
|
|
|
@Override // android.content.DialogInterface.OnClickListener
|
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
|
ScheduleBulkTransferFragment.a(this.a);
|
|
}
|
|
|
|
{
|
|
this.a = this;
|
|
}
|
|
}), Integer.valueOf(R.string.ntb_no), new DialogInterface.OnClickListener() { // from class: o.fzQ
|
|
@Override // android.content.DialogInterface.OnClickListener
|
|
public final void onClick(DialogInterface dialogInterface, int i) {
|
|
dialogInterface.dismiss();
|
|
}
|
|
}})).show();
|
|
}
|
|
|
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
|
public void onDestroy() {
|
|
this.scheduleBulkTransferPresenter.w_();
|
|
super.onDestroy();
|
|
}
|
|
|
|
public static /* synthetic */ void a(ScheduleBulkTransferFragment scheduleBulkTransferFragment) {
|
|
cEU ceu = scheduleBulkTransferFragment.scheduleBulkTransferPresenter;
|
|
String str = scheduleBulkTransferFragment.d.n;
|
|
if (ceu.f != 0) {
|
|
ceu.f.y();
|
|
}
|
|
ceu.a.a(new C10798eP(str, null));
|
|
C17079tjn c17079tjn = ceu.a;
|
|
c17079tjn.d(c17079tjn.i, new cEU.LWm(ceu, (byte) 0));
|
|
}
|
|
|
|
@Override // o.InterfaceC6636cYn.jNh
|
|
public final void d(FR fr) {
|
|
this.groupHeader.setText(fr.g);
|
|
this.groupId.setText(String.format(getString(R.string.group_id), fr.f));
|
|
this.refId.setText(String.format(getString(R.string.reference_id), fr.n));
|
|
this.effectiveDate.setEffectiveDate(fr.h);
|
|
this.source.setSourceName(fr.b);
|
|
this.source.setAccountNumber(fr.a);
|
|
this.source.setAvatar(fr.d);
|
|
this.recipients.setAdapter(new RecipientsReviewAdapter(fr.i));
|
|
this.amount.setValue(fr.j);
|
|
this.totalFee.setValue(fr.l);
|
|
this.totalFee.scheduleFeeText.setVisibility(0);
|
|
this.totalAmount.setValue(fr.k);
|
|
this.totalAmount.mDividerView.setVisibility(8);
|
|
this.totalAmount.scheduleFeeText.setVisibility(0);
|
|
}
|
|
}
|