t2p_to_replace_posm_screen

This commit is contained in:
CPM
2020-12-03 14:06:49 +05:30
parent e00cb3d03f
commit b4b003eee0
11 changed files with 147 additions and 29 deletions
Binary file not shown.
+2 -2
View File
@@ -27,7 +27,7 @@
<activity
android:name=".dailyentry.NewStockDataActivity"
android:label="@string/title_activity_new_stock_data"
android:theme="@style/AppTheme.NoActionBar"></activity>
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".dailyentry.CounterfeitIndicatorWebActivity"
android:label="@string/title_activity_counterfeit_indicator_web"
@@ -133,7 +133,7 @@
<activity
android:name=".dailyentry.T2PComplianceActivity"
android:configChanges="screenSize|orientation|keyboardHidden"
android:label="@string/daily_data_menu_t2p"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" /> <!-- Gagan Start Declaration -->
<activity
@@ -228,9 +228,8 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
//Kenya
// museridView.setText("test.Kenya");
/* museridView.setText("testkenya");
museridView.setText("testkenya");
mPasswordView.setText("cpm123");
*/
mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
@@ -0,0 +1,37 @@
package cpm.com.gskmtorange.dailyentry;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import androidx.navigation.fragment.NavHostFragment;
import cpm.com.gskmtorange.R;
public class First2Fragment extends Fragment {
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState
) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_first2, container, false);
}
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
view.findViewById(R.id.button_first).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NavHostFragment.findNavController(First2Fragment.this)
.navigate(R.id.action_First2Fragment_to_Second2Fragment);
}
});
}
}
@@ -0,0 +1,37 @@
package cpm.com.gskmtorange.dailyentry;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import androidx.navigation.fragment.NavHostFragment;
import cpm.com.gskmtorange.R;
public class Second2Fragment extends Fragment {
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState
) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_second2, container, false);
}
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
view.findViewById(R.id.button_second).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NavHostFragment.findNavController(Second2Fragment.this)
.navigate(R.id.action_Second2Fragment_to_First2Fragment);
}
});
}
}
@@ -108,11 +108,6 @@ public class T2PComplianceActivity extends AppCompatActivity {
//Intent data
categoryName = getIntent().getStringExtra("categoryName");
categoryId = getIntent().getStringExtra("categoryId");
// toolbar.setTitle(R.string.title_activity_t2_pcompliance + " - " + categoryName);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
db = new GSKOrangeDB(T2PComplianceActivity.this);
db.open();
@@ -133,9 +128,17 @@ public class T2PComplianceActivity extends AppCompatActivity {
camera_allow = preferences.getString(CommonString.KEY_CAMERA_ALLOW, "");
country_id = preferences.getString(CommonString.KEY_COUNTRY_ID, "");
store_flag_str = preferences.getString(CommonString.KEY_STORE_FLAG, null);
rec_t2p = (RecyclerView) findViewById(R.id.rec_t2p);
if (country_id.equals("8")){
toolbar.setTitle(getResources().getString(R.string.title_posm));
}else {
toolbar.setTitle(getResources().getString(R.string.title_activity_t2_pcompliance));
}
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// toolbar.setTitle(R.string.title_activity_t2_pcompliance + " - " + categoryName);
final FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
@@ -189,10 +192,9 @@ public class T2PComplianceActivity extends AppCompatActivity {
t2PGetterSetters = db.getT2pComplianceData(store_id, categoryId);
if (t2PGetterSetters.size() == 0) {
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
t2PGetterSetters = db.getT2PDefaultData(store_id, categoryId, CommonString.TABLE_MAPPING_T2P_ADHOC);
}
else {
} else {
t2PGetterSetters = db.getT2PDefaultData(store_id, categoryId, "MAPPING_T2P");
}
@@ -582,7 +584,6 @@ public class T2PComplianceActivity extends AppCompatActivity {
});
if (camera_allow.equals("1")) {
//Camera
@@ -718,9 +719,9 @@ public class T2PComplianceActivity extends AppCompatActivity {
holder.img_cam2.setEnabled(is_enabled);
holder.btn_gaps.setEnabled(is_enabled);
if (is_enabled && mItem.getAllowQty().equals("1")){
if (is_enabled && mItem.getAllowQty().equals("1")) {
holder.ly_allowqty.setVisibility(View.VISIBLE);
}else {
} else {
holder.ly_allowqty.setVisibility(View.GONE);
}
@@ -983,7 +984,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
temp_list = db.getSkuT2PData(null, null, null, brand_id, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
temp_list = db.getSkuT2PData(storeType_id, class_id, keyAccount_id, brand_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
}else {
} else {
temp_list = db.getSkuT2PData(storeType_id, class_id, keyAccount_id, brand_id, store_id, CommonString.TABLE_MAPPING_STOCK);
}
@@ -1246,7 +1247,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
flag = false;
error_msg = getResources().getString(R.string.title_activity_fill_sku);
break;
}else if(t2PGetterSetters.get(i).getAllowQty().equals("1") && t2PGetterSetters.get(i).getQty().equals("")){
} else if (t2PGetterSetters.get(i).getAllowQty().equals("1") && t2PGetterSetters.get(i).getQty().equals("")) {
//added for UAE 04.07.2019
flag = false;
error_msg = getResources().getString(R.string.title_activity_enter_quantity);
@@ -1274,7 +1275,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
public void onBackPressed() {
//super.onBackPressed();
if(editFlag){
if (editFlag) {
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(T2PComplianceActivity.this);
builder.setTitle("Parinaam");
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
@@ -1293,8 +1294,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
});
android.app.AlertDialog alert = builder.create();
alert.show();
}
else {
} else {
finish();
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
}
@@ -1666,11 +1666,11 @@ public class T2PComplianceActivity extends AppCompatActivity {
final ArrayList<BrandAvabilityGetterSetter> brandList;
if (country_id.equals("7")||country_id.equals("8")) {
if (country_id.equals("7") || country_id.equals("8")) {
brandList = db.getBrandAvailbilitydata(store_id, categoryId, null, null, null, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)){
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
brandList = db.getBrandAvailbilitydata(store_id, categoryId, keyAccount_id, class_id, storeType_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
}else {
} else {
brandList = db.getBrandAvailbilitydata(store_id, categoryId, keyAccount_id, class_id, storeType_id, CommonString.TABLE_MAPPING_STOCK);
}
@@ -199,9 +199,14 @@ public class DailyDataMenuActivity extends AppCompatActivity {
}
categoryList.add(data);*/
//T2p
//T2p and kenya POSm
data = new DailyDataMenuGetterSetter();
data.setCategory_name(getResources().getString(R.string.daily_data_menu_t2p));
if (country_id.equals("8")){
data.setCategory_name(getResources().getString(R.string.title_posm));
}else {
data.setCategory_name(getResources().getString(R.string.daily_data_menu_t2p));
}
boolean flag_t2p_mapping;
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
flag_t2p_mapping = db.isMappingT2PData(store_id, categoryId, CommonString.TABLE_MAPPING_T2P_ADHOC);
@@ -546,8 +551,8 @@ public class DailyDataMenuActivity extends AppCompatActivity {
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
}
}
} else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_t2p)))||dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.title_posm)))) {
} else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_t2p)))) {
boolean t2p_flag = false;
boolean flag_t2p_mapping;
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
@@ -646,7 +651,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
}
} else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_t2p)))) {
} else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_t2p)))||dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.title_posm)))) {
boolean t2p_flag = false;
boolean flag_t2p_mapping;
if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
@@ -25,4 +25,24 @@
android:id="@+id/action_SecondFragment_to_FirstFragment"
app:destination="@id/FirstFragment" />
</fragment>
<fragment
android:id="@+id/First2Fragment"
android:name="cpm.com.gskmtorange.dailyentry.First2Fragment"
android:label="@string/first_fragment_label"
tools:layout="@layout/fragment_first2">
<action
android:id="@+id/action_First2Fragment_to_Second2Fragment"
app:destination="@id/Second2Fragment" />
</fragment>
<fragment
android:id="@+id/Second2Fragment"
android:name="cpm.com.gskmtorange.dailyentry.Second2Fragment"
android:label="@string/second_fragment_label"
tools:layout="@layout/fragment_second2">
<action
android:id="@+id/action_Second2Fragment_to_First2Fragment"
app:destination="@id/First2Fragment" />
</fragment>
</navigation>
@@ -429,5 +429,5 @@
<string name="hello_first_fragment">Hello first fragment</string>
<string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string>
<string name="title_posm">POSM</string>
</resources>
@@ -428,6 +428,8 @@
<string name="hello_first_fragment">Hello first fragment</string>
<string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string>
<string name="title_activity_stock_avalability">StockAvalability</string>
<string name="title_posm">POSM</string>
</resources>
@@ -0,0 +1,18 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.androidbuts.multispinnerfilter;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String LIBRARY_PACKAGE_NAME = "com.androidbuts.multispinnerfilter";
/**
* @deprecated APPLICATION_ID is misleading in libraries. For the library package name use LIBRARY_PACKAGE_NAME
*/
@Deprecated
public static final String APPLICATION_ID = "com.androidbuts.multispinnerfilter";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}