Merge branch 'master' into CodeFire22
This commit is contained in:
@@ -171,9 +171,17 @@
|
|||||||
android:label="@string/title_activity_upload"
|
android:label="@string/title_activity_upload"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
|
|
||||||
android:name=".dailyentry.T2pBrand_Avaibility"
|
android:name=".dailyentry.T2pBrand_Avaibility"
|
||||||
android:label="@string/title_activity_t2p_brand__avaibility"
|
android:label="@string/title_activity_t2p_brand__avaibility"
|
||||||
android:theme="@style/AppTheme.NoActionBar"></activity>
|
android:theme="@style/AppTheme.NoActionBar"></activity>
|
||||||
|
<activity
|
||||||
|
android:name=".gsk_dailyentry.StockFacing_PlanogramTrackerActivity"
|
||||||
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
|
android:label="@string/title_activity_stock_facing__planogram_tracker"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/AppTheme.NoActionBar" />
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -43,6 +43,8 @@ import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.Promo_Compliance_DataGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.Promo_Compliance_DataGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.STORE_PERFORMANCE_MasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.STORE_PERFORMANCE_MasterGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.StockFacing_PlanogramTrackerDataGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.ShelfMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||||
@@ -130,8 +132,14 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.execSQL(TableBean.getAdditionalDisplay());
|
db.execSQL(TableBean.getAdditionalDisplay());
|
||||||
|
|
||||||
db.execSQL(TableBean.getMappingSosTarget());
|
db.execSQL(TableBean.getMappingSosTarget());
|
||||||
|
|
||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_BRAND_AVAIBILITY_DATA);
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_BRAND_AVAIBILITY_DATA);
|
||||||
|
|
||||||
|
db.execSQL(TableBean.getShelfMaster());
|
||||||
|
|
||||||
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_HEADER);
|
||||||
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_CHILD);
|
||||||
|
|
||||||
} 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();
|
||||||
@@ -191,9 +199,14 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
//Gagan end code
|
//Gagan end code
|
||||||
|
|
||||||
db.delete(CommonString.TABLE_INSERT_T2P_COMPLIANCE, null, null);
|
db.delete(CommonString.TABLE_INSERT_T2P_COMPLIANCE, null, null);
|
||||||
|
|
||||||
db.delete(CommonString.TABLE_INSERT_T2P_GAPS, null, null);
|
db.delete(CommonString.TABLE_INSERT_T2P_GAPS, null, null);
|
||||||
db.delete(CommonString.TABLE_INSERT_T2P_SKU, null, null);
|
db.delete(CommonString.TABLE_INSERT_T2P_SKU, null, null);
|
||||||
db.delete(CommonString.TABLE_INSERT_BRAND_AVAIBILITY_DATA, null, null);
|
db.delete(CommonString.TABLE_INSERT_BRAND_AVAIBILITY_DATA, null, null);
|
||||||
|
|
||||||
|
db.delete(CommonString.TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_HEADER, null, null);
|
||||||
|
db.delete(CommonString.TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_CHILD, null, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InsertJCP(JourneyPlanGetterSetter data) {
|
public void InsertJCP(JourneyPlanGetterSetter data) {
|
||||||
@@ -3578,6 +3591,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ArrayList<BrandAvabilityGetterSetter> getBrandAvailbilitydata(String store_id, String category_id, String keyAccount_id, String class_id, String storeType_id) {
|
public ArrayList<BrandAvabilityGetterSetter> getBrandAvailbilitydata(String store_id, String category_id, String keyAccount_id, String class_id, String storeType_id) {
|
||||||
Cursor cursordata = null;
|
Cursor cursordata = null;
|
||||||
ArrayList<BrandAvabilityGetterSetter> Data = new ArrayList<BrandAvabilityGetterSetter>();
|
ArrayList<BrandAvabilityGetterSetter> Data = new ArrayList<BrandAvabilityGetterSetter>();
|
||||||
@@ -3665,11 +3679,207 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return list;
|
|
||||||
|
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Stock Facing Planogram Tracker
|
||||||
|
public void InsertSHELF_MASTER(ShelfMasterGetterSetter data) {
|
||||||
|
db.delete("SHELF_MASTER", null, null);
|
||||||
|
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
try {
|
||||||
|
for (int i = 0; i < data.getSHELF_ID().size(); i++) {
|
||||||
|
|
||||||
|
values.put("SHELF_ID", data.getSHELF_ID().get(i));
|
||||||
|
values.put("SHELF", data.getSHELF().get(i));
|
||||||
|
|
||||||
|
db.insert("SHELF_MASTER", null, values);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", " SHELF_MASTER " + ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> getSHELF_MASTERData() {
|
||||||
|
Cursor cursordata = null;
|
||||||
|
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> Data = new ArrayList<>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
StockFacing_PlanogramTrackerDataGetterSetter sb1 = new StockFacing_PlanogramTrackerDataGetterSetter();
|
||||||
|
sb1.setShelf_id("0");
|
||||||
|
sb1.setShelf("Select");
|
||||||
|
|
||||||
|
Data.add(sb1);
|
||||||
|
|
||||||
|
cursordata = db.rawQuery("SELECT * FROM SHELF_MASTER ", null);
|
||||||
|
|
||||||
|
if (cursordata != null) {
|
||||||
|
cursordata.moveToFirst();
|
||||||
|
while (!cursordata.isAfterLast()) {
|
||||||
|
StockFacing_PlanogramTrackerDataGetterSetter sb = new StockFacing_PlanogramTrackerDataGetterSetter();
|
||||||
|
sb.setShelf_id(cursordata.getString(cursordata.getColumnIndexOrThrow("SHELF_ID")));
|
||||||
|
sb.setShelf(cursordata.getString(cursordata.getColumnIndexOrThrow("SHELF")));
|
||||||
|
|
||||||
|
Data.add(sb);
|
||||||
|
cursordata.moveToNext();
|
||||||
|
}
|
||||||
|
cursordata.close();
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", " Get SHELF_MASTER " + ex.toString());
|
||||||
|
}
|
||||||
|
return Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> getStockAndFacingPlanogramDefaultSKUData(
|
||||||
|
String category_id, String brand_id, String keyAccount_id, String storeType_id, String class_id) {
|
||||||
|
|
||||||
|
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("Select DISTINCT SK.SKU_ID,SK.SKU,SK.MRP,SK.SKU_SEQUENCE,M.MBQ,BR.COMPANY_ID " +
|
||||||
|
"from MAPPING_STOCK M " +
|
||||||
|
"inner join SKU_MASTER SK " +
|
||||||
|
"on M.SKU_ID=SK.SKU_ID " +
|
||||||
|
"inner join BRAND_MASTER BR " +
|
||||||
|
"on SK.BRAND_ID=BR.BRAND_ID " +
|
||||||
|
"inner join SUB_CATEGORY_MASTER SB " +
|
||||||
|
"on BR.SUB_CATEGORY_ID=SB.SUB_CATEGORY_ID " +
|
||||||
|
"inner join CATEGORY_MASTER CA " +
|
||||||
|
"on SB.CATEGORY_ID=CA.CATEGORY_ID " +
|
||||||
|
"where CA.CATEGORY_ID='" + category_id + "' AND BR.BRAND_ID='" + brand_id +
|
||||||
|
"' AND M.KEYACCOUNT_ID = '" + keyAccount_id + "' AND M.STORETYPE_ID = '" + storeType_id +
|
||||||
|
"' AND M.CLASS_ID = '" + class_id + "'", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
StockFacing_PlanogramTrackerDataGetterSetter cd = new StockFacing_PlanogramTrackerDataGetterSetter();
|
||||||
|
|
||||||
|
cd.setSku_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_ID")));
|
||||||
|
cd.setSku(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU")));
|
||||||
|
cd.setMrp(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MRP")));
|
||||||
|
cd.setSku_sequence(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_SEQUENCE")));
|
||||||
|
cd.setMbq(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MBQ")));
|
||||||
|
cd.setCompany_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("COMPANY_ID")));
|
||||||
|
/*cd.setStock("");
|
||||||
|
cd.setFacing("");*/
|
||||||
|
cd.setCheckbox_sku("0");
|
||||||
|
|
||||||
|
list.add(cd);
|
||||||
|
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// get T2P Compliance data
|
||||||
|
public ArrayList<T2PGetterSetter> getT2pCompliancedaletedata(String store_id) {
|
||||||
|
|
||||||
|
ArrayList<T2PGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
try {
|
||||||
|
|
||||||
|
dbcursor = db.rawQuery("SELECT * FROM " + CommonString.TABLE_INSERT_T2P_COMPLIANCE + " where " +
|
||||||
|
CommonString.KEY_STORE_ID + "='" + store_id + "'", null);
|
||||||
|
|
||||||
|
=======
|
||||||
|
public void InsertStock_Facing_PlanogramTracker(String storeId, String categoryId, String company_id, String brand_id, String sub_category_id,
|
||||||
|
List<StockFacing_PlanogramTrackerDataGetterSetter> hashMapListHeaderData,
|
||||||
|
HashMap<StockFacing_PlanogramTrackerDataGetterSetter, List<StockFacing_PlanogramTrackerDataGetterSetter>> hashMapListChildData) {
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
ContentValues values1 = new ContentValues();
|
||||||
|
|
||||||
|
try {
|
||||||
|
db.beginTransaction();
|
||||||
|
for (int i = 0; i < hashMapListHeaderData.size(); i++) {
|
||||||
|
StockFacing_PlanogramTrackerDataGetterSetter data1 = hashMapListHeaderData.get(i);
|
||||||
|
|
||||||
|
values1.put("store_id", storeId);
|
||||||
|
values1.put("category_id", categoryId);
|
||||||
|
values1.put("company_id", company_id);
|
||||||
|
values1.put("brand_id", brand_id);
|
||||||
|
values1.put("sub_category_id", sub_category_id);
|
||||||
|
values1.put("Shelf", data1.getSp_addShelf());
|
||||||
|
values1.put("Shelf_id", data1.getSp_addShelf_id());
|
||||||
|
values1.put("Shelf_Position", data1.getSp_shelfPosition());
|
||||||
|
|
||||||
|
long pos = db.insert(CommonString.TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_HEADER, null, values1);
|
||||||
|
|
||||||
|
for (int j = 0; j < hashMapListChildData.get(hashMapListHeaderData.get(i)).size(); j++) {
|
||||||
|
StockFacing_PlanogramTrackerDataGetterSetter data = hashMapListChildData.get(hashMapListHeaderData.get(i)).get(j);
|
||||||
|
|
||||||
|
values.put("common_id", pos);
|
||||||
|
values.put("Shelf", data1.getSp_addShelf());
|
||||||
|
values.put("Shelf_id", data.getSp_addShelf_id());
|
||||||
|
values.put("Shelf_Position", data1.getSp_shelfPosition());
|
||||||
|
values.put("sku", data.getSku());
|
||||||
|
values.put("sku_id", data.getSku_id());
|
||||||
|
values.put("checkbox_sku", data.getCheckbox_sku());
|
||||||
|
|
||||||
|
db.insert(CommonString.TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_CHILD, null, values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
db.setTransactionSuccessful();
|
||||||
|
db.endTransaction();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Exception ", " in Insert Stock Facing Planogram Tracker " + ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Stock Facing Planogram Server Upload Data
|
||||||
|
public ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> getStockAndFacingPlanogramServerUploadData(String store_id) {
|
||||||
|
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("Select C.Shelf_id,C.Shelf_Position,C.sku_id,C.checkbox_sku,H.category_id,H.company_id,H.brand_id,H.sub_category_id " +
|
||||||
|
"from Stock_Facing_Planogram_Header_Data H " +
|
||||||
|
"inner join Stock_Facing_Planogram_Child_Data C " +
|
||||||
|
"on H.KEY_ID=C.common_id AND H.Shelf_id=C.Shelf_id " +
|
||||||
|
"where H.store_id='" + store_id + "'", null);
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
|
||||||
|
StockFacing_PlanogramTrackerDataGetterSetter cd = new StockFacing_PlanogramTrackerDataGetterSetter();
|
||||||
|
|
||||||
|
cd.setSp_addShelf_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("Shelf_id")));
|
||||||
|
cd.setSp_shelfPosition(dbcursor.getString(dbcursor.getColumnIndexOrThrow("Shelf_Position")));
|
||||||
|
cd.setSku_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("sku_id")));
|
||||||
|
cd.setCheckbox_sku(dbcursor.getString(dbcursor.getColumnIndexOrThrow("checkbox_sku")));
|
||||||
|
cd.setCategory_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("category_id")));
|
||||||
|
cd.setCompany_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("company_id")));
|
||||||
|
cd.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("brand_id")));
|
||||||
|
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("sub_category_id")));
|
||||||
|
|
||||||
|
list.add(cd);
|
||||||
|
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
Log.d("Exception ", "get Stock Facing Planogram server upload !" + e.toString());
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
// get T2P Compliance data
|
// get T2P Compliance data
|
||||||
public ArrayList<T2PGetterSetter> getT2pCompliancedaletedata(String store_id) {
|
public ArrayList<T2PGetterSetter> getT2pCompliancedaletedata(String store_id) {
|
||||||
@@ -3688,20 +3898,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
T2PGetterSetter tp = new T2PGetterSetter();
|
T2PGetterSetter tp = new T2PGetterSetter();
|
||||||
|
|
||||||
tp.setKey_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_ID)));
|
tp.setKey_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_ID)));
|
||||||
|
|
||||||
/* tp.setDisplay_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_DISPLAY_ID)));
|
|
||||||
tp.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_BRAND_ID)));
|
|
||||||
tp.setBrand(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_BRAND)));
|
|
||||||
tp.setDisplay(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_DISPLAY)));
|
|
||||||
tp.setRef_image_url(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IMAGE_URL)));
|
|
||||||
tp.setRef_image_path(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IMAGE_PATH)));
|
|
||||||
tp.setImage(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IMAGE)));
|
|
||||||
tp.setImage1(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IMAGE1)));
|
|
||||||
tp.setImage2(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IMAGE2)));
|
|
||||||
tp.setRemark(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_REMARK)));
|
|
||||||
tp.setCategory_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_CATEGORY_ID)));
|
|
||||||
tp.setPresent((dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_PRESENT)).equalsIgnoreCase("1")));
|
|
||||||
*/
|
|
||||||
list.add(tp);
|
list.add(tp);
|
||||||
dbcursor.moveToNext();
|
dbcursor.moveToNext();
|
||||||
}
|
}
|
||||||
@@ -3709,10 +3905,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return list;
|
//return list;
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -551,26 +551,69 @@ public class CommonString {
|
|||||||
+ ")";
|
+ ")";
|
||||||
|
|
||||||
|
|
||||||
public static final String TABLE_INSERT_BRAND_AVAIBILITY_DATA = "Camera_Not_Allowed";
|
public static final String TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_HEADER = "Stock_Facing_Planogram_Header_Data";
|
||||||
|
|
||||||
public static final String CREATE_TABLE_INSERT_BRAND_AVAIBILITY_DATA = "CREATE TABLE IF NOT EXISTS "
|
public static final String CREATE_TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_HEADER = "CREATE TABLE IF NOT EXISTS "
|
||||||
+ TABLE_INSERT_BRAND_AVAIBILITY_DATA
|
+ TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_HEADER
|
||||||
|
|
||||||
|
+ "("
|
||||||
|
+ "KEY_ID"
|
||||||
|
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||||
|
+ "store_id"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "category_id"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "company_id"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "brand_id"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "sub_category_id"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "Shelf"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "Shelf_id"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "Shelf_Position"
|
||||||
|
+ " VARCHAR"
|
||||||
|
|
||||||
|
+ ")";
|
||||||
|
|
||||||
|
public static final String TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_CHILD = "Stock_Facing_Planogram_Child_Data";
|
||||||
|
|
||||||
|
public static final String CREATE_TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_CHILD = "CREATE TABLE IF NOT EXISTS "
|
||||||
|
+ TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_CHILD
|
||||||
+ "("
|
+ "("
|
||||||
+ "KEY_ID"
|
+ "KEY_ID"
|
||||||
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||||
|
|
||||||
+ "COMMON_ID"
|
+ "common_id"
|
||||||
+ " INTEGER,"
|
|
||||||
|
|
||||||
+ "BRAND_NAME"
|
|
||||||
+ " VARCHAR,"
|
+ " VARCHAR,"
|
||||||
|
|
||||||
+ "BRAND_ID"
|
+ "Shelf"
|
||||||
+ " INTEGER"
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "Shelf_id"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "Shelf_Position"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "sku"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "sku_id"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "checkbox_sku"
|
||||||
|
+ " VARCHAR"
|
||||||
|
|
||||||
+ ")";
|
+ ")";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.STORE_PERFORMANCE_MasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.STORE_PERFORMANCE_MasterGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.ShelfMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||||
@@ -86,15 +87,16 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
STORE_PERFORMANCE_MasterGetterSetter store_performance_masterGetterSetter;
|
STORE_PERFORMANCE_MasterGetterSetter store_performance_masterGetterSetter;
|
||||||
ADDITIONAL_DISPLAY_MASTERGetterSetter additional_display_getter_setter;
|
ADDITIONAL_DISPLAY_MASTERGetterSetter additional_display_getter_setter;
|
||||||
MAPPING_SOS_TARGET_MasterGetterSetter mapping_sos_target_masterGetterSetter;
|
MAPPING_SOS_TARGET_MasterGetterSetter mapping_sos_target_masterGetterSetter;
|
||||||
|
|
||||||
MAPPING_PLANOGRAM_MasterGetterSetter mapping_planogram_masterGetterSetter;
|
MAPPING_PLANOGRAM_MasterGetterSetter mapping_planogram_masterGetterSetter;
|
||||||
|
ShelfMasterGetterSetter shelfMasterGetterSetter;
|
||||||
|
|
||||||
private Dialog dialog;
|
private Dialog dialog;
|
||||||
private ProgressBar pb;
|
private ProgressBar pb;
|
||||||
private TextView percentage, message;
|
private TextView percentage, message;
|
||||||
private SharedPreferences preferences = null;
|
private SharedPreferences preferences = null;
|
||||||
Toolbar toolbar;
|
Toolbar toolbar;
|
||||||
String str;
|
String str;
|
||||||
boolean ResultFlag=true;
|
boolean ResultFlag = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -776,6 +778,43 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
publishProgress(data);
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
|
//SHELF_MASTER
|
||||||
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||||
|
request.addProperty("UserName", userId);
|
||||||
|
request.addProperty("Type", "SHELF_MASTER");
|
||||||
|
request.addProperty("cultureid", culture_id);
|
||||||
|
|
||||||
|
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||||
|
envelope.dotNet = true;
|
||||||
|
envelope.setOutputSoapObject(request);
|
||||||
|
|
||||||
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
|
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||||
|
|
||||||
|
result = envelope.getResponse();
|
||||||
|
|
||||||
|
if (result.toString() != null) {
|
||||||
|
xpp.setInput(new StringReader(result.toString()));
|
||||||
|
xpp.next();
|
||||||
|
eventType = xpp.getEventType();
|
||||||
|
shelfMasterGetterSetter = XMLHandlers.shelfMasterXMLHandler(xpp, eventType);
|
||||||
|
|
||||||
|
String table_ShelfMaster = shelfMasterGetterSetter.getTable_SHELF_MASTER();
|
||||||
|
if (table_ShelfMaster != null) {
|
||||||
|
resultHttp = CommonString.KEY_SUCCESS;
|
||||||
|
TableBean.setShelfMaster(table_ShelfMaster);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (shelfMasterGetterSetter.getSHELF_ID().size() > 0) {
|
||||||
|
data.value = 96;
|
||||||
|
data.name = "SHELF_MASTER " + getResources().getString(R.string.download_data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
|
//Images DownLoads
|
||||||
|
|
||||||
//MAPPING_PLANOGRAM Image save into folder
|
//MAPPING_PLANOGRAM Image save into folder
|
||||||
if (mapping_planogram_masterGetterSetter != null) {
|
if (mapping_planogram_masterGetterSetter != null) {
|
||||||
|
|
||||||
@@ -912,55 +951,45 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
db.InsertMAPPING_PLANOGRAM(mapping_planogram_masterGetterSetter);
|
db.InsertMAPPING_PLANOGRAM(mapping_planogram_masterGetterSetter);
|
||||||
db.InsertADDITIONAL_DISPLAY(additional_display_getter_setter);
|
db.InsertADDITIONAL_DISPLAY(additional_display_getter_setter);
|
||||||
db.InsertMAPPING_SOS_TARGET(mapping_sos_target_masterGetterSetter);
|
db.InsertMAPPING_SOS_TARGET(mapping_sos_target_masterGetterSetter);
|
||||||
|
db.InsertSHELF_MASTER(shelfMasterGetterSetter);
|
||||||
|
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
|
|
||||||
ResultFlag=false;
|
ResultFlag = false;
|
||||||
str=CommonString.MESSAGE_EXCEPTION;
|
str = CommonString.MESSAGE_EXCEPTION;
|
||||||
return CommonString.MESSAGE_EXCEPTION;
|
return CommonString.MESSAGE_EXCEPTION;
|
||||||
}
|
} catch (SocketTimeoutException e) {
|
||||||
catch (SocketTimeoutException e) {
|
ResultFlag = false;
|
||||||
ResultFlag=false;
|
str = CommonString.MESSAGE_SOCKETEXCEPTION;
|
||||||
str=CommonString.MESSAGE_SOCKETEXCEPTION;
|
|
||||||
return CommonString.MESSAGE_SOCKETEXCEPTION;
|
return CommonString.MESSAGE_SOCKETEXCEPTION;
|
||||||
}
|
} catch (InterruptedIOException e) {
|
||||||
catch (InterruptedIOException e){
|
|
||||||
|
|
||||||
ResultFlag=false;
|
ResultFlag = false;
|
||||||
str=CommonString.MESSAGE_EXCEPTION;
|
str = CommonString.MESSAGE_EXCEPTION;
|
||||||
return CommonString.MESSAGE_EXCEPTION;
|
return CommonString.MESSAGE_EXCEPTION;
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
||||||
ResultFlag=false;
|
ResultFlag = false;
|
||||||
str=CommonString.MESSAGE_SOCKETEXCEPTION;
|
str = CommonString.MESSAGE_SOCKETEXCEPTION;
|
||||||
return CommonString.MESSAGE_SOCKETEXCEPTION;
|
return CommonString.MESSAGE_SOCKETEXCEPTION;
|
||||||
}
|
} catch (XmlPullParserException e) {
|
||||||
catch (XmlPullParserException e) {
|
ResultFlag = false;
|
||||||
ResultFlag=false;
|
str = CommonString.MESSAGE_XmlPull;
|
||||||
str=CommonString.MESSAGE_XmlPull;
|
|
||||||
return CommonString.MESSAGE_XmlPull;
|
return CommonString.MESSAGE_XmlPull;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ResultFlag=false;
|
ResultFlag = false;
|
||||||
str=CommonString.MESSAGE_EXCEPTION;
|
str = CommonString.MESSAGE_EXCEPTION;
|
||||||
|
|
||||||
return CommonString.MESSAGE_EXCEPTION;
|
return CommonString.MESSAGE_EXCEPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ResultFlag)
|
if (ResultFlag) {
|
||||||
{
|
|
||||||
return "";
|
return "";
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -976,15 +1005,13 @@ public class DownloadActivity extends AppCompatActivity {
|
|||||||
protected void onPostExecute(String s) {
|
protected void onPostExecute(String s) {
|
||||||
super.onPostExecute(s);
|
super.onPostExecute(s);
|
||||||
|
|
||||||
if(s.equalsIgnoreCase("")){
|
if (s.equalsIgnoreCase("")) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
|
||||||
showAlert(getString(R.string.data_downloaded_successfully));
|
showAlert(getString(R.string.data_downloaded_successfully));
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
showAlert(getString(R.string.datanotfound)+" "+s);
|
showAlert(getString(R.string.datanotfound) + " " + s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+733
@@ -0,0 +1,733 @@
|
|||||||
|
package cpm.com.gskmtorange.gsk_dailyentry;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.pm.ActivityInfo;
|
||||||
|
import android.content.res.Resources;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.BitmapFactory;
|
||||||
|
import android.graphics.Typeface;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
|
import android.support.design.widget.FloatingActionButton;
|
||||||
|
import android.support.design.widget.Snackbar;
|
||||||
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.support.v7.widget.CardView;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.webkit.WebView;
|
||||||
|
import android.widget.AbsListView;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.BaseExpandableListAdapter;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.CompoundButton;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ExpandableListView;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.Spinner;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
|
import cpm.com.gskmtorange.R;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_DataGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.StockFacing_PlanogramTrackerDataGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||||
|
|
||||||
|
public class StockFacing_PlanogramTrackerActivity extends AppCompatActivity {
|
||||||
|
Button btn_addShelf, btn_addSKU;
|
||||||
|
ExpandableListView expandableListView;
|
||||||
|
String brand, brand_id, company_id, sub_category, sub_category_id;
|
||||||
|
String addShelfPosition = "";
|
||||||
|
ArrayAdapter<String> shelfPositionAdapter, shelfAdapter;
|
||||||
|
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> shelfList;
|
||||||
|
GSKOrangeDB db;
|
||||||
|
PlanogramExpandableListAdapter adapter;
|
||||||
|
String categoryName, categoryId, Error_Message = "";
|
||||||
|
boolean checkflag = true;
|
||||||
|
|
||||||
|
List<Integer> checkHeaderArray = new ArrayList<>();
|
||||||
|
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> headerDataList = new ArrayList<>();
|
||||||
|
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> tempHeaderDataList;
|
||||||
|
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> childDataList, tempChildDataList;
|
||||||
|
HashMap<StockFacing_PlanogramTrackerDataGetterSetter, List<StockFacing_PlanogramTrackerDataGetterSetter>> hashMapListChildData = new HashMap<>();
|
||||||
|
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_stock_facing__planogram_tracker);
|
||||||
|
|
||||||
|
try {
|
||||||
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
|
setSupportActionBar(toolbar);
|
||||||
|
getSupportActionBar().setHomeButtonEnabled(true);
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
|
db = new GSKOrangeDB(this);
|
||||||
|
db.open();
|
||||||
|
|
||||||
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
//updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
|
|
||||||
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
|
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
|
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
|
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||||
|
intime = preferences.getString(CommonString.KEY_STORE_IN_TIME, "");
|
||||||
|
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
||||||
|
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
||||||
|
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
||||||
|
camera_allow = preferences.getString(CommonString.KEY_CAMERA_ALLOW, "");
|
||||||
|
|
||||||
|
categoryName = getIntent().getStringExtra("categoryName");
|
||||||
|
categoryId = getIntent().getStringExtra("categoryId");
|
||||||
|
|
||||||
|
btn_addShelf = (Button) findViewById(R.id.btn_addShelf);
|
||||||
|
expandableListView = (ExpandableListView) findViewById(R.id.exp_PlanogramListView);
|
||||||
|
|
||||||
|
Intent intent = getIntent();
|
||||||
|
brand = intent.getStringExtra("brand");
|
||||||
|
brand_id = intent.getStringExtra("brand_id");
|
||||||
|
company_id = intent.getStringExtra("company_id");
|
||||||
|
sub_category = intent.getStringExtra("sub_category");
|
||||||
|
sub_category_id = intent.getStringExtra("sub_category_id");
|
||||||
|
|
||||||
|
|
||||||
|
//Shelf Position Adapter
|
||||||
|
shelfPositionAdapter = new ArrayAdapter<String>(StockFacing_PlanogramTrackerActivity.this, android.R.layout.simple_list_item_1);
|
||||||
|
shelfPositionAdapter.add(getResources().getString(R.string.select)); //Select
|
||||||
|
for (int i = 7; i >= 1; i--) {
|
||||||
|
shelfPositionAdapter.add(String.valueOf(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
//Shelf List
|
||||||
|
shelfList = new ArrayList<>();
|
||||||
|
shelfList = db.getSHELF_MASTERData();
|
||||||
|
|
||||||
|
shelfAdapter = new ArrayAdapter<String>(StockFacing_PlanogramTrackerActivity.this, android.R.layout.simple_list_item_1);
|
||||||
|
for (int j = 0; j < shelfList.size(); j++) {
|
||||||
|
shelfAdapter.add(shelfList.get(j).getShelf());
|
||||||
|
}
|
||||||
|
|
||||||
|
btn_addShelf.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(final View view1) {
|
||||||
|
final Dialog dialog = new Dialog(StockFacing_PlanogramTrackerActivity.this);
|
||||||
|
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||||
|
dialog.setContentView(R.layout.dialog_stock_facing_planogram_tracker);
|
||||||
|
|
||||||
|
Button addShelf = (Button) dialog.findViewById(R.id.dialog_btn_addShelf);
|
||||||
|
Button cancel = (Button) dialog.findViewById(R.id.dialog_btn_cancel);
|
||||||
|
Spinner sp_addShelf = (Spinner) dialog.findViewById(R.id.sp_addShelf);
|
||||||
|
Spinner sp_shelfPosition = (Spinner) dialog.findViewById(R.id.sp_shelfPosition);
|
||||||
|
|
||||||
|
sp_addShelf.setAdapter(shelfAdapter);
|
||||||
|
sp_shelfPosition.setAdapter(shelfPositionAdapter);
|
||||||
|
|
||||||
|
final StockFacing_PlanogramTrackerDataGetterSetter data = new StockFacing_PlanogramTrackerDataGetterSetter();
|
||||||
|
|
||||||
|
sp_addShelf.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long l) {
|
||||||
|
for (int i1 = 0; i1 < shelfList.size(); i1++) {
|
||||||
|
if (position == i1) {
|
||||||
|
//Selected spinner position value
|
||||||
|
data.setSp_addShelf_id(shelfList.get(i1).getShelf_id());
|
||||||
|
data.setSp_addShelf(shelfList.get(i1).getShelf());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
sp_shelfPosition.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long l) {
|
||||||
|
data.setSp_shelfPosition(parent.getItemAtPosition(position).toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
cancel.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
addShelf.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
|
||||||
|
if (!data.getSp_addShelf_id().equals("0") && !data.getSp_shelfPosition().equals("Select")) {
|
||||||
|
tempHeaderDataList = new ArrayList<>();
|
||||||
|
|
||||||
|
headerDataList.add(data);
|
||||||
|
//tempHeaderDataList.add(data);
|
||||||
|
|
||||||
|
dialog.dismiss();
|
||||||
|
prepareHeaderList(headerDataList);
|
||||||
|
} else {
|
||||||
|
Toast.makeText(StockFacing_PlanogramTrackerActivity.this, getResources().getString(R.string.empty_field), Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
dialog.show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
final FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab_stockFacing_PlanogramTracker);
|
||||||
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
/*Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
|
||||||
|
.setAction("Action", null).show();*/
|
||||||
|
|
||||||
|
if (validateData(headerDataList, hashMapListChildData)) {
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(StockFacing_PlanogramTrackerActivity.this);
|
||||||
|
builder.setMessage(getResources().getString(R.string.check_save_message))
|
||||||
|
.setCancelable(false)
|
||||||
|
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
|
||||||
|
db.InsertStock_Facing_PlanogramTracker(store_id, categoryId, company_id, brand_id,
|
||||||
|
sub_category_id, headerDataList, hashMapListChildData);
|
||||||
|
|
||||||
|
finish();
|
||||||
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
dialog.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
AlertDialog alert = builder.create();
|
||||||
|
alert.show();
|
||||||
|
} else {
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(StockFacing_PlanogramTrackerActivity.this);
|
||||||
|
//builder.setMessage(getResources().getString(R.string.empty_field))
|
||||||
|
builder.setMessage(Error_Message)
|
||||||
|
.setCancelable(false)
|
||||||
|
.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
AlertDialog alert = builder.create();
|
||||||
|
alert.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
expandableListView.setOnScrollListener(new AbsListView.OnScrollListener() {
|
||||||
|
@Override
|
||||||
|
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
|
||||||
|
int lastItem = firstVisibleItem + visibleItemCount;
|
||||||
|
|
||||||
|
if (firstVisibleItem == 0) {
|
||||||
|
fab.setVisibility(View.VISIBLE);
|
||||||
|
} else if (lastItem == totalItemCount) {
|
||||||
|
fab.setVisibility(View.INVISIBLE);
|
||||||
|
} /*else {
|
||||||
|
fab.setVisibility(View.VISIBLE);
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onScrollStateChanged(AbsListView arg0, int arg1) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
//expandableListView.invalidateViews();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
expandableListView.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/*expandableListView.setOnScrollListener(new AbsListView.OnScrollListener() {
|
||||||
|
@Override
|
||||||
|
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
|
||||||
|
int lastItem = firstVisibleItem + visibleItemCount;
|
||||||
|
|
||||||
|
*//*if (firstVisibleItem == 0) {
|
||||||
|
fab.setVisibility(View.VISIBLE);
|
||||||
|
} else if (lastItem == totalItemCount) {
|
||||||
|
fab.setVisibility(View.INVISIBLE);
|
||||||
|
} else {
|
||||||
|
fab.setVisibility(View.VISIBLE);
|
||||||
|
}*//*
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onScrollStateChanged(AbsListView arg0, int arg1) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
//expandableListView.invalidateViews();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview Group click listener
|
||||||
|
expandableListView.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview Group expanded listener
|
||||||
|
expandableListView.setOnGroupExpandListener(new ExpandableListView.OnGroupExpandListener() {
|
||||||
|
@Override
|
||||||
|
public void onGroupExpand(int groupPosition) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getWindow().getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview Group collasped listener
|
||||||
|
expandableListView.setOnGroupCollapseListener(new ExpandableListView.OnGroupCollapseListener() {
|
||||||
|
@Override
|
||||||
|
public void onGroupCollapse(int groupPosition) {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
if (getWindow().getCurrentFocus() != null) {
|
||||||
|
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||||
|
getCurrentFocus().clearFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listview on child click listener
|
||||||
|
expandableListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
|
||||||
|
int childPosition, long id) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});*/
|
||||||
|
} catch (Resources.NotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void prepareHeaderList(ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> headerDataList1) {
|
||||||
|
try {
|
||||||
|
//Header Data
|
||||||
|
if (headerDataList1.size() > 0) {
|
||||||
|
|
||||||
|
/*for (int i = 0; i < headerDataList.size(); i++) {
|
||||||
|
hashMapListChildData.put(headerDataList.get(i), childDataList);
|
||||||
|
|
||||||
|
*//*if (childDataList != null && childDataList.size() > 0) {
|
||||||
|
if (headerDataList.get(i).getSp_addShelf_id().equals(childDataList.get(i).getSp_addShelf_id())) {
|
||||||
|
hashMapListChildData.put(headerDataList.get(i), childDataList);
|
||||||
|
} else {
|
||||||
|
hashMapListChildData.put(headerDataList.get(i), tempChildDataList);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
hashMapListChildData.put(headerDataList.get(i), tempChildDataList);
|
||||||
|
}*//*
|
||||||
|
}*/
|
||||||
|
|
||||||
|
adapter = new PlanogramExpandableListAdapter(this, headerDataList1, hashMapListChildData);
|
||||||
|
expandableListView.setAdapter(adapter);
|
||||||
|
|
||||||
|
if (childDataList != null && childDataList.size() > 0) {
|
||||||
|
for (int j = 0; j < headerDataList.size(); j++) {
|
||||||
|
if (hashMapListChildData.get(headerDataList.get(j)).size() > 0) {
|
||||||
|
expandableListView.expandGroup(j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void prepareSkuList(ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> childDataList1,
|
||||||
|
StockFacing_PlanogramTrackerDataGetterSetter object) {
|
||||||
|
try {
|
||||||
|
if (headerDataList.size() > 0) {
|
||||||
|
|
||||||
|
hashMapListChildData.put(object, childDataList1);
|
||||||
|
/*//Child Sku Data
|
||||||
|
for (int i = 0; i < headerDataList.size(); i++) {
|
||||||
|
if (object.getSp_addShelf_id().equals(headerDataList.get(i).getSp_addShelf_id())) {
|
||||||
|
hashMapListChildData.put(object, childDataList1);
|
||||||
|
} else {
|
||||||
|
hashMapListChildData.put(headerDataList.get(i), childDataList);
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/* adapter = new PlanogramExpandableListAdapter(this, headerDataList, hashMapListChildData);
|
||||||
|
expandableListView.setAdapter(adapter);*/
|
||||||
|
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
//expandableListView.invalidate();
|
||||||
|
|
||||||
|
|
||||||
|
if (childDataList != null && childDataList.size() > 0) {
|
||||||
|
for (int j = 0; j < headerDataList.size(); j++) {
|
||||||
|
if (hashMapListChildData.get(headerDataList.get(j)).size() > 0) {
|
||||||
|
expandableListView.expandGroup(j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PlanogramExpandableListAdapter extends BaseExpandableListAdapter {
|
||||||
|
private Context _context;
|
||||||
|
private List<StockFacing_PlanogramTrackerDataGetterSetter> _listDataHeader;
|
||||||
|
private HashMap<StockFacing_PlanogramTrackerDataGetterSetter, List<StockFacing_PlanogramTrackerDataGetterSetter>> _listDataChild;
|
||||||
|
|
||||||
|
public PlanogramExpandableListAdapter(Context context, List<StockFacing_PlanogramTrackerDataGetterSetter> listDataHeader,
|
||||||
|
HashMap<StockFacing_PlanogramTrackerDataGetterSetter, List<StockFacing_PlanogramTrackerDataGetterSetter>> listChildData) {
|
||||||
|
this._context = context;
|
||||||
|
this._listDataHeader = listDataHeader;
|
||||||
|
this._listDataChild = listChildData;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getGroup(int groupPosition) {
|
||||||
|
return this._listDataHeader.get(groupPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getGroupCount() {
|
||||||
|
return this._listDataHeader.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getGroupId(int groupPosition) {
|
||||||
|
return groupPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
|
||||||
|
final StockFacing_PlanogramTrackerDataGetterSetter headerTitle =
|
||||||
|
(StockFacing_PlanogramTrackerDataGetterSetter) getGroup(groupPosition);
|
||||||
|
|
||||||
|
if (headerTitle != null) {
|
||||||
|
if (convertView == null) {
|
||||||
|
LayoutInflater infalInflater = (LayoutInflater) _context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
convertView = infalInflater.inflate(R.layout.item_stock_facing_planogram_header, null, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
TextView txt_shelfHeader = (TextView) convertView.findViewById(R.id.txt_shelfHeader);
|
||||||
|
Button btn_addSku = (Button) convertView.findViewById(R.id.btn_addSku);
|
||||||
|
|
||||||
|
txt_shelfHeader.setText(headerTitle.getSp_addShelf() + " (Position : " + headerTitle.getSp_shelfPosition() + ")");
|
||||||
|
|
||||||
|
btn_addSku.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
//Stock Facing Planogram SKU Data
|
||||||
|
tempChildDataList = db.getStockAndFacingPlanogramDefaultSKUData(categoryId, brand_id,
|
||||||
|
keyAccount_id, storeType_id, class_id);
|
||||||
|
|
||||||
|
final Dialog dialog1 = new Dialog(StockFacing_PlanogramTrackerActivity.this);
|
||||||
|
dialog1.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
dialog1.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||||
|
dialog1.setContentView(R.layout.dialog_stock_facing_planogram_tracker_add_sku);
|
||||||
|
|
||||||
|
LinearLayout lin_addSku = (LinearLayout) dialog1.findViewById(R.id.lin_addSku);
|
||||||
|
Button addSKU = (Button) dialog1.findViewById(R.id.dialog_btn_addSku_Shelf);
|
||||||
|
Button cancel = (Button) dialog1.findViewById(R.id.dialog_btn_cancel_addSku);
|
||||||
|
|
||||||
|
cancel.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
dialog1.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
childDataList = new ArrayList<>();
|
||||||
|
|
||||||
|
for (int i = 0; i < tempChildDataList.size(); i++) {
|
||||||
|
View view1 = getLayoutInflater().inflate(R.layout.item_stock_facing_planogram_child, null);
|
||||||
|
|
||||||
|
TextView txt_skuChild = (TextView) view1.findViewById(R.id.txt_skuChild);
|
||||||
|
CheckBox chk_sku = (CheckBox) view1.findViewById(R.id.chk_sku);
|
||||||
|
|
||||||
|
final StockFacing_PlanogramTrackerDataGetterSetter childData = tempChildDataList.get(i);
|
||||||
|
txt_skuChild.setText(childData.getSku());
|
||||||
|
|
||||||
|
childData.setSp_addShelf_id(headerTitle.getSp_addShelf_id());
|
||||||
|
|
||||||
|
if (childData.getCheckbox_sku().equals("0")) {
|
||||||
|
chk_sku.setChecked(false);
|
||||||
|
} else if (childData.getCheckbox_sku().equals("1")) {
|
||||||
|
chk_sku.setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
chk_sku.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton compoundButton, boolean isCheck) {
|
||||||
|
if (isCheck) {
|
||||||
|
childData.setCheckbox_sku("1");
|
||||||
|
} else {
|
||||||
|
childData.setCheckbox_sku("0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
childDataList.add(childData);
|
||||||
|
lin_addSku.addView(view1);
|
||||||
|
}
|
||||||
|
|
||||||
|
addSKU.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
/*headerTitle.getShelf_id();
|
||||||
|
childDataList.size();*/
|
||||||
|
|
||||||
|
/*prepareSkuList(childDataList, headerTitle);
|
||||||
|
dialog1.dismiss();*/
|
||||||
|
|
||||||
|
boolean flag = false;
|
||||||
|
for (int i = 0; i < childDataList.size(); i++) {
|
||||||
|
if (childDataList.get(i).getCheckbox_sku().equals("1")) {
|
||||||
|
flag = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flag) {
|
||||||
|
prepareSkuList(childDataList, headerTitle);
|
||||||
|
dialog1.dismiss();
|
||||||
|
} else {
|
||||||
|
Snackbar.make(view, "Please select atleast one sku", Snackbar.LENGTH_LONG)
|
||||||
|
.setAction("Action", null).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
dialog1.show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!checkflag) {
|
||||||
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
|
txt_shelfHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
txt_shelfHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getChild(int groupPosition, int childPosititon) {
|
||||||
|
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).get(childPosititon);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getChildrenCount(int groupPosition) {
|
||||||
|
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getChildId(int groupPosition, int childPosition) {
|
||||||
|
return childPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getChildView(int groupPosition, final int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
|
||||||
|
StockFacing_PlanogramTrackerDataGetterSetter childData =
|
||||||
|
(StockFacing_PlanogramTrackerDataGetterSetter) getChild(groupPosition, childPosition);
|
||||||
|
ViewHolder holder = null;
|
||||||
|
|
||||||
|
if (childData != null) {
|
||||||
|
if (convertView == null) {
|
||||||
|
LayoutInflater infalInflater = (LayoutInflater) _context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
convertView = infalInflater.inflate(R.layout.item_stock_facing_planogram_child, null, false);
|
||||||
|
|
||||||
|
holder = new ViewHolder();
|
||||||
|
holder.txt_skuChild = (TextView) convertView.findViewById(R.id.txt_skuChild);
|
||||||
|
holder.checkBox = (CheckBox) convertView.findViewById(R.id.chk_sku);
|
||||||
|
|
||||||
|
convertView.setTag(holder);
|
||||||
|
} else {
|
||||||
|
holder = (ViewHolder) convertView.getTag();
|
||||||
|
}
|
||||||
|
|
||||||
|
//holder.checkBox.setVisibility(View.GONE);
|
||||||
|
holder.checkBox.setEnabled(false);
|
||||||
|
|
||||||
|
holder.txt_skuChild.setText(childData.getSku());
|
||||||
|
|
||||||
|
if (childData.getCheckbox_sku().equals("1")) {
|
||||||
|
holder.checkBox.setChecked(true);
|
||||||
|
} else {
|
||||||
|
holder.checkBox.setChecked(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasStableIds() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isChildSelectable(int groupPosition, int childPosition) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ViewHolder {
|
||||||
|
TextView txt_skuChild;
|
||||||
|
CheckBox checkBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean validateData(List<StockFacing_PlanogramTrackerDataGetterSetter> listDataHeader,
|
||||||
|
HashMap<StockFacing_PlanogramTrackerDataGetterSetter, List<StockFacing_PlanogramTrackerDataGetterSetter>> listDataChild) {
|
||||||
|
boolean flag = true;
|
||||||
|
checkHeaderArray.clear();
|
||||||
|
|
||||||
|
for (int i = 0; i < listDataHeader.size(); i++) {
|
||||||
|
|
||||||
|
if (listDataChild.get(listDataHeader.get(i)) == null) {
|
||||||
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
checkflag = false;
|
||||||
|
Error_Message = "add sku shelf can not be empty";
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
if (listDataChild.get(listDataHeader.get(i)).size() <= 0) {
|
||||||
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
Error_Message = "add sku shelf can not be empty";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flag == false) {
|
||||||
|
checkflag = false;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
checkflag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//expListView.invalidate();
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
|
||||||
|
return checkflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
//super.onBackPressed();
|
||||||
|
|
||||||
|
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(StockFacing_PlanogramTrackerActivity.this);
|
||||||
|
builder.setTitle(getResources().getString(R.string.dialog_title));
|
||||||
|
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
|
||||||
|
.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setNegativeButton(getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
android.app.AlertDialog alert = builder.create();
|
||||||
|
alert.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
int id = item.getItemId();
|
||||||
|
|
||||||
|
if (id == android.R.id.home) {
|
||||||
|
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(StockFacing_PlanogramTrackerActivity.this);
|
||||||
|
builder.setTitle(getResources().getString(R.string.dialog_title));
|
||||||
|
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
|
||||||
|
.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setNegativeButton(getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
android.app.AlertDialog alert = builder.create();
|
||||||
|
alert.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
+17
@@ -947,6 +947,23 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
|||||||
//Camera allow disable
|
//Camera allow disable
|
||||||
img_camera1.setBackgroundResource(R.mipmap.camera_grey);
|
img_camera1.setBackgroundResource(R.mipmap.camera_grey);
|
||||||
img_camera2.setBackgroundResource(R.mipmap.camera_grey);
|
img_camera2.setBackgroundResource(R.mipmap.camera_grey);
|
||||||
|
|
||||||
|
img_camera1.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Intent intent = new Intent(Stock_FacingActivity.this, StockFacing_PlanogramTrackerActivity.class);
|
||||||
|
|
||||||
|
intent.putExtra("brand", headerTitle.getBrand());
|
||||||
|
intent.putExtra("brand_id", headerTitle.getBrand_id());
|
||||||
|
intent.putExtra("company_id", headerTitle.getCompany_id());
|
||||||
|
intent.putExtra("sub_category", headerTitle.getSub_category());
|
||||||
|
intent.putExtra("sub_category_id", headerTitle.getSub_category_id());
|
||||||
|
intent.putExtra("categoryName", categoryName);
|
||||||
|
intent.putExtra("categoryId", categoryId);
|
||||||
|
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (headerTitle.getCompany_id().equals("1")) {
|
if (headerTitle.getCompany_id().equals("1")) {
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.GapsChecklistGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.Promo_Compliance_DataGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.Promo_Compliance_DataGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.StockFacing_PlanogramTrackerDataGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlHandlers.FailureXMLHandler;
|
import cpm.com.gskmtorange.xmlHandlers.FailureXMLHandler;
|
||||||
@@ -76,7 +77,11 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
|||||||
private FailureGetterSetter failureGetterSetter = null;
|
private FailureGetterSetter failureGetterSetter = null;
|
||||||
private SharedPreferences preferences;
|
private SharedPreferences preferences;
|
||||||
private int factor, k = 0;
|
private int factor, k = 0;
|
||||||
|
|
||||||
Object result = "";
|
Object result = "";
|
||||||
|
|
||||||
|
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> stockFacingPlanogramDataList;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -840,6 +845,65 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
|||||||
data.name = getString(R.string.t2p_data_uploading);
|
data.name = getString(R.string.t2p_data_uploading);
|
||||||
publishProgress(data);
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
|
//Stock Facing Planogram Tracker
|
||||||
|
String stock_facing_planogram_xml = "";
|
||||||
|
onXML = "";
|
||||||
|
stockFacingPlanogramDataList = db.getStockAndFacingPlanogramServerUploadData(coverageList.get(i).getStoreId());
|
||||||
|
|
||||||
|
if (stockFacingPlanogramDataList.size() > 0) {
|
||||||
|
|
||||||
|
for (int i1 = 0; i1 < stockFacingPlanogramDataList.size(); i1++) {
|
||||||
|
onXML = "[STOCK_FACING_PLANOGRAM_DATA]"
|
||||||
|
+ "[MID]" + mid + "[/MID]"
|
||||||
|
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||||
|
+ "[SKU_ID]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getSku_id()) + "[/SKU_ID]"
|
||||||
|
//+ "[category_id]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getCategory_id()) + "[/category_id]"
|
||||||
|
//+ "[company_id]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getCompany_id()) + "[/company_id]"
|
||||||
|
//+ "[sub_category_id]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getSub_category_id()) + "[/sub_category_id]"
|
||||||
|
+ "[BRAND_ID]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getBrand_id()) + "[/BRAND_ID]"
|
||||||
|
+ "[SHELF_ID]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getSp_addShelf_id()) + "[/SHELF_ID]"
|
||||||
|
+ "[SHELF_POSITION]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getSp_shelfPosition()) + "[/SHELF_POSITION]"
|
||||||
|
+ "[CHECKBOX]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getCheckbox_sku()) + "[/CHECKBOX]"
|
||||||
|
+ "[/STOCK_FACING_PLANOGRAM_DATA]";
|
||||||
|
|
||||||
|
stock_facing_planogram_xml = stock_facing_planogram_xml + onXML;
|
||||||
|
}
|
||||||
|
|
||||||
|
final String sos_xml = "[DATA]" + stock_facing_planogram_xml + "[/DATA]";
|
||||||
|
|
||||||
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||||
|
request.addProperty("XMLDATA", sos_xml);
|
||||||
|
request.addProperty("KEYS", "STOCK_FACING_PLANOGRAM_DATA");
|
||||||
|
request.addProperty("USERNAME", userId);
|
||||||
|
request.addProperty("MID", mid);
|
||||||
|
|
||||||
|
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||||
|
envelope.dotNet = true;
|
||||||
|
envelope.setOutputSoapObject(request);
|
||||||
|
|
||||||
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
|
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||||
|
|
||||||
|
result = envelope.getResponse();
|
||||||
|
|
||||||
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.toString().equalsIgnoreCase(CommonString.KEY_NO_DATA)) {
|
||||||
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.toString().equalsIgnoreCase(CommonString.KEY_FAILURE)) {
|
||||||
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data.value = 50;
|
||||||
|
data.name = getString(R.string.stock_planogram_data_uploading);
|
||||||
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
//Image Upload
|
//Image Upload
|
||||||
|
|
||||||
//Stock Facing Images Upload
|
//Stock Facing Images Upload
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.GapsChecklistGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.Promo_Compliance_DataGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.Promo_Compliance_DataGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.StockFacing_PlanogramTrackerDataGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlHandlers.FailureXMLHandler;
|
import cpm.com.gskmtorange.xmlHandlers.FailureXMLHandler;
|
||||||
@@ -80,9 +81,10 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
private SharedPreferences preferences;
|
private SharedPreferences preferences;
|
||||||
private int factor, k = 0;
|
private int factor, k = 0;
|
||||||
Object result = "";
|
Object result = "";
|
||||||
|
|
||||||
Toolbar toolbar;
|
Toolbar toolbar;
|
||||||
|
|
||||||
|
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> stockFacingPlanogramDataList;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -847,6 +849,65 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
data.name = getString(R.string.t2p_data_uploading);
|
data.name = getString(R.string.t2p_data_uploading);
|
||||||
publishProgress(data);
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
|
//Stock Facing Planogram Tracker
|
||||||
|
String stock_facing_planogram_xml = "";
|
||||||
|
onXML = "";
|
||||||
|
stockFacingPlanogramDataList = db.getStockAndFacingPlanogramServerUploadData(coverageList.get(i).getStoreId());
|
||||||
|
|
||||||
|
if (stockFacingPlanogramDataList.size() > 0) {
|
||||||
|
|
||||||
|
for (int i1 = 0; i1 < stockFacingPlanogramDataList.size(); i1++) {
|
||||||
|
onXML = "[STOCK_FACING_PLANOGRAM_DATA]"
|
||||||
|
+ "[MID]" + mid + "[/MID]"
|
||||||
|
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||||
|
+ "[SKU_ID]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getSku_id()) + "[/SKU_ID]"
|
||||||
|
//+ "[category_id]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getCategory_id()) + "[/category_id]"
|
||||||
|
//+ "[company_id]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getCompany_id()) + "[/company_id]"
|
||||||
|
//+ "[sub_category_id]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getSub_category_id()) + "[/sub_category_id]"
|
||||||
|
+ "[BRAND_ID]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getBrand_id()) + "[/BRAND_ID]"
|
||||||
|
+ "[SHELF_ID]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getSp_addShelf_id()) + "[/SHELF_ID]"
|
||||||
|
+ "[SHELF_POSITION]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getSp_shelfPosition()) + "[/SHELF_POSITION]"
|
||||||
|
+ "[CHECKBOX]" + Integer.parseInt(stockFacingPlanogramDataList.get(i1).getCheckbox_sku()) + "[/CHECKBOX]"
|
||||||
|
+ "[/STOCK_FACING_PLANOGRAM_DATA]";
|
||||||
|
|
||||||
|
stock_facing_planogram_xml = stock_facing_planogram_xml + onXML;
|
||||||
|
}
|
||||||
|
|
||||||
|
final String sos_xml = "[DATA]" + stock_facing_planogram_xml + "[/DATA]";
|
||||||
|
|
||||||
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||||
|
request.addProperty("XMLDATA", sos_xml);
|
||||||
|
request.addProperty("KEYS", "STOCK_FACING_PLANOGRAM_DATA");
|
||||||
|
request.addProperty("USERNAME", userId);
|
||||||
|
request.addProperty("MID", mid);
|
||||||
|
|
||||||
|
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||||
|
envelope.dotNet = true;
|
||||||
|
envelope.setOutputSoapObject(request);
|
||||||
|
|
||||||
|
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||||
|
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||||
|
|
||||||
|
result = envelope.getResponse();
|
||||||
|
|
||||||
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.toString().equalsIgnoreCase(CommonString.KEY_NO_DATA)) {
|
||||||
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.toString().equalsIgnoreCase(CommonString.KEY_FAILURE)) {
|
||||||
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data.value = 50;
|
||||||
|
data.name = getString(R.string.stock_planogram_data_uploading);
|
||||||
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
//Image Upload
|
//Image Upload
|
||||||
|
|
||||||
//Stock Facing Images Upload
|
//Stock Facing Images Upload
|
||||||
|
|||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class ShelfMasterGetterSetter {
|
||||||
|
String table_SHELF_MASTER;
|
||||||
|
|
||||||
|
ArrayList<String> SHELF_ID = new ArrayList<>();
|
||||||
|
ArrayList<String> SHELF = new ArrayList<>();
|
||||||
|
|
||||||
|
public String getTable_SHELF_MASTER() {
|
||||||
|
return table_SHELF_MASTER;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTable_SHELF_MASTER(String table_SHELF_MASTER) {
|
||||||
|
this.table_SHELF_MASTER = table_SHELF_MASTER;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getSHELF_ID() {
|
||||||
|
return SHELF_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSHELF_ID(String SHELF_ID) {
|
||||||
|
this.SHELF_ID.add(SHELF_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getSHELF() {
|
||||||
|
return SHELF;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSHELF(String SHELF) {
|
||||||
|
this.SHELF.add(SHELF);
|
||||||
|
}
|
||||||
|
}
|
||||||
+185
@@ -0,0 +1,185 @@
|
|||||||
|
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class StockFacing_PlanogramTrackerDataGetterSetter {
|
||||||
|
String shelf_id, shelf, sp_addShelf_id, sp_addShelf, sp_shelfPosition, checkbox_sku;
|
||||||
|
String category_id, sub_category_id, sub_category, brand_id, brand,
|
||||||
|
sku_id, sku, mrp, sku_sequence, stock, facing, mbq, company_id, image1, image2, sos_target;
|
||||||
|
|
||||||
|
public String getShelf_id() {
|
||||||
|
return shelf_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShelf_id(String shelf_id) {
|
||||||
|
this.shelf_id = shelf_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShelf() {
|
||||||
|
return shelf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShelf(String shelf) {
|
||||||
|
this.shelf = shelf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSp_addShelf_id() {
|
||||||
|
return sp_addShelf_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSp_addShelf_id(String sp_addShelf_id) {
|
||||||
|
this.sp_addShelf_id = sp_addShelf_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSp_addShelf() {
|
||||||
|
return sp_addShelf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSp_addShelf(String sp_addShelf) {
|
||||||
|
this.sp_addShelf = sp_addShelf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSp_shelfPosition() {
|
||||||
|
return sp_shelfPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSp_shelfPosition(String sp_shelfPosition) {
|
||||||
|
this.sp_shelfPosition = sp_shelfPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory_id() {
|
||||||
|
return category_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory_id(String category_id) {
|
||||||
|
this.category_id = category_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSub_category_id() {
|
||||||
|
return sub_category_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSub_category_id(String sub_category_id) {
|
||||||
|
this.sub_category_id = sub_category_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSub_category() {
|
||||||
|
return sub_category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSub_category(String sub_category) {
|
||||||
|
this.sub_category = sub_category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBrand_id() {
|
||||||
|
return brand_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBrand_id(String brand_id) {
|
||||||
|
this.brand_id = brand_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBrand() {
|
||||||
|
return brand;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBrand(String brand) {
|
||||||
|
this.brand = brand;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSku_id() {
|
||||||
|
return sku_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSku_id(String sku_id) {
|
||||||
|
this.sku_id = sku_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSku() {
|
||||||
|
return sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSku(String sku) {
|
||||||
|
this.sku = sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMrp() {
|
||||||
|
return mrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMrp(String mrp) {
|
||||||
|
this.mrp = mrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSku_sequence() {
|
||||||
|
return sku_sequence;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSku_sequence(String sku_sequence) {
|
||||||
|
this.sku_sequence = sku_sequence;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStock() {
|
||||||
|
return stock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStock(String stock) {
|
||||||
|
this.stock = stock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFacing() {
|
||||||
|
return facing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFacing(String facing) {
|
||||||
|
this.facing = facing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMbq() {
|
||||||
|
return mbq;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMbq(String mbq) {
|
||||||
|
this.mbq = mbq;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompany_id() {
|
||||||
|
return company_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompany_id(String company_id) {
|
||||||
|
this.company_id = company_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage1() {
|
||||||
|
return image1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImage1(String image1) {
|
||||||
|
this.image1 = image1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage2() {
|
||||||
|
return image2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImage2(String image2) {
|
||||||
|
this.image2 = image2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSos_target() {
|
||||||
|
return sos_target;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSos_target(String sos_target) {
|
||||||
|
this.sos_target = sos_target;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckbox_sku() {
|
||||||
|
return checkbox_sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheckbox_sku(String checkbox_sku) {
|
||||||
|
this.checkbox_sku = checkbox_sku;
|
||||||
|
}
|
||||||
|
}
|
||||||
+138
@@ -0,0 +1,138 @@
|
|||||||
|
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by gagang on 23-12-2016.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Stock_Facing_PlanogramTrackerGetterSetter {
|
||||||
|
String category_id, sub_category_id, sub_category, brand_id, brand,
|
||||||
|
sku_id, sku, mrp, sku_sequence, stock, facing, mbq, company_id, image1, image2, sos_target;
|
||||||
|
|
||||||
|
public String getSub_category_id() {
|
||||||
|
return sub_category_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSub_category_id(String sub_category_id) {
|
||||||
|
this.sub_category_id = sub_category_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSub_category() {
|
||||||
|
return sub_category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSub_category(String sub_category) {
|
||||||
|
this.sub_category = sub_category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBrand_id() {
|
||||||
|
return brand_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBrand_id(String brand_id) {
|
||||||
|
this.brand_id = brand_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBrand() {
|
||||||
|
return brand;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBrand(String brand) {
|
||||||
|
this.brand = brand;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSku_id() {
|
||||||
|
return sku_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSku_id(String sku_id) {
|
||||||
|
this.sku_id = sku_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSku() {
|
||||||
|
return sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSku(String sku) {
|
||||||
|
this.sku = sku;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMrp() {
|
||||||
|
return mrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMrp(String mrp) {
|
||||||
|
this.mrp = mrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSku_sequence() {
|
||||||
|
return sku_sequence;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSku_sequence(String sku_sequence) {
|
||||||
|
this.sku_sequence = sku_sequence;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStock() {
|
||||||
|
return stock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStock(String stock) {
|
||||||
|
this.stock = stock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFacing() {
|
||||||
|
return facing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFacing(String facing) {
|
||||||
|
this.facing = facing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMbq() {
|
||||||
|
return mbq;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMbq(String mbq) {
|
||||||
|
this.mbq = mbq;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompany_id() {
|
||||||
|
return company_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompany_id(String company_id) {
|
||||||
|
this.company_id = company_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage1() {
|
||||||
|
return image1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImage1(String image1) {
|
||||||
|
this.image1 = image1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage2() {
|
||||||
|
return image2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImage2(String image2) {
|
||||||
|
this.image2 = image2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory_id() {
|
||||||
|
return category_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory_id(String category_id) {
|
||||||
|
this.category_id = category_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSos_target() {
|
||||||
|
return sos_target;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSos_target(String sos_target) {
|
||||||
|
this.sos_target = sos_target;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,7 +24,7 @@ public class TableBean {
|
|||||||
public static String STORE_PERFORMANCE;
|
public static String STORE_PERFORMANCE;
|
||||||
public static String MAPPING_PLANOGRAM;
|
public static String MAPPING_PLANOGRAM;
|
||||||
public static String MAPPING_SOS_TARGET;
|
public static String MAPPING_SOS_TARGET;
|
||||||
|
public static String SHELF_MASTER;
|
||||||
|
|
||||||
|
|
||||||
public static String getAdditionalDisplay() {
|
public static String getAdditionalDisplay() {
|
||||||
@@ -169,5 +169,13 @@ public class TableBean {
|
|||||||
MAPPING_SOS_TARGET = mappingSosTarget;
|
MAPPING_SOS_TARGET = mappingSosTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Gagan end code
|
public static String getShelfMaster() {
|
||||||
|
return SHELF_MASTER;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setShelfMaster(String shelfMaster) {
|
||||||
|
SHELF_MASTER = shelfMaster;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Gagan end code
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
|||||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.STORE_PERFORMANCE_MasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.STORE_PERFORMANCE_MasterGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.ShelfMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||||
|
|
||||||
@@ -787,5 +788,31 @@ public class XMLHandlers {
|
|||||||
return st;
|
return st;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ShelfMasterGetterSetter shelfMasterXMLHandler(XmlPullParser xpp, int eventType) {
|
||||||
|
ShelfMasterGetterSetter st = new ShelfMasterGetterSetter();
|
||||||
|
|
||||||
|
try {
|
||||||
|
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||||
|
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||||
|
|
||||||
|
if (xpp.getName().equals("META_DATA")) {
|
||||||
|
st.setTable_SHELF_MASTER(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("SHELF_ID")) {
|
||||||
|
st.setSHELF_ID(xpp.nextText());
|
||||||
|
}
|
||||||
|
if (xpp.getName().equals("SHELF")) {
|
||||||
|
st.setSHELF(xpp.nextText());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xpp.next();
|
||||||
|
}
|
||||||
|
} catch (XmlPullParserException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return st;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
|
||||||
|
<corners android:radius="2dp" />
|
||||||
|
|
||||||
|
<solid android:color="#FFF" />
|
||||||
|
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="@color/colorPrimary" />
|
||||||
|
|
||||||
|
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
|
||||||
|
<corners android:radius="15dp" />
|
||||||
|
<!--<solid android:color="#FFF" />-->
|
||||||
|
|
||||||
|
<stroke
|
||||||
|
android:width="2dp"
|
||||||
|
android:color="@color/colorPrimary" />
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
tools:context="cpm.com.gskmtorange.gsk_dailyentry.StockFacing_PlanogramTrackerActivity">
|
||||||
|
|
||||||
|
<android.support.design.widget.AppBarLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:theme="@style/AppTheme.AppBarOverlay">
|
||||||
|
|
||||||
|
<android.support.v7.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:background="?attr/colorPrimary"
|
||||||
|
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||||
|
|
||||||
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
|
<include layout="@layout/content_stock_facing__planogram_tracker" />
|
||||||
|
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/fab_stockFacing_PlanogramTracker"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_margin="@dimen/fab_margin"
|
||||||
|
app:srcCompat="@drawable/save_icon" />
|
||||||
|
|
||||||
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/content_stock_facing__planogram_tracker"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
|
tools:context="cpm.com.gskmtorange.gsk_dailyentry.StockFacing_PlanogramTrackerActivity"
|
||||||
|
tools:showIn="@layout/activity_stock_facing__planogram_tracker">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="10dp">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_addShelf"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Add Shelf"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/white" />
|
||||||
|
|
||||||
|
<!--<Button
|
||||||
|
android:id="@+id/btn_addSKU"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Add SKU"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/white" />-->
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/grey_dark_background" />
|
||||||
|
|
||||||
|
<!--<android.support.v7.widget.RecyclerView
|
||||||
|
android:id="@+id/recyclerView_stockFacingPlanogramTracker"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />-->
|
||||||
|
|
||||||
|
<ExpandableListView
|
||||||
|
android:id="@+id/exp_PlanogramListView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:cacheColorHint="#00000000"
|
||||||
|
android:divider="@null"
|
||||||
|
android:dividerHeight="0dp"
|
||||||
|
android:scrollingCache="false" />
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
@@ -0,0 +1,244 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<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_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/card_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
card_view:cardBackgroundColor="@color/light_orange_background"
|
||||||
|
card_view:cardCornerRadius="20dp">
|
||||||
|
<!--android:background="@drawable/bg_boarder_orange_transparent"-->
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/light_orange_background"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!--Dialog Title-->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_dialog_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="15dp"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:paddingTop="15dp"
|
||||||
|
android:text="Add Shelf"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<!--Add Shelf Position Value-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!--Add Shelf View-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_boarder_orange"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="7"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_boarder_orange"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="6"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_boarder_orange"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="5"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_boarder_orange"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="4"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_boarder_orange"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="3"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_boarder_orange"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="2"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_boarder_orange"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="1"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_divider1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<!--Add Shelf and Shelf Position-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
|
<!--Add Shelf-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="Add Shelf"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/sp_addShelf"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--Shelf Position-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:text="Position on Shelf"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/sp_shelfPosition"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
|
||||||
|
<!--Bottom Buttom-->
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rel_addShelf_Cancel"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:padding="10dp">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/dialog_btn_addShelf"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Add Shelf"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/white" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/dialog_btn_cancel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Cancel"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/white" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</android.support.v7.widget.CardView>
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<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_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/card_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
card_view:cardBackgroundColor="@color/light_orange_background"
|
||||||
|
card_view:cardCornerRadius="20dp">
|
||||||
|
<!--android:background="@drawable/bg_boarder_orange_transparent"-->
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/light_orange_background"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!--Add Shelf View-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="10dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_addSku"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--Bottom Buttom-->
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rel_addSku_Cancel"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/dialog_btn_addSku_Shelf"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Add SKU to Shelf"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/white" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/dialog_btn_cancel_addSku"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:text="Cancel"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/white" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</android.support.v7.widget.CardView>
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_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/light_orange_background"
|
||||||
|
card_view:cardCornerRadius="10dp">-->
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_stockFaceupHeader"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.6"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_skuChild"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:text="Brand Name"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/colorPrimaryDark" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--Camera Images-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".4"
|
||||||
|
android:gravity="center_vertical|center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/chk_sku"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/colorPrimary" />
|
||||||
|
<!--</android.support.v7.widget.CardView>-->
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_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/light_orange_background"
|
||||||
|
card_view:cardCornerRadius="10dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/lin_stockFaceupHeader"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.2"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_shelfHeader"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="20dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:text="Brand Name"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/colorPrimaryDark" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--Camera Images-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight=".8"
|
||||||
|
android:gravity="center_vertical|right"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_addSku"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="15dp"
|
||||||
|
android:text="Add SKU"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
|
android:textColor="@color/black" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</android.support.v7.widget.CardView>
|
||||||
|
</LinearLayout>
|
||||||
@@ -7,11 +7,12 @@
|
|||||||
<color name="white">#FFFFFF</color>
|
<color name="white">#FFFFFF</color>
|
||||||
<color name="black">#000000</color>
|
<color name="black">#000000</color>
|
||||||
<color name="grey_background">#EEEEEE</color>
|
<color name="grey_background">#EEEEEE</color>
|
||||||
|
<color name="grey_dark_background">#888</color>
|
||||||
|
<color name="light_orange_background">#FFF9E0BA</color>
|
||||||
<color name="green">#FF27A404</color>
|
<color name="green">#FF27A404</color>
|
||||||
<color name="blue">#2196F3</color>
|
<color name="blue">#2196F3</color>
|
||||||
|
|
||||||
<color name="colorOrange">#FFE0B2</color>
|
<color name="colorOrange">#FFE0B2</color>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -265,7 +265,15 @@
|
|||||||
<string name="first_geotag_the_store">First geotag the store</string>
|
<string name="first_geotag_the_store">First geotag the store</string>
|
||||||
|
|
||||||
<string name="new_update_available">New Update Available \n\n Yeni güncelleme var</string>
|
<string name="new_update_available">New Update Available \n\n Yeni güncelleme var</string>
|
||||||
|
|
||||||
|
<string name="title_activity_stock_facing__planogram_tracker">Planogram Tracker</string>
|
||||||
|
|
||||||
<string name="datanotfound">Data not found in</string>
|
<string name="datanotfound">Data not found in</string>
|
||||||
|
|
||||||
<string name="title_activity_t2p_brand__avaibility">T2pBrand_Avaibility</string>
|
<string name="title_activity_t2p_brand__avaibility">T2pBrand_Avaibility</string>
|
||||||
<string name="title_activity_fill_brand">Please fill brand data</string>
|
<string name="title_activity_fill_brand">Please fill brand data</string>
|
||||||
|
|
||||||
|
<!--Stock Facing Planogram Tracker-->
|
||||||
|
<string name="stock_planogram_data_uploading">Stock Planogram Data Uploading</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user