Merge pull request #78 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/GG_Change_Checkout_Condition
//Stock_FacingActivity Changes today
This commit is contained in:
@@ -126,7 +126,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.execSQL(TableBean.getAdditionalDisplay());
|
db.execSQL(TableBean.getAdditionalDisplay());
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Toast.makeText(context,"Error -" +e.toString(),Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, "Error -" + e.toString(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -331,7 +331,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
dbcursor = db.rawQuery("SELECT * FROM(SELECT DISTINCT BR.BRAND_ID, SCM.SUB_CATEGORY||'-'||BR.BRAND AS BRAND FROM MAPPING_STOCK MS INNER JOIN SKU_MASTER SM ON MS.SKU_ID = SM.SKU_ID INNER JOIN BRAND_MASTER BR ON SM.BRAND_ID=BR.BRAND_ID INNER JOIN SUB_CATEGORY_MASTER SCM ON BR.SUB_CATEGORY_ID = SCM.SUB_CATEGORY_ID WHERE MS.KEYACCOUNT_ID ='" + key_account_id + "' AND STORETYPE_ID ='" + store_type_id + "' AND CLASS_ID = '" + class_id + "' AND BR.COMPANY_ID ='1' AND SCM.CATEGORY_ID = '"+ category_id +"' ORDER BY SCM.SUB_CATEGORY_SEQUENCE, BR.BRAND_SEQUENCE ) As Brand", null);
|
dbcursor = db.rawQuery("SELECT * FROM(SELECT DISTINCT BR.BRAND_ID, SCM.SUB_CATEGORY||'-'||BR.BRAND AS BRAND FROM MAPPING_STOCK MS INNER JOIN SKU_MASTER SM ON MS.SKU_ID = SM.SKU_ID INNER JOIN BRAND_MASTER BR ON SM.BRAND_ID=BR.BRAND_ID INNER JOIN SUB_CATEGORY_MASTER SCM ON BR.SUB_CATEGORY_ID = SCM.SUB_CATEGORY_ID WHERE MS.KEYACCOUNT_ID ='" + key_account_id + "' AND STORETYPE_ID ='" + store_type_id + "' AND CLASS_ID = '" + class_id + "' AND BR.COMPANY_ID ='1' AND SCM.CATEGORY_ID = '" + category_id + "' ORDER BY SCM.SUB_CATEGORY_SEQUENCE, BR.BRAND_SEQUENCE ) As Brand", null);
|
||||||
if (dbcursor != null) {
|
if (dbcursor != null) {
|
||||||
|
|
||||||
dbcursor.moveToFirst();
|
dbcursor.moveToFirst();
|
||||||
@@ -3235,4 +3235,75 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
return filled;
|
return filled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMappingPromotionData() {
|
||||||
|
boolean filled = false;
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("SELECT * FROM MAPPING_PROMOTION ", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
int icount = dbcursor.getInt(0);
|
||||||
|
dbcursor.close();
|
||||||
|
if (icount > 0) {
|
||||||
|
filled = true;
|
||||||
|
} else {
|
||||||
|
filled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", " when fetching Records!!!!!!!!!!!!!!!!!!!!! " + e.toString());
|
||||||
|
return filled;
|
||||||
|
}
|
||||||
|
return filled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isMappingStockData() {
|
||||||
|
boolean filled = false;
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("SELECT * FROM MAPPING_STOCK ", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
int icount = dbcursor.getInt(0);
|
||||||
|
dbcursor.close();
|
||||||
|
if (icount > 0) {
|
||||||
|
filled = true;
|
||||||
|
} else {
|
||||||
|
filled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", " when fetching Records!!!!!!!!!!!!!!!!!!!!! " + e.toString());
|
||||||
|
return filled;
|
||||||
|
}
|
||||||
|
return filled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isMappingT2PData() {
|
||||||
|
boolean filled = false;
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("SELECT * FROM MAPPING_T2P ", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
int icount = dbcursor.getInt(0);
|
||||||
|
dbcursor.close();
|
||||||
|
if (icount > 0) {
|
||||||
|
filled = true;
|
||||||
|
} else {
|
||||||
|
filled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", " when fetching Records!!!!!!!!!!!!!!!!!!!!! " + e.toString());
|
||||||
|
return filled;
|
||||||
|
}
|
||||||
|
return filled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1148,7 +1148,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
brand_id = brandList.get(position).getBRAND_ID().get(0);
|
brand_id = brandList.get(position).getBRAND_ID().get(0);
|
||||||
brand_name = brandList.get(position).getBRAND().get(0);
|
brand_name = brandList.get(position).getBRAND().get(0);
|
||||||
|
|
||||||
sku_list = db.getSkuT2PData("1", "1", "1", brand_id);
|
sku_list = db.getSkuT2PData(store_type_id, class_id, key_account_id, brand_id);
|
||||||
SkuGetterSetter select = new SkuGetterSetter();
|
SkuGetterSetter select = new SkuGetterSetter();
|
||||||
select.setSKU(getResources().getString(R.string.select));
|
select.setSKU(getResources().getString(R.string.select));
|
||||||
sku_list.add(0, select);
|
sku_list.add(0, select);
|
||||||
|
|||||||
+77
-28
@@ -55,7 +55,7 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
|
||||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
|
|
||||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
@@ -88,46 +88,63 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
|
|
||||||
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||||
categoryList = new ArrayList<>();
|
categoryList = new ArrayList<>();
|
||||||
|
|
||||||
categoryList = db.getCategoryListData(keyAccount_id, storeType_id, class_id);
|
categoryList = db.getCategoryListData(keyAccount_id, storeType_id, class_id);
|
||||||
|
|
||||||
if(categoryList.size()>0){
|
if (categoryList.size() > 0) {
|
||||||
|
|
||||||
for(int i=0;i<categoryList.size();i++){
|
for (int i = 0; i < categoryList.size(); i++) {
|
||||||
|
|
||||||
boolean flag_filled = false;
|
boolean flag_filled = false;
|
||||||
String category_id = categoryList.get(i).getCategory_id();
|
String category_id = categoryList.get(i).getCategory_id();
|
||||||
if (db.checkMsl_AvailabilityData(store_id, category_id)
|
|
||||||
&& db.checkStockAndFacingData(store_id, category_id)
|
|
||||||
&& db.checkPromoComplianceData(store_id, category_id)
|
|
||||||
&& db.isFilledT2P(store_id, category_id)
|
|
||||||
&& db.additionalVisibilitydata(store_id, category_id)) {
|
|
||||||
|
|
||||||
flag_filled =true;
|
if (db.additionalVisibilitydata(store_id, category_id)) {
|
||||||
|
boolean flag = true;
|
||||||
|
|
||||||
|
if (db.isMappingStockData()) {
|
||||||
|
if (!db.checkMsl_AvailabilityData(store_id, category_id)
|
||||||
|
&& !db.checkStockAndFacingData(store_id, category_id)) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(flag_filled){
|
if (flag) {
|
||||||
if (category_id.equals("1")){
|
if (!db.isMappingPromotionData()) {
|
||||||
|
if (db.checkPromoComplianceData(store_id, category_id)) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flag) {
|
||||||
|
if (!db.isMappingT2PData()) {
|
||||||
|
if (db.isFilledT2P(store_id, category_id)) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
flag_filled = flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flag_filled) {
|
||||||
|
if (category_id.equals("1")) {
|
||||||
categoryList.get(i).setCategory_img(R.mipmap.nutritionals_tick);
|
categoryList.get(i).setCategory_img(R.mipmap.nutritionals_tick);
|
||||||
}
|
} else if (category_id.equals("2")) {
|
||||||
else if (category_id.equals("2")){
|
|
||||||
categoryList.get(i).setCategory_img(R.mipmap.oralcare_tick);
|
categoryList.get(i).setCategory_img(R.mipmap.oralcare_tick);
|
||||||
}else if (category_id.equals("3")){
|
} else if (category_id.equals("3")) {
|
||||||
categoryList.get(i).setCategory_img(R.mipmap.wellness_tick);
|
categoryList.get(i).setCategory_img(R.mipmap.wellness_tick);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
if (category_id.equals("1")) {
|
||||||
if (category_id.equals("1")){
|
|
||||||
categoryList.get(i).setCategory_img(R.mipmap.nutritionals);
|
categoryList.get(i).setCategory_img(R.mipmap.nutritionals);
|
||||||
}
|
} else if (category_id.equals("2")) {
|
||||||
else if (category_id.equals("2")){
|
|
||||||
categoryList.get(i).setCategory_img(R.mipmap.oral_care);
|
categoryList.get(i).setCategory_img(R.mipmap.oral_care);
|
||||||
}else if (category_id.equals("3")){
|
} else if (category_id.equals("3")) {
|
||||||
categoryList.get(i).setCategory_img(R.mipmap.wellness);
|
categoryList.get(i).setCategory_img(R.mipmap.wellness);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -227,15 +244,13 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private static boolean updateResources(Context context, String language) {
|
private static boolean updateResources(Context context, String language) {
|
||||||
|
|
||||||
String lang ;
|
String lang;
|
||||||
|
|
||||||
if(language.equalsIgnoreCase("English")){
|
if (language.equalsIgnoreCase("English")) {
|
||||||
lang = "EN";
|
lang = "EN";
|
||||||
}
|
} else if (language.equalsIgnoreCase("UAE")) {
|
||||||
else if(language.equalsIgnoreCase("UAE")) {
|
|
||||||
lang = "AR";
|
lang = "AR";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
lang = "TR";
|
lang = "TR";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,12 +274,46 @@ public class CategoryListActivity extends AppCompatActivity {
|
|||||||
for (int i = 0; i < categoryList.size(); i++) {
|
for (int i = 0; i < categoryList.size(); i++) {
|
||||||
String category_id = categoryList.get(i).getCategory_id();
|
String category_id = categoryList.get(i).getCategory_id();
|
||||||
|
|
||||||
if (db.checkMsl_AvailabilityData(store_id, category_id)
|
/* if (db.checkMsl_AvailabilityData(store_id, category_id)
|
||||||
&& db.checkStockAndFacingData(store_id, category_id)
|
&& db.checkStockAndFacingData(store_id, category_id)
|
||||||
&& db.checkPromoComplianceData(store_id, category_id)
|
&& db.checkPromoComplianceData(store_id, category_id)
|
||||||
&& db.isFilledT2P(store_id, category_id)
|
&& db.isFilledT2P(store_id, category_id)
|
||||||
&& db.additionalVisibilitydata(store_id, category_id)) {
|
&& db.additionalVisibilitydata(store_id, category_id)) {
|
||||||
|
|
||||||
|
flag_filled = true;
|
||||||
|
} else {
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
if (db.additionalVisibilitydata(store_id, category_id)) {
|
||||||
|
//boolean flag = true;
|
||||||
|
|
||||||
|
if (db.isMappingStockData()) {
|
||||||
|
if (!db.checkMsl_AvailabilityData(store_id, category_id)
|
||||||
|
&& !db.checkStockAndFacingData(store_id, category_id)) {
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!db.isMappingPromotionData()) {
|
||||||
|
if (db.checkPromoComplianceData(store_id, category_id)) {
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!db.isMappingT2PData()) {
|
||||||
|
if (db.isFilledT2P(store_id, category_id)) {
|
||||||
|
flag_filled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
flag_filled = true;
|
flag_filled = true;
|
||||||
} else {
|
} else {
|
||||||
flag_filled = false;
|
flag_filled = false;
|
||||||
|
|||||||
+59
-12
@@ -60,7 +60,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
//preference data
|
//preference data
|
||||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
|
||||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
|
|
||||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
@@ -98,7 +98,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
categoryList = new ArrayList<>();
|
categoryList = new ArrayList<>();
|
||||||
@@ -106,32 +106,44 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
DailyDataMenuGetterSetter data = new DailyDataMenuGetterSetter();
|
DailyDataMenuGetterSetter data = new DailyDataMenuGetterSetter();
|
||||||
//data.setCategory_name("MSL Availability");
|
//data.setCategory_name("MSL Availability");
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_msl_availability));
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_msl_availability));
|
||||||
|
if (db.isMappingStockData()) {
|
||||||
if (db.checkMsl_AvailabilityData(store_id, categoryId)) {
|
if (db.checkMsl_AvailabilityData(store_id, categoryId)) {
|
||||||
data.setCategory_img(R.mipmap.msl_availability_done);
|
data.setCategory_img(R.mipmap.msl_availability_done);
|
||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.msl_availability);
|
data.setCategory_img(R.mipmap.msl_availability);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.msl_availability_grey);
|
||||||
|
}
|
||||||
categoryList.add(data);
|
categoryList.add(data);
|
||||||
|
|
||||||
data = new DailyDataMenuGetterSetter();
|
data = new DailyDataMenuGetterSetter();
|
||||||
//data.setCategory_name("Stock & Facing");
|
//data.setCategory_name("Stock & Facing");
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_stock_facing));
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_stock_facing));
|
||||||
|
if (db.isMappingStockData()) {
|
||||||
if (db.checkStockAndFacingData(store_id, categoryId)) {
|
if (db.checkStockAndFacingData(store_id, categoryId)) {
|
||||||
data.setCategory_img(R.mipmap.stock_facing_done);
|
data.setCategory_img(R.mipmap.stock_facing_done);
|
||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.stock_facing);
|
data.setCategory_img(R.mipmap.stock_facing);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.stockandfacing_grey);
|
||||||
|
}
|
||||||
categoryList.add(data);
|
categoryList.add(data);
|
||||||
|
|
||||||
//T2p
|
//T2p
|
||||||
data = new DailyDataMenuGetterSetter();
|
data = new DailyDataMenuGetterSetter();
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_t2p));
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_t2p));
|
||||||
|
|
||||||
|
if (db.isMappingT2PData()) {
|
||||||
if (db.isFilledT2P(store_id, categoryId)) {
|
if (db.isFilledT2P(store_id, categoryId)) {
|
||||||
data.setCategory_img(R.mipmap.t2p_compliance_done);
|
data.setCategory_img(R.mipmap.t2p_compliance_done);
|
||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.t2p_compliance);
|
data.setCategory_img(R.mipmap.t2p_compliance);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.t2pcompliance_grey);
|
||||||
|
}
|
||||||
|
|
||||||
categoryList.add(data);
|
categoryList.add(data);
|
||||||
//T2p added
|
//T2p added
|
||||||
@@ -150,11 +162,16 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
data = new DailyDataMenuGetterSetter();
|
data = new DailyDataMenuGetterSetter();
|
||||||
//data.setCategory_name("Promo Compliance");
|
//data.setCategory_name("Promo Compliance");
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_promo_compliance));
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_promo_compliance));
|
||||||
|
|
||||||
|
if (db.isMappingPromotionData()) {
|
||||||
if (db.checkPromoComplianceData(store_id, categoryId)) {
|
if (db.checkPromoComplianceData(store_id, categoryId)) {
|
||||||
data.setCategory_img(R.mipmap.promo_compliance_done);
|
data.setCategory_img(R.mipmap.promo_compliance_done);
|
||||||
} else {
|
} else {
|
||||||
data.setCategory_img(R.mipmap.promo_compliance);
|
data.setCategory_img(R.mipmap.promo_compliance);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.promocompliance_grey);
|
||||||
|
}
|
||||||
categoryList.add(data);
|
categoryList.add(data);
|
||||||
|
|
||||||
/*data = new DailyDataMenuGetterSetter();
|
/*data = new DailyDataMenuGetterSetter();
|
||||||
@@ -223,40 +240,72 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(DailyDataMenuAdapter.MyViewHolder holder, int position) {
|
public void onBindViewHolder(final DailyDataMenuAdapter.MyViewHolder holder, int position) {
|
||||||
final DailyDataMenuGetterSetter dailyData = list.get(position);
|
final DailyDataMenuGetterSetter dailyData = list.get(position);
|
||||||
|
|
||||||
holder.categoryName.setText(dailyData.getCategory_name());
|
holder.categoryName.setText(dailyData.getCategory_name());
|
||||||
holder.categoryIcon.setImageResource(dailyData.getCategory_img());
|
holder.categoryIcon.setImageResource(dailyData.getCategory_img());
|
||||||
|
|
||||||
|
if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_msl_availability))) {
|
||||||
|
if (db.isMappingStockData()) {
|
||||||
|
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
|
} else {
|
||||||
|
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
||||||
|
}
|
||||||
|
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_stock_facing))) {
|
||||||
|
if (db.isMappingStockData()) {
|
||||||
|
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
|
} else {
|
||||||
|
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
||||||
|
}
|
||||||
|
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_promo_compliance))) {
|
||||||
|
if (db.isMappingPromotionData()) {
|
||||||
|
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
|
} else {
|
||||||
|
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
||||||
|
}
|
||||||
|
} else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_t2p)))) {
|
||||||
|
if (db.isMappingT2PData()) {
|
||||||
|
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
|
} else {
|
||||||
|
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
holder.lay_menu.setOnClickListener(new View.OnClickListener() {
|
holder.lay_menu.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_msl_availability))) {
|
if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_msl_availability))) {
|
||||||
|
if (db.isMappingStockData()) {
|
||||||
Intent intent = new Intent(DailyDataMenuActivity.this, MSL_AvailabilityActivity.class);
|
Intent intent = new Intent(DailyDataMenuActivity.this, MSL_AvailabilityActivity.class);
|
||||||
intent.putExtra("categoryName", dailyData.getCategory_name());
|
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||||
intent.putExtra("categoryId", categoryId);
|
intent.putExtra("categoryId", categoryId);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
}
|
||||||
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_stock_facing))) {
|
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_stock_facing))) {
|
||||||
|
if (db.isMappingStockData()) {
|
||||||
Intent intent = new Intent(DailyDataMenuActivity.this, Stock_FacingActivity.class);
|
Intent intent = new Intent(DailyDataMenuActivity.this, Stock_FacingActivity.class);
|
||||||
intent.putExtra("categoryName", dailyData.getCategory_name());
|
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||||
intent.putExtra("categoryId", categoryId);
|
intent.putExtra("categoryId", categoryId);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
}
|
||||||
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_promo_compliance))) {
|
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_promo_compliance))) {
|
||||||
|
|
||||||
|
if (db.isMappingPromotionData()) {
|
||||||
Intent intent = new Intent(DailyDataMenuActivity.this, PromoComplianceActivity.class);
|
Intent intent = new Intent(DailyDataMenuActivity.this, PromoComplianceActivity.class);
|
||||||
intent.putExtra("categoryName", dailyData.getCategory_name());
|
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||||
intent.putExtra("categoryId", categoryId);
|
intent.putExtra("categoryId", categoryId);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
}
|
||||||
} else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_t2p)))) {
|
} else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_t2p)))) {
|
||||||
|
if (db.isMappingT2PData()) {
|
||||||
Intent intent = new Intent(DailyDataMenuActivity.this, T2PComplianceActivity.class);
|
Intent intent = new Intent(DailyDataMenuActivity.this, T2PComplianceActivity.class);
|
||||||
intent.putExtra("categoryName", dailyData.getCategory_name());
|
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||||
intent.putExtra("categoryId", categoryId);
|
intent.putExtra("categoryId", categoryId);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.title_activity_Additional_visibility)))) {
|
||||||
else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.title_activity_Additional_visibility)))) {
|
|
||||||
Intent intent = new Intent(DailyDataMenuActivity.this, AdditionalVisibility.class);
|
Intent intent = new Intent(DailyDataMenuActivity.this, AdditionalVisibility.class);
|
||||||
intent.putExtra("categoryName", dailyData.getCategory_name());
|
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||||
intent.putExtra("categoryId", categoryId);
|
intent.putExtra("categoryId", categoryId);
|
||||||
@@ -291,15 +340,13 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private static boolean updateResources(Context context, String language) {
|
private static boolean updateResources(Context context, String language) {
|
||||||
|
|
||||||
String lang ;
|
String lang;
|
||||||
|
|
||||||
if(language.equalsIgnoreCase("English")){
|
if (language.equalsIgnoreCase("English")) {
|
||||||
lang = "EN";
|
lang = "EN";
|
||||||
}
|
} else if (language.equalsIgnoreCase("UAE")) {
|
||||||
else if(language.equalsIgnoreCase("UAE")) {
|
|
||||||
lang = "AR";
|
lang = "AR";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
lang = "TR";
|
lang = "TR";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:weightSum="1">
|
android:weightSum="1">
|
||||||
|
|
||||||
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
<android.support.v7.widget.CardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:text="Category List"
|
android:text="Category List"
|
||||||
android:textAppearance="?android:textAppearanceSmall"
|
android:textAppearance="?android:textAppearanceSmall"
|
||||||
android:textColor="#f2711f"
|
android:textColor="@color/colorPrimaryDark"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
Reference in New Issue
Block a user