Merge branch 'master' into GeoT
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
|
||||
<activity
|
||||
android:name=".SplashScreenActivity"
|
||||
android:label="@string/app_name"
|
||||
@@ -29,72 +28,64 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".LoginActivity"
|
||||
android:label="@string/title_activity_login"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
<activity android:name=".autoupdate.AutoUpdateActivity" />
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity android:name=".autoupdate.AutoUpdateActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".SelectLanguageActivity"
|
||||
android:label="@string/title_activity_select_language"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
<activity android:name=".download.DownloadActivity" />
|
||||
|
||||
<activity android:name=".download.DownloadActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
|
||||
android:name=".GeoTag.GeoTagStoreList"
|
||||
android:label="@string/title_activity_store_list_geotag"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
android:name=".gsk_dailyentry.CategoryListActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<!--android:label="@string/title_activity_category_list"-->
|
||||
|
||||
android:screenOrientation="portrait"/>
|
||||
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.CategoryWisePerformanceActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"/>
|
||||
<!-- android:label="@string/title_activity_category_wise_performance" -->
|
||||
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.DailyDataMenuActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<!--android:label="@string/title_activity_daily_main_menu"-->
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"/>
|
||||
<!-- android:label="@string/title_activity_daily_main_menu" -->
|
||||
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.MSL_AvailabilityActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<!--android:label="@string/title_activity_msl__availability"-->
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"/>
|
||||
<!-- android:label="@string/title_activity_msl__availability" -->
|
||||
<activity
|
||||
android:name=".dailyentry.StoreListActivity"
|
||||
android:label="@string/title_activity_store_list_geotag"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".dailyentry.StoreimageActivity"
|
||||
android:label="@string/title_activity_store_list_geotag"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
|
||||
|
||||
|
||||
<activity
|
||||
|
||||
android:name=".GeoTag.GeoTagActivity"
|
||||
android:label="@string/title_activity_store_geotag"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
@@ -110,8 +101,14 @@
|
||||
android:name=".gsk_dailyentry.Stock_FacingActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".dailyentry.T2PComplianceActivity"
|
||||
android:label="@string/title_activity_t2_pcompliance"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar"></activity>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -8,25 +8,36 @@ import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
import cpm.com.gskmtorange.GetterSetter.GeotaggingBeans;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.GapsChecklistGetterSetter;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.JourneyPlanGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
|
||||
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayMasterGetterSetter;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPINGT2PGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
|
||||
|
||||
/**
|
||||
* Created by ashishc on 29-12-2016.
|
||||
*/
|
||||
@@ -53,19 +64,30 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
public void onCreate(SQLiteDatabase db) {
|
||||
|
||||
db.execSQL(TableBean.getJourneyPlan());
|
||||
|
||||
//Gagan
|
||||
db.execSQL(TableBean.getBrandMaster());
|
||||
db.execSQL(TableBean.getSkuMaster());
|
||||
db.execSQL(TableBean.getCategoryMaster());
|
||||
db.execSQL(TableBean.getSubCategoryMaster());
|
||||
db.execSQL(TableBean.getDisplayMaster());
|
||||
|
||||
db.execSQL(TableBean.getMappingStock());
|
||||
db.execSQL(TableBean.getMappingT2p());
|
||||
|
||||
|
||||
db.execSQL(CommonString.CREATE_TABLE_STORE_GEOTAGGING);
|
||||
db.execSQL(CommonString.CREATE_TABLE_COVERAGE_DATA);
|
||||
|
||||
|
||||
db.execSQL(TableBean.getDisplayChecklistMaster());
|
||||
db.execSQL(TableBean.getMappingDisplayChecklist());
|
||||
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_MSL_AVAILABILITY);
|
||||
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_FACING_HEADER);
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_FACING_CHILD);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -128,15 +150,189 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<StoreBean> getStoreData(String date) {
|
||||
public ArrayList<T2PGetterSetter> getT2PDefaultData(String store_id){
|
||||
|
||||
|
||||
ArrayList<StoreBean> list = new ArrayList<StoreBean>();
|
||||
ArrayList<T2PGetterSetter> t2PList = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT * from JOURNEY_PLAN where VISIT_DATE ='" + date + "'", null);
|
||||
dbcursor = db.rawQuery("Select BM.BRAND As BRAND, BM.BRAND_ID As BRAND_ID, DM.DISPLAY As DISPLAY, DM.DISPLAY_ID As DISPLAY_ID from BRAND_MASTER BM INNER JOIN MAPPING_T2P T ON BM.BRAND_ID = T.BRAND_ID INNER JOIN DISPLAY_MASTER DM ON T.DISPLAY_ID= DM.DISPLAY_ID WHERE T.STORE_ID = '"+ store_id +"'",null);
|
||||
if(dbcursor != null){
|
||||
dbcursor.moveToFirst();
|
||||
while(!dbcursor.isAfterLast()){
|
||||
|
||||
T2PGetterSetter t2p = new T2PGetterSetter();
|
||||
|
||||
t2p.setBrand_id(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("BRAND_ID")));
|
||||
|
||||
t2p.setBrand(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("BRAND")));
|
||||
|
||||
t2p.setDisplay_id(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("DISPLAY_ID")));
|
||||
|
||||
t2p.setDisplay(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("DISPLAY")));
|
||||
|
||||
t2p.setImage("");
|
||||
|
||||
t2p.setRemark("");
|
||||
|
||||
t2p.isPresent();
|
||||
|
||||
t2PList.add(t2p);
|
||||
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
|
||||
dbcursor.close();
|
||||
return t2PList;
|
||||
}
|
||||
}
|
||||
catch (Exception e){
|
||||
|
||||
Log.d("Exception get T2P", e.toString());
|
||||
return t2PList;
|
||||
}
|
||||
|
||||
return t2PList;
|
||||
}
|
||||
|
||||
//get Gaps data
|
||||
public ArrayList<GapsChecklistGetterSetter> getGapsDefaultData(String display_id){
|
||||
|
||||
ArrayList<GapsChecklistGetterSetter> checkList = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("Select DC.CHECKLIST_ID As CHECKLIST_ID, DC.CHECKLIST As CHECKLIST, C.DISPLAY_ID As DISPLAY_ID from MAPPING_DISPLAY_CHECKLIST C INNER JOIN DISPLAY_CHECKLIST_MASTER DC ON C.CHECKLIST_ID= DC.CHECKLIST_ID WHERE C.DISPLAY_ID = '"+ display_id +"'",null);
|
||||
if(dbcursor != null){
|
||||
dbcursor.moveToFirst();
|
||||
while(!dbcursor.isAfterLast()){
|
||||
|
||||
GapsChecklistGetterSetter check = new GapsChecklistGetterSetter();
|
||||
|
||||
check.setChecklist_id(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CHECKLIST_ID")));
|
||||
|
||||
check.setChecklist(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CHECKLIST")));
|
||||
|
||||
check.setDisplay_id(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("DISPLAY_ID")));
|
||||
|
||||
check.isPresent();
|
||||
|
||||
checkList.add(check);
|
||||
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
|
||||
dbcursor.close();
|
||||
return checkList;
|
||||
}
|
||||
}
|
||||
catch (Exception e){
|
||||
|
||||
Log.d("Exception get T2P", e.toString());
|
||||
return checkList;
|
||||
}
|
||||
|
||||
return checkList;
|
||||
}
|
||||
|
||||
//get Brand data for T2P
|
||||
public ArrayList<BrandMasterGetterSetter> getBrandT2PData(String store_type_id, String class_id, String key_account_id ){
|
||||
|
||||
ArrayList<BrandMasterGetterSetter> brandList = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT DISTINCT BR.BRAND_ID, SCM.SUB_CATEGORY||'-'||BR.BRAND AS BRAND FROM MAPPING_STOCK MS INNER JOIN SKU_MASTER SM ON MS.SKU_ID = SM.SKU_ID INNER JOIN BRAND_MASTER BR ON SM.BRAND_ID=BR.BRAND_ID INNER JOIN SUB_CATEGORY_MASTER SCM ON BR.SUB_CATEGORY_ID = SCM.SUB_CATEGORY_ID WHERE MS.KEYACCOUNT_ID ='"+key_account_id +"' AND STORETYPE_ID ='" + store_type_id + "' AND CLASS_ID = "+ class_id +"'",null);
|
||||
if(dbcursor != null){
|
||||
dbcursor.moveToFirst();
|
||||
while(!dbcursor.isAfterLast()){
|
||||
|
||||
BrandMasterGetterSetter brand = new BrandMasterGetterSetter();
|
||||
|
||||
brand.setBRAND(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("BRAND")));
|
||||
|
||||
brand.setBRAND_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("BRAND_ID")));
|
||||
|
||||
|
||||
brandList.add(brand);
|
||||
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
|
||||
dbcursor.close();
|
||||
return brandList;
|
||||
}
|
||||
}
|
||||
catch (Exception e){
|
||||
|
||||
Log.d("Exception get T2P", e.toString());
|
||||
return brandList;
|
||||
}
|
||||
|
||||
return brandList;
|
||||
}
|
||||
|
||||
//get Sku data for T2P
|
||||
public ArrayList<SkuGetterSetter> getSkuT2PData(String store_type_id, String class_id, String key_account_id , String brand_id){
|
||||
|
||||
ArrayList<SkuGetterSetter> skuList = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT DISTINCT SM.SKU, SM.SKU_ID, BR.BRAND_ID FROM MAPPING_STOCK MS INNER JOIN SKU_MASTER SM ON MS.SKU_ID = SM.SKU_ID INNER JOIN BRAND_MASTER BR ON SM.BRAND_ID=BR.BRAND_ID INNER JOIN SUB_CATEGORY_MASTER SCM ON BR.SUB_CATEGORY_ID = SCM.SUB_CATEGORY_ID WHERE MS.KEYACCOUNT_ID ='"+key_account_id +"' AND STORETYPE_ID ='" + store_type_id + "' AND CLASS_ID = "+ class_id +"' AND SM.BRAND_ID='"+ brand_id + "'",null);
|
||||
if(dbcursor != null){
|
||||
dbcursor.moveToFirst();
|
||||
while(!dbcursor.isAfterLast()){
|
||||
|
||||
SkuGetterSetter sku = new SkuGetterSetter();
|
||||
|
||||
sku.setSKU(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("SKU")));
|
||||
|
||||
sku.setBRAND_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("BRAND_ID")));
|
||||
|
||||
sku.setSKU_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("SKU_ID")));
|
||||
|
||||
skuList.add(sku);
|
||||
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
|
||||
dbcursor.close();
|
||||
return skuList;
|
||||
}
|
||||
}
|
||||
catch (Exception e){
|
||||
|
||||
Log.d("Exception get T2P", e.toString());
|
||||
return skuList;
|
||||
}
|
||||
|
||||
return skuList;
|
||||
}
|
||||
|
||||
public ArrayList<StoreBean> getStoreData(String date) {
|
||||
ArrayList<StoreBean> list = new ArrayList<StoreBean>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("SELECT * from JOURNEY_PLAN " +
|
||||
"where VISIT_DATE ='" + date + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
@@ -246,6 +442,24 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
}
|
||||
|
||||
//insert MAPPING_DISPLAY_CHECKLIST
|
||||
public void InsertMappingDisplayChecklist(MappingDisplayChecklistGetterSetter data) {
|
||||
db.delete("MAPPING_DISPLAY_CHECKLIST", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getCHECKLIST_ID().size(); i++) {
|
||||
|
||||
values.put("DISPLAY_ID", data.getDISPLAY_ID().get(i));
|
||||
values.put("CHECKLIST_ID", data.getCHECKLIST_ID().get(i));
|
||||
|
||||
db.insert("MAPPING_DISPLAY_CHECKLIST", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in MAPPING_STOCK " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertSubCategoryMaster(SubCategoryMasterGetterSetter data) {
|
||||
db.delete("SUB_CATEGORY_MASTER", null, null);
|
||||
|
||||
@@ -305,6 +519,24 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
}
|
||||
|
||||
//insert DISPLAY_CHECKLIST_MASTER
|
||||
public void InsertDisplayChecklistMaster(DisplayChecklistMasterGetterSetter data) {
|
||||
db.delete("DISPLAY_CHECKLIST_MASTER", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getCHECKLIST_ID().size(); i++) {
|
||||
|
||||
values.put("CHECKLIST_ID", data.getCHECKLIST_ID().get(i));
|
||||
values.put("CHECKLIST", data.getCHECKLIST().get(i));
|
||||
|
||||
db.insert("DISPLAY_CHECKLIST_MASTER", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in DISPLAY_CHECKLIST_MASTER " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertDisplayMaster(DisplayMasterGetterSetter data) {
|
||||
db.delete("DISPLAY_MASTER", null, null);
|
||||
|
||||
@@ -341,6 +573,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void InsertSTOREgeotag(String storeid, double lat, double longitude, String path,String status) {
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
@@ -398,14 +631,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public ArrayList<GeotaggingBeans> getinsertGeotaggingData(String status) {
|
||||
|
||||
|
||||
@@ -547,6 +772,447 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
list.add(sb);
|
||||
|
||||
|
||||
//Category List
|
||||
public ArrayList<CategoryGetterSetter> getCategoryListData(String keyAccountId, String storeTypeId, String classId) {
|
||||
ArrayList<CategoryGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select DISTINCT CA.CATEGORY_ID,CA.CATEGORY " +
|
||||
"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 M.KEYACCOUNT_ID='" + keyAccountId + "' AND " +
|
||||
"M.STORETYPE_ID='" + storeTypeId + "' AND " +
|
||||
"M.CLASS_ID='" + classId + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
CategoryGetterSetter cd = new CategoryGetterSetter();
|
||||
|
||||
cd.setCategory_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CATEGORY_ID")));
|
||||
cd.setCategory(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CATEGORY")));
|
||||
cd.setCategory_img("category");
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception get JCP!", e.toString());
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
//MSL_Availability
|
||||
public ArrayList<MSL_AvailabilityGetterSetter> getMSL_AvailabilityHeaderData(String category_id) {
|
||||
ArrayList<MSL_AvailabilityGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select DISTINCT SB.SUB_CATEGORY_ID,SB.SUB_CATEGORY,BR.BRAND_ID,BR.BRAND " +
|
||||
"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 M.MUST_HAVE=1 AND CA.CATEGORY_ID='" + category_id + "' " +
|
||||
"order by SB.SUB_CATEGORY,BR.BRAND", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
MSL_AvailabilityGetterSetter cd = new MSL_AvailabilityGetterSetter();
|
||||
|
||||
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||
cd.setSub_category(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
||||
cd.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND_ID")));
|
||||
cd.setBrand(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND")));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public ArrayList<MSL_AvailabilityGetterSetter> getMSL_AvailabilitySKUData(String category_id, String brand_id) {
|
||||
ArrayList<MSL_AvailabilityGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select DISTINCT SK.SKU_ID,SK.SKU,SK.MRP,SK.SKU_SEQUENCE,M.MBQ " +
|
||||
"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 M.MUST_HAVE=1 AND " +
|
||||
"CA.CATEGORY_ID='" + category_id + "' AND BR.BRAND_ID='" + brand_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
MSL_AvailabilityGetterSetter cd = new MSL_AvailabilityGetterSetter();
|
||||
|
||||
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.setToggleValue("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;
|
||||
}
|
||||
|
||||
public void InsertMSL_Availability(String storeId, String categoryId, List<MSL_AvailabilityGetterSetter> hashMapListHeaderData,
|
||||
HashMap<MSL_AvailabilityGetterSetter, List<MSL_AvailabilityGetterSetter>> hashMapListChildData) {
|
||||
ContentValues values = new ContentValues();
|
||||
|
||||
try {
|
||||
db.beginTransaction();
|
||||
for (int i = 0; i < hashMapListHeaderData.size(); i++) {
|
||||
|
||||
for (int j = 0; j < hashMapListChildData.get(hashMapListHeaderData.get(i)).size(); j++) {
|
||||
MSL_AvailabilityGetterSetter data = hashMapListChildData.get(hashMapListHeaderData.get(i)).get(j);
|
||||
|
||||
values.put("Store_Id", storeId);
|
||||
values.put("Category_Id", categoryId);
|
||||
values.put("Brand_Id", hashMapListHeaderData.get(i).getBrand_id());
|
||||
values.put("SKU_ID", data.getSku_id());
|
||||
values.put("SKU", data.getSku());
|
||||
values.put("SKU_SEQUENCE", data.getSku_sequence());
|
||||
values.put("MBQ", data.getMbq());
|
||||
values.put("TOGGLE_VALUE", data.getToggleValue());
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_MSL_AVAILABILITY, null, values);
|
||||
}
|
||||
}
|
||||
db.setTransactionSuccessful();
|
||||
db.endTransaction();
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in Insert MSL_Availability " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<MSL_AvailabilityGetterSetter> getMSL_AvailabilitySKU_AfterSaveData(String category_id, String brand_id) {
|
||||
ArrayList<MSL_AvailabilityGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * from Msl_Availability_Data " +
|
||||
"where category_id='" + category_id + "' and Brand_Id='" + brand_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
MSL_AvailabilityGetterSetter cd = new MSL_AvailabilityGetterSetter();
|
||||
|
||||
cd.setSku_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_ID")));
|
||||
cd.setSku(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU")));
|
||||
cd.setSku_sequence(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_SEQUENCE")));
|
||||
cd.setMbq(dbcursor.getString(dbcursor.getColumnIndexOrThrow("MBQ")));
|
||||
cd.setToggleValue(dbcursor.getString(dbcursor.getColumnIndexOrThrow("TOGGLE_VALUE")));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "get MSL_Availability Sku After Save Data!" + e.toString());
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public boolean checkMsl_AvailabilityData(String store_id, String category_id) {
|
||||
Log.d("MSL_Availability ", "Stock data--------------->Start<------------");
|
||||
ArrayList<MSL_AvailabilityGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * from Msl_Availability_Data " +
|
||||
"where category_id='" + category_id + "' and Store_Id='" + store_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
if (dbcursor.moveToFirst()) {
|
||||
do {
|
||||
MSL_AvailabilityGetterSetter sb = new MSL_AvailabilityGetterSetter();
|
||||
|
||||
sb.setSku_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_ID")));
|
||||
list.add(sb);
|
||||
} while (dbcursor.moveToNext());
|
||||
}
|
||||
dbcursor.close();
|
||||
|
||||
if (list.size() > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "when fetching Records!!!!!!!!!!!!!!!!!!!!!" + e.toString());
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.d("MSL_Availability ", "midday---------------------->Stop<-----------");
|
||||
return false;
|
||||
}
|
||||
|
||||
public void updateMSL_Availability(String storeId, String categoryId, List<MSL_AvailabilityGetterSetter> hashMapListHeaderData,
|
||||
HashMap<MSL_AvailabilityGetterSetter, List<MSL_AvailabilityGetterSetter>> hashMapListChildData) {
|
||||
ContentValues values = new ContentValues();
|
||||
|
||||
try {
|
||||
db.beginTransaction();
|
||||
for (int i = 0; i < hashMapListHeaderData.size(); i++) {
|
||||
|
||||
for (int j = 0; j < hashMapListChildData.get(hashMapListHeaderData.get(i)).size(); j++) {
|
||||
MSL_AvailabilityGetterSetter data = hashMapListChildData.get(hashMapListHeaderData.get(i)).get(j);
|
||||
|
||||
values.put("TOGGLE_VALUE", data.getToggleValue());
|
||||
|
||||
db.update(CommonString.TABLE_INSERT_MSL_AVAILABILITY, values,
|
||||
"Brand_Id ='" + hashMapListHeaderData.get(i).getBrand_id() + "' AND SKU_ID ='" + data.getSku_id() +
|
||||
"' AND Category_Id='" + categoryId + "'", null);
|
||||
}
|
||||
}
|
||||
db.setTransactionSuccessful();
|
||||
db.endTransaction();
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in Insert MSL_Availability " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
//Stock_facing
|
||||
public ArrayList<Stock_FacingGetterSetter> getStockAndFacingHeaderData(String category_id) {
|
||||
ArrayList<Stock_FacingGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select DISTINCT SB.SUB_CATEGORY_ID,SB.SUB_CATEGORY,BR.BRAND_ID,BR.BRAND " +
|
||||
"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 + "' " +
|
||||
"order by SB.SUB_CATEGORY,BR.BRAND", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
Stock_FacingGetterSetter cd = new Stock_FacingGetterSetter();
|
||||
|
||||
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||
cd.setSub_category(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
||||
cd.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND_ID")));
|
||||
cd.setBrand(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND")));
|
||||
cd.setImage1("");
|
||||
cd.setImage2("");
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public ArrayList<Stock_FacingGetterSetter> getStockAndFacingSKUData(String category_id, String brand_id) {
|
||||
ArrayList<Stock_FacingGetterSetter> 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 + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
Stock_FacingGetterSetter cd = new Stock_FacingGetterSetter();
|
||||
|
||||
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("");
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public void InsertStock_Facing(String storeId, String categoryId, List<Stock_FacingGetterSetter> hashMapListHeaderData,
|
||||
HashMap<Stock_FacingGetterSetter, List<Stock_FacingGetterSetter>> hashMapListChildData) {
|
||||
ContentValues values = new ContentValues();
|
||||
ContentValues values1 = new ContentValues();
|
||||
|
||||
try {
|
||||
db.beginTransaction();
|
||||
for (int i = 0; i < hashMapListHeaderData.size(); i++) {
|
||||
Stock_FacingGetterSetter data1 = hashMapListHeaderData.get(i);
|
||||
|
||||
values1.put("Store_Id", storeId);
|
||||
values1.put("Category_Id", categoryId);
|
||||
values1.put("SUB_CATEGORY_ID", data1.getSub_category_id());
|
||||
values1.put("SUB_CATEGORY", data1.getSub_category());
|
||||
values1.put("BRAND_ID", data1.getBrand_id());
|
||||
values1.put("BRAND", data1.getBrand());
|
||||
values1.put("IMAGE1", data1.getImage1());
|
||||
values1.put("IMAGE2", data1.getImage2());
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_STOCK_FACING_HEADER, null, values1);
|
||||
|
||||
for (int j = 0; j < hashMapListChildData.get(hashMapListHeaderData.get(i)).size(); j++) {
|
||||
Stock_FacingGetterSetter data = hashMapListChildData.get(hashMapListHeaderData.get(i)).get(j);
|
||||
|
||||
values.put("Store_Id", storeId);
|
||||
values.put("Category_Id", categoryId);
|
||||
values.put("Brand_Id", hashMapListHeaderData.get(i).getBrand_id());
|
||||
values.put("SKU_ID", data.getSku_id());
|
||||
values.put("SKU", data.getSku());
|
||||
values.put("SKU_SEQUENCE", data.getSku_sequence());
|
||||
values.put("MBQ", data.getMbq());
|
||||
values.put("COMPANY_ID", data.getCompany_id());
|
||||
values.put("STOCK_VALUE", data.getStock());
|
||||
values.put("FACEUP_VALUE", data.getFacing());
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_STOCK_FACING_CHILD, null, values);
|
||||
}
|
||||
}
|
||||
db.setTransactionSuccessful();
|
||||
db.endTransaction();
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in Insert MSL_Availability " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<Stock_FacingGetterSetter> getStockAndFacingHeader_AfterSaveData(String category_id) {
|
||||
ArrayList<Stock_FacingGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * from Stock_Facing_Header_Data " +
|
||||
"where category_id='" + category_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
Stock_FacingGetterSetter cd = new Stock_FacingGetterSetter();
|
||||
|
||||
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||
cd.setSub_category(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
||||
cd.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND_ID")));
|
||||
cd.setBrand(dbcursor.getString(dbcursor.getColumnIndexOrThrow("BRAND")));
|
||||
cd.setImage1(dbcursor.getString(dbcursor.getColumnIndexOrThrow("IMAGE1")));
|
||||
cd.setImage2(dbcursor.getString(dbcursor.getColumnIndexOrThrow("IMAGE2")));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "get after save Stock_FacingHeader!" + e.toString());
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public ArrayList<Stock_FacingGetterSetter> getStockAndFacingSKU_AfterSaveData(String category_id, String brand_id) {
|
||||
ArrayList<Stock_FacingGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * from Stock_Facing_Child_Data " +
|
||||
"where category_id='" + category_id + "' and Brand_Id='" + brand_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
Stock_FacingGetterSetter cd = new Stock_FacingGetterSetter();
|
||||
|
||||
cd.setSku_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_ID")));
|
||||
cd.setSku(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU")));
|
||||
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(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STOCK_VALUE")));
|
||||
cd.setFacing(dbcursor.getString(dbcursor.getColumnIndexOrThrow("FACEUP_VALUE")));
|
||||
|
||||
list.add(cd);
|
||||
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
@@ -554,15 +1220,13 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", e.toString());
|
||||
|
||||
Log.d("Exception ", "get Stock_Facing Sku After Save Data!" + e.toString());
|
||||
return list;
|
||||
}
|
||||
|
||||
return list;
|
||||
|
||||
}
|
||||
|
||||
public long InsertCoverageData(CoverageBean data) {
|
||||
|
||||
public long InsertCoverageData(CoverageBean data) {
|
||||
|
||||
//db.delete(CommonString1.TABLE_COVERAGE_DATA, "STORE_ID" + "='" + data.getStoreId() + "'", null);
|
||||
|
||||
@@ -595,4 +1259,75 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
|
||||
public boolean checkStockAndFacingData(String store_id, String category_id) {
|
||||
Log.d("Stock_Facing ", "Stock data--------------->Start<------------");
|
||||
ArrayList<Stock_FacingGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * from Stock_Facing_Child_Data " +
|
||||
"where category_id='" + category_id + "' and Store_Id='" + store_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
if (dbcursor.moveToFirst()) {
|
||||
do {
|
||||
Stock_FacingGetterSetter sb = new Stock_FacingGetterSetter();
|
||||
|
||||
sb.setSku_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SKU_ID")));
|
||||
list.add(sb);
|
||||
} while (dbcursor.moveToNext());
|
||||
}
|
||||
dbcursor.close();
|
||||
|
||||
if (list.size() > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "when fetching Records!!!!!!!!!!!!!!!!!!!!!" + e.toString());
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.d("Stock_Facing ", "midday---------------------->Stop<-----------");
|
||||
return false;
|
||||
}
|
||||
|
||||
public void updateStockAndFacing(String storeId, String categoryId, List<Stock_FacingGetterSetter> hashMapListHeaderData,
|
||||
HashMap<Stock_FacingGetterSetter, List<Stock_FacingGetterSetter>> hashMapListChildData) {
|
||||
ContentValues values = new ContentValues();
|
||||
ContentValues values1 = new ContentValues();
|
||||
|
||||
try {
|
||||
db.beginTransaction();
|
||||
for (int i = 0; i < hashMapListHeaderData.size(); i++) {
|
||||
Stock_FacingGetterSetter data1 = hashMapListHeaderData.get(i);
|
||||
|
||||
values1.put("IMAGE1", data1.getImage1());
|
||||
values1.put("IMAGE2", data1.getImage2());
|
||||
|
||||
//db.insert(CommonString.TABLE_INSERT_STOCK_FACING_HEADER, null, values1);
|
||||
db.update(CommonString.TABLE_INSERT_STOCK_FACING_HEADER, values1,
|
||||
"Category_Id='" + categoryId + "'", null);
|
||||
|
||||
for (int j = 0; j < hashMapListChildData.get(hashMapListHeaderData.get(i)).size(); j++) {
|
||||
Stock_FacingGetterSetter data = hashMapListChildData.get(hashMapListHeaderData.get(i)).get(j);
|
||||
|
||||
values.put("STOCK_VALUE", data.getStock());
|
||||
values.put("FACEUP_VALUE", data.getFacing());
|
||||
|
||||
//db.insert(CommonString.TABLE_INSERT_STOCK_FACING_CHILD, null, values);
|
||||
db.update(CommonString.TABLE_INSERT_STOCK_FACING_CHILD, values,
|
||||
"Brand_Id ='" + hashMapListHeaderData.get(i).getBrand_id() + "' AND SKU_ID ='" + data.getSku_id() +
|
||||
"' AND Category_Id='" + categoryId + "'", null);
|
||||
}
|
||||
}
|
||||
db.setTransactionSuccessful();
|
||||
db.endTransaction();
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in Insert MSL_Availability " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.MainActivity;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
|
||||
@@ -5,10 +5,13 @@ import android.animation.AnimatorListenerAdapter;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.location.Location;
|
||||
import android.location.LocationListener;
|
||||
import android.os.Environment;
|
||||
@@ -52,6 +55,7 @@ import java.net.MalformedURLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.autoupdate.AutoUpdateActivity;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
@@ -158,16 +162,12 @@ public class LoginActivity extends AppCompatActivity {
|
||||
|
||||
// Create a Folder for Images
|
||||
|
||||
File file = new File(Environment.getExternalStorageDirectory(),
|
||||
"GSK_MT_Images");
|
||||
|
||||
File file = new File(Environment.getExternalStorageDirectory(), "GSK_MT_ORANGE_IMAGES");
|
||||
if (!file.isDirectory()) {
|
||||
file.mkdir();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* private void populateAutoComplete() {
|
||||
@@ -596,6 +596,8 @@ public class LoginActivity extends AppCompatActivity {
|
||||
}
|
||||
else{
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
Intent intent = new Intent(getBaseContext(),
|
||||
MainActivity.class);
|
||||
startActivity(intent);
|
||||
@@ -651,8 +653,34 @@ public class LoginActivity extends AppCompatActivity {
|
||||
|
||||
return intime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
String lang ;
|
||||
|
||||
if(language.equals("English")){
|
||||
lang = "EN";
|
||||
}
|
||||
else if(language.equals("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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,17 +21,19 @@ import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GeoTag.GeoTagStoreList;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GeoTag.GeoTagStoreList;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.dailyentry.T2PComplianceActivity;
|
||||
import cpm.com.gskmtorange.gsk_dailyentry.CategoryListActivity;
|
||||
import cpm.com.gskmtorange.dailyentry.StoreListActivity;
|
||||
import cpm.com.gskmtorange.download.DownloadActivity;
|
||||
@@ -170,6 +172,11 @@ public class MainActivity extends AppCompatActivity
|
||||
|
||||
} else if (id == R.id.nav_services) {
|
||||
|
||||
Intent startDownload = new Intent(this,T2PComplianceActivity.class);
|
||||
startActivity(startDownload);
|
||||
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
|
||||
} else if (id == R.id.nav_setting) {
|
||||
startActivity(new Intent(MainActivity.this, CategoryListActivity.class));
|
||||
} else if (id == R.id.nav_export) {
|
||||
@@ -206,6 +213,7 @@ public class MainActivity extends AppCompatActivity
|
||||
File backupDB = new File(path, backupDBPath);
|
||||
|
||||
//Snackbar.make(rec_store_data, "Database Exported Successfully", Snackbar.LENGTH_SHORT).show();
|
||||
Toast.makeText(MainActivity.this, "Database Exported Successfully", Toast.LENGTH_SHORT).show();
|
||||
|
||||
if (currentDB.exists()) {
|
||||
@SuppressWarnings("resource")
|
||||
@@ -259,6 +267,5 @@ public class MainActivity extends AppCompatActivity
|
||||
super.onPageStarted(view, url, favicon);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ public class CommonString {
|
||||
public static final String KEY_STOREVISITED_STATUS = "STOREVISITED_STATUS";
|
||||
public static final String FILE_PATH = Environment.getExternalStorageDirectory() + "/GSK_MT_Images/";
|
||||
|
||||
|
||||
public static final String KEY_PATH = "path";
|
||||
public static final String KEY_VERSION = "APP_VERSION";
|
||||
|
||||
@@ -157,5 +156,118 @@ public class CommonString {
|
||||
|
||||
|
||||
|
||||
//File Path
|
||||
public static final String FILE_PATH = Environment.getExternalStorageDirectory() + "/GSK_MT_ORANGE_IMAGES/";
|
||||
|
||||
|
||||
//Table
|
||||
public static final String TABLE_INSERT_MSL_AVAILABILITY = "Msl_Availability_Data";
|
||||
|
||||
public static final String CREATE_TABLE_INSERT_MSL_AVAILABILITY = "CREATE TABLE IF NOT EXISTS "
|
||||
+ TABLE_INSERT_MSL_AVAILABILITY
|
||||
+ "("
|
||||
+ "KEY_ID"
|
||||
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||
|
||||
+ "Store_Id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "Category_Id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "Brand_Id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "SKU_ID"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "SKU"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "SKU_SEQUENCE"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "MBQ"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "TOGGLE_VALUE"
|
||||
+ " VARCHAR"
|
||||
|
||||
+ ")";
|
||||
|
||||
|
||||
public static final String TABLE_INSERT_STOCK_FACING_HEADER = "Stock_Facing_Header_Data";
|
||||
|
||||
public static final String CREATE_TABLE_INSERT_STOCK_FACING_HEADER = "CREATE TABLE IF NOT EXISTS "
|
||||
+ TABLE_INSERT_STOCK_FACING_HEADER
|
||||
+ "("
|
||||
+ "KEY_ID"
|
||||
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||
|
||||
+ "Store_Id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "Category_Id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "SUB_CATEGORY_ID"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "SUB_CATEGORY"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "BRAND_ID"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "BRAND"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "IMAGE1"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "IMAGE2"
|
||||
+ " VARCHAR"
|
||||
|
||||
+ ")";
|
||||
|
||||
public static final String TABLE_INSERT_STOCK_FACING_CHILD = "Stock_Facing_Child_Data";
|
||||
|
||||
public static final String CREATE_TABLE_INSERT_STOCK_FACING_CHILD = "CREATE TABLE IF NOT EXISTS "
|
||||
+ TABLE_INSERT_STOCK_FACING_CHILD
|
||||
+ "("
|
||||
+ "KEY_ID"
|
||||
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||
|
||||
+ "Store_Id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "Category_Id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "Brand_Id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "SKU_ID"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "SKU"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "SKU_SEQUENCE"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "MBQ"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "COMPANY_ID"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "STOCK_VALUE"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "FACEUP_VALUE"
|
||||
+ " VARCHAR"
|
||||
|
||||
+ ")";
|
||||
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import java.util.List;
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
@@ -41,10 +42,14 @@ import cpm.com.gskmtorange.constant.CommonString;
|
||||
*/
|
||||
|
||||
public class StoreListActivity extends AppCompatActivity {
|
||||
|
||||
ArrayList<CoverageBean> coverage;
|
||||
|
||||
|
||||
ArrayList<StoreBean> storelist = new ArrayList<StoreBean>();
|
||||
//ListView list;
|
||||
private SharedPreferences preferences;
|
||||
|
||||
String date, visit_status;
|
||||
GSKOrangeDB db;
|
||||
StoreListActivity.ValueAdapter adapter;
|
||||
@@ -74,6 +79,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
db.open();
|
||||
|
||||
|
||||
|
||||
linearlay = (LinearLayout) findViewById(R.id.linearlayout);
|
||||
recyclerView = (RecyclerView) findViewById(R.id.drawer_layout_recycle);
|
||||
|
||||
@@ -86,10 +92,15 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
recyclerView.setVisibility(View.INVISIBLE);
|
||||
linearlay.setVisibility(View.VISIBLE);
|
||||
|
||||
if (storelist.size() > 0) {
|
||||
list.setAdapter(new MyAdaptor());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -108,6 +119,8 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
// NavUtils.navigateUpFromSameTask(this);
|
||||
finish();
|
||||
|
||||
//Toast.makeText(getApplicationContext(), "Click", Toast.LENGTH_LONG).show();
|
||||
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
|
||||
}
|
||||
@@ -118,6 +131,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
|
||||
public class ValueAdapter extends RecyclerView.Adapter<StoreListActivity.ValueAdapter.MyViewHolder> {
|
||||
|
||||
|
||||
private LayoutInflater inflator;
|
||||
|
||||
List<StoreBean> data = Collections.emptyList();
|
||||
@@ -193,6 +207,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.checkin);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -301,6 +316,9 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
chkbtn = (Button) itemView.findViewById(R.id.chkout);
|
||||
|
||||
}
|
||||
|
||||
return convertView;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -377,10 +395,8 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
public boolean setcheckedmenthod(String store_cd) {
|
||||
|
||||
|
||||
for (int i = 0; i < coverage.size(); i++) {
|
||||
if (store_cd.equals(coverage.get(i).getStoreId())) {
|
||||
if (coverage.get(i).getOutTime() != null) {
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
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.view.Window;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.GapsChecklistGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
||||
|
||||
public class T2PComplianceActivity extends AppCompatActivity {
|
||||
|
||||
GSKOrangeDB db;
|
||||
ArrayList<T2PGetterSetter> t2PGetterSetters;
|
||||
T2PAdapter t2PAdapter;
|
||||
RecyclerView rec_t2p;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_t2_pcompliance);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
db = new GSKOrangeDB(T2PComplianceActivity.this);
|
||||
db.open();
|
||||
|
||||
rec_t2p = (RecyclerView) findViewById(R.id.rec_t2p);
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
t2PGetterSetters = db.getT2PDefaultData("1");
|
||||
|
||||
if(t2PGetterSetters.size()>0){
|
||||
rec_t2p.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||
t2PAdapter = new T2PAdapter(t2PGetterSetters);
|
||||
rec_t2p.setAdapter(t2PAdapter);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class T2PAdapter extends RecyclerView.Adapter<T2PAdapter.ViewHolder> {
|
||||
|
||||
private ArrayList<T2PGetterSetter> list;
|
||||
|
||||
public T2PAdapter(ArrayList<T2PGetterSetter> t2PList) {
|
||||
list = t2PList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.t2p_item_layout, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final ViewHolder holder, int position) {
|
||||
|
||||
final T2PGetterSetter mItem = list.get(position);
|
||||
holder.tv_brand.setText(mItem.getBrand());
|
||||
holder.tv_display.setText(mItem.getDisplay().trim());
|
||||
|
||||
holder.btn_gaps.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
ArrayList<GapsChecklistGetterSetter> gapsChecklist = showGapsDialog(mItem.getDisplay_id());
|
||||
if(gapsChecklist.size()>0){
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
holder.btn_sku.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showSkuDialog();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public final View mView;
|
||||
public final LinearLayout parentLayout;
|
||||
public final TextView tv_brand, tv_display;
|
||||
public final ImageView img_cam, img_remark;
|
||||
public final Button btn_gaps, btn_sku, btn_ref_img;
|
||||
|
||||
|
||||
public ViewHolder(View view) {
|
||||
super(view);
|
||||
|
||||
mView = view;
|
||||
|
||||
tv_brand = (TextView) mView.findViewById(R.id.tv_brand);
|
||||
tv_display = (TextView) mView.findViewById(R.id.tv_display);
|
||||
img_cam = (ImageView) mView.findViewById(R.id.img_cam);
|
||||
img_remark = (ImageView) mView.findViewById(R.id.img_remark);
|
||||
btn_gaps = (Button) mView.findViewById(R.id.btn_gaps);
|
||||
btn_sku = (Button) mView.findViewById(R.id.btn_sku);
|
||||
btn_ref_img = (Button) mView.findViewById(R.id.btn_ref_image);
|
||||
parentLayout = (LinearLayout) mView.findViewById(R.id.parent_layout);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<GapsChecklistGetterSetter> showGapsDialog(String display_id){
|
||||
ArrayList<GapsChecklistGetterSetter> gapsChecklist = db.getGapsDefaultData(display_id);
|
||||
|
||||
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.gaps_dialog_layout);
|
||||
//pb = (ProgressBar) dialog.findViewById(R.id.progressBar1);
|
||||
RecyclerView rec_gap_checklist = (RecyclerView) dialog.findViewById(R.id.rec_gap_checklist);
|
||||
rec_gap_checklist.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||
GapsAdapter gapAdapter = new GapsAdapter(gapsChecklist);
|
||||
rec_gap_checklist.setAdapter(gapAdapter);
|
||||
|
||||
//dialog.setCancelable(false);
|
||||
dialog.show();
|
||||
|
||||
return gapsChecklist;
|
||||
}
|
||||
|
||||
public void showSkuDialog(){
|
||||
|
||||
ArrayList<BrandMasterGetterSetter> brandList = db.getBrandT2PData("1", "1", "1");
|
||||
// ArrayList<SkuMasterGetterSetter> skuMasterGetterSetterArrayList = db.getSkuT2PData("1", "1", "1",)
|
||||
|
||||
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.t2p_sku_dialog_layout);
|
||||
//pb = (ProgressBar) dialog.findViewById(R.id.progressBar1);
|
||||
//dialog.setCancelable(false);
|
||||
dialog.show();
|
||||
|
||||
}
|
||||
|
||||
public class GapsAdapter extends RecyclerView.Adapter<GapsAdapter.ViewHolder> {
|
||||
|
||||
private ArrayList<GapsChecklistGetterSetter> list;
|
||||
|
||||
public GapsAdapter(ArrayList<GapsChecklistGetterSetter> gapsPList) {
|
||||
list = gapsPList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.gap_checklist_item, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final ViewHolder holder, int position) {
|
||||
|
||||
final GapsChecklistGetterSetter mItem = list.get(position);
|
||||
holder.tv_checklist.setText(mItem.getChecklist());
|
||||
|
||||
holder.tb_present.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public final View mView;
|
||||
public final LinearLayout parentLayout;
|
||||
public final TextView tv_checklist;
|
||||
public final ToggleButton tb_present;
|
||||
|
||||
|
||||
public ViewHolder(View view) {
|
||||
super(view);
|
||||
|
||||
mView = view;
|
||||
|
||||
tv_checklist = (TextView) mView.findViewById(R.id.tv_checklist);
|
||||
tb_present = (ToggleButton) mView.findViewById(R.id.btn_is_present);
|
||||
parentLayout = (LinearLayout) mView.findViewById(R.id.parent_layout);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -32,10 +32,14 @@ import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.JourneyPlanGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPINGT2PGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
@@ -60,6 +64,10 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
DisplayMasterGetterSetter displayMasterGetterSetter;
|
||||
MappingStockGetterSetter mappingStockGetterSetter;
|
||||
MAPPINGT2PGetterSetter mappingt2PGetterSetter;
|
||||
DisplayChecklistMasterGetterSetter checklistMasterGetterSetter;
|
||||
MappingDisplayChecklistGetterSetter mappingChecklistGetterSetter;
|
||||
NonWorkingReasonGetterSetter nonWorkingReasonGetterSetter;
|
||||
MappingPromotionGetterSetter mappingPromotionGetterSetter;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -393,13 +401,149 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
TableBean.setMappingT2p(t2ptable);
|
||||
}
|
||||
} else {
|
||||
return "MAPPING_T2P";
|
||||
//return "MAPPING_T2P";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "MAPPING_T2P Data Download";
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
// DISPLAY_CHECKLIST_MASTER
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "DISPLAY_CHECKLIST_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 = (Object) envelope.getResponse();
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
checklistMasterGetterSetter = XMLHandlers.mappingDisplayChecklistMasterXMLHandler(xpp, eventType);
|
||||
if (checklistMasterGetterSetter.getCHECKLIST_ID().size() > 0) {
|
||||
String checklist_master_table = checklistMasterGetterSetter.getTable_DISPLAY_CHECKLIST_MASTER();
|
||||
if (checklist_master_table != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setDisplayChecklistMaster(checklist_master_table);
|
||||
}
|
||||
} else {
|
||||
return "DISPLAY_CHECKLIST_MASTER";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "DISPLAY_CHECKLIST_MASTER Data Download";
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
// MAPPING_DISPLAY_CHECKLIST
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "MAPPING_DISPLAY_CHECKLIST");
|
||||
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 = (Object) envelope.getResponse();
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
mappingChecklistGetterSetter = XMLHandlers.mappingMappingDisplayChecklistXMLHandler(xpp, eventType);
|
||||
if (mappingChecklistGetterSetter.getCHECKLIST_ID().size() > 0) {
|
||||
String mapping_display_checklisttable = mappingChecklistGetterSetter.getTable_MAPPING_DISPLAY_CHECKLIST();
|
||||
if (mapping_display_checklisttable != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setMappingDisplayChecklist(mapping_display_checklisttable);
|
||||
}
|
||||
} else {
|
||||
//return "MAPPING_DISPLAY_CHECKLIST";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "MAPPING_DISPLAY_CHECKLIST Data Download";
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
// NON_WORKING_REASON
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "NON_WORKING_REASON");
|
||||
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 = (Object) envelope.getResponse();
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
nonWorkingReasonGetterSetter = XMLHandlers.nonWorkingReasonXMLHandler(xpp, eventType);
|
||||
if (nonWorkingReasonGetterSetter.getREASON_ID().size() > 0) {
|
||||
String reasontable = nonWorkingReasonGetterSetter.getTable_NON_WORKING_REASON();
|
||||
if (reasontable != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setNonWorkingReason(reasontable);
|
||||
}
|
||||
} else {
|
||||
return "NON_WORKING_REASON";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "NON_WORKING_REASON Data Download";
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
// MAPPING_PROMOTION
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "MAPPING_PROMOTION");
|
||||
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 = (Object) envelope.getResponse();
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
mappingPromotionGetterSetter = XMLHandlers.mappingPromotionXMLHandler(xpp, eventType);
|
||||
if (mappingPromotionGetterSetter.getSTORE_ID().size() > 0) {
|
||||
String mapping_promotion_table = mappingPromotionGetterSetter.getTable_MAPPING_PROMOTION();
|
||||
if (mapping_promotion_table != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setMappingPromotion(mapping_promotion_table);
|
||||
}
|
||||
} else {
|
||||
//return "MAPPING_PROMOTION";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "MAPPING_PROMOTION Data Download";
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
db.open();
|
||||
db.InsertJCP(jcpgettersetter);
|
||||
@@ -411,7 +555,8 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
|
||||
db.InsertMAPPING_T2P(mappingt2PGetterSetter);
|
||||
db.InsertMappingStock(mappingStockGetterSetter);
|
||||
|
||||
db.InsertDisplayChecklistMaster(checklistMasterGetterSetter);
|
||||
db.InsertMappingDisplayChecklist(mappingChecklistGetterSetter);
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
/*final AlertMessage message = new AlertMessage(
|
||||
|
||||
+15
-22
@@ -22,14 +22,18 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryGetterSetter;
|
||||
|
||||
public class CategoryListActivity extends AppCompatActivity {
|
||||
RecyclerView recyclerView;
|
||||
TextView txt_categoryName;
|
||||
|
||||
ArrayList<CategoryGetterSetter> categoryList;
|
||||
CategoryListAdapter adapter;
|
||||
TextView txt_categoryName;
|
||||
|
||||
GSKOrangeDB db;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -41,8 +45,12 @@ public class CategoryListActivity extends AppCompatActivity {
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
db = new GSKOrangeDB(this);
|
||||
db.open();
|
||||
|
||||
txt_categoryName = (TextView) findViewById(R.id.txt_categoryName);
|
||||
txt_categoryName.setText("Category List");
|
||||
//txt_categoryName.setText("Category List");
|
||||
txt_categoryName.setText(getResources().getString(R.string.title_activity_category_list));
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -61,20 +69,7 @@ public class CategoryListActivity extends AppCompatActivity {
|
||||
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||
categoryList = new ArrayList<>();
|
||||
|
||||
CategoryGetterSetter data = new CategoryGetterSetter();
|
||||
data.setCategory_name("Oral Health");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new CategoryGetterSetter();
|
||||
data.setCategory_name("Nutritionals");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new CategoryGetterSetter();
|
||||
data.setCategory_name("Wellness");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
categoryList = db.getCategoryListData("1", "1", "1");
|
||||
|
||||
adapter = new CategoryListAdapter(CategoryListActivity.this, categoryList);
|
||||
recyclerView.setAdapter(adapter);
|
||||
@@ -103,22 +98,20 @@ public class CategoryListActivity extends AppCompatActivity {
|
||||
public void onBindViewHolder(MyViewHolder holder, int position) {
|
||||
final CategoryGetterSetter categoryData = list.get(position);
|
||||
|
||||
holder.categoryName.setText(categoryData.getCategory_name());
|
||||
holder.categoryIcon.setImageResource(categoryData.getCategory_img());
|
||||
holder.categoryName.setText(categoryData.getCategory());
|
||||
holder.categoryIcon.setImageResource(R.drawable.category);
|
||||
|
||||
holder.lay_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(CategoryListActivity.this, CategoryWisePerformanceActivity.class);
|
||||
intent.putExtra("categoryName", categoryData.getCategory_name());
|
||||
intent.putExtra("categoryName", categoryData.getCategory());
|
||||
intent.putExtra("categoryId", categoryData.getCategory_id());
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
|
||||
+6
-4
@@ -14,6 +14,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -25,7 +26,7 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
TextView txt_categoryName;
|
||||
RecyclerView recyclerView;
|
||||
|
||||
String categoryName = "";
|
||||
String categoryName = "", categoryId;
|
||||
|
||||
ArrayList<CategoryWisePerformaceGetterSetter> categoryWisePerformanceList;
|
||||
CategoryWisePerformaceAdapter adapter;
|
||||
@@ -44,17 +45,18 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
txt_categoryName = (TextView) findViewById(R.id.txt_categoryName);
|
||||
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
categoryId = getIntent().getStringExtra("categoryId");
|
||||
|
||||
txt_categoryName.setText("CategoryWise Performance " + categoryName);
|
||||
//txt_categoryName.setText("CategoryWise Performance " + categoryName);
|
||||
txt_categoryName.setText(getResources().getString(R.string.title_activity_category_wise_performance) + " " + categoryName);
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
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();*/
|
||||
Intent intent = new Intent(CategoryWisePerformanceActivity.this, DailyDataMenuActivity.class);
|
||||
intent.putExtra("categoryName", categoryName);
|
||||
intent.putExtra("categoryId", categoryId);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
+27
-17
@@ -30,7 +30,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
ArrayList<DailyDataMenuGetterSetter> categoryList;
|
||||
DailyDataMenuAdapter adapter;
|
||||
TextView txt_categoryName;
|
||||
String categoryName = "";
|
||||
String categoryName = "", categoryId;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -46,17 +46,19 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
txt_categoryName = (TextView) findViewById(R.id.txt_categoryName);
|
||||
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
categoryId = getIntent().getStringExtra("categoryId");
|
||||
|
||||
txt_categoryName.setText("Daily Data Menu - " + categoryName);
|
||||
//txt_categoryName.setText("Daily Data Menu - " + categoryName);
|
||||
txt_categoryName.setText(getResources().getString(R.string.title_activity_daily_main_menu) + " - " + categoryName);
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
/*FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
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();
|
||||
}
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,37 +68,44 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
categoryList = new ArrayList<>();
|
||||
|
||||
DailyDataMenuGetterSetter data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("MSL Availability");
|
||||
//data.setCategory_name("MSL Availability");
|
||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_msl_availability));
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("Stock & Facing");
|
||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_stock_facing));
|
||||
//data.setCategory_name("Stock & Facing");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("T2P Compliance");
|
||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_t2p));
|
||||
//data.setCategory_name("T2P Compliance");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("Additional Visibility");
|
||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_additional_visibility));
|
||||
//data.setCategory_name("Additional Visibility");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("Promo Compliance");
|
||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_promo_compliance));
|
||||
//data.setCategory_name("Promo Compliance");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("Competition Visibility");
|
||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_competition_tracking));
|
||||
//data.setCategory_name("Competition Tracking");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("Competition Promo");
|
||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_additional_promotions));
|
||||
//data.setCategory_name("Competition Promo");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
@@ -133,16 +142,17 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
holder.lay_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (dailyData.getCategory_name().equalsIgnoreCase("MSL Availability")) {
|
||||
if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_msl_availability))) {
|
||||
Intent intent = new Intent(DailyDataMenuActivity.this, MSL_AvailabilityActivity.class);
|
||||
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||
intent.putExtra("categoryId", categoryId);
|
||||
startActivity(intent);
|
||||
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_stock_facing))) {
|
||||
Intent intent = new Intent(DailyDataMenuActivity.this, Stock_FacingActivity.class);
|
||||
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||
intent.putExtra("categoryId", categoryId);
|
||||
startActivity(intent);
|
||||
} else if (dailyData.getCategory_name().equalsIgnoreCase("Stock & Facing")) {
|
||||
Intent intent1 = new Intent(DailyDataMenuActivity.this, Stock_FacingActivity.class);
|
||||
intent1.putExtra("categoryName", dailyData.getCategory_name());
|
||||
startActivity(intent1);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+111
-59
@@ -1,6 +1,8 @@
|
||||
package cpm.com.gskmtorange.gsk_dailyentry;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
@@ -16,18 +18,21 @@ import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.AbsListView;
|
||||
import android.widget.BaseExpandableListAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ExpandableListView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
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.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||
|
||||
@@ -42,7 +47,9 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
|
||||
ExpandableListAdapter adapter;
|
||||
|
||||
String title;
|
||||
GSKOrangeDB db;
|
||||
|
||||
String categoryName, categoryId, storeId;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -54,26 +61,81 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
db = new GSKOrangeDB(this);
|
||||
db.open();
|
||||
|
||||
expandableListView = (ExpandableListView) findViewById(R.id.expandableListView);
|
||||
txt_mslAvailabilityName = (TextView) findViewById(R.id.txt_mslAvailabilityName);
|
||||
|
||||
title = getIntent().getStringExtra("categoryName");
|
||||
txt_mslAvailabilityName.setText(title);
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
categoryId = getIntent().getStringExtra("categoryId");
|
||||
storeId = "";
|
||||
|
||||
//txt_mslAvailabilityName.setText(categoryName);
|
||||
txt_mslAvailabilityName.setText(getResources().getString(R.string.title_activity_msl__availability));
|
||||
|
||||
prepareList();
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
final FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
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(listDataHeader, listDataChild)) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(MSL_AvailabilityActivity.this);
|
||||
builder.setMessage("Are you sure you want to save")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
db.open();
|
||||
|
||||
if (db.checkMsl_AvailabilityData(storeId, categoryId)) {
|
||||
db.updateMSL_Availability(storeId, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
} else {
|
||||
db.InsertMSL_Availability(storeId, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
}
|
||||
|
||||
Toast.makeText(getApplicationContext(), "Data has been saved", Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
}
|
||||
})
|
||||
.setNegativeButton("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(MSL_AvailabilityActivity.this);
|
||||
builder.setMessage("Fill the value or fill 0 ")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("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
|
||||
@@ -85,7 +147,7 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
getCurrentFocus().clearFocus();
|
||||
}
|
||||
|
||||
expandableListView.invalidateViews();
|
||||
//expandableListView.invalidateViews();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -131,62 +193,27 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void prepareList() {
|
||||
headerDataList = new ArrayList<>();
|
||||
|
||||
MSL_AvailabilityGetterSetter msl = new MSL_AvailabilityGetterSetter();
|
||||
msl.setBrandName("Parodontax header 1");
|
||||
msl.setMbq("1");
|
||||
msl.setAvailable("No");
|
||||
headerDataList.add(msl);
|
||||
|
||||
msl = new MSL_AvailabilityGetterSetter();
|
||||
msl.setBrandName("Parodontax header 2");
|
||||
msl.setMbq("2");
|
||||
msl.setAvailable("Yes");
|
||||
headerDataList.add(msl);
|
||||
|
||||
msl = new MSL_AvailabilityGetterSetter();
|
||||
msl.setBrandName("Parodontax header 3");
|
||||
msl.setMbq("3");
|
||||
msl.setAvailable("Yes");
|
||||
headerDataList.add(msl);
|
||||
|
||||
msl = new MSL_AvailabilityGetterSetter();
|
||||
msl.setBrandName("Parodontax header 4");
|
||||
msl.setMbq("4");
|
||||
msl.setAvailable("No");
|
||||
headerDataList.add(msl);
|
||||
|
||||
|
||||
hashMapListHeaderData = new ArrayList<>();
|
||||
hashMapListChildData = new HashMap<>();
|
||||
|
||||
if (headerDataList.size() > 0) {
|
||||
//Header
|
||||
headerDataList = db.getMSL_AvailabilityHeaderData(categoryId);
|
||||
|
||||
if (headerDataList.size() > 0) {
|
||||
for (int i = 0; i < headerDataList.size(); i++) {
|
||||
hashMapListHeaderData.add(headerDataList.get(i));
|
||||
|
||||
childDataList = new ArrayList<>();
|
||||
|
||||
MSL_AvailabilityGetterSetter msl1 = new MSL_AvailabilityGetterSetter();
|
||||
msl.setBrandName("Parodontax 1");
|
||||
msl.setMbq("1");
|
||||
msl.setAvailable("No");
|
||||
childDataList.add(msl1);
|
||||
|
||||
msl1 = new MSL_AvailabilityGetterSetter();
|
||||
msl.setBrandName("Parodontax 2");
|
||||
msl.setMbq("2");
|
||||
msl.setAvailable("No");
|
||||
childDataList.add(msl1);
|
||||
//childDataList = new ArrayList<>();
|
||||
childDataList = db.getMSL_AvailabilitySKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id());
|
||||
if (!(childDataList.size() > 0)) {
|
||||
childDataList = db.getMSL_AvailabilitySKUData(categoryId, headerDataList.get(i).getBrand_id());
|
||||
}
|
||||
|
||||
hashMapListChildData.put(hashMapListHeaderData.get(i), childDataList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
adapter = new ExpandableListAdapter(this, hashMapListHeaderData, hashMapListChildData);
|
||||
@@ -234,7 +261,7 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
ImageView img_camera = (ImageView) convertView.findViewById(R.id.img_camera);
|
||||
|
||||
txt_categoryHeader.setTypeface(null, Typeface.BOLD);
|
||||
txt_categoryHeader.setText(headerTitle.getBrandName());
|
||||
txt_categoryHeader.setText(headerTitle.getSub_category() + "-" + headerTitle.getBrand());
|
||||
|
||||
/*img_camera.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -292,7 +319,7 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public View getChildView(final int groupPosition, final int childPosition, boolean isLastChild,
|
||||
View convertView, ViewGroup parent) {
|
||||
MSL_AvailabilityGetterSetter childData = (MSL_AvailabilityGetterSetter) getChild(groupPosition, childPosition);
|
||||
final MSL_AvailabilityGetterSetter childData = (MSL_AvailabilityGetterSetter) getChild(groupPosition, childPosition);
|
||||
ViewHolder holder = null;
|
||||
|
||||
if (convertView == null) {
|
||||
@@ -304,18 +331,44 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
holder.lin_category = (LinearLayout) convertView.findViewById(R.id.lin_category);
|
||||
|
||||
holder.txt_skuName = (TextView) convertView.findViewById(R.id.txt_skuName);
|
||||
holder.ed_mbq = (EditText) convertView.findViewById(R.id.ed_mbq);
|
||||
holder.txt_mbq = (TextView) convertView.findViewById(R.id.txt_mbq);
|
||||
holder.toggle_available = (ToggleButton) convertView.findViewById(R.id.toggle_available);
|
||||
|
||||
holder.toggle_available.setTextOff("No");
|
||||
holder.toggle_available.setTextOn("Yes");
|
||||
|
||||
convertView.setTag(holder);
|
||||
} else {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
|
||||
holder.txt_skuName.setText(childData.getBrandName());
|
||||
holder.ed_mbq.setText(childData.getMbq());
|
||||
holder.txt_skuName.setText(childData.getSku());
|
||||
holder.txt_mbq.setText(childData.getMbq());
|
||||
|
||||
holder.toggle_available.setTextOff("No");
|
||||
holder.toggle_available.setTextOn("Yes");
|
||||
/*if (childData.getToggleValue().equals("1")) {
|
||||
holder.toggle_available.setText("Yes");
|
||||
} else {
|
||||
holder.toggle_available.setText("No");
|
||||
}*/
|
||||
|
||||
holder.toggle_available.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) {
|
||||
childData.setToggleValue("1");
|
||||
} else {
|
||||
childData.setToggleValue("0");
|
||||
}
|
||||
|
||||
expandableListView.invalidateViews();
|
||||
}
|
||||
});
|
||||
|
||||
if (childData.getToggleValue().equals("1")) {
|
||||
holder.toggle_available.setChecked(true);
|
||||
} else {
|
||||
holder.toggle_available.setChecked(false);
|
||||
}
|
||||
|
||||
return convertView;
|
||||
}
|
||||
@@ -332,9 +385,8 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
public class ViewHolder {
|
||||
EditText ed_mbq;
|
||||
CardView cardView;
|
||||
TextView txt_skuName;
|
||||
TextView txt_skuName, txt_mbq;
|
||||
ToggleButton toggle_available;
|
||||
LinearLayout lin_category;
|
||||
}
|
||||
|
||||
+166
-50
@@ -1,6 +1,8 @@
|
||||
package cpm.com.gskmtorange.gsk_dailyentry;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
@@ -28,6 +30,7 @@ import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import java.io.File;
|
||||
@@ -38,6 +41,7 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||
@@ -52,11 +56,13 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
HashMap<Stock_FacingGetterSetter, List<Stock_FacingGetterSetter>> hashMapListChildData;
|
||||
|
||||
ExpandableListAdapter adapter;
|
||||
GSKOrangeDB db;
|
||||
|
||||
String title;
|
||||
String categoryName, categoryId, storeId;
|
||||
|
||||
String path = "", str = "", _pathforcheck = "", img1 = "";
|
||||
static int child_position = -1;
|
||||
boolean isDialogOpen = true;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -68,11 +74,18 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
db = new GSKOrangeDB(this);
|
||||
db.open();
|
||||
|
||||
expandableListView = (ExpandableListView) findViewById(R.id.expandableListView);
|
||||
txt_stockFacingName = (TextView) findViewById(R.id.txt_stockFacingName);
|
||||
|
||||
title = getIntent().getStringExtra("categoryName");
|
||||
txt_stockFacingName.setText(title);
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
categoryId = getIntent().getStringExtra("categoryId");
|
||||
storeId = "";
|
||||
|
||||
//txt_stockFacingName.setText(categoryName);
|
||||
txt_stockFacingName.setText(getResources().getString(R.string.title_activity_stock_facing));
|
||||
|
||||
prepareList();
|
||||
|
||||
@@ -82,8 +95,49 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
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();
|
||||
/*Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
|
||||
.setAction("Action", null).show();*/
|
||||
|
||||
//if (validateData(listDataHeader, listDataChild)) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Stock_FacingActivity.this);
|
||||
builder.setMessage("Are you sure you want to save")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
db.open();
|
||||
//db.InsertStock_Facing(storeId, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
|
||||
if (db.checkStockAndFacingData(storeId, categoryId)) {
|
||||
db.updateStockAndFacing(storeId, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
} else {
|
||||
db.InsertStock_Facing(storeId, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
}
|
||||
|
||||
Toast.makeText(getApplicationContext(), "Data has been saved", Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
}
|
||||
})
|
||||
.setNegativeButton("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(MSL_AvailabilityActivity.this);
|
||||
builder.setMessage("Fill the value or fill 0 ")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}*/
|
||||
}
|
||||
});
|
||||
|
||||
@@ -150,58 +204,28 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void prepareList() {
|
||||
headerDataList = new ArrayList<>();
|
||||
|
||||
Stock_FacingGetterSetter msl = new Stock_FacingGetterSetter();
|
||||
msl.setBrandName("Parodontax header 1");
|
||||
msl.setMbq("1");
|
||||
msl.setAvailable("No");
|
||||
headerDataList.add(msl);
|
||||
|
||||
msl = new Stock_FacingGetterSetter();
|
||||
msl.setBrandName("Parodontax header 2");
|
||||
msl.setMbq("2");
|
||||
msl.setAvailable("Yes");
|
||||
headerDataList.add(msl);
|
||||
|
||||
msl = new Stock_FacingGetterSetter();
|
||||
msl.setBrandName("Parodontax header 3");
|
||||
msl.setMbq("3");
|
||||
msl.setAvailable("Yes");
|
||||
headerDataList.add(msl);
|
||||
|
||||
msl = new Stock_FacingGetterSetter();
|
||||
msl.setBrandName("Parodontax header 4");
|
||||
msl.setMbq("4");
|
||||
msl.setAvailable("No");
|
||||
headerDataList.add(msl);
|
||||
|
||||
|
||||
hashMapListHeaderData = new ArrayList<>();
|
||||
hashMapListChildData = new HashMap<>();
|
||||
|
||||
//Header Data
|
||||
headerDataList = db.getStockAndFacingHeader_AfterSaveData(categoryId);
|
||||
if (!(headerDataList.size() > 0)) {
|
||||
headerDataList = db.getStockAndFacingHeaderData(categoryId);
|
||||
}
|
||||
|
||||
if (headerDataList.size() > 0) {
|
||||
|
||||
for (int i = 0; i < headerDataList.size(); i++) {
|
||||
hashMapListHeaderData.add(headerDataList.get(i));
|
||||
|
||||
childDataList = new ArrayList<>();
|
||||
|
||||
Stock_FacingGetterSetter msl1 = new Stock_FacingGetterSetter();
|
||||
msl.setBrandName("Parodontax 1");
|
||||
msl.setMbq("1");
|
||||
msl.setAvailable("No");
|
||||
childDataList.add(msl1);
|
||||
|
||||
msl1 = new Stock_FacingGetterSetter();
|
||||
msl.setBrandName("Parodontax 2");
|
||||
msl.setMbq("2");
|
||||
msl.setAvailable("No");
|
||||
childDataList.add(msl1);
|
||||
//Child Data
|
||||
childDataList = db.getStockAndFacingSKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id());
|
||||
if (!(childDataList.size() > 0)) {
|
||||
childDataList = db.getStockAndFacingSKUData(categoryId, headerDataList.get(i).getBrand_id());
|
||||
}
|
||||
|
||||
hashMapListChildData.put(hashMapListHeaderData.get(i), childDataList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
adapter = new ExpandableListAdapter(this, hashMapListHeaderData, hashMapListChildData);
|
||||
@@ -252,7 +276,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
ImageView img_edit = (ImageView) convertView.findViewById(R.id.img_edit);
|
||||
|
||||
txt_stockFaceupHeader.setTypeface(null, Typeface.BOLD);
|
||||
txt_stockFaceupHeader.setText(headerTitle.getBrandName());
|
||||
txt_stockFaceupHeader.setText(headerTitle.getSub_category() + "-" + headerTitle.getBrand());
|
||||
|
||||
img_camera1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -338,7 +362,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public View getChildView(final int groupPosition, final int childPosition, boolean isLastChild,
|
||||
View convertView, ViewGroup parent) {
|
||||
Stock_FacingGetterSetter childData = (Stock_FacingGetterSetter) getChild(groupPosition, childPosition);
|
||||
final Stock_FacingGetterSetter childData = (Stock_FacingGetterSetter) getChild(groupPosition, childPosition);
|
||||
ViewHolder holder = null;
|
||||
|
||||
if (convertView == null) {
|
||||
@@ -357,8 +381,100 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
|
||||
holder.txt_skuName.setText(childData.getBrandName());
|
||||
holder.ed_stock.setText(childData.getMbq());
|
||||
holder.txt_skuName.setText(childData.getSku());
|
||||
|
||||
if (childData.getCompany_id().equals("1")) {
|
||||
holder.txt_skuName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||
} else {
|
||||
holder.txt_skuName.setTextColor(getResources().getColor(R.color.black));
|
||||
}
|
||||
|
||||
|
||||
if (childData.getStock().equals("0")) {
|
||||
holder.ed_facing.setEnabled(false);
|
||||
} else {
|
||||
holder.ed_facing.setEnabled(true);
|
||||
}
|
||||
|
||||
final ViewHolder finalHolder = holder;
|
||||
holder.ed_stock.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
|
||||
final EditText caption = (EditText) v;
|
||||
String edStock = caption.getText().toString();
|
||||
|
||||
if (!edStock.equals("")) {
|
||||
String stock = edStock.replaceFirst("^0+(?!$)", "");
|
||||
childData.setStock(stock);
|
||||
|
||||
if (edStock.equals("0")) {
|
||||
childData.setFacing("0");
|
||||
|
||||
finalHolder.ed_facing.setEnabled(false);
|
||||
} else {
|
||||
childData.setFacing(childData.getFacing());
|
||||
finalHolder.ed_facing.setEnabled(true);
|
||||
}
|
||||
} else {
|
||||
childData.setStock("");
|
||||
finalHolder.ed_facing.setEnabled(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
holder.ed_stock.setText(childData.getStock());
|
||||
|
||||
holder.ed_facing.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
final EditText caption = (EditText) v;
|
||||
final String edFaceup = caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
||||
|
||||
if (!childData.getStock().equals("")) {
|
||||
if (!edFaceup.equals("")) {
|
||||
if (Integer.parseInt(edFaceup) <= Integer.parseInt(childData.getStock())) {
|
||||
childData.setFacing(edFaceup);
|
||||
} else {
|
||||
if (isDialogOpen) {
|
||||
isDialogOpen = !isDialogOpen;
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Stock_FacingActivity.this);
|
||||
builder.setMessage("Faceup can not be greater than stock value")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.dismiss();
|
||||
isDialogOpen = !isDialogOpen;
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
childData.setFacing("");
|
||||
}
|
||||
} else {
|
||||
if (isDialogOpen) {
|
||||
isDialogOpen = !isDialogOpen;
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Stock_FacingActivity.this);
|
||||
builder.setMessage("First fill the stock value")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.dismiss();
|
||||
isDialogOpen = !isDialogOpen;
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
holder.ed_facing.setText(childData.getFacing());
|
||||
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
+15
-8
@@ -6,22 +6,29 @@ package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
public class CategoryGetterSetter {
|
||||
|
||||
String category_name;
|
||||
int category_img = -1;
|
||||
String category_id, category, category_img;
|
||||
|
||||
public String getCategory_name() {
|
||||
return category_name;
|
||||
public String getCategory_id() {
|
||||
return category_id;
|
||||
}
|
||||
|
||||
public void setCategory_name(String category_name) {
|
||||
this.category_name = category_name;
|
||||
public void setCategory_id(String category_id) {
|
||||
this.category_id = category_id;
|
||||
}
|
||||
|
||||
public int getCategory_img() {
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getCategory_img() {
|
||||
return category_img;
|
||||
}
|
||||
|
||||
public void setCategory_img(int category_img) {
|
||||
public void setCategory_img(String category_img) {
|
||||
this.category_img = category_img;
|
||||
}
|
||||
}
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 03-01-2017.
|
||||
*/
|
||||
|
||||
public class DisplayChecklistMasterGetterSetter {
|
||||
|
||||
String table_DISPLAY_CHECKLIST_MASTER;
|
||||
|
||||
public String getTable_DISPLAY_CHECKLIST_MASTER() {
|
||||
return table_DISPLAY_CHECKLIST_MASTER;
|
||||
}
|
||||
|
||||
public void setTable_DISPLAY_CHECKLIST_MASTER(String table_DISPLAY_CHECKLIST_MASTER) {
|
||||
this.table_DISPLAY_CHECKLIST_MASTER = table_DISPLAY_CHECKLIST_MASTER;
|
||||
}
|
||||
|
||||
public ArrayList<String> getCHECKLIST_ID() {
|
||||
return CHECKLIST_ID;
|
||||
}
|
||||
|
||||
public void setCHECKLIST_ID(String CHECKLIST_ID) {
|
||||
this.CHECKLIST_ID.add(CHECKLIST_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getCHECKLIST() {
|
||||
return CHECKLIST;
|
||||
}
|
||||
|
||||
public void setCHECKLIST(String CHECKLIST) {
|
||||
this.CHECKLIST.add(CHECKLIST);
|
||||
}
|
||||
|
||||
ArrayList<String> CHECKLIST_ID = new ArrayList<>();
|
||||
ArrayList<String> CHECKLIST = new ArrayList<>();
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 04-01-2017.
|
||||
*/
|
||||
|
||||
public class GapsChecklistGetterSetter {
|
||||
|
||||
String checklist, checklist_id, display_id;
|
||||
boolean present;
|
||||
|
||||
public String getChecklist() {
|
||||
return checklist;
|
||||
}
|
||||
|
||||
public void setChecklist(String checklist) {
|
||||
this.checklist = checklist;
|
||||
}
|
||||
|
||||
public String getChecklist_id() {
|
||||
return checklist_id;
|
||||
}
|
||||
|
||||
public void setChecklist_id(String checklist_id) {
|
||||
this.checklist_id = checklist_id;
|
||||
}
|
||||
|
||||
public boolean isPresent() {
|
||||
return present;
|
||||
}
|
||||
|
||||
public void setPresent(boolean present) {
|
||||
this.present = present;
|
||||
}
|
||||
|
||||
public String getDisplay_id() {
|
||||
return display_id;
|
||||
}
|
||||
|
||||
public void setDisplay_id(String display_id) {
|
||||
this.display_id = display_id;
|
||||
}
|
||||
}
|
||||
+70
-13
@@ -5,14 +5,79 @@ package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
*/
|
||||
|
||||
public class MSL_AvailabilityGetterSetter {
|
||||
String brandName, mbq, available;
|
||||
String sub_category_id, sub_category, brand_id, brand,
|
||||
sku_id, sku, mrp, sku_sequence, toggleValue,mbq;
|
||||
|
||||
public String getBrandName() {
|
||||
return brandName;
|
||||
public String getSub_category_id() {
|
||||
return sub_category_id;
|
||||
}
|
||||
|
||||
public void setBrandName(String brandName) {
|
||||
this.brandName = brandName;
|
||||
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 getToggleValue() {
|
||||
return toggleValue;
|
||||
}
|
||||
|
||||
public void setToggleValue(String toggleValue) {
|
||||
this.toggleValue = toggleValue;
|
||||
}
|
||||
|
||||
public String getMbq() {
|
||||
@@ -22,12 +87,4 @@ public class MSL_AvailabilityGetterSetter {
|
||||
public void setMbq(String mbq) {
|
||||
this.mbq = mbq;
|
||||
}
|
||||
|
||||
public String getAvailable() {
|
||||
return available;
|
||||
}
|
||||
|
||||
public void setAvailable(String available) {
|
||||
this.available = available;
|
||||
}
|
||||
}
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 03-01-2017.
|
||||
*/
|
||||
|
||||
public class MappingDisplayChecklistGetterSetter {
|
||||
|
||||
String table_MAPPING_DISPLAY_CHECKLIST;
|
||||
|
||||
ArrayList<String> DISPLAY_ID = new ArrayList<>();
|
||||
ArrayList<String> CHECKLIST_ID = new ArrayList<>();
|
||||
|
||||
public String getTable_MAPPING_DISPLAY_CHECKLIST() {
|
||||
return table_MAPPING_DISPLAY_CHECKLIST;
|
||||
}
|
||||
|
||||
public void setTable_MAPPING_DISPLAY_CHECKLIST(String table_MAPPING_DISPLAY_CHECKLIST) {
|
||||
this.table_MAPPING_DISPLAY_CHECKLIST = table_MAPPING_DISPLAY_CHECKLIST;
|
||||
}
|
||||
|
||||
public ArrayList<String> getDISPLAY_ID() {
|
||||
return DISPLAY_ID;
|
||||
}
|
||||
|
||||
public void setDISPLAY_ID(String DISPLAY_ID) {
|
||||
this.DISPLAY_ID.add(DISPLAY_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getCHECKLIST_ID() {
|
||||
return CHECKLIST_ID;
|
||||
}
|
||||
|
||||
public void setCHECKLIST_ID(String CHECKLIST_ID) {
|
||||
this.CHECKLIST_ID.add(CHECKLIST_ID);
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 03-01-2017.
|
||||
*/
|
||||
|
||||
public class MappingPromotionGetterSetter {
|
||||
|
||||
String table_MAPPING_PROMOTION;
|
||||
|
||||
ArrayList<String> STORE_ID = new ArrayList<>();
|
||||
ArrayList<String> SKU_ID = new ArrayList<>();
|
||||
ArrayList<String> SKU = new ArrayList<>();
|
||||
ArrayList<String> PROMO_ID = new ArrayList<>();
|
||||
ArrayList<String> PROMO = new ArrayList<>();
|
||||
|
||||
public String getTable_MAPPING_PROMOTION() {
|
||||
return table_MAPPING_PROMOTION;
|
||||
}
|
||||
|
||||
public void setTable_MAPPING_PROMOTION(String table_MAPPING_PROMOTION) {
|
||||
this.table_MAPPING_PROMOTION = table_MAPPING_PROMOTION;
|
||||
}
|
||||
|
||||
public ArrayList<String> getSTORE_ID() {
|
||||
return STORE_ID;
|
||||
}
|
||||
|
||||
public void setSTORE_ID(String STORE_ID) {
|
||||
this.STORE_ID.add(STORE_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getSKU_ID() {
|
||||
return SKU_ID;
|
||||
}
|
||||
|
||||
public void setSKU_ID(String SKU_ID) {
|
||||
this.SKU_ID.add(SKU_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getSKU() {
|
||||
return SKU;
|
||||
}
|
||||
|
||||
public void setSKU(String SKU) {
|
||||
this.SKU.add(SKU);
|
||||
}
|
||||
|
||||
public ArrayList<String> getPROMO_ID() {
|
||||
return PROMO_ID;
|
||||
}
|
||||
|
||||
public void setPROMO_ID(String PROMO_ID) {
|
||||
this.PROMO_ID.add(PROMO_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getPROMO() {
|
||||
return PROMO;
|
||||
}
|
||||
|
||||
public void setPROMO(String PROMO) {
|
||||
this.PROMO.add(PROMO);
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 03-01-2017.
|
||||
*/
|
||||
|
||||
public class NonWorkingReasonGetterSetter {
|
||||
|
||||
String table_NON_WORKING_REASON;
|
||||
|
||||
ArrayList<String> REASON_ID = new ArrayList<>();
|
||||
ArrayList<String> REASON = new ArrayList<>();
|
||||
ArrayList<String> ENTRY_ALLOW = new ArrayList<>();
|
||||
ArrayList<String> IMAGE_ALLOW = new ArrayList<>();
|
||||
|
||||
public String getTable_NON_WORKING_REASON() {
|
||||
return table_NON_WORKING_REASON;
|
||||
}
|
||||
|
||||
public void setTable_NON_WORKING_REASON(String table_NON_WORKING_REASON) {
|
||||
this.table_NON_WORKING_REASON = table_NON_WORKING_REASON;
|
||||
}
|
||||
|
||||
public ArrayList<String> getREASON_ID() {
|
||||
return REASON_ID;
|
||||
}
|
||||
|
||||
public void setREASON_ID(String REASON_ID) {
|
||||
this.REASON_ID.add(REASON_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getREASON() {
|
||||
return REASON;
|
||||
}
|
||||
|
||||
public void setREASON(String REASON) {
|
||||
this.REASON.add(REASON);
|
||||
}
|
||||
|
||||
public ArrayList<String> getENTRY_ALLOW() {
|
||||
return ENTRY_ALLOW;
|
||||
}
|
||||
|
||||
public void setENTRY_ALLOW(String ENTRY_ALLOW) {
|
||||
this.ENTRY_ALLOW.add(ENTRY_ALLOW);
|
||||
}
|
||||
|
||||
public ArrayList<String> getIMAGE_ALLOW() {
|
||||
return IMAGE_ALLOW;
|
||||
}
|
||||
|
||||
public void setIMAGE_ALLOW(String IMAGE_ALLOW) {
|
||||
this.IMAGE_ALLOW.add(IMAGE_ALLOW);
|
||||
}
|
||||
}
|
||||
+98
-9
@@ -5,14 +5,87 @@ package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
*/
|
||||
|
||||
public class Stock_FacingGetterSetter {
|
||||
String brandName, mbq, available;
|
||||
String sub_category_id, sub_category, brand_id, brand,
|
||||
sku_id, sku, mrp, sku_sequence, stock, facing, mbq, company_id, image1, image2;
|
||||
|
||||
public String getBrandName() {
|
||||
return brandName;
|
||||
public String getSub_category_id() {
|
||||
return sub_category_id;
|
||||
}
|
||||
|
||||
public void setBrandName(String brandName) {
|
||||
this.brandName = brandName;
|
||||
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() {
|
||||
@@ -23,11 +96,27 @@ public class Stock_FacingGetterSetter {
|
||||
this.mbq = mbq;
|
||||
}
|
||||
|
||||
public String getAvailable() {
|
||||
return available;
|
||||
public String getCompany_id() {
|
||||
return company_id;
|
||||
}
|
||||
|
||||
public void setAvailable(String available) {
|
||||
this.available = available;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 02-01-2017.
|
||||
*/
|
||||
|
||||
public class T2PGetterSetter {
|
||||
|
||||
String brand_id, display_id, brand, display, image, remark;
|
||||
boolean isPresent;
|
||||
|
||||
public String getBrand_id() {
|
||||
return brand_id;
|
||||
}
|
||||
|
||||
public void setBrand_id(String brand_id) {
|
||||
this.brand_id = brand_id;
|
||||
}
|
||||
|
||||
public String getDisplay_id() {
|
||||
return display_id;
|
||||
}
|
||||
|
||||
public void setDisplay_id(String display_id) {
|
||||
this.display_id = display_id;
|
||||
}
|
||||
|
||||
public String getBrand() {
|
||||
return brand;
|
||||
}
|
||||
|
||||
public void setBrand(String brand) {
|
||||
this.brand = brand;
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(String display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public boolean isPresent() {
|
||||
return isPresent;
|
||||
}
|
||||
|
||||
public void setPresent(boolean present) {
|
||||
isPresent = present;
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,10 @@ public class TableBean {
|
||||
public static String DISPLAY_MASTER;
|
||||
public static String MAPPING_STOCK;
|
||||
public static String MAPPING_T2P;
|
||||
public static String DISPLAY_CHECKLIST_MASTER;
|
||||
public static String MAPPING_DISPLAY_CHECKLIST;
|
||||
public static String NON_WORKING_REASON;
|
||||
public static String MAPPING_PROMOTION;
|
||||
|
||||
public static String getJourneyPlan() {
|
||||
return JOURNEY_PLAN;
|
||||
@@ -78,4 +82,36 @@ public class TableBean {
|
||||
public static void setMappingT2p(String mappingT2p) {
|
||||
MAPPING_T2P = mappingT2p;
|
||||
}
|
||||
|
||||
public static String getDisplayChecklistMaster() {
|
||||
return DISPLAY_CHECKLIST_MASTER;
|
||||
}
|
||||
|
||||
public static void setDisplayChecklistMaster(String displayChecklistMaster) {
|
||||
DISPLAY_CHECKLIST_MASTER = displayChecklistMaster;
|
||||
}
|
||||
|
||||
public static String getMappingDisplayChecklist() {
|
||||
return MAPPING_DISPLAY_CHECKLIST;
|
||||
}
|
||||
|
||||
public static void setMappingDisplayChecklist(String mappingDisplayChecklist) {
|
||||
MAPPING_DISPLAY_CHECKLIST = mappingDisplayChecklist;
|
||||
}
|
||||
|
||||
public static String getNonWorkingReason() {
|
||||
return NON_WORKING_REASON;
|
||||
}
|
||||
|
||||
public static void setNonWorkingReason(String nonWorkingReason) {
|
||||
NON_WORKING_REASON = nonWorkingReason;
|
||||
}
|
||||
|
||||
public static String getMappingPromotion() {
|
||||
return MAPPING_PROMOTION;
|
||||
}
|
||||
|
||||
public static void setMappingPromotion(String mappingPromotion) {
|
||||
MAPPING_PROMOTION = mappingPromotion;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,12 +7,16 @@ import java.io.IOException;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.FailureGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.JourneyPlanGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.LoginGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPINGT2PGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
|
||||
@@ -405,7 +409,7 @@ public class XMLHandlers {
|
||||
return stock;
|
||||
}
|
||||
|
||||
// MAPPING_STOCK XML HANDLER
|
||||
// MAPPING_T2P XML HANDLER
|
||||
public static MAPPINGT2PGetterSetter mappingT2pXMLHandler(XmlPullParser xpp,
|
||||
int eventType) {
|
||||
MAPPINGT2PGetterSetter t2p = new MAPPINGT2PGetterSetter();
|
||||
@@ -437,4 +441,140 @@ public class XMLHandlers {
|
||||
}
|
||||
return t2p;
|
||||
}
|
||||
|
||||
// DISPLAY_CHECKLIST_MASTER XML HANDLER
|
||||
public static DisplayChecklistMasterGetterSetter mappingDisplayChecklistMasterXMLHandler(XmlPullParser xpp,
|
||||
int eventType) {
|
||||
DisplayChecklistMasterGetterSetter checklist = new DisplayChecklistMasterGetterSetter();
|
||||
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
checklist.setTable_DISPLAY_CHECKLIST_MASTER(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("CHECKLIST_ID")) {
|
||||
checklist.setCHECKLIST_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("CHECKLIST")) {
|
||||
checklist.setCHECKLIST(xpp.nextText());
|
||||
}
|
||||
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
return checklist;
|
||||
}
|
||||
|
||||
// MAPPING_DISPLAY_CHECKLIST XML HANDLER
|
||||
public static MappingDisplayChecklistGetterSetter mappingMappingDisplayChecklistXMLHandler(XmlPullParser xpp,
|
||||
int eventType) {
|
||||
MappingDisplayChecklistGetterSetter checklist = new MappingDisplayChecklistGetterSetter();
|
||||
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
checklist.setTable_MAPPING_DISPLAY_CHECKLIST(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("CHECKLIST_ID")) {
|
||||
checklist.setCHECKLIST_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("DISPLAY_ID")) {
|
||||
checklist.setDISPLAY_ID(xpp.nextText());
|
||||
}
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
return checklist;
|
||||
}
|
||||
|
||||
// NON_WORKING_REASON XML HANDLER
|
||||
public static NonWorkingReasonGetterSetter nonWorkingReasonXMLHandler(XmlPullParser xpp,
|
||||
int eventType) {
|
||||
NonWorkingReasonGetterSetter reason = new NonWorkingReasonGetterSetter();
|
||||
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
reason.setTable_NON_WORKING_REASON(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("REASON_ID")) {
|
||||
reason.setREASON_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("REASON")) {
|
||||
reason.setREASON(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("ENTRY_ALLOW")) {
|
||||
reason.setENTRY_ALLOW(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("IMAGE_ALLOW")) {
|
||||
reason.setIMAGE_ALLOW(xpp.nextText());
|
||||
}
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
return reason;
|
||||
}
|
||||
|
||||
// MAPPING_PROMOTION XML HANDLER
|
||||
public static MappingPromotionGetterSetter mappingPromotionXMLHandler(XmlPullParser xpp,
|
||||
int eventType) {
|
||||
MappingPromotionGetterSetter t2p = new MappingPromotionGetterSetter();
|
||||
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
t2p.setTable_MAPPING_PROMOTION(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("STORE_ID")) {
|
||||
t2p.setSTORE_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("SKU_ID")) {
|
||||
t2p.setSKU_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("SKU")) {
|
||||
t2p.setSKU(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("PROMO_ID")) {
|
||||
t2p.setPROMO_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("PROMO")) {
|
||||
t2p.setPROMO(xpp.nextText());
|
||||
}
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
return t2p;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -29,6 +29,7 @@
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/save_icon" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
@@ -29,6 +29,6 @@
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
app:srcCompat="@drawable/save_icon" />
|
||||
app:srcCompat="@drawable/right_arrow" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/save_icon" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:fitsSystemWindows="true"
|
||||
|
||||
app:menu="@menu/activity_main_drawer" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
||||
@@ -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.T2PComplianceActivity">
|
||||
|
||||
<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_t2_pcompliance" />
|
||||
|
||||
<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>
|
||||
@@ -5,6 +5,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:id="@+id/coordinate"
|
||||
tools:context="cpm.com.gskmtorange.MainActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:text="Category Performance"
|
||||
android:text="Daily Data Menu"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="SKU"
|
||||
android:text="@string/msl_availability_sku"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
@@ -63,7 +63,7 @@
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="MBQ"
|
||||
android:text="@string/msl_availability_mbq"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
@@ -80,7 +80,7 @@
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Available"
|
||||
android:text="@string/msl_availability_availability"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
android:id="@+id/content_msl__availability"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:showIn="@layout/activity_msl__availability">
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -46,7 +45,7 @@
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="SKU"
|
||||
android:text="@string/stock_facing_sku_name"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
@@ -63,7 +62,7 @@
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Stock"
|
||||
android:text="@string/stock_facing_stock"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
@@ -80,7 +79,7 @@
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Faceup"
|
||||
android:text="@string/stock_facing_faceup"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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_t2_pcompliance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/custom_margin"
|
||||
android:paddingLeft="@dimen/custom_margin"
|
||||
android:paddingRight="@dimen/custom_margin"
|
||||
android:paddingTop="@dimen/custom_margin"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context="cpm.com.gskmtorange.dailyentry.T2PComplianceActivity"
|
||||
tools:showIn="@layout/activity_t2_pcompliance"
|
||||
android:background="@color/grey_background">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rec_t2p"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"></android.support.v7.widget.RecyclerView>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?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"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/custom_margin"
|
||||
android:layout_marginRight="@dimen/custom_margin"
|
||||
android:layout_marginTop="@dimen/custom_margin"
|
||||
card_view:cardBackgroundColor="@color/white"
|
||||
card_view:cardCornerRadius="10dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="2"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_checklist"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="Checklist"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/custom_margin"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="5dp"
|
||||
>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/btn_is_present"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</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"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<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="20dp"
|
||||
|
||||
>
|
||||
|
||||
<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:paddingLeft="5dp"
|
||||
android:text="@string/gaps"
|
||||
android:textSize="@dimen/text_size_normal"
|
||||
android:paddingBottom="20dp"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rec_gap_checklist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/grey_background">
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:background="@color/grey_background">
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="@string/save"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -61,23 +61,11 @@
|
||||
android:layout_weight="1.25"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--<TextView
|
||||
<TextView
|
||||
android:id="@+id/txt_mbq"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="MBQ"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />-->
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ed_mbq"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:inputType="number"
|
||||
android:maxLength="7"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222"
|
||||
android:textColorHint="#666" />
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
<?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:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
card_view:cardBackgroundColor="@android:color/white"
|
||||
card_view:cardUseCompatPadding="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/parent_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/brand"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brand"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/brand" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/display"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_display"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/display" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/present"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/toggle_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/brand"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/image"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_cam"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/image"
|
||||
android:layout_weight="1"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/cam_active"
|
||||
android:padding="@dimen/custom_margin"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_remark"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/image"
|
||||
android:layout_weight="1"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/edit_deactive"
|
||||
android:padding="@dimen/custom_margin"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_gaps"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:text="@string/gaps"
|
||||
android:textColor="@color/white"
|
||||
android:background="@color/colorPrimary"
|
||||
android:layout_centerInParent="true"
|
||||
android:textSize="@dimen/text_size_xsmall"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_sku"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:text="@string/sku"
|
||||
android:textColor="@color/white"
|
||||
android:background="@color/colorPrimary"
|
||||
android:layout_centerInParent="true"
|
||||
android:textSize="@dimen/text_size_xsmall"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_ref_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:text="@string/ref_image"
|
||||
android:textColor="@color/white"
|
||||
android:background="@color/colorPrimary"
|
||||
android:layout_centerInParent="true"
|
||||
android:textSize="@dimen/text_size_xsmall"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,134 @@
|
||||
<?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:orientation="vertical"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<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="20dp"
|
||||
|
||||
>
|
||||
|
||||
<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:paddingLeft="5dp"
|
||||
android:text="@string/sku"
|
||||
android:textSize="@dimen/text_size_normal"
|
||||
android:paddingBottom="20dp"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2"
|
||||
android:background="@color/grey_background"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brand"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/brand"
|
||||
android:paddingLeft="5dp"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_brand"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2"
|
||||
android:background="@color/grey_background"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/sku"
|
||||
android:paddingLeft="5dp"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_sku"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2"
|
||||
android:background="@color/grey_background"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/stock"
|
||||
android:paddingLeft="5dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_stock"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:background="@color/grey_background">
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="@string/add"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -20,13 +20,25 @@
|
||||
<string name="menu_setting">Ayarlar</string>
|
||||
<string name="menu_services">Hizmetler</string>
|
||||
|
||||
|
||||
//changes after
|
||||
<string name="title_geo_tag_activity_upload_data">Store Uploaded</string>
|
||||
<string name="title_geo_tag_activity_geo_data">Store Geo Data Uploaded</string>
|
||||
<string name="title_geo_tag_activity_geo_already_done">Store Already Geotagged</string>
|
||||
|
||||
<string name="save">Sakla</string>
|
||||
|
||||
<string name="brand">Marka</string>
|
||||
<string name="display">Teşhir Türü</string>
|
||||
<string name="image">Fotoğraf</string>
|
||||
<string name="gaps">Sorunlar</string>
|
||||
<string name="sku">Ürünler</string>
|
||||
<string name="ref_image">ref. Fotoğraf</string>
|
||||
<string name="present">Teşhir var mı?</string>
|
||||
<string name="add">Ekle</string>
|
||||
|
||||
<string name="select">Seç</string>
|
||||
|
||||
<string name="title_activity_t2_pcompliance">Kalıcı Teşhir</string>
|
||||
|
||||
</resources>
|
||||
@@ -11,5 +11,9 @@
|
||||
|
||||
<dimen name="text_size_normal">20sp</dimen>
|
||||
<dimen name="text_size_small">16sp</dimen>
|
||||
|
||||
<dimen name="store_entry_text_size">20sp</dimen>
|
||||
|
||||
<dimen name="text_size_xsmall">12sp</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -21,6 +21,19 @@
|
||||
completions."
|
||||
</string>
|
||||
|
||||
<string name="save">Save</string>
|
||||
|
||||
<string name="brand">Brand</string>
|
||||
<string name="display">Display</string>
|
||||
<string name="image">Image</string>
|
||||
<string name="gaps">Gaps</string>
|
||||
<string name="sku">Sku</string>
|
||||
<string name="ref_image">Ref. Image</string>
|
||||
<string name="present">Present</string>
|
||||
<string name="stock">Stock</string>
|
||||
<string name="select">Select</string>
|
||||
<string name="add">Add</string>
|
||||
|
||||
<string name="select_language">Please select language</string>
|
||||
<string name="title_activity_select_language">SelectLanguageActivity</string>
|
||||
|
||||
@@ -40,9 +53,31 @@
|
||||
<string name="menu_services">Services</string>
|
||||
|
||||
<string name="title_activity_category_list">Category List</string>
|
||||
<string name="title_activity_category_wise_performance">CategoryWise Performance</string>
|
||||
<string name="title_activity_daily_main_menu">DailyMainMenuActivity</string>
|
||||
<string name="title_activity_msl__availability">MSL_AvailabilityActivity</string>
|
||||
<string name="title_activity_t2_pcompliance">T2P Compliance</string>
|
||||
|
||||
<string name="title_activity_category_wise_performance">Categorywise Performance</string>
|
||||
<string name="title_activity_daily_main_menu">Daily Data Menu</string>
|
||||
<string name="title_activity_msl__availability">Must Stock Availability</string>
|
||||
<string name="title_activity_stock_facing">Stock and Facing</string>
|
||||
|
||||
<string name="daily_data_menu_msl_availability">MSL Availability</string>
|
||||
<string name="daily_data_menu_stock_facing">Stock and Facing</string>
|
||||
<string name="daily_data_menu_t2p">T2P Compliance</string>
|
||||
<string name="daily_data_menu_additional_visibility">Additional Visibility</string>
|
||||
<string name="daily_data_menu_promo_compliance">Promo Compliance</string>
|
||||
<string name="daily_data_menu_competition_tracking">Competition Visibility</string>
|
||||
<string name="daily_data_menu_additional_promotions">Competition Promo</string>
|
||||
|
||||
<string name="msl_availability_sku">SKU Name</string>
|
||||
<string name="msl_availability_mbq">MBQ</string>
|
||||
<string name="msl_availability_availability">Availability</string>
|
||||
|
||||
<string name="stock_facing_reference_image">Reference Image</string>
|
||||
<string name="stock_facing_sku_name">SKU Name</string>
|
||||
<string name="stock_facing_stock">Stock</string>
|
||||
<string name="stock_facing_faceup">Facing</string>
|
||||
<string name="stock_facing_sos_target">SOS Target</string>
|
||||
|
||||
|
||||
<string name="title_geo_tag_activity_upload_data">Store Uploaded</string>
|
||||
<string name="title_geo_tag_activity_geo_data">Store Geo Data Uploaded</string>
|
||||
|
||||
Reference in New Issue
Block a user