kebappas removed
This commit is contained in:
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
3
.idea/compiler.xml
generated
3
.idea/compiler.xml
generated
@@ -4,5 +4,8 @@
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="pizzacucina-android.app" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
||||
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -15,6 +15,7 @@
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -2,12 +2,8 @@
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<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$/app/AndroidStudioProjects-pizzacucina-android-app.iml" filepath="$PROJECT_DIR$/app/AndroidStudioProjects-pizzacucina-android-app.iml" group="pizzacucina-android/app" />
|
||||
<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" />
|
||||
<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$/.idea/modules/app/pizzacucina-android.app.iml" filepath="$PROJECT_DIR$/.idea/modules/app/pizzacucina-android.app.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@@ -97,8 +97,7 @@ public class CampaignProductDetailsActivity extends BaseActivity {
|
||||
if(SessionHelper.isCustomerLoggedIn()){
|
||||
addProductToCart();
|
||||
/*
|
||||
if((campaignModel.getCode().equals(ApiConstants.CAMPAIGN_CODE_PIZZAPASS) && SessionHelper.isUserUsedPizzapassCampaign()) ||
|
||||
(campaignModel.getCode().equals(ApiConstants.CAMPAIGN_CODE_KEBAPPASS) && SessionHelper.isUserUsedKebappassCampaign())){
|
||||
if((campaignModel.getCode().equals(ApiConstants.CAMPAIGN_CODE_PIZZAPASS) && SessionHelper.isUserUsedPizzapassCampaign()){
|
||||
DialogHelper.showAlertDialog(BaseActivity.currentActivity, cannotUseCampaignText);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -80,7 +80,6 @@ public class CampaignProductListActivity extends BaseActivity {
|
||||
productPropertiesIntent.putExtra("menuProductModel", menuProductList.get(position));
|
||||
productPropertiesIntent.putExtra("campaignModel", campaignModel);
|
||||
//productPropertiesIntent.putExtra("isFromPizzapassCampaign", categoryModel.isPizzapassCampaign());
|
||||
//productPropertiesIntent.putExtra("isFromKebappassCampaign", categoryModel.isKebappassCampaign());
|
||||
startActivityForResult(productPropertiesIntent, REQUEST_CODE_CAMPAIGN_PRODUCT_PROPERTIES);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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
|
||||
* 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,
|
||||
* 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) {
|
||||
cartInfoModel.setPizzapassCampaignUsed(this.cartInfoModel.isPizzapassCampaignUsed());
|
||||
cartInfoModel.setKebappassCampaignUsed(this.cartInfoModel.isKebappassCampaignUsed());
|
||||
this.cartInfoModel = cartInfoModel;
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,6 @@ public class OrderHistoryDetailsActivity extends BaseActivity {
|
||||
SharedPrefsHelper.setCartItemCount(0);
|
||||
SharedPrefsHelper.setCartTotalPrice("0");
|
||||
SharedPrefsHelper.setUserUsedPizzapassCampaign(false);
|
||||
SharedPrefsHelper.setUserUsedKebappassCampaign(false);
|
||||
MainActivity mainActivity = (MainActivity) BaseActivity.currentActivity;
|
||||
mainActivity.setCartItemCount();
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,6 @@ public class ApiConstants {
|
||||
public static final int PRODUCT_ID_VERSION_MENU = -111;
|
||||
|
||||
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_BANK_CASH = "cod"; // Bar
|
||||
|
||||
@@ -31,7 +31,6 @@ public class ApiEndPoints {
|
||||
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_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_GET_DELIVERY_TIME_OF_STORE = PREFIX + "getDeliveryTimeForStore" + SUFFIX;
|
||||
|
||||
|
||||
@@ -208,10 +208,6 @@ public interface ApiInterface {
|
||||
Call<ResponseObject<CampaignModel>> checkPizzapassCampaign(@Path("storeName") String storeName,
|
||||
@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)
|
||||
Call<ResponseObject<Boolean>> checkDeliveryTime(@Path("storeName") String storeName,
|
||||
@Query("shipping_method_code") String shippingMethodCode);
|
||||
|
||||
@@ -84,13 +84,11 @@ public class CartFragment extends BaseFragment {
|
||||
public static final java.lang.String FRAGMENT_NAME = "cartFragment";
|
||||
private int REQUEST_CODE_CAMPAIGN_PRODUCT_LIST = 7847;
|
||||
private String pizzapassCampaignCategoryId = "";
|
||||
private String kebappassCampaignCategoryId = "";
|
||||
|
||||
private CartInfoModel cartInfoModel;
|
||||
private ArrayList<CartProductModel> cartProductList = new ArrayList<>();
|
||||
private CartRecyclerAdapter cartRecyclerAdapter;
|
||||
private ArrayList<MenuProductModel> pizzapassCampaignProductList = new ArrayList<>();
|
||||
private ArrayList<MenuProductModel> kebappassCampaignProductList = new ArrayList<>();
|
||||
|
||||
public CartFragment() {}
|
||||
|
||||
@@ -151,9 +149,6 @@ public class CartFragment extends BaseFragment {
|
||||
if(!pizzapassCampaignCategoryId.isEmpty()){
|
||||
getCampaignProductsForPizzapassOnContinueButtonClicked();
|
||||
}
|
||||
else if(!kebappassCampaignCategoryId.isEmpty()){
|
||||
getCampaignProductsForKebappassOnContinueButtonClicked();
|
||||
}
|
||||
else {
|
||||
openCreateOrderActivity();
|
||||
}
|
||||
@@ -169,9 +164,6 @@ public class CartFragment extends BaseFragment {
|
||||
if(!pizzapassCampaignCategoryId.isEmpty()){
|
||||
getCampaignProductsForPizzapassOnContinueButtonClicked();
|
||||
}
|
||||
else if(!kebappassCampaignCategoryId.isEmpty()){
|
||||
getCampaignProductsForKebappassOnContinueButtonClicked();
|
||||
}
|
||||
else {
|
||||
openCreateOrderActivity();
|
||||
}
|
||||
@@ -424,12 +416,6 @@ public class CartFragment extends BaseFragment {
|
||||
pizzapassCampaignProductList));
|
||||
}
|
||||
|
||||
if(!kebappassCampaignProductList.isEmpty()){
|
||||
cartInfoModel.setKebappassCampaignUsed(
|
||||
isBasketContainsCampaignProduct(
|
||||
kebappassCampaignProductList));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -490,27 +476,23 @@ public class CartFragment extends BaseFragment {
|
||||
.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 {
|
||||
pizzapassCampaignCategoryId = response.body().getData().getCategoryId();
|
||||
getCampaignProducts(response.body().getData(), true);
|
||||
getCampaignProducts(response.body().getData());
|
||||
}
|
||||
}
|
||||
else {
|
||||
checkKebappassCampaign();
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
DialogHelper.hideLoadingDialog();
|
||||
ApiErrorUtils.parseError(response);
|
||||
}
|
||||
}
|
||||
@@ -540,128 +522,34 @@ public class CartFragment extends BaseFragment {
|
||||
new MaterialDialog.SingleButtonCallback() {
|
||||
@Override
|
||||
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
|
||||
DialogHelper.showLoadingDialog();
|
||||
checkKebappassCampaign();
|
||||
}
|
||||
},
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
private void checkKebappassCampaign(){
|
||||
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){
|
||||
private void getCampaignProducts(final CampaignModel campaignModel){
|
||||
Call<ResponseArray<MenuProductModel>> call = ApiService.apiInterface.getProductsByCategory(
|
||||
SessionHelper.getSelectedStore().getStoreName(),
|
||||
campaignModel.getCategoryId());
|
||||
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()) {
|
||||
|
||||
if(isBasketContainsCampaignProduct(response.body().getData())){
|
||||
if(isForPizzapass){
|
||||
checkKebappassCampaign();
|
||||
}
|
||||
else {
|
||||
DialogHelper.hideLoadingDialog();
|
||||
}
|
||||
}
|
||||
else {
|
||||
DialogHelper.hideLoadingDialog();
|
||||
if(isForPizzapass){
|
||||
if(!isBasketContainsCampaignProduct(response.body().getData())){
|
||||
showPizzapassCampaignDialog(campaignModel);
|
||||
}
|
||||
else {
|
||||
showKebappassCampaignDialog(campaignModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
DialogHelper.hideLoadingDialog();
|
||||
ApiErrorUtils.parseError(response);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ResponseArray<MenuProductModel>> call, Throwable t) {
|
||||
DialogHelper.hideLoadingDialog();
|
||||
DialogHelper.showFailedDialog();
|
||||
}
|
||||
});
|
||||
@@ -686,14 +574,9 @@ public class CartFragment extends BaseFragment {
|
||||
pizzapassCampaignProductList.addAll(response.body().getData());
|
||||
cartInfoModel.setPizzapassCampaignUsed(isBasketContainsCampaignProduct(response.body().getData()));
|
||||
|
||||
if(!kebappassCampaignCategoryId.isEmpty()){
|
||||
getCampaignProductsForKebappassOnContinueButtonClicked();
|
||||
}
|
||||
else {
|
||||
DialogHelper.hideLoadingDialog();
|
||||
openCreateOrderActivity();
|
||||
}
|
||||
}
|
||||
else {
|
||||
DialogHelper.hideLoadingDialog();
|
||||
ApiErrorUtils.parseError(response);
|
||||
@@ -708,41 +591,6 @@ public class CartFragment extends BaseFragment {
|
||||
});
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
else {
|
||||
ApiErrorUtils.parseError(response);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ResponseArray<MenuProductModel>> call, Throwable t) {
|
||||
DialogHelper.hideLoadingDialog();
|
||||
DialogHelper.showFailedDialog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private boolean isBasketContainsCampaignProduct(ArrayList<MenuProductModel> campaignProductsList){
|
||||
|
||||
boolean isContains = false;
|
||||
|
||||
@@ -170,7 +170,6 @@ public class OrderHistoryFragment extends BaseFragment {
|
||||
SharedPrefsHelper.setCartItemCount(0);
|
||||
SharedPrefsHelper.setCartTotalPrice("0");
|
||||
SharedPrefsHelper.setUserUsedPizzapassCampaign(false);
|
||||
SharedPrefsHelper.setUserUsedKebappassCampaign(false);
|
||||
MainActivity mainActivity = (MainActivity) BaseActivity.currentActivity;
|
||||
mainActivity.setCartItemCount();
|
||||
*/
|
||||
|
||||
@@ -56,8 +56,6 @@ import static android.app.Activity.RESULT_OK;
|
||||
|
||||
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.lastnamePizzalinkInfoLayout) AppInfoView lastnamePizzalinkInfoLayout;
|
||||
@BindView(R.id.emailPizzalinkInfoLayout) AppInfoView emailPizzalinkInfoLayout;
|
||||
@@ -140,8 +138,6 @@ public class ProfileFragment extends BaseFragment {
|
||||
if(requestCode == REQUEST_CODE_UPDATE_PROFILE &&
|
||||
resultCode == RESULT_OK){
|
||||
userModel = SessionHelper.getUser();
|
||||
pizzapassCountPizzalinkInfoLayout.setText(userModel.getPizzapassCount());
|
||||
kebappassCountPizzalinkInfoLayout.setText(userModel.getKebappassCount());
|
||||
firstnamePizzalinkInfoLayout.setText(userModel.getFirstname());
|
||||
lastnamePizzalinkInfoLayout.setText(userModel.getLastname());
|
||||
emailPizzalinkInfoLayout.setText(userModel.getEmail());
|
||||
@@ -290,8 +286,6 @@ public class ProfileFragment extends BaseFragment {
|
||||
userModel = user;
|
||||
SessionHelper.saveCustomer(userModel);
|
||||
|
||||
pizzapassCountPizzalinkInfoLayout.setText(userModel.getPizzapassCount());
|
||||
kebappassCountPizzalinkInfoLayout.setText(userModel.getKebappassCount());
|
||||
firstnamePizzalinkInfoLayout.setText(userModel.getFirstname());
|
||||
lastnamePizzalinkInfoLayout.setText(userModel.getLastname());
|
||||
emailPizzalinkInfoLayout.setText(userModel.getEmail());
|
||||
|
||||
@@ -217,7 +217,6 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
||||
params.put("payment_method_code", createOrderActivity.getSelectedPaymentMethod().getCode());
|
||||
params.put("comment", createOrderNote());
|
||||
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);
|
||||
SessionHelper.addCouponCodeToRequestParamsIfNeeded(params);
|
||||
if(dateOfOrderString != null && !dateOfOrderString.isEmpty() &&
|
||||
@@ -714,7 +713,6 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
||||
params.put("payment_method_code", createOrderActivity.getSelectedPaymentMethod().getCode());
|
||||
params.put("comment", createOrderNote());
|
||||
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);
|
||||
if(paymentMethodNonce != null){
|
||||
params.put("payment_method_nonce", paymentMethodNonce);
|
||||
|
||||
@@ -14,7 +14,6 @@ public class UserModel implements Serializable{
|
||||
@Expose @SerializedName("customer_id") private String id;
|
||||
@Expose @SerializedName("address_id") private String addressId;
|
||||
@Expose @SerializedName("pizza_pass_count") private String pizzapassCount;
|
||||
@Expose @SerializedName("kebab_pass_count") private String kebappassCount;
|
||||
private String firstname;
|
||||
private String lastname;
|
||||
private String email;
|
||||
@@ -44,9 +43,6 @@ public class UserModel implements Serializable{
|
||||
if(pizzapassCount == null)
|
||||
pizzapassCount = "0";
|
||||
|
||||
if(kebappassCount == null)
|
||||
kebappassCount = "0";
|
||||
|
||||
if(token != null)
|
||||
token.checkNull();
|
||||
}
|
||||
@@ -118,12 +114,4 @@ public class UserModel implements Serializable{
|
||||
public void setPizzapassCount(String pizzapassCount) {
|
||||
this.pizzapassCount = pizzapassCount;
|
||||
}
|
||||
|
||||
public String getKebappassCount() {
|
||||
return kebappassCount;
|
||||
}
|
||||
|
||||
public void setKebappassCount(String kebappassCount) {
|
||||
this.kebappassCount = kebappassCount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ public class CartInfoModel implements Serializable {
|
||||
private ArrayList<CartProductModel> products;
|
||||
private ArrayList<CartTotalModel> totals;
|
||||
private boolean isPizzapassCampaignUsed;
|
||||
private boolean isKebappassCampaignUsed;
|
||||
|
||||
public ArrayList<CartProductModel> getProducts() {
|
||||
return products;
|
||||
@@ -70,12 +69,4 @@ public class CartInfoModel implements Serializable {
|
||||
public void setPizzapassCampaignUsed(boolean pizzapassCampaignUsed) {
|
||||
isPizzapassCampaignUsed = pizzapassCampaignUsed;
|
||||
}
|
||||
|
||||
public boolean isKebappassCampaignUsed() {
|
||||
return isKebappassCampaignUsed;
|
||||
}
|
||||
|
||||
public void setKebappassCampaignUsed(boolean kebappassCampaignUsed) {
|
||||
isKebappassCampaignUsed = kebappassCampaignUsed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,18 +34,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
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
|
||||
android:id="@+id/personalCouponCodesTextView"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user