Merge pull request #9 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/CodeFire22
Code fire22
This commit is contained in:
Generated
+1
-1
@@ -41,7 +41,7 @@
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
Generated
+1
@@ -4,6 +4,7 @@
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/GSKMTOrange/GSKMTOrange.iml" filepath="$PROJECT_DIR$/GSKMTOrange/GSKMTOrange.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/GSKORANGEV1.iml" filepath="$PROJECT_DIR$/GSKORANGEV1.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/GSKORANGEV2.iml" filepath="$PROJECT_DIR$/GSKORANGEV2.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@@ -171,11 +171,17 @@
|
||||
android:label="@string/title_activity_upload"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
|
||||
android:name=".dailyentry.T2pBrand_Avaibility"
|
||||
android:label="@string/title_activity_t2p_brand__avaibility"
|
||||
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>
|
||||
|
||||
</manifest>
|
||||
@@ -14,6 +14,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
import cpm.com.gskmtorange.GetterSetter.GeotaggingBeans;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
@@ -62,6 +63,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
TableBean tableBean;
|
||||
private SQLiteDatabase db;
|
||||
Context context;
|
||||
ArrayList<T2PGetterSetter> t2PGetterSetters;
|
||||
|
||||
public GSKOrangeDB(Context context) {
|
||||
|
||||
@@ -131,10 +133,13 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
db.execSQL(TableBean.getMappingSosTarget());
|
||||
|
||||
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) {
|
||||
e.printStackTrace();
|
||||
Toast.makeText(context, "Error -" + e.toString(), Toast.LENGTH_SHORT).show();
|
||||
@@ -163,6 +168,16 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
db.delete(CommonString.TABLE_INSERT_PROMO_SKU, "STORE_ID='" + storeid + "'", null);
|
||||
//Gagan end code
|
||||
|
||||
t2PGetterSetters = getT2pCompliancedaletedata(storeid);
|
||||
|
||||
for (int q = 0; q < t2PGetterSetters.size(); q++) {
|
||||
|
||||
db.delete(CommonString.TABLE_INSERT_T2P_GAPS, "COMMON_ID='" + t2PGetterSetters.get(q).getKey_id() + "'", null);
|
||||
db.delete(CommonString.TABLE_INSERT_T2P_SKU, "COMMON_ID='" + t2PGetterSetters.get(q).getKey_id() + "'", null);
|
||||
db.delete(CommonString.TABLE_INSERT_BRAND_AVAIBILITY_DATA, "COMMON_ID='" + t2PGetterSetters.get(q).getKey_id() + "'", null);
|
||||
|
||||
}
|
||||
|
||||
db.delete(CommonString.TABLE_INSERT_T2P_COMPLIANCE, "STORE_ID='" + storeid + "'", null);
|
||||
}
|
||||
|
||||
@@ -185,8 +200,13 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
db.delete(CommonString.TABLE_INSERT_T2P_COMPLIANCE, 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_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) {
|
||||
@@ -2137,7 +2157,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
//Store wise Performance
|
||||
public void InsertSTORE_PERFORMANCE(STORE_PERFORMANCE_MasterGetterSetter data) {
|
||||
db.delete("STORE_PERFORMANCE", null, null);
|
||||
db.delete("STORE_PERFORMANCE_NEW", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
@@ -2146,17 +2166,18 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
values.put("STORE_ID", data.getSTORE_ID().get(i));
|
||||
values.put("CATEGORY_ID", data.getCATEGORY_ID().get(i));
|
||||
values.put("PERIOD", data.getPERIOD().get(i));
|
||||
values.put("MSL_AVAILABILITY", data.getMSL_AVAILABILITY().get(i));
|
||||
values.put("MSL", data.getMSL_AVAILABILITY().get(i));
|
||||
values.put("SOS", data.getSOS().get(i));
|
||||
values.put("T2P", data.getT2P().get(i));
|
||||
values.put("PROMO", data.getPROMO().get(i));
|
||||
values.put("OSS", data.getOSS().get(i));
|
||||
values.put("ORDERID", data.getORDERID().get(i));
|
||||
values.put("PLANOGRAM", data.getPLANOGRAM().get(i));
|
||||
|
||||
db.insert("STORE_PERFORMANCE", null, values);
|
||||
db.insert("STORE_PERFORMANCE_NEW", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " STORE_PERFORMANCE " + ex.toString());
|
||||
Log.d("Exception ", " STORE_PERFORMANCE_NEW " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2166,7 +2187,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * from STORE_PERFORMANCE " +
|
||||
dbcursor = db.rawQuery("Select * from STORE_PERFORMANCE_NEW " +
|
||||
"where STORE_ID='" + store_id + "' and CATEGORY_ID='" + category_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
@@ -2177,13 +2198,13 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
cd.setStore_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STORE_ID")));
|
||||
cd.setCategory_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CATEGORY_ID")));
|
||||
cd.setPeriod(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PERIOD")));
|
||||
cd.setMsl_availability(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MSL_AVAILABILITY")));
|
||||
cd.setMsl_availability(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MSL")));
|
||||
cd.setSos(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SOS")));
|
||||
cd.setT2p(dbcursor.getString(dbcursor.getColumnIndexOrThrow("T2P")));
|
||||
cd.setPromo(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PROMO")));
|
||||
cd.setOss(dbcursor.getString(dbcursor.getColumnIndexOrThrow("OSS")));
|
||||
cd.setOrder_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("ORDERID")));
|
||||
|
||||
cd.setPLANOGRAM(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PLANOGRAM")));
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
@@ -2202,9 +2223,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select PERIOD, ROUND(avg(MSL_AVAILABILITY),1) as MSL_AVAILABILITY,ROUND(avg(sos),1) as SOS ," +
|
||||
" ROUND(avg(t2p),1) as T2P,ROUND(avg(pROMO),1) as PROMO,ROUND(SUM(oss),1) AS OSS " +
|
||||
"from STORE_PERFORMANCE " +
|
||||
dbcursor = db.rawQuery("Select PERIOD, ROUND(avg(MSL),1) as MSL,ROUND(avg(sos),1) as SOS ," +
|
||||
" ROUND(avg(t2p),1) as T2P,ROUND(avg(pROMO),1) as PROMO , ROUND(avg(pLANOGRAM),1) as PLANOGRAM, ROUND(SUM(oss),1) AS OSS " +
|
||||
"from STORE_PERFORMANCE_NEW " +
|
||||
"where STORE_ID='" + store_id + "' " +
|
||||
"GROUP BY PERIOD " +
|
||||
"ORDER BY ORDERID ", null);
|
||||
@@ -2217,12 +2238,12 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
/* cd.setStore_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STORE_ID")));
|
||||
cd.setCategory_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CATEGORY_ID")));*/
|
||||
cd.setPeriod(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PERIOD")));
|
||||
cd.setMsl_availability(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MSL_AVAILABILITY")));
|
||||
cd.setMsl_availability(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MSL")));
|
||||
cd.setSos(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SOS")));
|
||||
cd.setT2p(dbcursor.getString(dbcursor.getColumnIndexOrThrow("T2P")));
|
||||
cd.setPromo(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PROMO")));
|
||||
cd.setOss(dbcursor.getString(dbcursor.getColumnIndexOrThrow("OSS")));
|
||||
// cd.setOrder_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("ORDERID")));
|
||||
cd.setPLANOGRAM(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PLANOGRAM")));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
@@ -2581,6 +2602,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
ContentValues values = new ContentValues();
|
||||
ContentValues values1 = new ContentValues();
|
||||
ContentValues values2 = new ContentValues();
|
||||
ContentValues values3 = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
|
||||
@@ -2629,6 +2651,20 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
}
|
||||
|
||||
|
||||
ArrayList<BrandAvabilityGetterSetter> brand = data.get(i).getBrandlist();
|
||||
|
||||
for (int p = 0; p < brand.size(); p++) {
|
||||
|
||||
values3.put("COMMON_ID", l);
|
||||
values3.put("BRAND_NAME", brand.get(p).getBRAND());
|
||||
values3.put("BRAND_ID", brand.get(p).getBRAND_ID());
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_BRAND_AVAIBILITY_DATA, null, values3);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in T2P_COMPLIANCE " + ex.toString());
|
||||
@@ -3555,6 +3591,100 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ArrayList<BrandAvabilityGetterSetter> getBrandAvailbilitydata(String store_id, String category_id, String keyAccount_id, String class_id, String storeType_id) {
|
||||
Cursor cursordata = null;
|
||||
ArrayList<BrandAvabilityGetterSetter> Data = new ArrayList<BrandAvabilityGetterSetter>();
|
||||
|
||||
try {
|
||||
|
||||
cursordata = db.rawQuery("SELECT DISTINCT BR.BRAND_ID, BR.BRAND FROM SKU_MASTER SK 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 " +
|
||||
"INNER JOIN " +
|
||||
"(SELECT DISTINCT SKU_ID FROM MAPPING_STOCK WHERE KEYACCOUNT_ID = '" + keyAccount_id + "' AND STORETYPE_ID = '" + storeType_id + "' AND CLASS_ID = '" + class_id + "') A " +
|
||||
"ON SK.SKU_ID = A.SKU_ID " +
|
||||
"WHERE CA.CATEGORY_ID = '" + category_id + "'", null);
|
||||
|
||||
if (cursordata != null) {
|
||||
cursordata.moveToFirst();
|
||||
while (!cursordata.isAfterLast()) {
|
||||
BrandAvabilityGetterSetter sb = new BrandAvabilityGetterSetter();
|
||||
|
||||
sb.setBRAND_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("BRAND_ID")));
|
||||
|
||||
sb.setBRAND(cursordata.getString(cursordata.getColumnIndexOrThrow("BRAND")));
|
||||
|
||||
Data.add(sb);
|
||||
cursordata.moveToNext();
|
||||
}
|
||||
cursordata.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
}
|
||||
return Data;
|
||||
|
||||
}
|
||||
|
||||
public void InsertBrandAvabilitydata(BrandAvabilityGetterSetter data, ArrayList<BrandAvabilityGetterSetter> list) {
|
||||
|
||||
db.delete("Camera_Not_Allowed ", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
|
||||
values.put("STORETYPE_ID", data.getStoreType_id());
|
||||
values.put("class_id", data.getClass_id());
|
||||
values.put("CATEGORY_ID", data.getCategoryId());
|
||||
values.put("keyAccount_id", data.getKeyAccount_id());
|
||||
values.put("STORE_ID", data.getStore_id());
|
||||
values.put("BRAND_NAME", list.get(i).getBRAND());
|
||||
values.put("BRAND_ID", list.get(i).getBRAND_ID());
|
||||
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_BRAND_AVAIBILITY_DATA, null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " Camera_Not_Allowed " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// get T2P brand data
|
||||
public ArrayList<BrandAvabilityGetterSetter> getT2BrandData(String common_id) {
|
||||
|
||||
ArrayList<BrandAvabilityGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
try {
|
||||
dbcursor = db.rawQuery("SELECT * FROM " + CommonString.TABLE_INSERT_BRAND_AVAIBILITY_DATA + " where " +
|
||||
CommonString.KEY_COMMON_ID + "='" + common_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
BrandAvabilityGetterSetter BG = new BrandAvabilityGetterSetter();
|
||||
|
||||
BG.setBRAND(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND_NAME")));
|
||||
BG.setBRAND_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND_ID")));
|
||||
|
||||
list.add(BG);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
//Stock Facing Planogram Tracker
|
||||
public void InsertSHELF_MASTER(ShelfMasterGetterSetter data) {
|
||||
db.delete("SHELF_MASTER", null, null);
|
||||
@@ -3642,18 +3772,31 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
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;
|
||||
}
|
||||
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) {
|
||||
@@ -3712,6 +3855,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
|
||||
StockFacing_PlanogramTrackerDataGetterSetter cd = new StockFacing_PlanogramTrackerDataGetterSetter();
|
||||
|
||||
cd.setSp_addShelf_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("Shelf_id")));
|
||||
@@ -3724,15 +3868,46 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
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;
|
||||
}
|
||||
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);
|
||||
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
T2PGetterSetter tp = new T2PGetterSetter();
|
||||
|
||||
tp.setKey_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_ID)));
|
||||
list.add(tp);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
//return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package cpm.com.gskmtorange.GetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 07-02-2017.
|
||||
*/
|
||||
|
||||
public class BrandAvabilityGetterSetter {
|
||||
|
||||
String BRAND_ID;
|
||||
String BRAND;
|
||||
String keyAccount_id;
|
||||
String class_id;
|
||||
String categoryId;
|
||||
|
||||
public String getStore_id() {
|
||||
return store_id;
|
||||
}
|
||||
|
||||
public void setStore_id(String store_id) {
|
||||
this.store_id = store_id;
|
||||
}
|
||||
|
||||
String store_id;
|
||||
|
||||
public String getStoreType_id() {
|
||||
return storeType_id;
|
||||
}
|
||||
|
||||
public void setStoreType_id(String storeType_id) {
|
||||
this.storeType_id = storeType_id;
|
||||
}
|
||||
|
||||
public String getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
public void setCategoryId(String categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public String getClass_id() {
|
||||
return class_id;
|
||||
}
|
||||
|
||||
public void setClass_id(String class_id) {
|
||||
this.class_id = class_id;
|
||||
}
|
||||
|
||||
public String getKeyAccount_id() {
|
||||
return keyAccount_id;
|
||||
}
|
||||
|
||||
public void setKeyAccount_id(String keyAccount_id) {
|
||||
this.keyAccount_id = keyAccount_id;
|
||||
}
|
||||
|
||||
String storeType_id;
|
||||
|
||||
|
||||
public String getBRAND() {
|
||||
return BRAND;
|
||||
}
|
||||
|
||||
public void setBRAND(String BRAND) {
|
||||
this.BRAND = BRAND;
|
||||
}
|
||||
|
||||
public String getBRAND_ID() {
|
||||
return BRAND_ID;
|
||||
}
|
||||
|
||||
public void setBRAND_ID(String BRAND_ID) {
|
||||
this.BRAND_ID = BRAND_ID;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -555,10 +555,10 @@ public class CommonString {
|
||||
|
||||
public static final String CREATE_TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_HEADER = "CREATE TABLE IF NOT EXISTS "
|
||||
+ TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_HEADER
|
||||
|
||||
+ "("
|
||||
+ "KEY_ID"
|
||||
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||
|
||||
+ "store_id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
@@ -615,4 +615,5 @@ public class CommonString {
|
||||
+ " VARCHAR"
|
||||
|
||||
+ ")";
|
||||
|
||||
}
|
||||
|
||||
@@ -169,6 +169,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
str = CommonString.FILE_PATH;
|
||||
|
||||
///band List
|
||||
|
||||
brand_list = db.getBrandMasterData(store_id, categoryId);
|
||||
BrandMasterGetterSetter brand = new BrandMasterGetterSetter();
|
||||
String str = getResources().getString(R.string.select);
|
||||
@@ -1164,10 +1165,9 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
ab.setSku_id(SKU_ID);
|
||||
ab.setSku_name(SKU_name);
|
||||
// ab.setProcess_id(process_id);
|
||||
ab.setQuantity(Edt_txt.getText().toString());
|
||||
ab.setQuantity( Edt_txt.getText().toString().replaceFirst("^0+(?!$)", ""));
|
||||
// ab.setCategory_id(category_id);
|
||||
|
||||
|
||||
if (validateDialogData(ab)) {
|
||||
|
||||
|
||||
|
||||
+320
-8
@@ -24,6 +24,7 @@ import android.provider.MediaStore;
|
||||
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.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
@@ -38,10 +39,12 @@ import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
@@ -54,7 +57,9 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
@@ -71,7 +76,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
ArrayList<T2PGetterSetter> t2PGetterSetters;
|
||||
T2PAdapter t2PAdapter;
|
||||
RecyclerView rec_t2p;
|
||||
|
||||
MyAdaptorStock adapterData;
|
||||
String categoryName, categoryId;
|
||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
||||
String str = CommonString.FILE_PATH,
|
||||
@@ -81,7 +86,14 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
int child_position = -1, child_position1 = -1, child_position2 = -1;
|
||||
String error_msg;
|
||||
private SharedPreferences preferences;
|
||||
|
||||
Spinner spinner_brand;
|
||||
Button btn_add,btn_close;
|
||||
ListView listview;
|
||||
LinearLayout linearlay;
|
||||
//CardView cardlay;
|
||||
String brand_name="",brand_id="";
|
||||
ArrayList<BrandAvabilityGetterSetter> brand_new_list=new ArrayList<BrandAvabilityGetterSetter>();
|
||||
ArrayList<BrandAvabilityGetterSetter> brandList;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -170,9 +182,15 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
|
||||
ArrayList<GapsChecklistGetterSetter> gapsList = db.getGapsData(t2PGetterSetters.get(i).getKey_id());
|
||||
ArrayList<SkuGetterSetter> skuList = db.getT2PSKUData(t2PGetterSetters.get(i).getKey_id());
|
||||
ArrayList<BrandAvabilityGetterSetter> brandList = db.getT2BrandData(t2PGetterSetters.get(i).getKey_id());
|
||||
|
||||
t2PGetterSetters.get(i).setGapsChecklist(gapsList);
|
||||
t2PGetterSetters.get(i).setSkulist(skuList);
|
||||
t2PGetterSetters.get(i).setBrandlist(brandList);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -231,6 +249,9 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
/* Typeface iconFont = FontManager.getTypeface(getApplicationContext(), FontManager.FONTAWESOME);
|
||||
FontManager.markAsIconContainer(findViewById(R.id.icons_container), iconFont);
|
||||
*/
|
||||
|
||||
|
||||
|
||||
holder.btn_gaps.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@@ -330,7 +351,11 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
});
|
||||
|
||||
if (mItem.getImage().equals("")) {
|
||||
|
||||
|
||||
|
||||
if (mItem.isPresent()) {
|
||||
|
||||
holder.img_cam.setBackgroundResource(R.mipmap.camera_orange);
|
||||
} else {
|
||||
//if not present camera disabled
|
||||
@@ -357,6 +382,8 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
|
||||
if (mItem.getImage1().equals("")) {
|
||||
if (mItem.isPresent()) {
|
||||
|
||||
holder.img_cam1.setVisibility(View.VISIBLE);
|
||||
holder.img_cam1.setBackgroundResource(R.mipmap.camera_orange);
|
||||
} else {
|
||||
//if not present camera disabled
|
||||
@@ -383,6 +410,8 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
|
||||
if (mItem.getImage2().equals("")) {
|
||||
if (mItem.isPresent()) {
|
||||
|
||||
holder.img_cam2.setVisibility(View.VISIBLE);
|
||||
holder.img_cam2.setBackgroundResource(R.mipmap.camera_orange);
|
||||
} else {
|
||||
//if not present camera disabled
|
||||
@@ -393,16 +422,53 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
holder.img_cam2.setBackgroundResource(R.mipmap.camera_green);
|
||||
}
|
||||
} else {
|
||||
holder.img_cam.setBackgroundResource(R.mipmap.camera_grey);
|
||||
holder.img_cam1.setBackgroundResource(R.mipmap.camera_grey);
|
||||
holder.img_cam2.setBackgroundResource(R.mipmap.camera_grey);
|
||||
// holder.img_cam.setBackgroundResource(R.mipmap.camera_grey);
|
||||
// holder.img_cam1.setBackgroundResource(R.mipmap.camera_grey);
|
||||
// holder.img_cam2.setBackgroundResource(R.mipmap.camera_grey);
|
||||
holder.img_cam1.setVisibility(View.INVISIBLE);
|
||||
holder.img_cam2.setVisibility(View.INVISIBLE);
|
||||
|
||||
holder.img_cam.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
/* Intent in =new Intent(T2PComplianceActivity.this,T2pBrand_Avaibility.class);
|
||||
in.putExtra("categoryName", categoryName);
|
||||
in.putExtra("categoryId", categoryId);
|
||||
startActivity(in);*/
|
||||
|
||||
showBrandAvabilitydialog(mItem.getBrandlist());
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
if(mItem.getBrandlist().size()>0)
|
||||
{
|
||||
|
||||
holder.img_cam.setBackgroundResource(R.mipmap.new_no_camera_done_edit);
|
||||
}else{
|
||||
|
||||
if (mItem.isPresent()) {
|
||||
|
||||
holder.img_cam.setBackgroundResource(R.mipmap.new_no_camera_edit);
|
||||
} else {
|
||||
//if not present camera disabled
|
||||
holder.img_cam.setBackgroundResource(R.mipmap.no_camera);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
boolean is_enabled = mItem.isPresent();
|
||||
|
||||
holder.toggle_btn.setChecked(is_enabled);
|
||||
holder.img_cam.setEnabled(is_enabled);
|
||||
holder.img_cam.setEnabled(is_enabled);
|
||||
holder.img_cam1.setEnabled(is_enabled);
|
||||
holder.img_cam2.setEnabled(is_enabled);
|
||||
holder.btn_gaps.setEnabled(is_enabled);
|
||||
@@ -554,7 +620,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
sku.setBRAND(brand_selected[0].getBRAND().get(0));
|
||||
sku.setSKU(sku_selected[0].getSKU());
|
||||
sku.setSKU_ID(sku_selected[0].getSKU_ID());
|
||||
sku.setSTOCK(et_stock.getText().toString());
|
||||
sku.setSTOCK(et_stock.getText().toString().replaceFirst("^0+(?!$)", ""));
|
||||
|
||||
skuAddedList.add(sku);
|
||||
|
||||
@@ -574,7 +640,6 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
|
||||
spinner_sku.setSelection(0);
|
||||
|
||||
|
||||
brand_selected[0] = null;
|
||||
sku_selected[0] = null;
|
||||
}
|
||||
@@ -854,6 +919,12 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
error_msg = getResources().getString(R.string.click_image);
|
||||
break;
|
||||
}
|
||||
else if (t2PGetterSetters.get(i).getBrandlist().size() == 0) {
|
||||
flag = false;
|
||||
error_msg = getResources().getString(R.string.title_activity_fill_brand);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1204,4 +1275,245 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
super.onPageStarted(view, url, favicon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// new <code></code>
|
||||
|
||||
|
||||
|
||||
public void showBrandAvabilitydialog(final ArrayList<BrandAvabilityGetterSetter> brandGetdata) {
|
||||
|
||||
final ArrayList<BrandAvabilityGetterSetter> brandList = db.getBrandAvailbilitydata(store_id, categoryId,keyAccount_id,class_id,storeType_id);
|
||||
|
||||
BrandAvabilityGetterSetter brand = new BrandAvabilityGetterSetter();
|
||||
brand.setBRAND(getResources().getString(R.string.select));
|
||||
brandList.add(0, brand);
|
||||
|
||||
final Dialog dialog = new Dialog(T2PComplianceActivity.this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||
dialog.setContentView(R.layout.t2pbranddialoglayout);
|
||||
dialog.setCancelable(false);
|
||||
//pb = (ProgressBar) dialog.findViewById(R.id.progressBar1);
|
||||
//dialog.setCancelable(false);
|
||||
spinner_brand = (Spinner) dialog.findViewById(R.id.spinner_brand);
|
||||
|
||||
btn_add = (Button) dialog.findViewById(R.id.btn_add);
|
||||
btn_close = (Button) dialog.findViewById(R.id.btn_cancel);
|
||||
|
||||
listview = (ListView) dialog.findViewById(R.id.lv);
|
||||
linearlay = (LinearLayout) dialog.findViewById(R.id.list_layout);
|
||||
// cardlay = (CardView) dialog.findViewById(R.id.cardId);
|
||||
|
||||
// Create custom adapter object ( see below CustomAdapter.java )
|
||||
T2PComplianceActivity.CustomBRANDAdapter adapter = new T2PComplianceActivity.CustomBRANDAdapter(T2PComplianceActivity.this, R.layout.custom_spinner_item, brandList);
|
||||
|
||||
spinner_brand.setAdapter(adapter);
|
||||
|
||||
if (brandGetdata.size() > 0) {
|
||||
linearlay.setVisibility(View.VISIBLE);
|
||||
// cardlay.setVisibility(View.VISIBLE);
|
||||
adapterData = new T2PComplianceActivity.MyAdaptorStock(T2PComplianceActivity.this, brandGetdata);
|
||||
listview.setAdapter(adapterData);
|
||||
listview.invalidateViews();
|
||||
} else {
|
||||
linearlay.setVisibility(View.GONE);
|
||||
// cardlay.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
spinner_brand.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
||||
if (position != 0) {
|
||||
|
||||
brand_name = brandList.get(position).getBRAND();
|
||||
brand_id = brandList.get(position).getBRAND_ID();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
btn_close.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
//brandGetdata.add(brand_new_list);
|
||||
dialog.cancel();
|
||||
t2PAdapter.notifyDataSetChanged();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
btn_add.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
BrandAvabilityGetterSetter ab = new BrandAvabilityGetterSetter();
|
||||
|
||||
if (!brand_name.equalsIgnoreCase("") && brand_name!=null){
|
||||
|
||||
BrandAvabilityGetterSetter brand = new BrandAvabilityGetterSetter();
|
||||
|
||||
brand.setBRAND(brand_name);
|
||||
brand.setBRAND_ID(brand_id);
|
||||
|
||||
brandGetdata.add(brand);
|
||||
|
||||
adapterData = new T2PComplianceActivity.MyAdaptorStock(T2PComplianceActivity.this, brandGetdata);
|
||||
listview.setAdapter(adapterData);
|
||||
listview.invalidateViews();
|
||||
|
||||
// cardlay.setVisibility(View.VISIBLE);
|
||||
linearlay.setVisibility(View.VISIBLE);
|
||||
spinner_brand.setSelection(0);
|
||||
brand_name="";
|
||||
brand_id="";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Snackbar.make(v, "Please select dropdown", Snackbar.LENGTH_LONG)
|
||||
.setAction("Action", null).show();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
dialog.show();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class MyAdaptorStock extends BaseAdapter {
|
||||
|
||||
private LayoutInflater mInflater;
|
||||
private Context mcontext;
|
||||
private ArrayList<BrandAvabilityGetterSetter> list;
|
||||
|
||||
public MyAdaptorStock(Activity activity, ArrayList<BrandAvabilityGetterSetter> list1) {
|
||||
|
||||
mInflater = LayoutInflater.from(getBaseContext());
|
||||
mcontext = activity;
|
||||
list = list1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
|
||||
return list.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position1) {
|
||||
|
||||
return position1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position1) {
|
||||
|
||||
return position1;
|
||||
}
|
||||
|
||||
class ViewHolder {
|
||||
TextView brand;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final int position1, View convertView, ViewGroup parent) {
|
||||
|
||||
final T2PComplianceActivity.MyAdaptorStock.ViewHolder holder;
|
||||
|
||||
if (convertView == null) {
|
||||
|
||||
convertView = mInflater
|
||||
.inflate(R.layout.brandavabilityadpterlayout, null);
|
||||
holder = new T2PComplianceActivity.MyAdaptorStock.ViewHolder();
|
||||
|
||||
holder.brand = (TextView) convertView.findViewById(R.id.brand_name);
|
||||
|
||||
convertView.setTag(holder);
|
||||
} else {
|
||||
holder = (T2PComplianceActivity.MyAdaptorStock.ViewHolder) convertView.getTag();
|
||||
}
|
||||
|
||||
holder.brand.setText(list.get(position1).getBRAND());
|
||||
|
||||
holder.brand.setId(position1);
|
||||
|
||||
|
||||
return convertView;
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomBRANDAdapter extends ArrayAdapter<String> {
|
||||
|
||||
BrandAvabilityGetterSetter tempValues = null;
|
||||
LayoutInflater inflater;
|
||||
private Activity activity;
|
||||
private ArrayList data;
|
||||
|
||||
/*************
|
||||
* CustomAdapter Constructor
|
||||
*****************/
|
||||
public CustomBRANDAdapter(
|
||||
T2PComplianceActivity activitySpinner,
|
||||
int textViewResourceId,
|
||||
ArrayList objects
|
||||
|
||||
) {
|
||||
super(activitySpinner, textViewResourceId, objects);
|
||||
|
||||
/********** Take passed values **********/
|
||||
activity = activitySpinner;
|
||||
data = objects;
|
||||
/*********** Layout inflator to call external xml layout () **********************/
|
||||
inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
// This funtion called for each row ( Called data.size() times )
|
||||
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
||||
|
||||
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
||||
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
||||
|
||||
/***** Get each Model object from Arraylist ********/
|
||||
tempValues = null;
|
||||
tempValues = (BrandAvabilityGetterSetter) data.get(position);
|
||||
|
||||
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
||||
|
||||
if (position == 0) {
|
||||
|
||||
// Default selected Spinner item
|
||||
label.setText(getString(R.string.select));
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
label.setText(tempValues.getBRAND());
|
||||
}
|
||||
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
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.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
|
||||
public class T2pBrand_Avaibility extends AppCompatActivity {
|
||||
GSKOrangeDB db;
|
||||
private SharedPreferences preferences;
|
||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
||||
Spinner spinner_brand;
|
||||
Button add;
|
||||
ArrayList<BrandAvabilityGetterSetter> brand_list;
|
||||
String categoryName,categoryId,brand_name="",brand_id="";
|
||||
RecyclerView recyclerView;
|
||||
ArrayList<BrandAvabilityGetterSetter> brand_new_list=new ArrayList<BrandAvabilityGetterSetter>();
|
||||
|
||||
|
||||
T2pBrand_Avaibility.ValueAdapter adapteravabiblity;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_t2p_brand__avaibility);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
spinner_brand = (Spinner) findViewById(R.id.spinner);
|
||||
add = (Button) findViewById(R.id.button2);
|
||||
recyclerView = (RecyclerView) findViewById(R.id.layout_recycle);
|
||||
|
||||
|
||||
db = new GSKOrangeDB(T2pBrand_Avaibility.this);
|
||||
db.open();
|
||||
|
||||
//preference data
|
||||
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, "");
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
categoryId = getIntent().getStringExtra("categoryId");
|
||||
/////
|
||||
brand_list = db.getBrandAvailbilitydata(store_id, categoryId,keyAccount_id,class_id,storeType_id);
|
||||
BrandAvabilityGetterSetter brand = new BrandAvabilityGetterSetter();
|
||||
String str = getResources().getString(R.string.select);
|
||||
brand.setBRAND(str);
|
||||
brand_list.add(0, brand);
|
||||
T2pBrand_Avaibility.CustomAdapter adapter = new T2pBrand_Avaibility.CustomAdapter(T2pBrand_Avaibility.this, R.layout.custom_spinner_item, brand_list);
|
||||
spinner_brand.setAdapter(adapter);
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if(brand_new_list.size()>0)
|
||||
{
|
||||
BrandAvabilityGetterSetter br=new BrandAvabilityGetterSetter();
|
||||
|
||||
br.setCategoryId(categoryId);
|
||||
br.setClass_id(class_id);
|
||||
br.setKeyAccount_id(keyAccount_id);
|
||||
br.setStoreType_id(storeType_id);
|
||||
br.setStore_id(store_id);
|
||||
db.InsertBrandAvabilitydata( br, brand_new_list);
|
||||
|
||||
brand_new_list.clear();
|
||||
finish();
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
Snackbar.make(view, "Please add data", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
add.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
if (!brand_name.equalsIgnoreCase("") && brand_name!=null){
|
||||
|
||||
BrandAvabilityGetterSetter brand = new BrandAvabilityGetterSetter();
|
||||
|
||||
brand.setBRAND(brand_name);
|
||||
brand.setBRAND_ID(brand_id);
|
||||
|
||||
brand_new_list.add(brand);
|
||||
|
||||
adapteravabiblity = new T2pBrand_Avaibility.ValueAdapter(T2pBrand_Avaibility.this, brand_new_list);
|
||||
recyclerView.setAdapter(adapteravabiblity);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(T2pBrand_Avaibility.this));
|
||||
|
||||
spinner_brand.setSelection(0);
|
||||
brand_name="";
|
||||
brand_id="";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Snackbar.make(view, "Please select dropdown", Snackbar.LENGTH_LONG)
|
||||
.setAction("Action", null).show();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
spinner_brand.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
||||
if (position != 0) {
|
||||
|
||||
brand_name = brand_list.get(position).getBRAND();
|
||||
brand_id = brand_list.get(position).getBRAND_ID();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class CustomAdapter extends ArrayAdapter<String> {
|
||||
|
||||
private Activity activity;
|
||||
private ArrayList data;
|
||||
BrandAvabilityGetterSetter tempValues = null;
|
||||
LayoutInflater inflater;
|
||||
|
||||
/*************
|
||||
* CustomAdapter Constructor
|
||||
*****************/
|
||||
public CustomAdapter(
|
||||
T2pBrand_Avaibility activitySpinner,
|
||||
int textViewResourceId,
|
||||
ArrayList objects
|
||||
|
||||
) {
|
||||
super(activitySpinner, textViewResourceId, objects);
|
||||
|
||||
/********** Take passed values **********/
|
||||
activity = activitySpinner;
|
||||
data = objects;
|
||||
/*********** Layout inflator to call external xml layout () **********************/
|
||||
inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
// This funtion called for each row ( Called data.size() times )
|
||||
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
||||
|
||||
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
||||
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
||||
|
||||
/***** Get each Model object from Arraylist ********/
|
||||
tempValues = null;
|
||||
tempValues = (BrandAvabilityGetterSetter) data.get(position);
|
||||
|
||||
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
||||
|
||||
if (position == 0) {
|
||||
|
||||
// Default selected Spinner item
|
||||
label.setText(getResources().getString(R.string.select));
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
label.setText(tempValues.getBRAND());
|
||||
}
|
||||
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
String lang;
|
||||
|
||||
if (language.equalsIgnoreCase("English")) {
|
||||
lang = "EN";
|
||||
} else if (language.equalsIgnoreCase("UAE")) {
|
||||
lang = "AR";
|
||||
} else {
|
||||
lang = "TR";
|
||||
}
|
||||
|
||||
Locale locale = new Locale(lang);
|
||||
Locale.setDefault(locale);
|
||||
|
||||
Resources resources = context.getResources();
|
||||
|
||||
Configuration configuration = resources.getConfiguration();
|
||||
configuration.locale = locale;
|
||||
|
||||
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public class ValueAdapter extends RecyclerView.Adapter<T2pBrand_Avaibility.ValueAdapter.MyViewHolder> {
|
||||
|
||||
private LayoutInflater inflator;
|
||||
|
||||
List<BrandAvabilityGetterSetter> data = Collections.emptyList();
|
||||
|
||||
public ValueAdapter(Context context, List<BrandAvabilityGetterSetter> data) {
|
||||
|
||||
inflator = LayoutInflater.from(context);
|
||||
this.data = data;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public T2pBrand_Avaibility.ValueAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int i) {
|
||||
|
||||
View view = inflator.inflate(R.layout.brandavabilityadpterlayout, parent, false);
|
||||
|
||||
T2pBrand_Avaibility.ValueAdapter.MyViewHolder holder = new T2pBrand_Avaibility.ValueAdapter.MyViewHolder(view);
|
||||
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final T2pBrand_Avaibility.ValueAdapter.MyViewHolder viewHolder, final int position) {
|
||||
|
||||
final BrandAvabilityGetterSetter current = data.get(position);
|
||||
|
||||
viewHolder.txt.setText(current.getBRAND());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return data.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
TextView txt, address;
|
||||
|
||||
|
||||
public MyViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
txt = (TextView) itemView.findViewById(R.id.brand_name);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -635,7 +635,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
//STORE_PERFORMANCE
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "STORE_PERFORMANCE");
|
||||
request.addProperty("Type", "STORE_PERFORMANCE_NEW");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
@@ -661,7 +661,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
|
||||
if (store_performance_masterGetterSetter.getSTORE_ID().size() > 0) {
|
||||
data.value = 85;
|
||||
data.name = "STORE_PERFORMANCE Data Download";
|
||||
data.name = "STORE_PERFORMANCE_NEW Data Download";
|
||||
} else {
|
||||
//return "STORE_PERFORMANCE";
|
||||
}
|
||||
|
||||
+5
-1
@@ -163,6 +163,8 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
holder.txt_t2p.setText(categoryData.getT2p());
|
||||
holder.txt_promo.setText(categoryData.getPromo());
|
||||
holder.txt_oss.setText(categoryData.getOss());
|
||||
holder.txt_planogram.setText(categoryData.getPLANOGRAM());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -171,7 +173,7 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView txt_period, txt_sos, txt_t2p, txt_promo, txt_msl_availability, txt_oss;
|
||||
TextView txt_period, txt_sos, txt_t2p, txt_promo, txt_msl_availability, txt_oss,txt_planogram;
|
||||
LinearLayout lay_menu;
|
||||
|
||||
public MyViewHolder(View itemView) {
|
||||
@@ -183,6 +185,8 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
txt_promo = (TextView) itemView.findViewById(R.id.txt_promo);
|
||||
txt_msl_availability = (TextView) itemView.findViewById(R.id.txt_msl_availability);
|
||||
txt_oss = (TextView) itemView.findViewById(R.id.txt_oss);
|
||||
txt_planogram = (TextView) itemView.findViewById(R.id.txt_planogram);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-1
@@ -181,6 +181,8 @@ public class StoreWisePerformanceActivity extends AppCompatActivity {
|
||||
holder.txt_t2p.setText(categoryData.getT2p());
|
||||
holder.txt_promo.setText(categoryData.getPromo());
|
||||
holder.txt_oss.setText(categoryData.getOss());
|
||||
holder.txt_planogram.setText(categoryData.getPLANOGRAM());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -189,7 +191,7 @@ public class StoreWisePerformanceActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView txt_period, txt_sos, txt_t2p, txt_promo, txt_msl_availability, txt_oss;
|
||||
TextView txt_period, txt_sos, txt_t2p, txt_promo, txt_msl_availability, txt_oss,txt_planogram;
|
||||
LinearLayout lay_menu;
|
||||
|
||||
public MyViewHolder(View itemView) {
|
||||
@@ -201,6 +203,9 @@ public class StoreWisePerformanceActivity extends AppCompatActivity {
|
||||
txt_promo = (TextView) itemView.findViewById(R.id.txt_promo);
|
||||
txt_msl_availability = (TextView) itemView.findViewById(R.id.txt_msl_availability);
|
||||
txt_oss = (TextView) itemView.findViewById(R.id.txt_oss);
|
||||
txt_planogram = (TextView) itemView.findViewById(R.id.txt_planogram);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+88
-15
@@ -38,6 +38,7 @@ import javax.xml.parsers.SAXParserFactory;
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
@@ -77,6 +78,8 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
private SharedPreferences preferences;
|
||||
private int factor, k = 0;
|
||||
|
||||
Object result = "";
|
||||
|
||||
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> stockFacingPlanogramDataList;
|
||||
|
||||
@Override
|
||||
@@ -270,7 +273,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UPLOAD_STORE_COVERAGE, envelope);
|
||||
|
||||
Object result = envelope.getResponse();
|
||||
result = envelope.getResponse();
|
||||
|
||||
datacheck = result.toString();
|
||||
words = datacheck.split("\\;");
|
||||
@@ -341,7 +344,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
data.value = 10;
|
||||
data.name = "MSL_Availability Uploading";
|
||||
data.name = getString(R.string.availability_data_uploading);
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
@@ -466,7 +469,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
data.value = 20;
|
||||
data.name = "Stock Facing Uploading";
|
||||
data.name = getString(R.string.stock_data_uploading);
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
@@ -525,7 +528,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
data.value = 30;
|
||||
data.name = "Promotion Data Uploading";
|
||||
data.name = getString(R.string.promo_data_uploading);
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
@@ -584,7 +587,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
data.value = 35;
|
||||
data.name = "Additional Promotion Data Uploading";
|
||||
data.name = getString(R.string.additional_data_uploading);
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
@@ -632,7 +635,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
onXML = "[ADDITIONAL_VISIBILITY_DATA]"
|
||||
onXML = "[ADDITIONAL_VISIBILITY_NEW]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]"
|
||||
+ userId
|
||||
@@ -646,19 +649,25 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
+ "[ADDITIONAL_DISPLAY]"
|
||||
+ additionalVisibilityList.get(J).getBtn_toogle()
|
||||
+ "[/ADDITIONAL_DISPLAY]"
|
||||
+ "[BRAND_ID]"
|
||||
/* + "[BRAND_ID]"
|
||||
+ additionalVisibilityList.get(J).getBrand_id()
|
||||
+ "[/BRAND_ID]"
|
||||
+ "[/BRAND_ID]"*/
|
||||
+ "[IMAGE_URL]"
|
||||
+ additionalVisibilityList.get(J).getImage()
|
||||
+ "[/IMAGE_URL]"
|
||||
+ "[IMAGE_URL1]"
|
||||
+ additionalVisibilityList.get(J).getImage2()
|
||||
+ "[/IMAGE_URL1]"
|
||||
+ "[IMAGE_URL2]"
|
||||
+ additionalVisibilityList.get(J).getImage3()
|
||||
+ "[/IMAGE_URL2]"
|
||||
+ "[DISPLAY_ID]"
|
||||
+ additionalVisibilityList.get(J).getSku_id()
|
||||
+ "[/DISPLAY_ID]"
|
||||
+ "[SKU_LIST]"
|
||||
+ additional_visibility_dialog_xml
|
||||
+ "[/SKU_LIST]"
|
||||
+ "[/ADDITIONAL_VISIBILITY_DATA]";
|
||||
+ "[/ADDITIONAL_VISIBILITY_NEW]";
|
||||
|
||||
|
||||
additional_visibility_data_xml = additional_visibility_data_xml + onXML;
|
||||
@@ -673,7 +682,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||
request.addProperty("XMLDATA", sos_xml);
|
||||
request.addProperty("KEYS", "ADDITIONAL_VISIBILITY_DATA");
|
||||
request.addProperty("KEYS", "ADDITIONAL_VISIBILITY_NEW");
|
||||
request.addProperty("USERNAME", userId);
|
||||
request.addProperty("MID", mid);
|
||||
|
||||
@@ -699,9 +708,8 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
data.value = 35;
|
||||
data.name = "Additional Visibility Data";
|
||||
data.name = getString(R.string.additional_data_uploading);
|
||||
publishProgress(data);
|
||||
|
||||
/////ashish close
|
||||
@@ -717,7 +725,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
ArrayList<GapsChecklistGetterSetter> gapsList = db.getGapsData(t2PGetterSetters.get(i).getKey_id());
|
||||
ArrayList<SkuGetterSetter> skuList = db.getT2PSKUData(t2PGetterSetters.get(i).getKey_id());
|
||||
|
||||
ArrayList<BrandAvabilityGetterSetter> brandList = db.getT2BrandData(t2PGetterSetters.get(i).getKey_id());
|
||||
String gaps_xml = "";
|
||||
String gaps_child;
|
||||
|
||||
@@ -757,6 +765,24 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
sku_xml = sku_xml + sku_child;
|
||||
}
|
||||
|
||||
|
||||
String brandxml = "";
|
||||
String brandchild;
|
||||
|
||||
if (brandList.size() > 0) {
|
||||
|
||||
for (int M = 0; M < brandList.size(); M++) {
|
||||
|
||||
brandchild = "[BRAND]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[BRAND_ID]" + brandList.get(M).getBRAND_ID() + "[/BRAND_ID]"
|
||||
/* + "[BRAND]" + brandList.get(M).getBRAND() + "[/BRAND]"*/
|
||||
+ "[COMMON_ID]" + Integer.parseInt(t2PGetterSetters.get(i1).getKey_id()) + "[/COMMON_ID]"
|
||||
+ "[/BRAND]";
|
||||
brandxml = brandxml + brandchild;
|
||||
}
|
||||
}
|
||||
String present = "";
|
||||
if (t2PGetterSetters.get(i1).isPresent()) {
|
||||
present = "1";
|
||||
@@ -777,6 +803,8 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
+ "[PRESENT]" + present + "[/PRESENT]"
|
||||
+ "[GAPS_DATA]" + gaps_xml + "[/GAPS_DATA]"
|
||||
+ "[SKU_DATA]" + sku_xml + "[/SKU_DATA]"
|
||||
+ "[BRAND_DATA]" + brandxml + "[/BRAND_DATA]"
|
||||
|
||||
+ "[/T2P_DATA]";
|
||||
|
||||
t2p_data_xml = t2p_data_xml + onXML;
|
||||
@@ -787,7 +815,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||
request.addProperty("XMLDATA", t2p_final_xml);
|
||||
request.addProperty("KEYS", "T2P_DATA");
|
||||
request.addProperty("KEYS", "T2P_DATA_NEW");
|
||||
request.addProperty("USERNAME", userId);
|
||||
request.addProperty("MID", mid);
|
||||
|
||||
@@ -814,7 +842,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
data.value = 40;
|
||||
data.name = "T2P Data Uploading";
|
||||
data.name = getString(R.string.t2p_data_uploading);
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
@@ -949,9 +977,54 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (additionalVisibilityList.get(i1).getImage2() != null && !additionalVisibilityList.get(i1).getImage2().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + additionalVisibilityList.get(i1).getImage2()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalVisibilityList.get(i1).getImage2(), "AdditionalVisibilityImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "AdditionalVisibilityImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("AdditionalVisibilityImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (additionalVisibilityList.get(i1).getImage3() != null && !additionalVisibilityList.get(i1).getImage3().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + additionalVisibilityList.get(i1).getImage3()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalVisibilityList.get(i1).getImage3(), "AdditionalVisibilityImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "AdditionalVisibilityImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("AdditionalVisibilityImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// ashish close image
|
||||
|
||||
///////Start store images
|
||||
|
||||
@@ -40,6 +40,7 @@ import javax.xml.parsers.SAXParserFactory;
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
@@ -728,7 +729,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
ArrayList<GapsChecklistGetterSetter> gapsList = db.getGapsData(t2PGetterSetters.get(i).getKey_id());
|
||||
ArrayList<SkuGetterSetter> skuList = db.getT2PSKUData(t2PGetterSetters.get(i).getKey_id());
|
||||
|
||||
ArrayList<BrandAvabilityGetterSetter> brandList = db.getT2BrandData(t2PGetterSetters.get(i).getKey_id());
|
||||
String gaps_xml = "";
|
||||
String gaps_child;
|
||||
|
||||
@@ -768,6 +769,24 @@ public class UploadActivity extends AppCompatActivity {
|
||||
sku_xml = sku_xml + sku_child;
|
||||
}
|
||||
|
||||
|
||||
String brandxml = "";
|
||||
String brandchild;
|
||||
|
||||
if (brandList.size() > 0) {
|
||||
|
||||
for (int M = 0; M < brandList.size(); M++) {
|
||||
|
||||
brandchild = "[BRAND]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[BRAND_ID]" + brandList.get(M).getBRAND_ID() + "[/BRAND_ID]"
|
||||
/* + "[BRAND]" + brandList.get(M).getBRAND() + "[/BRAND]"*/
|
||||
+ "[COMMON_ID]" + Integer.parseInt(t2PGetterSetters.get(i1).getKey_id()) + "[/COMMON_ID]"
|
||||
+ "[/BRAND]";
|
||||
brandxml = brandxml + brandchild;
|
||||
}
|
||||
}
|
||||
String present = "";
|
||||
if (t2PGetterSetters.get(i1).isPresent()) {
|
||||
present = "1";
|
||||
@@ -788,6 +807,8 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ "[PRESENT]" + present + "[/PRESENT]"
|
||||
+ "[GAPS_DATA]" + gaps_xml + "[/GAPS_DATA]"
|
||||
+ "[SKU_DATA]" + sku_xml + "[/SKU_DATA]"
|
||||
+ "[BRAND_DATA]" + brandxml + "[/BRAND_DATA]"
|
||||
|
||||
+ "[/T2P_DATA]";
|
||||
|
||||
t2p_data_xml = t2p_data_xml + onXML;
|
||||
@@ -798,7 +819,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||
request.addProperty("XMLDATA", t2p_final_xml);
|
||||
request.addProperty("KEYS", "T2P_DATA");
|
||||
request.addProperty("KEYS", "T2P_DATA_NEW");
|
||||
request.addProperty("USERNAME", userId);
|
||||
request.addProperty("MID", mid);
|
||||
|
||||
|
||||
+9
@@ -7,6 +7,15 @@ package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
public class CategoryWisePerformaceGetterSetter {
|
||||
String store_id, category_id, period, msl_availability, sos, t2p, promo, oss, order_id;
|
||||
|
||||
public String getPLANOGRAM() {
|
||||
return PLANOGRAM;
|
||||
}
|
||||
|
||||
public void setPLANOGRAM(String PLANOGRAM) {
|
||||
this.PLANOGRAM = PLANOGRAM;
|
||||
}
|
||||
|
||||
String PLANOGRAM;
|
||||
public String getStore_id() {
|
||||
return store_id;
|
||||
}
|
||||
|
||||
+12
@@ -18,6 +18,18 @@ public class STORE_PERFORMANCE_MasterGetterSetter {
|
||||
ArrayList<String> MSL_AVAILABILITY = new ArrayList<>();
|
||||
ArrayList<String> OSS = new ArrayList<>();
|
||||
ArrayList<String> ORDERID = new ArrayList<>();
|
||||
ArrayList<String> PLANOGRAM = new ArrayList<>();
|
||||
public ArrayList<String> getPLANOGRAM() {
|
||||
return PLANOGRAM;
|
||||
}
|
||||
|
||||
public void setPLANOGRAM(String PLANOGRAM) {
|
||||
this.PLANOGRAM.add(PLANOGRAM);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getTable_STORE_PERFORMANCE() {
|
||||
return table_STORE_PERFORMANCE;
|
||||
|
||||
+10
@@ -7,6 +7,16 @@ package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
public class StoreWisePerformaceGetterSetter {
|
||||
String store_id, category_id, period, msl_availability, sos, t2p, promo, oss, order_id;
|
||||
|
||||
public String getPLANOGRAM() {
|
||||
return PLANOGRAM;
|
||||
}
|
||||
|
||||
public void setPLANOGRAM(String PLANOGRAM) {
|
||||
this.PLANOGRAM = PLANOGRAM;
|
||||
}
|
||||
|
||||
String PLANOGRAM;
|
||||
|
||||
public String getStore_id() {
|
||||
return store_id;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 02-01-2017.
|
||||
*/
|
||||
@@ -14,6 +16,16 @@ public class T2PGetterSetter {
|
||||
ArrayList<GapsChecklistGetterSetter> gapsChecklist = new ArrayList<>();
|
||||
ArrayList<SkuGetterSetter> skulist = new ArrayList<>();
|
||||
|
||||
public ArrayList<BrandAvabilityGetterSetter> getBrandlist() {
|
||||
return brandlist;
|
||||
}
|
||||
|
||||
public void setBrandlist(ArrayList<BrandAvabilityGetterSetter> brandlist) {
|
||||
this.brandlist = brandlist;
|
||||
}
|
||||
|
||||
ArrayList<BrandAvabilityGetterSetter> brandlist = new ArrayList<>();
|
||||
|
||||
public String getBrand_id() {
|
||||
return brand_id;
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ public class XMLHandlers {
|
||||
if (xpp.getName().equals("PROMO")) {
|
||||
st.setPROMO(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("MSL_AVAILABILITY")) {
|
||||
if (xpp.getName().equals("MSL")) {
|
||||
st.setMSL_AVAILABILITY(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("OSS")) {
|
||||
@@ -668,6 +668,10 @@ public class XMLHandlers {
|
||||
if (xpp.getName().equals("ORDERID")) {
|
||||
st.setORDERID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("PLANOGRAM")) {
|
||||
st.setPLANOGRAM(xpp.nextText());
|
||||
}
|
||||
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
|
||||
@@ -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.dailyentry.T2pBrand_Avaibility">
|
||||
|
||||
<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_t2p_brand__avaibility" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
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,35 @@
|
||||
<?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="wrap_content">
|
||||
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_weight="35"
|
||||
card_view:cardBackgroundColor="@color/colorOrange"
|
||||
card_view:cardCornerRadius="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/brand_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1"
|
||||
android:text="TextView" />
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
@@ -41,12 +41,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="30">
|
||||
android:weightSum="28">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_period"
|
||||
@@ -61,7 +61,7 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_msl_availability"
|
||||
@@ -76,7 +76,7 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_sos"
|
||||
@@ -91,7 +91,7 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_t2p"
|
||||
@@ -106,7 +106,7 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_promo"
|
||||
@@ -121,12 +121,28 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_oss"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#000" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_PLANOGRAM"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#000" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:showIn="@layout/activity_category_wise_performance">
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -41,12 +41,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="30">
|
||||
android:weightSum="28">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_period"
|
||||
@@ -61,7 +61,7 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_msl_availability"
|
||||
@@ -76,7 +76,7 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_sos"
|
||||
@@ -91,7 +91,7 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_t2p"
|
||||
@@ -106,7 +106,7 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_promo"
|
||||
@@ -121,12 +121,28 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_oss"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#000" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="@string/category_performance_PLANOGRAM"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#000" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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_t2p_brand__avaibility"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:weightSum="100"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context="cpm.com.gskmtorange.dailyentry.T2pBrand_Avaibility"
|
||||
tools:showIn="@layout/activity_t2p_brand__avaibility">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="15"
|
||||
android:orientation="horizontal"
|
||||
|
||||
android:paddingBottom="5dp"
|
||||
android:weightSum="10">
|
||||
<Spinner
|
||||
android:id="@+id/spinner"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="7" />
|
||||
<Button
|
||||
android:id="@+id/button2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="3"
|
||||
android:background="@color/colorPrimary"
|
||||
android:text="add" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="85"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="100">
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/layout_recycle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="5dp">
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -14,13 +14,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="30">
|
||||
android:weightSum="28">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_period"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="Period"
|
||||
@@ -36,7 +36,7 @@
|
||||
android:id="@+id/txt_msl_availability"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="MSL Availability"
|
||||
@@ -52,7 +52,7 @@
|
||||
android:id="@+id/txt_sos"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="SOS"
|
||||
@@ -68,7 +68,7 @@
|
||||
android:id="@+id/txt_t2p"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="T2P"
|
||||
@@ -84,7 +84,7 @@
|
||||
android:id="@+id/txt_promo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="Promo"
|
||||
@@ -100,12 +100,29 @@
|
||||
android:id="@+id/txt_oss"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="OSS"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#000" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_planogram"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="PLANOGRAM"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#000" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="30">
|
||||
android:weightSum="28">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_period"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="Period"
|
||||
@@ -36,7 +36,7 @@
|
||||
android:id="@+id/txt_msl_availability"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="MSL Availability"
|
||||
@@ -52,7 +52,7 @@
|
||||
android:id="@+id/txt_sos"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="SOS"
|
||||
@@ -68,7 +68,7 @@
|
||||
android:id="@+id/txt_t2p"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="T2P"
|
||||
@@ -84,7 +84,7 @@
|
||||
android:id="@+id/txt_promo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="Promo"
|
||||
@@ -100,12 +100,30 @@
|
||||
android:id="@+id/txt_oss"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="OSS"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#000" />
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_planogram"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="PLANOGRAM"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#000" />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
<?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="300dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="10dp"
|
||||
card_view:cardBackgroundColor="@color/colorPrimary"
|
||||
card_view:cardCornerRadius="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="@string/brand"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_normal" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/grey_background"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="3">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brand"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="@string/brand" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_brand"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_weight="2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/grey_background"
|
||||
android:padding="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/add" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/closed" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- <android.support.v7.widget.RecyclerView
|
||||
android:background="@color/grey_background"
|
||||
android:id="@+id/rec_sku"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"></android.support.v7.widget.RecyclerView>-->
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/list_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="95"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/lv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:cacheColorHint="#00000000"
|
||||
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="#ff9933"
|
||||
android:dividerHeight="2dp"
|
||||
android:fastScrollEnabled="true"
|
||||
android:smoothScrollbar="true"></ListView>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<!-- <android.support.v7.widget.CardView
|
||||
android:id="@+id/cardId"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
|
||||
card_view:cardBackgroundColor="@color/colorOrange"
|
||||
card_view:cardCornerRadius="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/list_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="95"
|
||||
>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/lv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:cacheColorHint="#00000000"
|
||||
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="#ff9933"
|
||||
android:dividerHeight="2dp"
|
||||
android:fastScrollEnabled="true"
|
||||
android:smoothScrollbar="true"></ListView>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>-->
|
||||
</LinearLayout>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
@@ -236,6 +236,8 @@
|
||||
|
||||
<string name="enter_the_values">Değerleri girin</string>
|
||||
<string name="datanotfound">Içinde bulunmayan veri</string>
|
||||
<string name="title_activity_fill_brand">Lütfen marka verilerini doldurun</string>
|
||||
<string name="category_performance_PLANOGRAM">PLANOGRAM</string>
|
||||
</resources>
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<dimen name="nav_header_vertical_spacing">16dp</dimen>
|
||||
<dimen name="nav_header_height">160dp</dimen>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_horizontal_margin">5dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
|
||||
|
||||
@@ -129,12 +129,12 @@
|
||||
<string name="promo_compliance_add">Add</string>
|
||||
|
||||
<string name="category_performance_period">Period</string>
|
||||
<string name="category_performance_msl_availability">MSL Availability</string>
|
||||
<string name="category_performance_msl_availability">MSL</string>
|
||||
<string name="category_performance_sos">SOS</string>
|
||||
<string name="category_performance_t2p">T2P</string>
|
||||
<string name="category_performance_promo">Promo</string>
|
||||
<string name="category_performance_oss">OSS</string>
|
||||
|
||||
<string name="category_performance_PLANOGRAM">Planogram</string>
|
||||
<string name="category_performance_ltm">LTM</string>
|
||||
<string name="category_performance_mtd">MTD</string>
|
||||
<string name="category_performance_lsv">LSV</string>
|
||||
@@ -270,6 +270,9 @@
|
||||
|
||||
<string name="datanotfound">Data not found in</string>
|
||||
|
||||
<string name="title_activity_t2p_brand__avaibility">T2pBrand_Avaibility</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>
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.2.2'
|
||||
classpath 'com.android.tools.build:gradle:2.2.3'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
Reference in New Issue
Block a user