kebappas removed

This commit is contained in:
2020-11-04 10:24:52 +03:00
parent 54c9c363d1
commit 5079fd8129
18 changed files with 16 additions and 220 deletions

Binary file not shown.

3
.idea/compiler.xml generated
View File

@@ -4,5 +4,8 @@
<annotationProcessing> <annotationProcessing>
<profile default="true" name="Default" enabled="true" /> <profile default="true" name="Default" enabled="true" />
</annotationProcessing> </annotationProcessing>
<bytecodeTargetLevel>
<module name="pizzacucina-android.app" target="1.8" />
</bytecodeTargetLevel>
</component> </component>
</project> </project>

1
.idea/gradle.xml generated
View File

@@ -15,6 +15,7 @@
</set> </set>
</option> </option>
<option name="resolveModulePerSourceSet" value="false" /> <option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings> </GradleProjectSettings>
</option> </option>
</component> </component>

8
.idea/modules.xml generated
View File

@@ -2,12 +2,8 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/AndroidStudioProjects-pizzacucina-android.iml" filepath="$PROJECT_DIR$/AndroidStudioProjects-pizzacucina-android.iml" group="pizzacucina-android" /> <module fileurl="file://$PROJECT_DIR$/.idea/modules/AndroidStudioProjects.pizzacucina-android.iml" filepath="$PROJECT_DIR$/.idea/modules/AndroidStudioProjects.pizzacucina-android.iml" />
<module fileurl="file://$PROJECT_DIR$/app/AndroidStudioProjects-pizzacucina-android-app.iml" filepath="$PROJECT_DIR$/app/AndroidStudioProjects-pizzacucina-android-app.iml" group="pizzacucina-android/app" /> <module fileurl="file://$PROJECT_DIR$/.idea/modules/app/pizzacucina-android.app.iml" filepath="$PROJECT_DIR$/.idea/modules/app/pizzacucina-android.app.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
<module fileurl="file://$PROJECT_DIR$/pizzacucina-android.iml" filepath="$PROJECT_DIR$/pizzacucina-android.iml" group="pizzacucina-android" />
<module fileurl="file://$PROJECT_DIR$/app/pizzacucina-android-app.iml" filepath="$PROJECT_DIR$/app/pizzacucina-android-app.iml" group="pizzacucina-android/app" />
<module fileurl="file://$PROJECT_DIR$/pizzaleu-android.iml" filepath="$PROJECT_DIR$/pizzaleu-android.iml" />
</modules> </modules>
</component> </component>
</project> </project>

View File

@@ -97,8 +97,7 @@ public class CampaignProductDetailsActivity extends BaseActivity {
if(SessionHelper.isCustomerLoggedIn()){ if(SessionHelper.isCustomerLoggedIn()){
addProductToCart(); addProductToCart();
/* /*
if((campaignModel.getCode().equals(ApiConstants.CAMPAIGN_CODE_PIZZAPASS) && SessionHelper.isUserUsedPizzapassCampaign()) || if((campaignModel.getCode().equals(ApiConstants.CAMPAIGN_CODE_PIZZAPASS) && SessionHelper.isUserUsedPizzapassCampaign()){
(campaignModel.getCode().equals(ApiConstants.CAMPAIGN_CODE_KEBAPPASS) && SessionHelper.isUserUsedKebappassCampaign())){
DialogHelper.showAlertDialog(BaseActivity.currentActivity, cannotUseCampaignText); DialogHelper.showAlertDialog(BaseActivity.currentActivity, cannotUseCampaignText);
} }
else { else {

View File

@@ -80,7 +80,6 @@ public class CampaignProductListActivity extends BaseActivity {
productPropertiesIntent.putExtra("menuProductModel", menuProductList.get(position)); productPropertiesIntent.putExtra("menuProductModel", menuProductList.get(position));
productPropertiesIntent.putExtra("campaignModel", campaignModel); productPropertiesIntent.putExtra("campaignModel", campaignModel);
//productPropertiesIntent.putExtra("isFromPizzapassCampaign", categoryModel.isPizzapassCampaign()); //productPropertiesIntent.putExtra("isFromPizzapassCampaign", categoryModel.isPizzapassCampaign());
//productPropertiesIntent.putExtra("isFromKebappassCampaign", categoryModel.isKebappassCampaign());
startActivityForResult(productPropertiesIntent, REQUEST_CODE_CAMPAIGN_PRODUCT_PROPERTIES); startActivityForResult(productPropertiesIntent, REQUEST_CODE_CAMPAIGN_PRODUCT_PROPERTIES);
} }
}); });

View File

@@ -171,15 +171,14 @@ public class CreateOrderActivity extends BaseActivity {
*/ */
/** /**
* eğer kampanya kullanıldıysa cartInfoModel de isPizzapassCampaignUsed ve isKebappassCampaignUsed * eğer kampanya kullanıldıysa cartInfoModel de isPizzapassCampaignUsed
* alanalrını true olarak set ediyoruz. create order ekranlarında herhangi bir yerde sepet sorgusu yapınca * alanalrını true olarak set ediyoruz. create order ekranlarında herhangi bir yerde sepet sorgusu yapınca
* buradaki cartInfoModel i de güncelliyoruz. fakat isPizzapassCampaignUsed ve isKebappassCampaignUsed alanları * buradaki cartInfoModel i de güncelliyoruz. fakat isPizzapassCampaignUsed alanları
* servisten gelmeyen değerler, bizim loaklde tuttuğumuz değişkenler. bu sebeple bu alanlar servisten hep false geliyor, * servisten gelmeyen değerler, bizim loaklde tuttuğumuz değişkenler. bu sebeple bu alanlar servisten hep false geliyor,
* buradakinde true olsa bile değişkeni guncellediğimiz için bu alanlar kayboluyor. bunu engellemek için bu metodu yazdım. * buradakinde true olsa bile değişkeni guncellediğimiz için bu alanlar kayboluyor. bunu engellemek için bu metodu yazdım.
*/ */
public void setCartInfoSafeForCampaigns(CartInfoModel cartInfoModel) { public void setCartInfoSafeForCampaigns(CartInfoModel cartInfoModel) {
cartInfoModel.setPizzapassCampaignUsed(this.cartInfoModel.isPizzapassCampaignUsed()); cartInfoModel.setPizzapassCampaignUsed(this.cartInfoModel.isPizzapassCampaignUsed());
cartInfoModel.setKebappassCampaignUsed(this.cartInfoModel.isKebappassCampaignUsed());
this.cartInfoModel = cartInfoModel; this.cartInfoModel = cartInfoModel;
} }

View File

@@ -209,7 +209,6 @@ public class OrderHistoryDetailsActivity extends BaseActivity {
SharedPrefsHelper.setCartItemCount(0); SharedPrefsHelper.setCartItemCount(0);
SharedPrefsHelper.setCartTotalPrice("0"); SharedPrefsHelper.setCartTotalPrice("0");
SharedPrefsHelper.setUserUsedPizzapassCampaign(false); SharedPrefsHelper.setUserUsedPizzapassCampaign(false);
SharedPrefsHelper.setUserUsedKebappassCampaign(false);
MainActivity mainActivity = (MainActivity) BaseActivity.currentActivity; MainActivity mainActivity = (MainActivity) BaseActivity.currentActivity;
mainActivity.setCartItemCount(); mainActivity.setCartItemCount();
*/ */

View File

@@ -13,7 +13,6 @@ public class ApiConstants {
public static final int PRODUCT_ID_VERSION_MENU = -111; public static final int PRODUCT_ID_VERSION_MENU = -111;
public static final String CAMPAIGN_CODE_PIZZAPASS = "PIZZAPASS"; public static final String CAMPAIGN_CODE_PIZZAPASS = "PIZZAPASS";
public static final String CAMPAIGN_CODE_KEBAPPASS = "KEBAPPASS";
public static final String PAYMENT_METHOD_CODE_CREDIT_DEBIT_CARD = "braintree"; // Credit / Debit Card public static final String PAYMENT_METHOD_CODE_CREDIT_DEBIT_CARD = "braintree"; // Credit / Debit Card
public static final String PAYMENT_METHOD_CODE_BANK_CASH = "cod"; // Bar public static final String PAYMENT_METHOD_CODE_BANK_CASH = "cod"; // Bar

View File

@@ -31,7 +31,6 @@ public class ApiEndPoints {
public static final String API_GET_CUSTOMER_PROFILE = PREFIX + "getCustomerInfo" + SUFFIX; public static final String API_GET_CUSTOMER_PROFILE = PREFIX + "getCustomerInfo" + SUFFIX;
public static final String API_GET_STORE_INFO = PREFIX + "getStoreInfo" + SUFFIX; public static final String API_GET_STORE_INFO = PREFIX + "getStoreInfo" + SUFFIX;
public static final String API_CHECK_CAMPAIGN_PIZZAPASS = PREFIX + "detectPizzaPassCampaign" + SUFFIX + "&token="; public static final String API_CHECK_CAMPAIGN_PIZZAPASS = PREFIX + "detectPizzaPassCampaign" + SUFFIX + "&token=";
public static final String API_CHECK_CAMPAIGN_KEBAPPASS = PREFIX + "detectKebapPassCampaign" + SUFFIX + "&token=";
public static final String API_CHECK_DELIVERY_TIME = PREFIX + "checkDeliveryTimeService" + SUFFIX; public static final String API_CHECK_DELIVERY_TIME = PREFIX + "checkDeliveryTimeService" + SUFFIX;
public static final String API_GET_DELIVERY_TIME_OF_STORE = PREFIX + "getDeliveryTimeForStore" + SUFFIX; public static final String API_GET_DELIVERY_TIME_OF_STORE = PREFIX + "getDeliveryTimeForStore" + SUFFIX;

View File

@@ -208,10 +208,6 @@ public interface ApiInterface {
Call<ResponseObject<CampaignModel>> checkPizzapassCampaign(@Path("storeName") String storeName, Call<ResponseObject<CampaignModel>> checkPizzapassCampaign(@Path("storeName") String storeName,
@Query("token") String token); @Query("token") String token);
@GET("{storeName}" + ApiEndPoints.API_CHECK_CAMPAIGN_KEBAPPASS)
Call<ResponseObject<CampaignModel>> checkKebapPassCampaign(@Path("storeName") String storeName,
@Query("token") String token);
@GET("{storeName}" + ApiEndPoints.API_CHECK_DELIVERY_TIME) @GET("{storeName}" + ApiEndPoints.API_CHECK_DELIVERY_TIME)
Call<ResponseObject<Boolean>> checkDeliveryTime(@Path("storeName") String storeName, Call<ResponseObject<Boolean>> checkDeliveryTime(@Path("storeName") String storeName,
@Query("shipping_method_code") String shippingMethodCode); @Query("shipping_method_code") String shippingMethodCode);

View File

@@ -84,13 +84,11 @@ public class CartFragment extends BaseFragment {
public static final java.lang.String FRAGMENT_NAME = "cartFragment"; public static final java.lang.String FRAGMENT_NAME = "cartFragment";
private int REQUEST_CODE_CAMPAIGN_PRODUCT_LIST = 7847; private int REQUEST_CODE_CAMPAIGN_PRODUCT_LIST = 7847;
private String pizzapassCampaignCategoryId = ""; private String pizzapassCampaignCategoryId = "";
private String kebappassCampaignCategoryId = "";
private CartInfoModel cartInfoModel; private CartInfoModel cartInfoModel;
private ArrayList<CartProductModel> cartProductList = new ArrayList<>(); private ArrayList<CartProductModel> cartProductList = new ArrayList<>();
private CartRecyclerAdapter cartRecyclerAdapter; private CartRecyclerAdapter cartRecyclerAdapter;
private ArrayList<MenuProductModel> pizzapassCampaignProductList = new ArrayList<>(); private ArrayList<MenuProductModel> pizzapassCampaignProductList = new ArrayList<>();
private ArrayList<MenuProductModel> kebappassCampaignProductList = new ArrayList<>();
public CartFragment() {} public CartFragment() {}
@@ -151,9 +149,6 @@ public class CartFragment extends BaseFragment {
if(!pizzapassCampaignCategoryId.isEmpty()){ if(!pizzapassCampaignCategoryId.isEmpty()){
getCampaignProductsForPizzapassOnContinueButtonClicked(); getCampaignProductsForPizzapassOnContinueButtonClicked();
} }
else if(!kebappassCampaignCategoryId.isEmpty()){
getCampaignProductsForKebappassOnContinueButtonClicked();
}
else { else {
openCreateOrderActivity(); openCreateOrderActivity();
} }
@@ -169,9 +164,6 @@ public class CartFragment extends BaseFragment {
if(!pizzapassCampaignCategoryId.isEmpty()){ if(!pizzapassCampaignCategoryId.isEmpty()){
getCampaignProductsForPizzapassOnContinueButtonClicked(); getCampaignProductsForPizzapassOnContinueButtonClicked();
} }
else if(!kebappassCampaignCategoryId.isEmpty()){
getCampaignProductsForKebappassOnContinueButtonClicked();
}
else { else {
openCreateOrderActivity(); openCreateOrderActivity();
} }
@@ -424,12 +416,6 @@ public class CartFragment extends BaseFragment {
pizzapassCampaignProductList)); pizzapassCampaignProductList));
} }
if(!kebappassCampaignProductList.isEmpty()){
cartInfoModel.setKebappassCampaignUsed(
isBasketContainsCampaignProduct(
kebappassCampaignProductList));
}
} }
} }
@@ -490,27 +476,23 @@ public class CartFragment extends BaseFragment {
.enqueue(new Callback<ResponseObject<CampaignModel>>() { .enqueue(new Callback<ResponseObject<CampaignModel>>() {
@Override @Override
public void onResponse(Call<ResponseObject<CampaignModel>> call, Response<ResponseObject<CampaignModel>> response) { public void onResponse(Call<ResponseObject<CampaignModel>> call, Response<ResponseObject<CampaignModel>> response) {
DialogHelper.hideLoadingDialog();
if(response.isSuccessful() && if(response.isSuccessful() &&
response.body() != null){ response.body() != null){
if(response.body().isSuccess()){ if(response.body().isSuccess()){
if(response.body().getData() == null){ if(response.body().getData() == null){
DialogHelper.hideLoadingDialog();
DialogHelper.showAlertDialog(BaseActivity.currentActivity, genericErrorText); DialogHelper.showAlertDialog(BaseActivity.currentActivity, genericErrorText);
} }
else { else {
pizzapassCampaignCategoryId = response.body().getData().getCategoryId(); pizzapassCampaignCategoryId = response.body().getData().getCategoryId();
getCampaignProducts(response.body().getData(), true); getCampaignProducts(response.body().getData());
} }
} }
else {
checkKebappassCampaign();
}
} }
else{ else{
DialogHelper.hideLoadingDialog();
ApiErrorUtils.parseError(response); ApiErrorUtils.parseError(response);
} }
} }
@@ -540,128 +522,34 @@ public class CartFragment extends BaseFragment {
new MaterialDialog.SingleButtonCallback() { new MaterialDialog.SingleButtonCallback() {
@Override @Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) { public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
DialogHelper.showLoadingDialog();
checkKebappassCampaign();
} }
}, },
false false
); );
} }
private void checkKebappassCampaign(){ private void getCampaignProducts(final CampaignModel campaignModel){
ApiService
.apiInterface
.checkKebapPassCampaign(
SessionHelper.getSelectedStore().getStoreName(),
SessionHelper.getCustomerToken().getToken())
.enqueue(new Callback<ResponseObject<CampaignModel>>() {
@Override
public void onResponse(Call<ResponseObject<CampaignModel>> call, Response<ResponseObject<CampaignModel>> response) {
DialogHelper.hideLoadingDialog();
if(response.isSuccessful() &&
response.body() != null){
if(response.body().isSuccess()){
if(response.body().getData() == null){
DialogHelper.hideLoadingDialog();
DialogHelper.showAlertDialog(BaseActivity.currentActivity, genericErrorText);
}
else {
kebappassCampaignCategoryId = response.body().getData().getCategoryId();
getCampaignProducts(response.body().getData(), false);
}
}
/*
if(response.body().isSuccess() && !SessionHelper.isUserUsedKebappassCampaign()){
if(response.body().getData() == null){
DialogHelper.showAlertDialog(BaseActivity.currentActivity, genericErrorText);
}
else {
response.body().getData().checkNull();
showKebappassCampaignDialog(response.body().getData());
}
}
*/
}
else{
ApiErrorUtils.parseError(response);
}
}
@Override
public void onFailure(Call<ResponseObject<CampaignModel>> call, Throwable t) {
DialogHelper.hideLoadingDialog();
DialogHelper.showFailedDialog();
}
});
}
private void showKebappassCampaignDialog(final CampaignModel campaignModel){
DialogHelper.showTwoButtonsDialog(
campaignModel.getName(),
campaignModel.getDescription(),
R.string.accept_campaign,
new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
Intent campaignIntent = new Intent(BaseActivity.currentActivity, CampaignProductListActivity.class);
campaignIntent.putExtra("campaignModel", campaignModel);
startActivityForResult(campaignIntent, REQUEST_CODE_CAMPAIGN_PRODUCT_LIST);
}
},
R.string.decline_campaign,
new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
}
},
false
);
}
private void getCampaignProducts(final CampaignModel campaignModel, final boolean isForPizzapass){
Call<ResponseArray<MenuProductModel>> call = ApiService.apiInterface.getProductsByCategory( Call<ResponseArray<MenuProductModel>> call = ApiService.apiInterface.getProductsByCategory(
SessionHelper.getSelectedStore().getStoreName(), SessionHelper.getSelectedStore().getStoreName(),
campaignModel.getCategoryId()); campaignModel.getCategoryId());
call.enqueue(new Callback<ResponseArray<MenuProductModel>>() { call.enqueue(new Callback<ResponseArray<MenuProductModel>>() {
@Override @Override
public void onResponse(Call<ResponseArray<MenuProductModel>> call, Response<ResponseArray<MenuProductModel>> response) { public void onResponse(Call<ResponseArray<MenuProductModel>> call, Response<ResponseArray<MenuProductModel>> response) {
DialogHelper.hideLoadingDialog();
if(response.isSuccessful() && if(response.isSuccessful() &&
response.body().getData() != null && response.body().getData() != null &&
response.body().isSuccess()) { response.body().isSuccess()) {
if(!isBasketContainsCampaignProduct(response.body().getData())){
if(isBasketContainsCampaignProduct(response.body().getData())){ showPizzapassCampaignDialog(campaignModel);
if(isForPizzapass){
checkKebappassCampaign();
}
else {
DialogHelper.hideLoadingDialog();
}
}
else {
DialogHelper.hideLoadingDialog();
if(isForPizzapass){
showPizzapassCampaignDialog(campaignModel);
}
else {
showKebappassCampaignDialog(campaignModel);
}
} }
} }
else { else {
DialogHelper.hideLoadingDialog();
ApiErrorUtils.parseError(response); ApiErrorUtils.parseError(response);
} }
} }
@Override @Override
public void onFailure(Call<ResponseArray<MenuProductModel>> call, Throwable t) { public void onFailure(Call<ResponseArray<MenuProductModel>> call, Throwable t) {
DialogHelper.hideLoadingDialog();
DialogHelper.showFailedDialog(); DialogHelper.showFailedDialog();
} }
}); });
@@ -686,51 +574,11 @@ public class CartFragment extends BaseFragment {
pizzapassCampaignProductList.addAll(response.body().getData()); pizzapassCampaignProductList.addAll(response.body().getData());
cartInfoModel.setPizzapassCampaignUsed(isBasketContainsCampaignProduct(response.body().getData())); cartInfoModel.setPizzapassCampaignUsed(isBasketContainsCampaignProduct(response.body().getData()));
if(!kebappassCampaignCategoryId.isEmpty()){
getCampaignProductsForKebappassOnContinueButtonClicked();
}
else {
DialogHelper.hideLoadingDialog();
openCreateOrderActivity();
}
}
else {
DialogHelper.hideLoadingDialog(); DialogHelper.hideLoadingDialog();
ApiErrorUtils.parseError(response);
}
}
@Override
public void onFailure(Call<ResponseArray<MenuProductModel>> call, Throwable t) {
DialogHelper.hideLoadingDialog();
DialogHelper.showFailedDialog();
}
});
}
private void getCampaignProductsForKebappassOnContinueButtonClicked(){
DialogHelper.showLoadingDialog();
Call<ResponseArray<MenuProductModel>> call = ApiService.apiInterface.getProductsByCategory(
SessionHelper.getSelectedStore().getStoreName(),
kebappassCampaignCategoryId);
call.enqueue(new Callback<ResponseArray<MenuProductModel>>() {
@Override
public void onResponse(Call<ResponseArray<MenuProductModel>> call, Response<ResponseArray<MenuProductModel>> response) {
DialogHelper.hideLoadingDialog();
if(response.isSuccessful() &&
response.body().getData() != null &&
response.body().isSuccess()) {
kebappassCampaignProductList.clear();
kebappassCampaignProductList.addAll(response.body().getData());
cartInfoModel.setKebappassCampaignUsed(isBasketContainsCampaignProduct(response.body().getData()));
openCreateOrderActivity(); openCreateOrderActivity();
} }
else { else {
DialogHelper.hideLoadingDialog();
ApiErrorUtils.parseError(response); ApiErrorUtils.parseError(response);
} }
} }

View File

@@ -170,7 +170,6 @@ public class OrderHistoryFragment extends BaseFragment {
SharedPrefsHelper.setCartItemCount(0); SharedPrefsHelper.setCartItemCount(0);
SharedPrefsHelper.setCartTotalPrice("0"); SharedPrefsHelper.setCartTotalPrice("0");
SharedPrefsHelper.setUserUsedPizzapassCampaign(false); SharedPrefsHelper.setUserUsedPizzapassCampaign(false);
SharedPrefsHelper.setUserUsedKebappassCampaign(false);
MainActivity mainActivity = (MainActivity) BaseActivity.currentActivity; MainActivity mainActivity = (MainActivity) BaseActivity.currentActivity;
mainActivity.setCartItemCount(); mainActivity.setCartItemCount();
*/ */

View File

@@ -56,8 +56,6 @@ import static android.app.Activity.RESULT_OK;
public class ProfileFragment extends BaseFragment { public class ProfileFragment extends BaseFragment {
@BindView(R.id.pizzapassCountPizzalinkInfoLayout) AppInfoView pizzapassCountPizzalinkInfoLayout;
@BindView(R.id.kebappassCountPizzalinkInfoLayout) AppInfoView kebappassCountPizzalinkInfoLayout;
@BindView(R.id.firstnamePizzalinkInfoLayout) AppInfoView firstnamePizzalinkInfoLayout; @BindView(R.id.firstnamePizzalinkInfoLayout) AppInfoView firstnamePizzalinkInfoLayout;
@BindView(R.id.lastnamePizzalinkInfoLayout) AppInfoView lastnamePizzalinkInfoLayout; @BindView(R.id.lastnamePizzalinkInfoLayout) AppInfoView lastnamePizzalinkInfoLayout;
@BindView(R.id.emailPizzalinkInfoLayout) AppInfoView emailPizzalinkInfoLayout; @BindView(R.id.emailPizzalinkInfoLayout) AppInfoView emailPizzalinkInfoLayout;
@@ -140,8 +138,6 @@ public class ProfileFragment extends BaseFragment {
if(requestCode == REQUEST_CODE_UPDATE_PROFILE && if(requestCode == REQUEST_CODE_UPDATE_PROFILE &&
resultCode == RESULT_OK){ resultCode == RESULT_OK){
userModel = SessionHelper.getUser(); userModel = SessionHelper.getUser();
pizzapassCountPizzalinkInfoLayout.setText(userModel.getPizzapassCount());
kebappassCountPizzalinkInfoLayout.setText(userModel.getKebappassCount());
firstnamePizzalinkInfoLayout.setText(userModel.getFirstname()); firstnamePizzalinkInfoLayout.setText(userModel.getFirstname());
lastnamePizzalinkInfoLayout.setText(userModel.getLastname()); lastnamePizzalinkInfoLayout.setText(userModel.getLastname());
emailPizzalinkInfoLayout.setText(userModel.getEmail()); emailPizzalinkInfoLayout.setText(userModel.getEmail());
@@ -290,8 +286,6 @@ public class ProfileFragment extends BaseFragment {
userModel = user; userModel = user;
SessionHelper.saveCustomer(userModel); SessionHelper.saveCustomer(userModel);
pizzapassCountPizzalinkInfoLayout.setText(userModel.getPizzapassCount());
kebappassCountPizzalinkInfoLayout.setText(userModel.getKebappassCount());
firstnamePizzalinkInfoLayout.setText(userModel.getFirstname()); firstnamePizzalinkInfoLayout.setText(userModel.getFirstname());
lastnamePizzalinkInfoLayout.setText(userModel.getLastname()); lastnamePizzalinkInfoLayout.setText(userModel.getLastname());
emailPizzalinkInfoLayout.setText(userModel.getEmail()); emailPizzalinkInfoLayout.setText(userModel.getEmail());

View File

@@ -217,7 +217,6 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
params.put("payment_method_code", createOrderActivity.getSelectedPaymentMethod().getCode()); params.put("payment_method_code", createOrderActivity.getSelectedPaymentMethod().getCode());
params.put("comment", createOrderNote()); params.put("comment", createOrderNote());
params.put("is_pizza_pass_campaign", createOrderActivity.getCartInfo().isPizzapassCampaignUsed()); params.put("is_pizza_pass_campaign", createOrderActivity.getCartInfo().isPizzapassCampaignUsed());
params.put("is_kebap_pass_campaign", createOrderActivity.getCartInfo().isKebappassCampaignUsed());
params.put("application_id", ApiConstants.APP_TYPE_ID_ANDROID); params.put("application_id", ApiConstants.APP_TYPE_ID_ANDROID);
SessionHelper.addCouponCodeToRequestParamsIfNeeded(params); SessionHelper.addCouponCodeToRequestParamsIfNeeded(params);
if(dateOfOrderString != null && !dateOfOrderString.isEmpty() && if(dateOfOrderString != null && !dateOfOrderString.isEmpty() &&
@@ -714,7 +713,6 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
params.put("payment_method_code", createOrderActivity.getSelectedPaymentMethod().getCode()); params.put("payment_method_code", createOrderActivity.getSelectedPaymentMethod().getCode());
params.put("comment", createOrderNote()); params.put("comment", createOrderNote());
params.put("is_pizza_pass_campaign", createOrderActivity.getCartInfo().isPizzapassCampaignUsed()); params.put("is_pizza_pass_campaign", createOrderActivity.getCartInfo().isPizzapassCampaignUsed());
params.put("is_kebap_pass_campaign", createOrderActivity.getCartInfo().isKebappassCampaignUsed());
params.put("application_id", ApiConstants.APP_TYPE_ID_ANDROID); params.put("application_id", ApiConstants.APP_TYPE_ID_ANDROID);
if(paymentMethodNonce != null){ if(paymentMethodNonce != null){
params.put("payment_method_nonce", paymentMethodNonce); params.put("payment_method_nonce", paymentMethodNonce);

View File

@@ -14,7 +14,6 @@ public class UserModel implements Serializable{
@Expose @SerializedName("customer_id") private String id; @Expose @SerializedName("customer_id") private String id;
@Expose @SerializedName("address_id") private String addressId; @Expose @SerializedName("address_id") private String addressId;
@Expose @SerializedName("pizza_pass_count") private String pizzapassCount; @Expose @SerializedName("pizza_pass_count") private String pizzapassCount;
@Expose @SerializedName("kebab_pass_count") private String kebappassCount;
private String firstname; private String firstname;
private String lastname; private String lastname;
private String email; private String email;
@@ -44,9 +43,6 @@ public class UserModel implements Serializable{
if(pizzapassCount == null) if(pizzapassCount == null)
pizzapassCount = "0"; pizzapassCount = "0";
if(kebappassCount == null)
kebappassCount = "0";
if(token != null) if(token != null)
token.checkNull(); token.checkNull();
} }
@@ -118,12 +114,4 @@ public class UserModel implements Serializable{
public void setPizzapassCount(String pizzapassCount) { public void setPizzapassCount(String pizzapassCount) {
this.pizzapassCount = pizzapassCount; this.pizzapassCount = pizzapassCount;
} }
public String getKebappassCount() {
return kebappassCount;
}
public void setKebappassCount(String kebappassCount) {
this.kebappassCount = kebappassCount;
}
} }

View File

@@ -14,7 +14,6 @@ public class CartInfoModel implements Serializable {
private ArrayList<CartProductModel> products; private ArrayList<CartProductModel> products;
private ArrayList<CartTotalModel> totals; private ArrayList<CartTotalModel> totals;
private boolean isPizzapassCampaignUsed; private boolean isPizzapassCampaignUsed;
private boolean isKebappassCampaignUsed;
public ArrayList<CartProductModel> getProducts() { public ArrayList<CartProductModel> getProducts() {
return products; return products;
@@ -70,12 +69,4 @@ public class CartInfoModel implements Serializable {
public void setPizzapassCampaignUsed(boolean pizzapassCampaignUsed) { public void setPizzapassCampaignUsed(boolean pizzapassCampaignUsed) {
isPizzapassCampaignUsed = pizzapassCampaignUsed; isPizzapassCampaignUsed = pizzapassCampaignUsed;
} }
public boolean isKebappassCampaignUsed() {
return isKebappassCampaignUsed;
}
public void setKebappassCampaignUsed(boolean kebappassCampaignUsed) {
isKebappassCampaignUsed = kebappassCampaignUsed;
}
} }

View File

@@ -34,18 +34,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<ch.pizzacucina.android.view.AppInfoView
android:id="@+id/pizzapassCountPizzalinkInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/pizza_pass" />
<ch.pizzacucina.android.view.AppInfoView
android:id="@+id/kebappassCountPizzalinkInfoLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:description="@string/kebap_pass" />
<TextView <TextView
android:id="@+id/personalCouponCodesTextView" android:id="@+id/personalCouponCodesTextView"
android:layout_width="wrap_content" android:layout_width="wrap_content"