service base url changed, test codes removed for umimplemented services, category id changed to string
This commit is contained in:
@@ -72,7 +72,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
private FragmentManager fragmentManager;
|
private FragmentManager fragmentManager;
|
||||||
private String currentFragmentName = "";
|
private String currentFragmentName = "";
|
||||||
private int currentCategoryId = -1;
|
private String currentCategoryId = "";
|
||||||
private boolean isStartWithOrderHistory, isStartWithCart;
|
private boolean isStartWithOrderHistory, isStartWithCart;
|
||||||
private ArrayList<CategoryModel> categoryList = new ArrayList<>();
|
private ArrayList<CategoryModel> categoryList = new ArrayList<>();
|
||||||
private NavigationMenuRecyclerAdapter navigationMenuRecyclerAdapter;
|
private NavigationMenuRecyclerAdapter navigationMenuRecyclerAdapter;
|
||||||
@@ -226,7 +226,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
fragmentManager.beginTransaction().replace(R.id.fragmentContainer, CartFragment.newInstance()).commit();
|
fragmentManager.beginTransaction().replace(R.id.fragmentContainer, CartFragment.newInstance()).commit();
|
||||||
currentFragmentName = CartFragment.FRAGMENT_NAME;
|
currentFragmentName = CartFragment.FRAGMENT_NAME;
|
||||||
|
|
||||||
currentCategoryId = -1;
|
currentCategoryId = "";
|
||||||
|
|
||||||
cartTotalRelativeLayout.setVisibility(View.GONE);
|
cartTotalRelativeLayout.setVisibility(View.GONE);
|
||||||
shoppingCartImageView.setImageDrawable(yellowCartDrawable);
|
shoppingCartImageView.setImageDrawable(yellowCartDrawable);
|
||||||
@@ -244,7 +244,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
fragmentManager.beginTransaction().replace(R.id.fragmentContainer, OrderHistoryFragment.newInstance()).commit();
|
fragmentManager.beginTransaction().replace(R.id.fragmentContainer, OrderHistoryFragment.newInstance()).commit();
|
||||||
currentFragmentName = OrderHistoryFragment.FRAGMENT_NAME;
|
currentFragmentName = OrderHistoryFragment.FRAGMENT_NAME;
|
||||||
|
|
||||||
currentCategoryId = -1;
|
currentCategoryId = "";
|
||||||
|
|
||||||
cartTotalRelativeLayout.setVisibility(View.GONE);
|
cartTotalRelativeLayout.setVisibility(View.GONE);
|
||||||
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
||||||
@@ -262,7 +262,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
fragmentManager.beginTransaction().replace(R.id.fragmentContainer, ProfileFragment.newInstance()).commit();
|
fragmentManager.beginTransaction().replace(R.id.fragmentContainer, ProfileFragment.newInstance()).commit();
|
||||||
currentFragmentName = ProfileFragment.FRAGMENT_NAME;
|
currentFragmentName = ProfileFragment.FRAGMENT_NAME;
|
||||||
|
|
||||||
currentCategoryId = -1;
|
currentCategoryId = "";
|
||||||
|
|
||||||
cartTotalRelativeLayout.setVisibility(View.GONE);
|
cartTotalRelativeLayout.setVisibility(View.GONE);
|
||||||
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
||||||
@@ -276,7 +276,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
fragmentManager.beginTransaction().replace(R.id.fragmentContainer, StoreInfoFragment.newInstance()).commit();
|
fragmentManager.beginTransaction().replace(R.id.fragmentContainer, StoreInfoFragment.newInstance()).commit();
|
||||||
currentFragmentName = StoreInfoFragment.FRAGMENT_NAME;
|
currentFragmentName = StoreInfoFragment.FRAGMENT_NAME;
|
||||||
|
|
||||||
currentCategoryId = -1;
|
currentCategoryId = "";
|
||||||
|
|
||||||
cartTotalRelativeLayout.setVisibility(View.GONE);
|
cartTotalRelativeLayout.setVisibility(View.GONE);
|
||||||
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
||||||
@@ -435,7 +435,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
|
|
||||||
private void openProductsScreen(CategoryModel clickedCategoryModel){
|
private void openProductsScreen(CategoryModel clickedCategoryModel){
|
||||||
|
|
||||||
if(clickedCategoryModel.getId() == ApiConstants.PRODUCT_ID_VERSION_MENU){
|
if(clickedCategoryModel.getId().equals(ApiConstants.PRODUCT_ID_VERSION_MENU)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,6 @@ public class SplashActivity extends BaseActivity {
|
|||||||
else {
|
else {
|
||||||
DialogHelper.hideLoadingDialog();
|
DialogHelper.hideLoadingDialog();
|
||||||
ApiErrorUtils.parseError(response);
|
ApiErrorUtils.parseError(response);
|
||||||
getStoreList();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +128,6 @@ public class SplashActivity extends BaseActivity {
|
|||||||
public void onFailure(Call<ResponseObject<String>> call, Throwable t) {
|
public void onFailure(Call<ResponseObject<String>> call, Throwable t) {
|
||||||
DialogHelper.hideLoadingDialog();
|
DialogHelper.hideLoadingDialog();
|
||||||
DialogHelper.showFailedDialog();
|
DialogHelper.showFailedDialog();
|
||||||
getStoreList();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -268,7 +266,6 @@ public class SplashActivity extends BaseActivity {
|
|||||||
else{
|
else{
|
||||||
DialogHelper.hideLoadingDialog();
|
DialogHelper.hideLoadingDialog();
|
||||||
ApiErrorUtils.parseError(response);
|
ApiErrorUtils.parseError(response);
|
||||||
getCategoryList();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -276,7 +273,6 @@ public class SplashActivity extends BaseActivity {
|
|||||||
public void onFailure(Call<ResponseObject<WelcomeMessageModel>> call, Throwable t) {
|
public void onFailure(Call<ResponseObject<WelcomeMessageModel>> call, Throwable t) {
|
||||||
DialogHelper.hideLoadingDialog();
|
DialogHelper.hideLoadingDialog();
|
||||||
DialogHelper.showFailedDialog();
|
DialogHelper.showFailedDialog();
|
||||||
getCategoryList();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,15 +3,14 @@ package ch.pizzalemon.android.api;
|
|||||||
public class ApiConstants {
|
public class ApiConstants {
|
||||||
public static final int API_READ_TIMEOUT = 30;
|
public static final int API_READ_TIMEOUT = 30;
|
||||||
public static final int API_CONNECT_TIMEOUT = 10;
|
public static final int API_CONNECT_TIMEOUT = 10;
|
||||||
public static final String API_PATH = "https://pizzalemon.ch/";
|
public static final String API_PATH = "http://172.104.247.141/";
|
||||||
//public static final String API_PATH = "https://cucinaexpress.ch/";
|
|
||||||
public static final String APP_TYPE_ID_ANDROID = "2";
|
public static final String APP_TYPE_ID_ANDROID = "2";
|
||||||
public static final int APP_ERROR_CODE_AUTHORIZATION = 1;
|
public static final int APP_ERROR_CODE_AUTHORIZATION = 1;
|
||||||
|
|
||||||
public static final int PRODUCT_ID_WUNSCHPIZZA = 56;
|
public static final int PRODUCT_ID_WUNSCHPIZZA = 56;
|
||||||
public static final int PRODUCT_ID_ABEND_MENU = 733;
|
public static final int PRODUCT_ID_ABEND_MENU = 733;
|
||||||
public static final int PRODUCT_ID_MITTAGS_MENU = 732;
|
public static final int PRODUCT_ID_MITTAGS_MENU = 732;
|
||||||
public static final int PRODUCT_ID_VERSION_MENU = -111;
|
public static final String PRODUCT_ID_VERSION_MENU = "-111";
|
||||||
|
|
||||||
public static final String CAMPAIGN_CODE_PIZZA_PROMOTION = "PIZZAPROMOTION";
|
public static final String CAMPAIGN_CODE_PIZZA_PROMOTION = "PIZZAPROMOTION";
|
||||||
|
|
||||||
@@ -44,10 +43,10 @@ public class ApiConstants {
|
|||||||
public static final String ONESIGNAL_NOTIFICATION_TAG_KEY = "notificationAllowed";
|
public static final String ONESIGNAL_NOTIFICATION_TAG_KEY = "notificationAllowed";
|
||||||
public static final String ONESIGNAL_NOTIFICATION_TAG_VALUE = "true";
|
public static final String ONESIGNAL_NOTIFICATION_TAG_VALUE = "true";
|
||||||
|
|
||||||
public static final String PAYMENT_WEBVIEW_URL_POSTFINANCE_TWINT = "https://pizzalemon.ch/lemon/index.php?route=mobile/service/postFinancePayment&order_id=";
|
public static final String PAYMENT_WEBVIEW_URL_POSTFINANCE_TWINT = "http://172.104.247.141/lemon/index.php?route=mobile/service/postFinancePayment&order_id=";
|
||||||
public static final String PAYMENT_WEBVIEW_REDIRECT_URL_POSTFINANCE_TWINT_SUCCESS = "postFinancePaymentIsSuccess";
|
public static final String PAYMENT_WEBVIEW_REDIRECT_URL_POSTFINANCE_TWINT_SUCCESS = "postFinancePaymentIsSuccess";
|
||||||
public static final String PAYMENT_WEBVIEW_REDIRECT_URL_POSTFINANCE_TWINT_FAIL = "postFinancePaymentIsFailed";
|
public static final String PAYMENT_WEBVIEW_REDIRECT_URL_POSTFINANCE_TWINT_FAIL = "postFinancePaymentIsFailed";
|
||||||
public static final String PAYMENT_WEBVIEW_MAIN_PAGE_HTTP = "https://pizzalemon.ch/";
|
public static final String PAYMENT_WEBVIEW_MAIN_PAGE_HTTP = "http://172.104.247.141/";
|
||||||
public static final String PAYMENT_WEBVIEW_MAIN_PAGE_HTTPS = "https://pizzalemon.ch/";
|
public static final String PAYMENT_WEBVIEW_MAIN_PAGE_HTTPS = "https://172.104.247.141/";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class CategoryModel implements Serializable{
|
|||||||
|
|
||||||
@Expose
|
@Expose
|
||||||
@SerializedName("category_id")
|
@SerializedName("category_id")
|
||||||
private int id;
|
private String id;
|
||||||
|
|
||||||
@Expose
|
@Expose
|
||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
@@ -67,11 +67,11 @@ public class CategoryModel implements Serializable{
|
|||||||
return String.valueOf(id);
|
return String.valueOf(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getId() {
|
public String getId() {
|
||||||
return id;
|
return id != null ? id : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(int id) {
|
public void setId(String id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user