Merge pull request #95 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/GG_CheckOut_Button_Turkish
//Stock_FacingActivity Changes today
This commit is contained in:
@@ -65,6 +65,7 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
FloatingActionButton fab;
|
FloatingActionButton fab;
|
||||||
String storeid;
|
String storeid;
|
||||||
Toolbar toolbar;
|
Toolbar toolbar;
|
||||||
|
String language;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -80,6 +81,7 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
visit_status = preferences.getString(CommonString.KEY_STOREVISITED_STATUS, "");
|
visit_status = preferences.getString(CommonString.KEY_STOREVISITED_STATUS, "");
|
||||||
|
language = preferences.getString(CommonString.KEY_LANGUAGE, "");
|
||||||
db = new GSKOrangeDB(StoreListActivity.this);
|
db = new GSKOrangeDB(StoreListActivity.this);
|
||||||
db.open();
|
db.open();
|
||||||
|
|
||||||
@@ -185,6 +187,12 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
final StoreBean current = data.get(position);
|
final StoreBean current = data.get(position);
|
||||||
|
|
||||||
|
if (language.equalsIgnoreCase("TURKISH")) {
|
||||||
|
viewHolder.chkbtn.setBackgroundResource(R.mipmap.checkout_turkish);
|
||||||
|
} else {
|
||||||
|
viewHolder.chkbtn.setBackgroundResource(R.mipmap.checkout);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
storeid = current.getSTORE_ID();
|
storeid = current.getSTORE_ID();
|
||||||
//viewHolder.txt.setText(current.txt);
|
//viewHolder.txt.setText(current.txt);
|
||||||
@@ -220,15 +228,11 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||||
}
|
} else if (checkleavestatus(storeid)) {
|
||||||
else if (checkleavestatus(storeid))
|
|
||||||
{
|
|
||||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||||
}
|
} else if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_INVALID)) {
|
||||||
|
|
||||||
else if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_INVALID)) {
|
|
||||||
|
|
||||||
if (coverage.size() > 0) {
|
if (coverage.size() > 0) {
|
||||||
|
|
||||||
@@ -284,19 +288,14 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
Snackbar.make(v, R.string.title_store_list_activity_store_again_uploaded, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
Snackbar.make(v, R.string.title_store_list_activity_store_again_uploaded, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_L)) {
|
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_L)) {
|
||||||
Snackbar.make(v, R.string.title_store_list_activity_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
Snackbar.make(v, R.string.title_store_list_activity_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||||
}
|
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)) {
|
||||||
else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)) {
|
|
||||||
Snackbar.make(v, R.string.title_store_list_activity_already_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
Snackbar.make(v, R.string.title_store_list_activity_already_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||||
}
|
} else if (checkleavestatus(store_id)) {
|
||||||
else if (checkleavestatus(store_id)) {
|
|
||||||
|
|
||||||
Snackbar.make(v, R.string.title_store_list_activity_already_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
Snackbar.make(v, R.string.title_store_list_activity_already_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||||
|
|
||||||
|
|
||||||
}
|
} else {
|
||||||
|
|
||||||
|
|
||||||
else {
|
|
||||||
|
|
||||||
// PUT IN PREFERENCES
|
// PUT IN PREFERENCES
|
||||||
editor = preferences.edit();
|
editor = preferences.edit();
|
||||||
@@ -390,6 +389,7 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean CheckNetAvailability() {
|
public boolean CheckNetAvailability() {
|
||||||
|
|
||||||
boolean connected = false;
|
boolean connected = false;
|
||||||
@@ -403,6 +403,7 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
return connected;
|
return connected;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
return data.size();
|
return data.size();
|
||||||
@@ -545,11 +546,9 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
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";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -578,8 +577,7 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
public boolean checkleavestatus(String store_cd) {
|
public boolean checkleavestatus(String store_cd) {
|
||||||
|
|
||||||
if(coverage.size()>0)
|
if (coverage.size() > 0) {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < coverage.size(); i++) {
|
for (int i = 0; i < coverage.size(); i++) {
|
||||||
@@ -599,9 +597,6 @@ public class StoreListActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Reference in New Issue
Block a user