Feedback:
1- Draft Report Presented carton correction 2- Section correction 3- Add Hand Feel Not OK fieldsmain
parent
938794cb7d
commit
53f3380d93
|
@ -45,6 +45,8 @@ public class InspectionReportItem implements Serializable {
|
||||||
private double minorQualityLevel;
|
private double minorQualityLevel;
|
||||||
private double majorQualityLevel;
|
private double majorQualityLevel;
|
||||||
|
|
||||||
|
private long handFeelNotOkay;
|
||||||
|
|
||||||
private int levelMajorDefects;
|
private int levelMajorDefects;
|
||||||
private int levelMinorDefects;
|
private int levelMinorDefects;
|
||||||
|
|
||||||
|
@ -65,6 +67,7 @@ public class InspectionReportItem implements Serializable {
|
||||||
private String fnsku;
|
private String fnsku;
|
||||||
|
|
||||||
private String section;
|
private String section;
|
||||||
|
private String sectionForDraft;
|
||||||
|
|
||||||
public long getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -266,6 +269,14 @@ public class InspectionReportItem implements Serializable {
|
||||||
this.sampleSize = sampleSize;
|
this.sampleSize = sampleSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long getHandFeelNotOkay() {
|
||||||
|
return handFeelNotOkay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHandFeelNotOkay(long handFeelNotOkay) {
|
||||||
|
this.handFeelNotOkay = handFeelNotOkay;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDateAdded() {
|
public String getDateAdded() {
|
||||||
return dateAdded;
|
return dateAdded;
|
||||||
}
|
}
|
||||||
|
@ -426,6 +437,14 @@ public void setLevelMinorDefects(int levelMinorDefects) {
|
||||||
this.section = section;
|
this.section = section;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getSectionForDraft() {
|
||||||
|
return sectionForDraft;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSectionForDraft(String sectionForDraft) {
|
||||||
|
this.sectionForDraft = sectionForDraft;
|
||||||
|
}
|
||||||
|
|
||||||
public List<byte[]> getDimensionImages() {
|
public List<byte[]> getDimensionImages() {
|
||||||
return dimensionImages;
|
return dimensionImages;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,18 +75,16 @@ public class NetworkService extends Service {
|
||||||
private void pushDataToInternet() {
|
private void pushDataToInternet() {
|
||||||
ReportRepository repository = new ReportRepository( this );
|
ReportRepository repository = new ReportRepository( this );
|
||||||
List<InspectionReportWrapper> reportWrappers = repository.findAllUnsynced();
|
List<InspectionReportWrapper> reportWrappers = repository.findAllUnsynced();
|
||||||
Log.e("ReportWrappers-Size: ",""+reportWrappers.size());
|
|
||||||
InspectionReportService service = InspectionReportService.getInstance();
|
InspectionReportService service = InspectionReportService.getInstance();
|
||||||
try {
|
try {
|
||||||
List<InspectionReport> reports = getReports( reportWrappers );
|
List<InspectionReport> reports = getReports( reportWrappers );
|
||||||
Log.e("Reports.size(): ",""+reports.size());
|
|
||||||
int size = reports.size();
|
int size = reports.size();
|
||||||
if( size > 0 ){
|
if( size > 0 ){
|
||||||
NotificationHelper.showNotification(
|
/*NotificationHelper.showNotification(
|
||||||
this,
|
this,
|
||||||
"Uploading Reports",
|
"Uploading Reports",
|
||||||
String.format(" %d report(s) uploading..", reports.size() )
|
String.format(" %d report(s) uploading..", reports.size() )
|
||||||
);
|
);*/
|
||||||
for ( InspectionReport report : reports ){
|
for ( InspectionReport report : reports ){
|
||||||
service.saveReport(report, new SaveReportCallback() {
|
service.saveReport(report, new SaveReportCallback() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -95,6 +93,10 @@ public class NetworkService extends Service {
|
||||||
repository.updateSyncStatus( report.getWrapperId() );
|
repository.updateSyncStatus( report.getWrapperId() );
|
||||||
// remove file
|
// remove file
|
||||||
FileUtils.deleteFile( report.getFilePath() );
|
FileUtils.deleteFile( report.getFilePath() );
|
||||||
|
|
||||||
|
NotificationHelper.showNotification(
|
||||||
|
NetworkService.this,
|
||||||
|
"Report Status", "1 Report uploaded successfully");
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable throwable) {
|
public void onFailure(Throwable throwable) {
|
||||||
|
@ -102,11 +104,11 @@ public class NetworkService extends Service {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
NotificationHelper.showNotification(
|
/*NotificationHelper.showNotification(
|
||||||
this,
|
this,
|
||||||
"Uploading Reports",
|
"Uploading Reports",
|
||||||
String.format(" %d report(s) uploaded successfully..", reports.size() )
|
String.format(" %d report(s) uploaded successfully..", reports.size() )
|
||||||
);
|
);*/
|
||||||
}
|
}
|
||||||
} catch ( Exception e ) {
|
} catch ( Exception e ) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -85,6 +85,7 @@ public class FirstStepFragment extends Fragment implements View.OnClickListener
|
||||||
private InspectionReportService inspectionReportService;
|
private InspectionReportService inspectionReportService;
|
||||||
private EditText aqlSampleSize, cartonWeight, cartonLength, cartonWidth, cartonHeight;
|
private EditText aqlSampleSize, cartonWeight, cartonLength, cartonWidth, cartonHeight;
|
||||||
private EditText packWeight, packLength, packWidth, packHeight;
|
private EditText packWeight, packLength, packWidth, packHeight;
|
||||||
|
private EditText etHandFeelNotOk, etHandFeelOk, etHandFeelPercent;
|
||||||
TextView txtTesting;
|
TextView txtTesting;
|
||||||
|
|
||||||
List<String> sizes = Collections.singletonList("[Size]");
|
List<String> sizes = Collections.singletonList("[Size]");
|
||||||
|
@ -120,6 +121,10 @@ public class FirstStepFragment extends Fragment implements View.OnClickListener
|
||||||
//System.out.println(inspectionReport);
|
//System.out.println(inspectionReport);
|
||||||
store.setReport(inspectionReport);
|
store.setReport(inspectionReport);
|
||||||
//System.out.println("Report-SKU: " + store.getReport().getItems().get(0).getFnsku());
|
//System.out.println("Report-SKU: " + store.getReport().getItems().get(0).getFnsku());
|
||||||
|
inspectionLevel = String.valueOf(store.getReport().getItems().get(0).getInspectionLevel());
|
||||||
|
qualityLevelMajor = String.valueOf(store.getReport().getItems().get(0).getMajorQualityLevel());
|
||||||
|
qualityLevelMinor = String.valueOf(store.getReport().getItems().get(0).getMinorQualityLevel());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initializeViews(view);
|
initializeViews(view);
|
||||||
|
@ -340,7 +345,7 @@ public class FirstStepFragment extends Fragment implements View.OnClickListener
|
||||||
});
|
});
|
||||||
|
|
||||||
//onTextChanges logic implementation
|
//onTextChanges logic implementation
|
||||||
//box = 1, itemPerBox, pieces
|
//box = 1, itemPerBox, pieces // Item Selected Details
|
||||||
boxCartonSelected.addTextChangedListener(new TextWatcher() {
|
boxCartonSelected.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
@ -351,7 +356,7 @@ public class FirstStepFragment extends Fragment implements View.OnClickListener
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
try {
|
try {
|
||||||
int packsCount = 0, piecesCount = 0;
|
int packsCount = 0, piecesCount = 0;
|
||||||
int boxCount = Integer.parseInt(s.toString());
|
int boxCount = (int) Double.parseDouble(s.toString());
|
||||||
if (itemPerBox.getText().toString().isEmpty() || pieces.getText().toString().isEmpty()) {
|
if (itemPerBox.getText().toString().isEmpty() || pieces.getText().toString().isEmpty()) {
|
||||||
Toast.makeText(getContext(), "Enter Item/Pieces Per box", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "Enter Item/Pieces Per box", Toast.LENGTH_SHORT).show();
|
||||||
} else {
|
} else {
|
||||||
|
@ -360,17 +365,16 @@ public class FirstStepFragment extends Fragment implements View.OnClickListener
|
||||||
|
|
||||||
int totalPacks = boxCount * packsCount;
|
int totalPacks = boxCount * packsCount;
|
||||||
int totalPieces = totalPacks * piecesCount;
|
int totalPieces = totalPacks * piecesCount;
|
||||||
Log.e("totalPacks: ",""+totalPacks);
|
|
||||||
Log.e("totalPieces: ",""+totalPieces);
|
|
||||||
|
|
||||||
itemPerBoxSelected.setText(String.valueOf(totalPacks));
|
itemPerBoxSelected.setText(String.valueOf(totalPacks));
|
||||||
store.getReport().getItems().get(0).setPacksSelected(Long.parseLong(String.valueOf(totalPacks)));
|
//store.getReport().getItems().get(0).setPacksSelected(Long.parseLong(String.valueOf(totalPacks)));
|
||||||
piecesSelected.setText(String.valueOf(totalPieces));
|
piecesSelected.setText(String.valueOf(totalPieces));
|
||||||
store.getReport().getItems().get(0).setPiecesSelected(Long.parseLong(String.valueOf(totalPieces)));
|
//store.getReport().getItems().get(0).setPiecesSelected(Long.parseLong(String.valueOf(totalPieces)));
|
||||||
}
|
}
|
||||||
|
|
||||||
store.getReport().getItems().get(0).setCartonsSelected(Long.parseLong(s.toString()));
|
store.getReport().getItems().get(0).setCartonsSelected(Float.parseFloat(s.toString()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
store.getReport().getItems().get(0).setCartonsSelected(0);
|
store.getReport().getItems().get(0).setCartonsSelected(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -499,9 +503,9 @@ public class FirstStepFragment extends Fragment implements View.OnClickListener
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//calculate aql sample size
|
//calculate aql sample size
|
||||||
//Log.e("ItemPresentedDetails-pieces: ", "" + s.toString());
|
Log.e("ItemPresentedDetails-pieces: ", "" + s.toString());
|
||||||
//Log.e("ItemPresentedDetails-inspectionLevel: ", "" + inspectionLevel);
|
Log.e("ItemPresentedDetails-inspectionLevel: ", "" + inspectionLevel);
|
||||||
if (!s.toString().isEmpty()) {
|
if (!s.toString().isEmpty() && s.toString() != null) {
|
||||||
trackSampleCode(Integer.parseInt(s.toString()), (int) Double.parseDouble(inspectionLevel), Double.parseDouble(qualityLevelMajor), Double.parseDouble(qualityLevelMinor));
|
trackSampleCode(Integer.parseInt(s.toString()), (int) Double.parseDouble(inspectionLevel), Double.parseDouble(qualityLevelMajor), Double.parseDouble(qualityLevelMinor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -713,6 +717,33 @@ public class FirstStepFragment extends Fragment implements View.OnClickListener
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
etHandFeelNotOk.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
try {
|
||||||
|
int sampleSize = Integer.parseInt(aqlSampleSize.getText().toString());
|
||||||
|
int handFeelNotOk = Integer.parseInt(s.toString());
|
||||||
|
int handFeelOk = sampleSize - handFeelNotOk;
|
||||||
|
etHandFeelOk.setText(String.valueOf(handFeelOk));
|
||||||
|
double percent = (double) handFeelNotOk / sampleSize * 100;
|
||||||
|
etHandFeelPercent.setText(String.format("%s%%", percent));
|
||||||
|
store.getReport().getItems().get(0).setHandFeelNotOkay(Long.parseLong(s.toString()));
|
||||||
|
} catch (Exception e) {
|
||||||
|
store.getReport().getItems().get(0).setHandFeelNotOkay(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// generalRemarks.addTextChangedListener(new TextWatcher() {
|
// generalRemarks.addTextChangedListener(new TextWatcher() {
|
||||||
// @Override
|
// @Override
|
||||||
|
@ -931,9 +962,11 @@ public class FirstStepFragment extends Fragment implements View.OnClickListener
|
||||||
boxCarton.setText(boxCartonText);
|
boxCarton.setText(boxCartonText);
|
||||||
packagingDetails.setText(packagingDetailsText);
|
packagingDetails.setText(packagingDetailsText);
|
||||||
|
|
||||||
|
Log.e("Carton: ",""+String.valueOf(store.getReport().getItems().get(0).getCartonsSelected()));
|
||||||
|
|
||||||
boxCartonSelected.setText(String.valueOf(store.getReport().getItems().get(0).getCartonsSelected()));
|
boxCartonSelected.setText(String.valueOf(store.getReport().getItems().get(0).getCartonsSelected()));
|
||||||
itemPerBoxSelected.setText(String.valueOf(store.getReport().getItems().get(0).getPacksSelected()));
|
//itemPerBoxSelected.setText(String.valueOf(store.getReport().getItems().get(0).getPacksSelected()));
|
||||||
piecesSelected.setText(String.valueOf(store.getReport().getItems().get(0).getPiecesSelected()));
|
//piecesSelected.setText(String.valueOf(store.getReport().getItems().get(0).getPiecesSelected()));
|
||||||
|
|
||||||
checkedBoxCartonSelected.setText(String.valueOf(store.getReport().getItems().get(0).getCheckedCartonsSelected()));
|
checkedBoxCartonSelected.setText(String.valueOf(store.getReport().getItems().get(0).getCheckedCartonsSelected()));
|
||||||
//checkedItemPerBoxSelected.setText(String.valueOf(store.getReport().getItems().get(0).getCheckedPacksSelected()));
|
//checkedItemPerBoxSelected.setText(String.valueOf(store.getReport().getItems().get(0).getCheckedPacksSelected()));
|
||||||
|
@ -1080,6 +1113,9 @@ public class FirstStepFragment extends Fragment implements View.OnClickListener
|
||||||
boxCartonSelected = view.findViewById(R.id.box_carton_selected);
|
boxCartonSelected = view.findViewById(R.id.box_carton_selected);
|
||||||
itemPerBoxSelected = view.findViewById(R.id.item_per_box_selected);
|
itemPerBoxSelected = view.findViewById(R.id.item_per_box_selected);
|
||||||
piecesSelected = view.findViewById(R.id.pieces_selected);
|
piecesSelected = view.findViewById(R.id.pieces_selected);
|
||||||
|
etHandFeelNotOk = view.findViewById(R.id.et_hand_feel_not_ok);
|
||||||
|
etHandFeelOk = view.findViewById(R.id.et_hand_feel_ok);
|
||||||
|
etHandFeelPercent = view.findViewById(R.id.et_not_ok_percent);
|
||||||
|
|
||||||
txtTesting = view.findViewById(R.id.txtTesting);
|
txtTesting = view.findViewById(R.id.txtTesting);
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,7 @@ import com.utopiaindustries.qualitychecker.utils.ImageUriHolder;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
@ -99,12 +100,8 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
private RecyclerView imageRecyclerView;
|
private RecyclerView imageRecyclerView;
|
||||||
|
|
||||||
private TextView minorCountTv, majorCountTv, criticalCountTv, txtMajor, txtMinor;
|
private TextView minorCountTv, majorCountTv, criticalCountTv, txtMajor, txtMinor;
|
||||||
String[] sectionArray = {"Comforter & Mattress Pad",
|
|
||||||
"Bedding",
|
ArrayList<String> sectionArrayList = new ArrayList<>();
|
||||||
"Blanket & Table Linen",
|
|
||||||
"Pillow",
|
|
||||||
"Terry Towel",
|
|
||||||
"Garments & Mattress Protector"};
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
|
@ -134,6 +131,7 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
vocRecyclerView.setAdapter(adapter);
|
vocRecyclerView.setAdapter(adapter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<List<VoiceOfCustomer>> call, Throwable t) {
|
public void onFailure(Call<List<VoiceOfCustomer>> call, Throwable t) {
|
||||||
System.out.println(t.getMessage());
|
System.out.println(t.getMessage());
|
||||||
|
@ -296,8 +294,7 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
if (!store.getReport().getItems().get(0).getDimensionImages().isEmpty()) {
|
if (!store.getReport().getItems().get(0).getDimensionImages().isEmpty()) {
|
||||||
store.getReport().getItems().get(0).getDimensionImages().remove(store.getReport().getItems().get(0).getDimensionImages().size() - 1);
|
store.getReport().getItems().get(0).getDimensionImages().remove(store.getReport().getItems().get(0).getDimensionImages().size() - 1);
|
||||||
updateImageAdapter(store.getReport().getItems().get(0).getDimensionImages());
|
updateImageAdapter(store.getReport().getItems().get(0).getDimensionImages());
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
System.out.println("The list is empty");
|
System.out.println("The list is empty");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -310,8 +307,7 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
if (requestCode == CAMERA_REQUEST) {
|
if (requestCode == CAMERA_REQUEST) {
|
||||||
Uri selectedImageUri = ImageUriHolder.getInstance().getImageUri();
|
Uri selectedImageUri = ImageUriHolder.getInstance().getImageUri();
|
||||||
saveImage(selectedImageUri);
|
saveImage(selectedImageUri);
|
||||||
}
|
} else if (requestCode == GALLERY_REQUEST) {
|
||||||
else if (requestCode == GALLERY_REQUEST) {
|
|
||||||
Uri selectedImageUri = data.getData();
|
Uri selectedImageUri = data.getData();
|
||||||
assert selectedImageUri != null;
|
assert selectedImageUri != null;
|
||||||
saveImage(selectedImageUri);
|
saveImage(selectedImageUri);
|
||||||
|
@ -539,7 +535,7 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
|
|
||||||
ArrayAdapter<String> adapter2 = new ArrayAdapter<>(getContext(),
|
ArrayAdapter<String> adapter2 = new ArrayAdapter<>(getContext(),
|
||||||
android.R.layout.simple_spinner_item,
|
android.R.layout.simple_spinner_item,
|
||||||
sectionArray );
|
sectionArrayList);
|
||||||
sectionSpinner.setAdapter(adapter2);
|
sectionSpinner.setAdapter(adapter2);
|
||||||
|
|
||||||
sectionSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
sectionSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
|
@ -547,6 +543,7 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
String result = parent.getItemAtPosition(position).toString().trim().replace(" ", "");
|
String result = parent.getItemAtPosition(position).toString().trim().replace(" ", "");
|
||||||
store.getReport().getItems().get(0).setSection(result.trim());
|
store.getReport().getItems().get(0).setSection(result.trim());
|
||||||
|
store.getReport().getItems().get(0).setSectionForDraft(parent.getItemAtPosition(position).toString());
|
||||||
Log.e("Section: ", "" + result);
|
Log.e("Section: ", "" + result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -574,7 +571,8 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
float quantity = itemCp.getQuantities().get(i);
|
float quantity = itemCp.getQuantities().get(i);
|
||||||
if (status.equalsIgnoreCase("minor")) {
|
if (status.equalsIgnoreCase("minor")) {
|
||||||
minor += (int) quantity;
|
minor += (int) quantity;
|
||||||
} ;
|
}
|
||||||
|
;
|
||||||
if (status.equalsIgnoreCase("major")) {
|
if (status.equalsIgnoreCase("major")) {
|
||||||
major += (int) quantity;
|
major += (int) quantity;
|
||||||
}
|
}
|
||||||
|
@ -601,8 +599,7 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
store.getReport().setReportResult("PASSED");
|
store.getReport().setReportResult("PASSED");
|
||||||
//resultStatus.setTextColor(ContextCompat.getColor(requireContext(),R.color.success));
|
//resultStatus.setTextColor(ContextCompat.getColor(requireContext(),R.color.success));
|
||||||
//resultStatus.setBackgroundResource( R.drawable.passed_bg );
|
//resultStatus.setBackgroundResource( R.drawable.passed_bg );
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
//resultStatus.setText("FAILED");
|
//resultStatus.setText("FAILED");
|
||||||
//resultStatus.setTextColor(ContextCompat.getColor(requireContext(),R.color.red));
|
//resultStatus.setTextColor(ContextCompat.getColor(requireContext(),R.color.red));
|
||||||
String defaultSelection = "FAILED";
|
String defaultSelection = "FAILED";
|
||||||
|
@ -622,6 +619,17 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
updateImageAdapter(store.getReport().getItems().get(0).getDimensionImages());
|
updateImageAdapter(store.getReport().getItems().get(0).getDimensionImages());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SharedPreferences sharedPreferences = getContext().getSharedPreferences("login_prefs", Context.MODE_PRIVATE);
|
||||||
|
long draftReportId = Long.parseLong(sharedPreferences.getString("draftReportId", null));
|
||||||
|
|
||||||
|
if (draftReportId > 0) {
|
||||||
|
Log.e("draft-Report-ID: ",""+draftReportId);
|
||||||
|
String selectedString = store.getReport().getItems().get(0).getSectionForDraft();
|
||||||
|
Log.e("draft-Report-selected: ",""+selectedString);
|
||||||
|
int index = sectionArrayList.indexOf(selectedString);
|
||||||
|
Log.e("draft-index: ",""+index);
|
||||||
|
sectionSpinner.setSelection(index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void calculateDimensions() {
|
private void calculateDimensions() {
|
||||||
|
@ -702,7 +710,15 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
|
||||||
txtMinor = view.findViewById(R.id.txt_minor);
|
txtMinor = view.findViewById(R.id.txt_minor);
|
||||||
etFloor = view.findViewById(R.id.et_floor);
|
etFloor = view.findViewById(R.id.et_floor);
|
||||||
|
|
||||||
|
sectionArrayList.add("Comforter & Mattress Pad");
|
||||||
|
sectionArrayList.add("Bedding");
|
||||||
|
sectionArrayList.add("Blanket & Table Linen");
|
||||||
|
sectionArrayList.add("Pillow");
|
||||||
|
sectionArrayList.add("Terry Towel");
|
||||||
|
sectionArrayList.add("Garments & Mattress Protector");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setOnClickListeners() {
|
private void setOnClickListeners() {
|
||||||
nextBtn.setOnClickListener(this);
|
nextBtn.setOnClickListener(this);
|
||||||
backBtn.setOnClickListener(this);
|
backBtn.setOnClickListener(this);
|
||||||
|
|
|
@ -515,6 +515,85 @@
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:layout_margin="5dp"/>
|
android:layout_margin="5dp"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:background="@drawable/box_border"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="11dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Hand Feel Not OK"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Hand Feel OK"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Hand Feel Not OK %"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingBottom="5dp">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_hand_feel_not_ok"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Hand Feel Not OK"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_hand_feel_ok"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Hand Feel OK"
|
||||||
|
android:enabled="false"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_not_ok_percent"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Not OK %"
|
||||||
|
android:enabled="false"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
Loading…
Reference in New Issue