YSY commit

This commit is contained in:
yadavendras
2019-03-08 21:12:55 +05:30
parent 97d30b2f5b
commit 5b7dd648b7
24 changed files with 443 additions and 115 deletions
+6 -7
View File
@@ -25,21 +25,20 @@ android {
versionName "3.4"*/
//For UAE
/*versionCode 18
versionName "3.0"*/
versionCode 19
versionName "3.1"
//For Turkey
/*versionCode 21
versionName "3.3"*/
//For KSA
/*versionCode 22
versionName "3.4"*/
/*versionCode 23
versionName "3.5"*/
//For SA
versionCode 22
versionName "3.4"
/*versionCode 22
versionName "3.4"*/
multiDexEnabled true
@@ -732,7 +732,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
}
public void updateStatus(String id, String status, double lat, double longtitude) {
public void updateStatus(String id, String status, double lat, double longtitude, String table_name) {
ContentValues values = new ContentValues();
@@ -740,7 +740,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
values.put("GEO_TAG", status);
db.update(CommonString.KEY_JOURNEY_PLAN, values, CommonString.KEY_STORE_ID + "='" + id + "'", null);
db.update(table_name, values, CommonString.KEY_STORE_ID + "='" + id + "'", null);
} catch (Exception ex) {
@@ -834,7 +834,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
values.put("GEO_TAG", status);
db.update(CommonString.KEY_JOURNEY_PLAN, values,
db.update(table_name, values,
CommonString.KEY_STORE_ID + "='" + id + "'", null);
} catch (Exception ex) {
@@ -6056,13 +6056,20 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
}
//Sub Category wise POG
public ArrayList<POGGetterSetter> getPOGSubCategoryWise(String sub_category_id, String pog_type_id, String store_type_id) {
public ArrayList<POGGetterSetter> getPOGSubCategoryWise(String sub_category_id, String pog_type_id, String store_type_id, String planogramType) {
Cursor cursordata = null;
ArrayList<POGGetterSetter> pogData = new ArrayList<>();
try {
if(planogramType==null){
cursordata = db.rawQuery("Select DISTINCT QUESTION , QUESTION_ID, QTYPE from POG_QUESTION_NEW " + "where SUB_CATEGORY_ID ='" + sub_category_id + "'AND POG_TYPE_ID='" + pog_type_id +"' " +
"AND STORETYPE_ID='"+ store_type_id +"'", null);
}
else {
cursordata = db.rawQuery("Select DISTINCT QUESTION , QUESTION_ID, QTYPE from POG_QUESTION_NEW " + "where SUB_CATEGORY_ID ='" + sub_category_id + "'AND POG_TYPE_ID='" + pog_type_id +"' " +
"AND STORETYPE_ID='"+ store_type_id +"'AND QTYPE='"+ planogramType +"'", null);
}
cursordata = db.rawQuery("Select DISTINCT QUESTION , QUESTION_ID, QTYPE from POG_QUESTION_NEW " + "where SUB_CATEGORY_ID ='" + sub_category_id + "'AND POG_TYPE_ID='" + pog_type_id +"' AND STORETYPE_ID='"+ store_type_id +"'", null);
if (cursordata != null) {
cursordata.moveToFirst();
@@ -6160,7 +6167,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
}
public ArrayList<MSL_AvailabilityStockFacingGetterSetter> getSubCategoryMasterForPOG(
String category_id, String store_type_id, String pog_type_id) {
String category_id, String store_type_id, String pog_type_id, String planogramType) {
ArrayList<MSL_AvailabilityStockFacingGetterSetter> list = new ArrayList<>();
Cursor dbcursor = null;
@@ -6168,8 +6175,15 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
try {
//dbcursor = db.rawQuery("SELECT DISTINCT SM.SUB_CATEGORY_ID,SM.SUB_CATEGORY FROM SUB_CATEGORY_MASTER SM INNER JOIN POG_QUESTION PG ON SM.SUB_CATEGORY_ID = PG.SUB_CATEGORY_ID WHERE CATEGORY_ID = '" + category_id + "'", null);
dbcursor = db.rawQuery("SELECT DISTINCT SM.SUB_CATEGORY_ID,SM.SUB_CATEGORY FROM SUB_CATEGORY_MASTER SM INNER JOIN POG_QUESTION_NEW PG ON SM.SUB_CATEGORY_ID = PG.SUB_CATEGORY_ID " +
"WHERE CATEGORY_ID = '" + category_id + "' AND POG_TYPE_ID='" + pog_type_id +"' AND STORETYPE_ID='"+ store_type_id +"'", null);
if(planogramType==null){
dbcursor = db.rawQuery("SELECT DISTINCT SM.SUB_CATEGORY_ID,SM.SUB_CATEGORY FROM SUB_CATEGORY_MASTER SM INNER JOIN POG_QUESTION_NEW PG ON SM.SUB_CATEGORY_ID = PG.SUB_CATEGORY_ID " +
"WHERE CATEGORY_ID = '" + category_id + "' AND POG_TYPE_ID='" + pog_type_id +"' AND STORETYPE_ID='"+ store_type_id +"'", null);
}
else {
dbcursor = db.rawQuery("SELECT DISTINCT SM.SUB_CATEGORY_ID,SM.SUB_CATEGORY FROM SUB_CATEGORY_MASTER SM INNER JOIN POG_QUESTION_NEW PG ON SM.SUB_CATEGORY_ID = PG.SUB_CATEGORY_ID " +
"WHERE CATEGORY_ID = '" + category_id + "' AND POG_TYPE_ID='" + pog_type_id +"' AND STORETYPE_ID='"+ store_type_id +"' AND QTYPE='"+ planogramType +"'", null);
}
if (dbcursor != null) {
dbcursor.moveToFirst();
@@ -6240,6 +6254,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
sb.setQUESTION_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("QUESTION_ID")));
sb.setQUESTION(dbcursor.getString(dbcursor.getColumnIndexOrThrow("QUESTION")));
sb.setANSWER_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("ANSWER_ID")));
sb.setQTYPE(dbcursor.getString(dbcursor.getColumnIndexOrThrow("QTYPE")));
list.add(sb);
dbcursor.moveToNext();
@@ -6376,6 +6391,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
values.put("VISIT_ORDER", data.getVISIT_ORDER().get(i));
values.put("LATITUDE", data.getLATITUDE().get(i));
values.put("LONGITUDE", data.getLONGITUDE().get(i));
values.put("POG_TYPE_ID", data.getPOG_TYPE_ID().get(i));
db.insert("ADHOC_JOURNEYPLAN", null, values);
@@ -7333,4 +7349,36 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
Log.d("Exception ", " in "+ CommonString.TABLE_IS_ADHOC_SAVED + ex.toString());
}
}
public ArrayList<String> getPogType(
String category_id, String store_type_id, String pog_type_id) {
ArrayList<String> list = new ArrayList<>();
Cursor dbcursor = null;
try {
//dbcursor = db.rawQuery("SELECT DISTINCT SM.SUB_CATEGORY_ID,SM.SUB_CATEGORY FROM SUB_CATEGORY_MASTER SM INNER JOIN POG_QUESTION PG ON SM.SUB_CATEGORY_ID = PG.SUB_CATEGORY_ID WHERE CATEGORY_ID = '" + category_id + "'", null);
dbcursor = db.rawQuery("SELECT DISTINCT PG.QTYPE FROM SUB_CATEGORY_MASTER SM INNER JOIN POG_QUESTION_NEW PG ON SM.SUB_CATEGORY_ID = PG.SUB_CATEGORY_ID " +
"WHERE CATEGORY_ID = '" + category_id + "' AND POG_TYPE_ID='" + pog_type_id +"' AND STORETYPE_ID='"+ store_type_id +"'", null);
if (dbcursor != null) {
dbcursor.moveToFirst();
while (!dbcursor.isAfterLast()) {
String qType;
qType = dbcursor.getString(dbcursor.getColumnIndexOrThrow("QTYPE"));
list.add(qType);
dbcursor.moveToNext();
}
dbcursor.close();
return list;
}
} catch (Exception e) {
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
return list;
}
return list;
}
}
@@ -147,7 +147,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
username = preferences.getString(CommonString.KEY_USERNAME, null);
//storeid = preferences.getString(CommonString.KEY_STORE_ID, null);
//storename = preferences.getString(CommonString.KEY_STORE_NAME, null);
visitData = preferences.getString(CommonString.KEY_VISIT_DATE, null);
visitData = preferences.getString(CommonString.KEY_DATE, null);
store_flag_str = getIntent().getStringExtra(CommonString.KEY_STORE_FLAG);
storeid = getIntent().getStringExtra(CommonString.KEY_STORE_ID);
@@ -238,7 +238,12 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
public void onClick(View view) {
if (!img_str.equalsIgnoreCase("")) {
status = "Y";
db.updateStatus(storeid, status, latitude, longitude);
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
db.updateStatus(storeid, status, latitude, longitude, CommonString.KEY_ADHOC_JOURNEY_PLAN);
}
else {
db.updateStatus(storeid, status, latitude, longitude, CommonString.KEY_JOURNEY_PLAN);
}
db.InsertSTOREgeotag(storeid, latitude, longitude, img_str, status);
img_str = "";
@@ -721,10 +726,10 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
db.updateGeoTagData(geotaglist.get(i).storeid, statusD);
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
db.updateDataStatus(geotaglistImage.get(i).getStoreid(), statusD, CommonString.KEY_ADHOC_JOURNEY_PLAN);
db.updateDataStatus(geotaglist.get(i).getStoreid(), statusD, CommonString.KEY_ADHOC_JOURNEY_PLAN);
}
else {
db.updateDataStatus(geotaglistImage.get(i).getStoreid(), statusD, CommonString.KEY_JOURNEY_PLAN);
db.updateDataStatus(geotaglist.get(i).getStoreid(), statusD, CommonString.KEY_JOURNEY_PLAN);
}
}
@@ -782,6 +787,8 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
Intent intent = new Intent(
GeoTagActivity.this,
StoreimageActivity.class);
intent.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
intent.putExtra(CommonString.KEY_STORE_ID, storeid);
startActivity(intent);
@@ -949,6 +956,8 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
Intent intent = new Intent(
GeoTagActivity.this,
StoreimageActivity.class);
intent.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
intent.putExtra(CommonString.KEY_STORE_ID, storeid);
startActivity(intent);
@@ -1002,6 +1011,8 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
Intent intent = new Intent(
GeoTagActivity.this,
StoreimageActivity.class);
intent.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
intent.putExtra(CommonString.KEY_STORE_ID, storeid);
startActivity(intent);
@@ -1021,6 +1032,8 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
Intent intent = new Intent(
GeoTagActivity.this,
StoreimageActivity.class);
intent.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
intent.putExtra(CommonString.KEY_STORE_ID, storeid);
startActivity(intent);
@@ -197,8 +197,8 @@ public class MainActivity extends AppCompatActivity
}
//temp remove it
Menu nav_Menu1 = navigationView.getMenu();
nav_Menu1.findItem(R.id.nav_deviation).setVisible(true);
/* Menu nav_Menu1 = navigationView.getMenu();
nav_Menu1.findItem(R.id.nav_deviation).setVisible(true);*/
if (configurationData.get(i).getCONFIGURE().get(0).equalsIgnoreCase("PDF ALLOW") &&
configurationData.get(i).getACTIVE().get(0).equalsIgnoreCase("1")) {
@@ -4,6 +4,7 @@ import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Typeface;
import android.os.Bundle;
@@ -16,6 +17,7 @@ import android.support.v7.widget.Toolbar;
import android.text.InputFilter;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
@@ -48,6 +50,8 @@ import cpm.com.gskmtorange.xmlGetterSetter.POGGetterSetter;
public class POGQuestionsActivity extends AppCompatActivity {
ExpandableListView expandableListView;
LinearLayout linPlanogramType;
Spinner spinPlanogramType;
String categoryName, categoryId, Error_Message = "";
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow, country_id, pog_type_id;
@@ -65,6 +69,8 @@ public class POGQuestionsActivity extends AppCompatActivity {
List<Integer> checkHeaderArray = new ArrayList<>();
String error_msg="";
boolean checkflag = true;
int selectedPOSMTypePosition =0;
boolean userSelect = false, changedFlag = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -74,6 +80,8 @@ public class POGQuestionsActivity extends AppCompatActivity {
setSupportActionBar(toolbar);
expandableListView = (ExpandableListView) findViewById(R.id.expandableListView);
linPlanogramType = (LinearLayout) findViewById(R.id.lin_planogram_type);
spinPlanogramType = (Spinner) findViewById(R.id.spinner_planogram_type);
db = new GSKOrangeDB(this);
db.open();
@@ -140,7 +148,101 @@ public class POGQuestionsActivity extends AppCompatActivity {
}
});
prepareListData();
if(country_id.equals("2") && (storeType_id.equals("9")|| storeType_id.equals("15"))){
linPlanogramType.setVisibility(View.VISIBLE);
final ArrayAdapter planogramTypeAdapter = new ArrayAdapter<CharSequence>(this,
android.R.layout.simple_spinner_item);
String select_str = getResources().getString(R.string.select_promo);
planogramTypeAdapter.add(select_str);
final ArrayList<String> pogTypeList = db.getPogType(categoryId, storeType_id, pog_type_id);
for (int i = 0; i < pogTypeList.size(); i++) {
planogramTypeAdapter.add(pogTypeList.get(i));
}
spinPlanogramType.setAdapter(planogramTypeAdapter);
planogramTypeAdapter
.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinPlanogramType.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
userSelect = true;
return false;
}
});
spinPlanogramType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, final int position, long id) {
if (userSelect) {
userSelect = false;
if(changedFlag){
AlertDialog.Builder builder = new AlertDialog.Builder(POGQuestionsActivity.this);
builder.setMessage(R.string.DELETE_ALERT_MESSAGE)
.setCancelable(false)
.setPositiveButton(getResources().getString(R.string.yes),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int id) {
selectedPOSMTypePosition = position;
prepareListData(planogramTypeAdapter.getItem(position).toString(), true);
}
})
.setNegativeButton(getResources().getString(R.string.no),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int id) {
spinPlanogramType.setSelection(selectedPOSMTypePosition);
dialog.cancel();
}
});
AlertDialog alert = builder.create();
alert.show();
}
else {
selectedPOSMTypePosition = position;
prepareListData(planogramTypeAdapter.getItem(position).toString(), true);
}
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
ArrayList<POGGetterSetter> pogSavedList = db.getAfterSavePOGUploadQuestionAnswerData(store_id, categoryId);
if(pogSavedList.size()>0){
String qType = pogSavedList.get(0).getQTYPE();
for(int i=0; i<pogTypeList.size();i++){
if(qType.equals(pogTypeList.get(i))){
selectedPOSMTypePosition = i+1;
spinPlanogramType.setSelection(i+1);
prepareListData(qType, false);
break;
}
}
changedFlag = true;
}
}
else {
prepareListData(null, false);
}
}
@@ -153,6 +255,39 @@ public class POGQuestionsActivity extends AppCompatActivity {
if (id == android.R.id.home) {
if(changedFlag){
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(POGQuestionsActivity.this);
builder.setTitle("Parinaam");
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
finish();
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
}
})
.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
android.app.AlertDialog alert = builder.create();
alert.show();
}
else {
finish();
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
}
}
return super.onOptionsItemSelected(item);
}
@Override
public void onBackPressed() {
//super.onBackPressed();
if(changedFlag){
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(POGQuestionsActivity.this);
builder.setTitle("Parinaam");
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
@@ -172,47 +307,29 @@ public class POGQuestionsActivity extends AppCompatActivity {
android.app.AlertDialog alert = builder.create();
alert.show();
}
else {
super.onBackPressed();
}
return super.onOptionsItemSelected(item);
}
@Override
public void onBackPressed() {
//super.onBackPressed();
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(POGQuestionsActivity.this);
builder.setTitle("Parinaam");
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
finish();
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
}
})
.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
android.app.AlertDialog alert = builder.create();
alert.show();
}
void prepareListData(){
void prepareListData(String planogramType, boolean clearFlag){
headerDataList = new ArrayList<>();
headerDataList = db.getSubCategoryMasterForPOG(categoryId, storeType_id, pog_type_id);
headerDataList = db.getSubCategoryMasterForPOG(categoryId, storeType_id, pog_type_id, planogramType);
if (headerDataList.size() > 0) {
for (int i = 0; i < headerDataList.size(); i++) {
ArrayList<POGGetterSetter> quizDataList = db.getAfterSavePOGQuestionAnswerData(store_id, categoryId, headerDataList.get(i).getSub_category_id());
ArrayList<POGGetterSetter> quizDataList = new ArrayList<>();
if(!clearFlag){
quizDataList = db.getAfterSavePOGQuestionAnswerData(store_id, categoryId, headerDataList.get(i).getSub_category_id());
}
if(quizDataList.size()==0){
quizDataList = db.getPOGSubCategoryWise(headerDataList.get(i).getSub_category_id(), pog_type_id, storeType_id);
quizDataList = db.getPOGSubCategoryWise(headerDataList.get(i).getSub_category_id(), pog_type_id, storeType_id, planogramType);
}
//hashMapListChildData = new HashMap<>();
@@ -240,6 +357,9 @@ public class POGQuestionsActivity extends AppCompatActivity {
adapter = new ExpandableListAdapter(this, headerDataList, hashMapListChildData);
expandableListView.setAdapter(adapter);
for (int i = 0; i < adapter.getGroupCount(); i++)
expandableListView.expandGroup(i);
}
public class ExpandableListAdapter extends BaseExpandableListAdapter {
@@ -275,7 +395,7 @@ public class POGQuestionsActivity extends AppCompatActivity {
if (convertView == null) {
LayoutInflater infalInflater = (LayoutInflater) this._context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = infalInflater.inflate(R.layout.item_msl_availability_stock_facing_header, null, false);
convertView = infalInflater.inflate(R.layout.item_pog_header, null, false);
}
TextView txt_categoryHeader = (TextView) convertView.findViewById(R.id.txt_categoryHeader);
@@ -365,7 +485,7 @@ public class POGQuestionsActivity extends AppCompatActivity {
POGGetterSetter ans = finalAns_list.get(position);
childData.setANSWER_ID(ans.getANSWER_ID());
childData.setANSWER(ans.getANSWER());
changedFlag = true;
}
@Override
@@ -212,6 +212,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
int eventType;
boolean ResultFlag = true;
String str;
StoreBean storeCurrentObj;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -753,6 +754,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
public void onClick(View v) {
store_id = current.getSTORE_ID();
storeCurrentObj = current;
if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_U) || current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_UN)) {
Snackbar.make(v, R.string.title_store_list_activity_store_already_done, Snackbar.LENGTH_LONG).setAction("Action", null).show();
@@ -904,27 +906,26 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
}
}else {
editor = preferences.edit();
editor.putString(CommonString.KEY_STORE_FLAG, store_flag_str);
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
editor.putString(CommonString.KEY_CAMERA_ALLOW, current.getCAMERA_ALLOW());
editor.putString(CommonString.KEY_CHECKOUT_STATUS, current.getCHECKOUT_STATUS());
editor.putString(CommonString.KEY_CLASS_ID, current.getCLASS_ID());
editor.putString(CommonString.KEY_EMP_ID, current.getEMP_ID());
editor.putString(CommonString.KEY_GEO_TAG, current.getGEO_TAG());
editor.putString(CommonString.KEY_KEYACCOUNT_ID, current.getKEYACCOUNT_ID());
editor.putString(CommonString.KEY_STORETYPE_ID, current.getSTORETYPE_ID());
editor.putString(CommonString.KEY_POG_TYPE_ID, current.getPOG_TYPE_ID());
editor.putString(CommonString.KEY_UPLOAD_STATUS, current.getUPLOAD_STATUS());
editor.commit();
new UploadTask(StoreListActivity.this, store_id).execute();
//dialog.cancel();
AlertDialog.Builder builder = new AlertDialog.Builder(StoreListActivity.this);
builder.setTitle(getResources().getString(R.string.dialog_title));
builder.setMessage(R.string.first_geotag_the_store).setCancelable(false)
.setPositiveButton(getResources().getString(R.string.ok),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog1,
int id) {
Intent in = new Intent(StoreListActivity.this, GeoTagActivity.class);
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
startActivity(in);
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
dialog1.cancel();
}
});
AlertDialog alert = builder.create();
alert.show();
}
}
@@ -2017,11 +2018,39 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
public void onClick(DialogInterface dialog, int id) {
if(flag){
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
in.putExtra(CommonString.KEY_STORE_ID, store_id);
startActivity(in);
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
if(storeCurrentObj!=null){
if(storeCurrentObj.getGEO_TAG().equalsIgnoreCase("N")){
//If store is not geotagged
AlertDialog.Builder builder = new AlertDialog.Builder(StoreListActivity.this);
builder.setTitle(getResources().getString(R.string.dialog_title));
builder.setMessage(R.string.first_geotag_the_store).setCancelable(false)
.setPositiveButton(getResources().getString(R.string.ok),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog1,
int id) {
Intent in = new Intent(StoreListActivity.this, GeoTagActivity.class);
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
in.putExtra(CommonString.KEY_STORE_ID, store_id);
startActivity(in);
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
dialog1.cancel();
}
});
AlertDialog alert = builder.create();
alert.show();
}
else {
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
in.putExtra(CommonString.KEY_STORE_ID, store_id);
startActivity(in);
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
}
}
}
}
});
@@ -145,9 +145,9 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
_UserId = preferences.getString(CommonString.KEY_USERNAME, "");
intime = preferences.getString(CommonString.KEY_STORE_IN_TIME, "");
country_id = preferences.getString(CommonString.KEY_COUNTRY_ID, "");
store_flag_str = preferences.getString(CommonString.KEY_STORE_FLAG, null);
//store_flag_str = preferences.getString(CommonString.KEY_STORE_FLAG, null);
//store_flag_str = getIntent().getStringExtra(CommonString.KEY_STORE_FLAG);
store_flag_str = getIntent().getStringExtra(CommonString.KEY_STORE_FLAG);
store_id = getIntent().getStringExtra(CommonString.KEY_STORE_ID);
str = CommonString.FILE_PATH;
@@ -1181,6 +1181,7 @@ public class DownloadActivity extends AppCompatActivity {
//ADDITIONAL_QUESTION
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
request.addProperty("UserName", userId);
//request.addProperty("Type", "POG_QUESTION_NEW");
request.addProperty("Type", "POG_QUESTION_NEW");
request.addProperty("cultureid", culture_id);
@@ -301,7 +301,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
//POG
data = new DailyDataMenuGetterSetter();
if (db.getSubCategoryMasterForPOG(categoryId, storeType_id, pog_type_id).size() > 0) {
if (db.getSubCategoryMasterForPOG(categoryId, storeType_id, pog_type_id, null).size() > 0) {
if (db.getAfterSavePOGUploadQuestionAnswerData(store_id, categoryId).size() > 0) {
data.setCategory_img(R.mipmap.msl_availability_done);
} else {
@@ -528,7 +528,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
}
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.pog))) {
if (db.getSubCategoryMasterForPOG(categoryId, storeType_id, pog_type_id).size() > 0) {
if (db.getSubCategoryMasterForPOG(categoryId, storeType_id, pog_type_id, null).size() > 0) {
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
} else {
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
@@ -659,7 +659,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.pog))) {
if (db.getSubCategoryMasterForPOG(categoryId, storeType_id, pog_type_id).size() > 0) {
if (db.getSubCategoryMasterForPOG(categoryId, storeType_id, pog_type_id, null).size() > 0) {
Intent intent = new Intent(DailyDataMenuActivity.this, POGQuestionsActivity.class);
intent.putExtra("categoryName", dailyData.getCategory_name());
intent.putExtra("categoryId", categoryId);
@@ -28,12 +28,14 @@ import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.ToggleButton;
@@ -80,7 +82,8 @@ public class PromoComplianceActivity extends AppCompatActivity {
String error_msg;
Promo_Compliance_DataGetterSetter cd;
FloatingActionButton fab, fab_add;
ScrollView scrollView;
private int oldScrollYPostion = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -97,7 +100,7 @@ public class PromoComplianceActivity extends AppCompatActivity {
lin_promo_sku = (LinearLayout) findViewById(R.id.lin_promo_sku);
lin_addtional_promo = (LinearLayout) findViewById(R.id.lin_addtional_promo);
view_promo_sku = findViewById(R.id.view_promo_sku);
view_additional_promo = findViewById(R.id.view_additional_promo);
//view_additional_promo = findViewById(R.id.view_additional_promo);
sp_promo = (Spinner) findViewById(R.id.sp_promo);
toggle_add_InStock = (Spinner) findViewById(R.id.toggle_add_InStock);
@@ -107,6 +110,20 @@ public class PromoComplianceActivity extends AppCompatActivity {
img_addPromotion = (ImageView) findViewById(R.id.img_addPromotion);
fab = (FloatingActionButton) findViewById(R.id.fab);
fab_add = (FloatingActionButton) findViewById(R.id.fab_add);
scrollView = (ScrollView) findViewById(R.id.scrollView_promoCompliance);
scrollView.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {
@Override
public void onScrollChanged() {
if (scrollView.getScrollY() > oldScrollYPostion) {
fab.hide();
} else if (scrollView.getScrollY() < oldScrollYPostion || scrollView.getScrollY() <= 0) {
fab.show();
}
oldScrollYPostion = scrollView.getScrollY();
}
});
db = new GSKOrangeDB(this);
db.open();
@@ -265,7 +265,7 @@ public class MPinActivity extends AppCompatActivity implements
R.string.error_incorrect_password,
Toast.LENGTH_SHORT).show();*/
Snackbar snackbar = Snackbar.make(blurLockView, "Incorrect MPin limit reached", Snackbar.LENGTH_INDEFINITE);
Snackbar snackbar = Snackbar.make(blurLockView, R.string.incorrect_mpin_limit_reached, Snackbar.LENGTH_INDEFINITE);
View view = snackbar.getView();
/*TextView tv = (TextView)view.findViewById(android.support.design.R.id.snackbar_text);
tv.setTextColor(Color.RED);*/
@@ -278,7 +278,7 @@ public class MPinActivity extends AppCompatActivity implements
editor.commit();
finish();
Intent in = new Intent(getApplicationContext(), MPinActivity.class);
Intent in = new Intent(getApplicationContext(), LoginActivity.class);
startActivity(in);
}
@@ -336,7 +336,7 @@ public class MPinActivity extends AppCompatActivity implements
if (IS_PASSWORD_CHECK) {
Snackbar snackbar = Snackbar.make(blurLockView, "Need to reset MPin", Snackbar.LENGTH_INDEFINITE);
Snackbar snackbar = Snackbar.make(blurLockView, R.string.need_to_reset_mpin, Snackbar.LENGTH_INDEFINITE);
View view = snackbar.getView();
/*TextView tv = (TextView)view.findViewById(android.support.design.R.id.snackbar_text);
tv.setTextColor(Color.RED);*/
@@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:background="@color/grey_background"
android:orientation="vertical">
<android.support.v7.widget.CardView
@@ -11,7 +11,7 @@
android:layout_margin="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="10dp"
card_view:cardCornerRadius="5dp"
android:elevation="5dp"
card_view:cardBackgroundColor="@color/white">
@@ -90,7 +90,9 @@
<ListView
android:id="@+id/listview"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:divider="@null"
android:dividerHeight="0dp">
</ListView>
@@ -6,7 +6,34 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".dailyentry.POGQuestionsActivity"
tools:showIn="@layout/activity_pogquestions">
tools:showIn="@layout/activity_pogquestions"
android:orientation="vertical"
android:background="@color/white">
<LinearLayout
android:id="@+id/lin_planogram_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_margin="5dp"
android:visibility="gone"
>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/store_planogram_type"
android:textSize="@dimen/store_entry_text_size"
android:padding="5dp"
android:layout_weight="3"/>
<Spinner
android:id="@+id/spinner_planogram_type"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"></Spinner>
</LinearLayout>
<ExpandableListView
android:id="@+id/expandableListView"
@@ -63,7 +63,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
card_view:cardCornerRadius="10dp">
card_view:cardCornerRadius="5dp"
android:elevation="5dp">
<LinearLayout
android:layout_width="match_parent"
@@ -289,11 +290,11 @@
</android.support.v7.widget.CardView>
<!--Additional List-->
<View
<!--<View
android:id="@+id/view_additional_promo"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/colorPrimaryDark" />
android:background="@color/colorPrimaryDark" />-->
<LinearLayout
android:id="@+id/lin_addtional_promo"
@@ -4,7 +4,7 @@
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/grey_background"
android:orientation="vertical"
android:weightSum="100">
@@ -27,7 +27,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/grey_background"
card_view:cardCornerRadius="10dp"
card_view:cardCornerRadius="5dp"
android:elevation="5dp"
android:layout_margin="5dp"
>
@@ -8,7 +8,7 @@
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
card_view:cardBackgroundColor="@android:color/white"
card_view:cardUseCompatPadding="true">
@@ -6,19 +6,13 @@
android:background="@color/white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
card_view:cardCornerRadius="10dp">
android:layout_height="wrap_content"
android:layout_margin="5dp"
card_view:cardCornerRadius="5dp"
android:elevation="4dp">
<LinearLayout
android:id="@+id/lin_category"
@@ -151,5 +145,5 @@
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</LinearLayout>
@@ -11,7 +11,8 @@
android:layout_height="match_parent"
android:layout_margin="5dp"
card_view:cardBackgroundColor="@color/grey_background"
card_view:cardCornerRadius="10dp">
card_view:cardCornerRadius="5dp"
android:elevation="4dp">
<RelativeLayout
android:id="@+id/rel_categoryHeader"
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical">
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
card_view:cardBackgroundColor="@color/colorOrange"
card_view:cardCornerRadius="5dp"
android:elevation="4dp">
<RelativeLayout
android:id="@+id/rel_categoryHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/txt_categoryHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="25dp"
android:text="Brand Name "
android:padding="7dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#222" />
<ImageView
android:id="@+id/img_camera"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="30dp"
android:src="@drawable/ic_menu_camera"
android:visibility="gone" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
@@ -2,16 +2,18 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:orientation="horizontal"
android:background="@color/white">
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:layout_margin="5dp"
card_view:cardBackgroundColor="#ffffff"
card_view:cardCornerRadius="5dp">
card_view:cardCornerRadius="5dp"
android:elevation="5dp"
>
<LinearLayout
android:layout_width="match_parent"
@@ -294,4 +294,31 @@
<string name="outtime_image">صورة الخروج</string>
<string name="select_coach">أختار مدرب</string>
<string name="title_activity_change_password">إعادة تعيين كلمة السر</string>
<string name="want_to_download">هل تريد أن تحمل البيانات</string>
<string name="want_to_upload">هل تريد أن ترفع البيانات</string>
<string name="want_to_exit">هل تريد الخروج</string>
<!-- Change Password-->
<string name="submit">إرسال البيانات</string>
<string name="old_password">كلمة المرور القديمة</string>
<string name="new_password">كلمة المرور الجديدة</string>
<string name="confirm_password">تأكيد كلمة المرور</string>
<string name="password_rules">قواعد كلمة المرور</string>
<string name="pw_rules">1. يجب أن يكون مجموع الرموز من 6 إلى 8 \n\n 2. يجب أن تحتوى على الإشتراطات التالية \n\n (A-Z) أحرف كبيرة \n (a-z) أحرف صغيرة \n (0-9) أرقام \n (@#$%) رموز خاصة</string>
<string name="invalid_password">كلمة مرور غير صحيحة</string>
<string name="password_and_confirm_password_not_match">كلمة المرور وتأكيد كلمة المرور غير متطابقين</string>
<string name="space_not_allowed_in_password">المسافة غير مسموح بها في كلمة المرور</string>
<string name="new_password_not_equal_to_old_password">كلمة المرور يجب أن لا تكون متطابقة مع كلمة المرور القديمة</string>
<string name="password_updated_successfully">تم تحديث كلمة المرور بنجاح</string>
<string name="title_activity_mpin">الرقم السري للجوال</string>
<string name="error_incorrect_pin">الرقم السري غير صحيح</string>
<string name="add_sku">ضافة صنف</string>
<string name="is_there_promo_compliance">هل يوجد أي عرض جاري</string>
<string name="first_click_compulsory_image">أولا أضغط على الصورة اللإزامية</string>
<string name="store_planogram_type">ما هو نوع صورة الرف</string>
<string name="incorrect_mpin_limit_reached">الرقم السري غير صحيح, تم بلوغ الحد لإدخال الرقم السري</string>
<string name="need_to_reset_mpin">تحتاج إلى إعادة تعيين الرقم السري</string>
</resources>
@@ -419,6 +419,9 @@
<string name="add_sku">Add SKU</string>
<string name="is_there_promo_compliance">Is there any Promo running</string>
<string name="first_click_compulsory_image">First click compulsory image</string>
<string name="store_planogram_type">What is the store planogram type?</string>
<string name="incorrect_mpin_limit_reached">Incorrect MPin limit reached</string>
<string name="need_to_reset_mpin">Need to reset MPin</string>
</resources>
@@ -1,4 +1,4 @@
#Fri Mar 01 20:15:20 IST 2019
#Fri Mar 08 21:08:32 IST 2019
D\:\\GITHub\\GSKORANGEV2\\library\\src\\main\\res\\layout\\item_listview_single.xml=D\:\\GITHub\\GSKORANGEV2\\library\\build\\intermediates\\packaged_res\\release\\layout\\item_listview_single.xml
D\:\\GITHub\\GSKORANGEV2\\library\\src\\main\\res\\layout\\item_listview_multiple.xml=D\:\\GITHub\\GSKORANGEV2\\library\\build\\intermediates\\packaged_res\\release\\layout\\item_listview_multiple.xml
D\:\\GITHub\\GSKORANGEV2\\library\\src\\main\\res\\layout\\activity_main.xml=D\:\\GITHub\\GSKORANGEV2\\library\\build\\intermediates\\packaged_res\\release\\layout\\activity_main.xml