coupon code dialog

This commit is contained in:
cimenmus
2018-08-14 21:27:08 +03:00
parent 57c75dd216
commit 436902b961
2 changed files with 11 additions and 3 deletions

View File

@@ -43,12 +43,14 @@ import retrofit2.Response;
public class PaymentMethodFragment extends CreateOrderBaseFragment {
@BindView(R.id.paymentMethodsRecyclerView) RecyclerView paymentMethodsRecyclerView;
@BindView(R.id.couponCodePizzalinkEditText)
AppEditText couponCodeAppEditText;
@BindView(R.id.couponCodePizzalinkEditText) AppEditText couponCodeAppEditText;
@BindString(R.string.app_name) String appName;
@BindString(R.string.alert_choose_payment_method) String choosePaymentMethodText;
@BindString(R.string.coupon_is_not_active) String couponIsNotActiveText;
@BindString(R.string.coupon_used_dialog_title) String couponUsedDialogTitle;
@BindString(R.string.coupon_used_dialog_content_part_1) String couponUsedDialogContentPart1;
@BindString(R.string.coupon_used_dialog_content_part_2) String couponUsedDialogContentPart2;
private ArrayList<PaymentMethodModel> paymentMethodList = new ArrayList<>();
private PaymentMethodsRecyclerAdapter paymentMethodsRecyclerAdapter;
@@ -242,7 +244,10 @@ public class PaymentMethodFragment extends CreateOrderBaseFragment {
couponModel = response.body().getData();
couponModel.checkNull();
if(couponModel.isActive()){
DialogHelper.showDialogWithPositiveButton(appName, BaseActivity.currentActivity, couponModel.getName());
DialogHelper.showDialogWithPositiveButton(
couponUsedDialogTitle,
BaseActivity.currentActivity,
couponUsedDialogContentPart1 + " " + couponModel.getName() + " " + couponUsedDialogContentPart2);
getCartProducts();
}
else {