coupon code dialog
This commit is contained in:
@@ -43,12 +43,14 @@ import retrofit2.Response;
|
|||||||
public class PaymentMethodFragment extends CreateOrderBaseFragment {
|
public class PaymentMethodFragment extends CreateOrderBaseFragment {
|
||||||
|
|
||||||
@BindView(R.id.paymentMethodsRecyclerView) RecyclerView paymentMethodsRecyclerView;
|
@BindView(R.id.paymentMethodsRecyclerView) RecyclerView paymentMethodsRecyclerView;
|
||||||
@BindView(R.id.couponCodePizzalinkEditText)
|
@BindView(R.id.couponCodePizzalinkEditText) AppEditText couponCodeAppEditText;
|
||||||
AppEditText couponCodeAppEditText;
|
|
||||||
|
|
||||||
@BindString(R.string.app_name) String appName;
|
@BindString(R.string.app_name) String appName;
|
||||||
@BindString(R.string.alert_choose_payment_method) String choosePaymentMethodText;
|
@BindString(R.string.alert_choose_payment_method) String choosePaymentMethodText;
|
||||||
@BindString(R.string.coupon_is_not_active) String couponIsNotActiveText;
|
@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 ArrayList<PaymentMethodModel> paymentMethodList = new ArrayList<>();
|
||||||
private PaymentMethodsRecyclerAdapter paymentMethodsRecyclerAdapter;
|
private PaymentMethodsRecyclerAdapter paymentMethodsRecyclerAdapter;
|
||||||
@@ -242,7 +244,10 @@ public class PaymentMethodFragment extends CreateOrderBaseFragment {
|
|||||||
couponModel = response.body().getData();
|
couponModel = response.body().getData();
|
||||||
couponModel.checkNull();
|
couponModel.checkNull();
|
||||||
if(couponModel.isActive()){
|
if(couponModel.isActive()){
|
||||||
DialogHelper.showDialogWithPositiveButton(appName, BaseActivity.currentActivity, couponModel.getName());
|
DialogHelper.showDialogWithPositiveButton(
|
||||||
|
couponUsedDialogTitle,
|
||||||
|
BaseActivity.currentActivity,
|
||||||
|
couponUsedDialogContentPart1 + " " + couponModel.getName() + " " + couponUsedDialogContentPart2);
|
||||||
getCartProducts();
|
getCartProducts();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -156,6 +156,9 @@
|
|||||||
<string name="alert_choose_payment_method">Bitte wählen Sie ein Bezahlverfahren aus.</string>
|
<string name="alert_choose_payment_method">Bitte wählen Sie ein Bezahlverfahren aus.</string>
|
||||||
<string name="coupon_code">Gutscheincode (Wahlweise)</string>
|
<string name="coupon_code">Gutscheincode (Wahlweise)</string>
|
||||||
<string name="payment_method">Bezahlverfahren</string>
|
<string name="payment_method">Bezahlverfahren</string>
|
||||||
|
<string name="coupon_used_dialog_title">Gutscheincode</string>
|
||||||
|
<string name="coupon_used_dialog_content_part_1">Sie haben erfolgreich Ihre</string>
|
||||||
|
<string name="coupon_used_dialog_content_part_2">eingelöst</string>
|
||||||
<string name="coupon_is_not_active">Der Coupon ist nicht aktiv.</string>
|
<string name="coupon_is_not_active">Der Coupon ist nicht aktiv.</string>
|
||||||
<!-- PaymentMethodFragment-->
|
<!-- PaymentMethodFragment-->
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user