Finish v11_0_45(48)
This commit is contained in:
commit
ba00e6e5f4
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -17,8 +17,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 47
|
def appVersionCode = 48
|
||||||
def appVersionName = '1.0.44'
|
def appVersionName = '1.0.45'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
@ -97,14 +97,14 @@ dependencies {
|
|||||||
implementation 'com.orhanobut:logger:2.2.0'
|
implementation 'com.orhanobut:logger:2.2.0'
|
||||||
implementation 'com.google.firebase:firebase-core:16.0.8'
|
implementation 'com.google.firebase:firebase-core:16.0.8'
|
||||||
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
||||||
implementation 'com.google.firebase:firebase-perf:16.2.4'
|
implementation 'com.google.firebase:firebase-perf:16.2.5'
|
||||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
|
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
|
||||||
implementation 'androidx.appcompat:appcompat:1.1.0-alpha03'
|
implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation 'com.google.android.material:material:1.1.0-alpha04'
|
implementation 'com.google.android.material:material:1.1.0-alpha05'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha4'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha03'
|
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04'
|
||||||
implementation 'androidx.preference:preference:1.1.0-alpha04'
|
implementation 'androidx.preference:preference:1.1.0-alpha04'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
|
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
|
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
|
||||||
|
|||||||
@ -98,7 +98,9 @@ public class MainActivity extends AppCompatActivity
|
|||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
} else {
|
} else {
|
||||||
pop();
|
//pop();
|
||||||
|
getSupportFragmentManager().popBackStack();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -130,6 +130,10 @@ public class BarcodeManager {
|
|||||||
mEnabled = true;
|
mEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isEnabled() {
|
||||||
|
return mEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
package it.integry.integrywmsnative.core.di;
|
package it.integry.integrywmsnative.core.di;
|
||||||
|
|
||||||
|
import androidx.annotation.ColorRes;
|
||||||
|
import androidx.annotation.IdRes;
|
||||||
|
import androidx.core.content.res.ResourcesCompat;
|
||||||
import androidx.databinding.BindingAdapter;
|
import androidx.databinding.BindingAdapter;
|
||||||
import androidx.databinding.BindingConversion;
|
import androidx.databinding.BindingConversion;
|
||||||
import androidx.constraintlayout.widget.Guideline;
|
import androidx.constraintlayout.widget.Guideline;
|
||||||
@ -7,6 +10,8 @@ import com.google.android.material.textfield.TextInputEditText;
|
|||||||
import androidx.core.util.Pair;
|
import androidx.core.util.Pair;
|
||||||
import androidx.appcompat.widget.AppCompatCheckBox;
|
import androidx.appcompat.widget.AppCompatCheckBox;
|
||||||
import androidx.appcompat.widget.AppCompatTextView;
|
import androidx.appcompat.widget.AppCompatTextView;
|
||||||
|
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
@ -20,6 +25,7 @@ import java.text.DecimalFormatSymbols;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import androidx.databinding.Observable;
|
import androidx.databinding.Observable;
|
||||||
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
|
|
||||||
public class Converters {
|
public class Converters {
|
||||||
@ -178,6 +184,11 @@ public class Converters {
|
|||||||
((Guideline)view).setGuidelinePercent(percentage);
|
((Guideline)view).setGuidelinePercent(percentage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BindingAdapter({"app:backgroundTintResID"})
|
||||||
|
public static void bindBackgroundTintResId(View view, @ColorRes final int colorResId) {
|
||||||
|
view.setBackgroundTintList(ColorStateList.valueOf(ResourcesCompat.getColor(MainApplication.res, colorResId, null)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,23 +1,41 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import androidx.databinding.Observable;
|
||||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsItemModel;
|
||||||
|
|
||||||
public class CheckableMtbColr {
|
public class CheckableMtbColr {
|
||||||
|
|
||||||
|
|
||||||
private MtbColr mtbColr;
|
private DialogChooseArtsFromListaArtsItemModel item;
|
||||||
private BindableBoolean checked = new BindableBoolean(false);
|
private BindableBoolean checked = new BindableBoolean(false);
|
||||||
|
private BindableBoolean hidden = new BindableBoolean(false);
|
||||||
|
|
||||||
public CheckableMtbColr(MtbColr mtbColr) {
|
public CheckableMtbColr(DialogChooseArtsFromListaArtsItemModel item) {
|
||||||
this.mtbColr = mtbColr;
|
this.item = item;
|
||||||
|
|
||||||
|
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||||
|
hidden.set(item.isHidden());
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public MtbColr getMtbColr() {
|
public DialogChooseArtsFromListaArtsItemModel getItem() {
|
||||||
return mtbColr;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CheckableMtbColr setMtbColr(MtbColr mtbColr) {
|
public CheckableMtbColr setItem(DialogChooseArtsFromListaArtsItemModel item) {
|
||||||
this.mtbColr = mtbColr;
|
this.item = item;
|
||||||
|
|
||||||
|
this.item.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||||
|
hidden.set(item.isHidden());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,6 +48,19 @@ public class CheckableMtbColr {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BindableBoolean getHidden() {
|
||||||
|
return hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isHidden() {
|
||||||
|
return hidden.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public CheckableMtbColr setHidden(BindableBoolean hidden) {
|
||||||
|
this.hidden = hidden;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public void toggleCheck() {
|
public void toggleCheck() {
|
||||||
this.checked.set(!this.checked.get());
|
this.checked.set(!this.checked.get());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
import androidx.databinding.ObservableArrayList;
|
import androidx.databinding.ObservableArrayList;
|
||||||
import android.os.Parcel;
|
|
||||||
import android.os.Parcelable;
|
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
@ -23,7 +21,7 @@ import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
|||||||
* Created by GiuseppeS on 06/03/2018.
|
* Created by GiuseppeS on 06/03/2018.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class MtbColt extends EntityBase implements Parcelable {
|
public class MtbColt extends EntityBase {
|
||||||
private String gestione;
|
private String gestione;
|
||||||
private String dataCollo;
|
private String dataCollo;
|
||||||
private String serCollo;
|
private String serCollo;
|
||||||
@ -62,196 +60,6 @@ public class MtbColt extends EntityBase implements Parcelable {
|
|||||||
|
|
||||||
private Boolean disablePrint;
|
private Boolean disablePrint;
|
||||||
|
|
||||||
protected MtbColt(Parcel in) {
|
|
||||||
type = "mtb_colt";
|
|
||||||
gestione = in.readString();
|
|
||||||
dataCollo = in.readString();
|
|
||||||
serCollo = in.readString();
|
|
||||||
if (in.readByte() == 0) {
|
|
||||||
numCollo = null;
|
|
||||||
} else {
|
|
||||||
numCollo = in.readInt();
|
|
||||||
}
|
|
||||||
rifOrd = in.readString();
|
|
||||||
codAnag = in.readString();
|
|
||||||
codVdes = in.readString();
|
|
||||||
codMdep = in.readString();
|
|
||||||
codVlis = in.readString();
|
|
||||||
codDtip = in.readString();
|
|
||||||
codTcol = in.readString();
|
|
||||||
serDoc = in.readString();
|
|
||||||
filtroOrdini = in.readString();
|
|
||||||
preparatoDa = in.readString();
|
|
||||||
annotazioni = in.readString();
|
|
||||||
posizione = in.readString();
|
|
||||||
codDtipProvv = in.readString();
|
|
||||||
serDocProvv = in.readString();
|
|
||||||
codJfas = in.readString();
|
|
||||||
dataOrd = in.readString();
|
|
||||||
dataDoc = in.readString();
|
|
||||||
oraInizPrep = in.readString();
|
|
||||||
oraFinePrep = in.readString();
|
|
||||||
dataDocProvv = in.readString();
|
|
||||||
dataVers = in.readString();
|
|
||||||
if (in.readByte() == 0) {
|
|
||||||
segno = null;
|
|
||||||
} else {
|
|
||||||
segno = in.readInt();
|
|
||||||
}
|
|
||||||
if (in.readByte() == 0) {
|
|
||||||
numOrd = null;
|
|
||||||
} else {
|
|
||||||
numOrd = in.readInt();
|
|
||||||
}
|
|
||||||
if (in.readByte() == 0) {
|
|
||||||
numDoc = null;
|
|
||||||
} else {
|
|
||||||
numDoc = in.readInt();
|
|
||||||
}
|
|
||||||
if (in.readByte() == 0) {
|
|
||||||
numDocProvv = null;
|
|
||||||
} else {
|
|
||||||
numDocProvv = in.readInt();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (in.readByte() == 0) {
|
|
||||||
pesoKg = null;
|
|
||||||
} else {
|
|
||||||
pesoKg = new BigDecimal(in.readFloat());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (in.readByte() == 0) {
|
|
||||||
lunghezzaCm = null;
|
|
||||||
} else {
|
|
||||||
lunghezzaCm = new BigDecimal(in.readFloat());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (in.readByte() == 0) {
|
|
||||||
larghezzaCm = null;
|
|
||||||
} else {
|
|
||||||
larghezzaCm = new BigDecimal(in.readFloat());
|
|
||||||
}
|
|
||||||
if (in.readByte() == 0) {
|
|
||||||
altezzaCm = null;
|
|
||||||
} else {
|
|
||||||
altezzaCm = new BigDecimal(in.readFloat());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
in.readList(mtbColr, MtbColr.class.getClassLoader());
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writeToParcel(Parcel dest, int flags) {
|
|
||||||
dest.writeString(gestione);
|
|
||||||
dest.writeString(dataCollo);
|
|
||||||
dest.writeString(serCollo);
|
|
||||||
if (numCollo == null) {
|
|
||||||
dest.writeByte((byte) 0);
|
|
||||||
} else {
|
|
||||||
dest.writeByte((byte) 1);
|
|
||||||
dest.writeInt(numCollo);
|
|
||||||
}
|
|
||||||
dest.writeString(rifOrd);
|
|
||||||
dest.writeString(codAnag);
|
|
||||||
dest.writeString(codVdes);
|
|
||||||
dest.writeString(codMdep);
|
|
||||||
dest.writeString(codVlis);
|
|
||||||
dest.writeString(codDtip);
|
|
||||||
dest.writeString(codTcol);
|
|
||||||
dest.writeString(serDoc);
|
|
||||||
dest.writeString(filtroOrdini);
|
|
||||||
dest.writeString(preparatoDa);
|
|
||||||
dest.writeString(annotazioni);
|
|
||||||
dest.writeString(posizione);
|
|
||||||
dest.writeString(codDtipProvv);
|
|
||||||
dest.writeString(serDocProvv);
|
|
||||||
dest.writeString(codJfas);
|
|
||||||
dest.writeString(dataOrd);
|
|
||||||
dest.writeString(dataDoc);
|
|
||||||
dest.writeString(oraInizPrep);
|
|
||||||
dest.writeString(oraFinePrep);
|
|
||||||
dest.writeString(dataDocProvv);
|
|
||||||
dest.writeString(dataVers);
|
|
||||||
if (segno == null) {
|
|
||||||
dest.writeByte((byte) 0);
|
|
||||||
} else {
|
|
||||||
dest.writeByte((byte) 1);
|
|
||||||
dest.writeInt(segno);
|
|
||||||
}
|
|
||||||
if (numOrd == null) {
|
|
||||||
dest.writeByte((byte) 0);
|
|
||||||
} else {
|
|
||||||
dest.writeByte((byte) 1);
|
|
||||||
dest.writeInt(numOrd);
|
|
||||||
}
|
|
||||||
if (numDoc == null) {
|
|
||||||
dest.writeByte((byte) 0);
|
|
||||||
} else {
|
|
||||||
dest.writeByte((byte) 1);
|
|
||||||
dest.writeInt(numDoc);
|
|
||||||
}
|
|
||||||
if (numDocProvv == null) {
|
|
||||||
dest.writeByte((byte) 0);
|
|
||||||
} else {
|
|
||||||
dest.writeByte((byte) 1);
|
|
||||||
dest.writeInt(numDocProvv);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (pesoKg == null) {
|
|
||||||
dest.writeByte((byte) 0);
|
|
||||||
} else {
|
|
||||||
dest.writeByte((byte) 1);
|
|
||||||
dest.writeFloat(pesoKg.floatValue());
|
|
||||||
}
|
|
||||||
if (lunghezzaCm == null) {
|
|
||||||
dest.writeByte((byte) 0);
|
|
||||||
} else {
|
|
||||||
dest.writeByte((byte) 1);
|
|
||||||
dest.writeFloat(lunghezzaCm.floatValue());
|
|
||||||
}
|
|
||||||
if (larghezzaCm == null) {
|
|
||||||
dest.writeByte((byte) 0);
|
|
||||||
} else {
|
|
||||||
dest.writeByte((byte) 1);
|
|
||||||
dest.writeFloat(larghezzaCm.floatValue());
|
|
||||||
}
|
|
||||||
if (altezzaCm == null) {
|
|
||||||
dest.writeByte((byte) 0);
|
|
||||||
} else {
|
|
||||||
dest.writeByte((byte) 1);
|
|
||||||
dest.writeFloat(altezzaCm.floatValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
dest.writeList(mtbColr);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int describeContents() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final Creator<MtbColt> CREATOR = new Creator<MtbColt>() {
|
|
||||||
@Override
|
|
||||||
public MtbColt createFromParcel(Parcel in) {
|
|
||||||
return new MtbColt(in);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public MtbColt[] newArray(int size) {
|
|
||||||
return new MtbColt[size];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
public void generaFiltroOrdine() throws Exception {
|
public void generaFiltroOrdine() throws Exception {
|
||||||
|
|
||||||
if (this.gestione == null) {
|
if (this.gestione == null) {
|
||||||
@ -706,5 +514,25 @@ public class MtbColt extends EntityBase implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
|
MtbColt mtbColt = (MtbColt) o;
|
||||||
|
|
||||||
|
if (!gestione.equals(mtbColt.gestione)) return false;
|
||||||
|
if (!dataCollo.equals(mtbColt.dataCollo)) return false;
|
||||||
|
if (!serCollo.equals(mtbColt.serCollo)) return false;
|
||||||
|
return numCollo.equals(mtbColt.numCollo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = gestione.hashCode();
|
||||||
|
result = 31 * result + dataCollo.hashCode();
|
||||||
|
result = 31 * result + serCollo.hashCode();
|
||||||
|
result = 31 * result + numCollo.hashCode();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,7 +45,11 @@ public class UtilityBarcode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isEanPeso(BarcodeScanDTO barcodeScanDTO) {
|
public static boolean isEanPeso(BarcodeScanDTO barcodeScanDTO) {
|
||||||
return barcodeScanDTO != null && barcodeScanDTO.getType() == BarcodeType.EAN13 && barcodeScanDTO.getStringValue().startsWith("2");
|
return isEan13(barcodeScanDTO) && barcodeScanDTO.getStringValue().startsWith("2");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isEan13(BarcodeScanDTO barcodeScanDTO) {
|
||||||
|
return barcodeScanDTO != null && barcodeScanDTO.getType() == BarcodeType.EAN13;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -122,7 +122,7 @@ public class AccettazioneOrdineInevasoActivity extends AppCompatActivity {
|
|||||||
// Make sure the request was successful
|
// Make sure the request was successful
|
||||||
if (resultCode == RESULT_OK) {
|
if (resultCode == RESULT_OK) {
|
||||||
|
|
||||||
MtbColt recoveredMtbColt = data.getParcelableExtra("key");
|
MtbColt recoveredMtbColt = DataCache.retrieveItem(data.getStringExtra("key"));
|
||||||
|
|
||||||
mAccettazioneOrdineInevasoViewModel.recoverUL(recoveredMtbColt);
|
mAccettazioneOrdineInevasoViewModel.recoverUL(recoveredMtbColt);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import android.os.Bundle;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.REST.consumers.PrinterRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.databinding.ActivityContenutoBancaleBinding;
|
import it.integry.integrywmsnative.databinding.ActivityContenutoBancaleBinding;
|
||||||
import it.integry.integrywmsnative.gest.contenuto_bancale.viewmodel.ContenutoBancaleViewModel;
|
import it.integry.integrywmsnative.gest.contenuto_bancale.viewmodel.ContenutoBancaleViewModel;
|
||||||
@ -28,9 +29,19 @@ public class ContenutoBancaleActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
public static Intent createIntent(Context context, MtbColt item, boolean canRecoverUl, PrinterRESTConsumer.Type printerType) {
|
public static Intent createIntent(Context context, MtbColt item, boolean canRecoverUl, PrinterRESTConsumer.Type printerType) {
|
||||||
Intent myIntent = new Intent(context, ContenutoBancaleActivity.class);
|
Intent myIntent = new Intent(context, ContenutoBancaleActivity.class);
|
||||||
myIntent.putExtra(Key.MtbColtKey, item);
|
|
||||||
myIntent.putExtra(Key.CanRecoverUL, canRecoverUl);
|
String keyMtbColt = DataCache.addItem(item);
|
||||||
myIntent.putExtra(Key.PrinterType, printerType);
|
myIntent.putExtra(Key.MtbColtKey, keyMtbColt);
|
||||||
|
|
||||||
|
String keyCanRecoverUL = DataCache.addItem(canRecoverUl);
|
||||||
|
myIntent.putExtra(Key.CanRecoverUL, keyCanRecoverUL);
|
||||||
|
|
||||||
|
String keyPrinterType = DataCache.addItem(printerType);
|
||||||
|
myIntent.putExtra(Key.PrinterType, keyPrinterType);
|
||||||
|
|
||||||
|
// myIntent.putExtra(Key.MtbColtKey, item);
|
||||||
|
// myIntent.putExtra(Key.CanRecoverUL, canRecoverUl);
|
||||||
|
// myIntent.putExtra(Key.PrinterType, printerType);
|
||||||
|
|
||||||
return myIntent;
|
return myIntent;
|
||||||
}
|
}
|
||||||
@ -41,13 +52,13 @@ public class ContenutoBancaleActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
bindings = DataBindingUtil.setContentView(this, R.layout.activity_contenuto_bancale);
|
bindings = DataBindingUtil.setContentView(this, R.layout.activity_contenuto_bancale);
|
||||||
|
|
||||||
boolean canRecoverUL = getIntent().getBooleanExtra(Key.CanRecoverUL, false);
|
boolean canRecoverUL = DataCache.retrieveItem(getIntent().getStringExtra(Key.CanRecoverUL));
|
||||||
MtbColt mtbColt = getIntent().getParcelableExtra(Key.MtbColtKey);
|
MtbColt mtbColt = DataCache.retrieveItem(getIntent().getStringExtra(Key.MtbColtKey));
|
||||||
|
|
||||||
PrinterRESTConsumer.Type mPrinterType;
|
PrinterRESTConsumer.Type mPrinterType = DataCache.retrieveItem(getIntent().getStringExtra(Key.PrinterType));
|
||||||
if(getIntent().hasExtra(Key.PrinterType)) {
|
// if(getIntent().hasExtra(Key.PrinterType)) {
|
||||||
mPrinterType = (PrinterRESTConsumer.Type) getIntent().getSerializableExtra(Key.PrinterType);
|
// mPrinterType = (PrinterRESTConsumer.Type) getIntent().getSerializableExtra(Key.PrinterType);
|
||||||
} else mPrinterType = null;
|
// } else mPrinterType = null;
|
||||||
|
|
||||||
mViewModel = new ContenutoBancaleViewModel(this, mtbColt, canRecoverUL, mPrinterType);
|
mViewModel = new ContenutoBancaleViewModel(this, mtbColt, canRecoverUL, mPrinterType);
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import it.integry.integrywmsnative.R;
|
|||||||
import it.integry.integrywmsnative.core.REST.consumers.DepositoRESTConsumer;
|
import it.integry.integrywmsnative.core.REST.consumers.DepositoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.REST.consumers.PrinterRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||||
import it.integry.integrywmsnative.core.di.BindableString;
|
import it.integry.integrywmsnative.core.di.BindableString;
|
||||||
import it.integry.integrywmsnative.core.interfaces.IRecyclerItemClicked;
|
import it.integry.integrywmsnative.core.interfaces.IRecyclerItemClicked;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
@ -87,7 +88,8 @@ public class ContenutoBancaleViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
public void recoverUL(){
|
public void recoverUL(){
|
||||||
Intent data = new Intent();
|
Intent data = new Intent();
|
||||||
data.putExtra("key", mtbColt.get());
|
String key = DataCache.addItem(mtbColt.get());
|
||||||
|
data.putExtra("key", key);
|
||||||
|
|
||||||
mContext.setResult(RESULT_OK, data);
|
mContext.setResult(RESULT_OK, data);
|
||||||
mContext.finish();
|
mContext.finish();
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.REST.consumers.PrinterRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.databinding.ActivityListaBancaliBinding;
|
import it.integry.integrywmsnative.databinding.ActivityListaBancaliBinding;
|
||||||
import it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleActivity;
|
import it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleActivity;
|
||||||
@ -37,9 +38,15 @@ public class ListaBancaliActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
public static Intent createIntent(Context context, ArrayList<MtbColt> items, boolean canRecoverUl, PrinterRESTConsumer.Type printerType) {
|
public static Intent createIntent(Context context, ArrayList<MtbColt> items, boolean canRecoverUl, PrinterRESTConsumer.Type printerType) {
|
||||||
Intent myIntent = new Intent(context, ListaBancaliActivity.class);
|
Intent myIntent = new Intent(context, ListaBancaliActivity.class);
|
||||||
myIntent.putExtra(Key.MtbColtsKey, items);
|
|
||||||
myIntent.putExtra(Key.CanRecoverUL, canRecoverUl);
|
String mtbColtsKey = DataCache.addItem(items);
|
||||||
myIntent.putExtra(Key.PrinterType, printerType);
|
myIntent.putExtra(Key.MtbColtsKey, mtbColtsKey);
|
||||||
|
|
||||||
|
String canRecoverULKey = DataCache.addItem(canRecoverUl);
|
||||||
|
myIntent.putExtra(Key.CanRecoverUL, canRecoverULKey);
|
||||||
|
|
||||||
|
String printerTypeKey = DataCache.addItem(printerType);
|
||||||
|
myIntent.putExtra(Key.PrinterType, printerTypeKey);
|
||||||
|
|
||||||
return myIntent;
|
return myIntent;
|
||||||
}
|
}
|
||||||
@ -50,13 +57,14 @@ public class ListaBancaliActivity extends AppCompatActivity {
|
|||||||
bindings = DataBindingUtil.setContentView(this, R.layout.activity_lista_bancali);
|
bindings = DataBindingUtil.setContentView(this, R.layout.activity_lista_bancali);
|
||||||
|
|
||||||
|
|
||||||
mCanRecoverUl = getIntent().getBooleanExtra(Key.CanRecoverUL, false);
|
mCanRecoverUl = DataCache.retrieveItem(getIntent().getStringExtra(Key.CanRecoverUL));
|
||||||
|
|
||||||
if(getIntent().hasExtra(Key.PrinterType)) {
|
mPrinterType = DataCache.retrieveItem(getIntent().getStringExtra(Key.PrinterType));
|
||||||
mPrinterType = (PrinterRESTConsumer.Type) getIntent().getSerializableExtra(Key.PrinterType);
|
// if(getIntent().hasExtra(Key.PrinterType)) {
|
||||||
} else mPrinterType = null;
|
// mPrinterType = (PrinterRESTConsumer.Type) getIntent().getSerializableExtra(Key.PrinterType);
|
||||||
|
// } else mPrinterType = null;
|
||||||
|
|
||||||
List<MtbColt> mtbColts = (ArrayList<MtbColt>)getIntent().getSerializableExtra(Key.MtbColtsKey);
|
List<MtbColt> mtbColts = DataCache.retrieveItem(getIntent().getStringExtra(Key.MtbColtsKey));
|
||||||
mViewModel = new ListaBancaliViewModel(this, mtbColts);
|
mViewModel = new ListaBancaliViewModel(this, mtbColts);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,7 @@ public class VenditaOrdineInevasoActivity extends AppCompatActivity {
|
|||||||
// Make sure the request was successful
|
// Make sure the request was successful
|
||||||
if (resultCode == RESULT_OK) {
|
if (resultCode == RESULT_OK) {
|
||||||
|
|
||||||
MtbColt recoveredMtbColt = data.getParcelableExtra("key");
|
MtbColt recoveredMtbColt = DataCache.retrieveItem(data.getStringExtra("key"));
|
||||||
|
|
||||||
mVenditaOrdineInevasoViewModel.recoverUL(recoveredMtbColt);
|
mVenditaOrdineInevasoViewModel.recoverUL(recoveredMtbColt);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,6 +54,7 @@ import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.core.interfaces.I
|
|||||||
import it.integry.integrywmsnative.view.bottomsheet.interfaces.IOnColloClosedCallback;
|
import it.integry.integrywmsnative.view.bottomsheet.interfaces.IOnColloClosedCallback;
|
||||||
import it.integry.integrywmsnative.view.bottomsheet.viewmodel.ArticoliInColloBottomSheetViewModel;
|
import it.integry.integrywmsnative.view.bottomsheet.viewmodel.ArticoliInColloBottomSheetViewModel;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
||||||
@ -305,7 +306,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
|
|
||||||
for(int i = 0; i < recoveredMtbColt.getMtbColr().size(); i++){
|
for(int i = 0; i < recoveredMtbColt.getMtbColr().size(); i++){
|
||||||
|
|
||||||
// MtbColr currentMtbColr = recoveredMtbColt.getMtbColr().get(i);
|
// MtbColr currentMtbColr = recoveredMtbColt.getItem().get(i);
|
||||||
|
|
||||||
// List<OrdineAccettazioneDTO.Riga> foundRows = Stream.of(groupedOrdini)
|
// List<OrdineAccettazioneDTO.Riga> foundRows = Stream.of(groupedOrdini)
|
||||||
// .filter(x -> x.getNumOrd() == currentMtbColr.getNumOrd() &&
|
// .filter(x -> x.getNumOrd() == currentMtbColr.getNumOrd() &&
|
||||||
@ -434,7 +435,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
searchArtFromUL(mtbColt, progressDialog);
|
searchArtFromUL(mtbColt, progressDialog);
|
||||||
} else {
|
} else {
|
||||||
progressDialog.dismiss();
|
progressDialog.dismiss();
|
||||||
showNoArtFoundDialog();
|
DialogCommon.showNoArtFoundDialog(mActivity, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -478,7 +479,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
searchArtFromUL(mtbColt, progressDialog);
|
searchArtFromUL(mtbColt, progressDialog);
|
||||||
} else {
|
} else {
|
||||||
progressDialog.dismiss();
|
progressDialog.dismiss();
|
||||||
showNoArtFoundDialog();
|
DialogCommon.showNoArtFoundDialog(mActivity, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -580,17 +581,21 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
x.getSerCollo().equalsIgnoreCase(scannedUL.getSerCollo()) &&
|
x.getSerCollo().equalsIgnoreCase(scannedUL.getSerCollo()) &&
|
||||||
(scannedUL.getGestioneEnum() == GestioneEnum.ACQUISTO || scannedUL.getGestioneEnum() == GestioneEnum.LAVORAZIONE)).toList();
|
(scannedUL.getGestioneEnum() == GestioneEnum.ACQUISTO || scannedUL.getGestioneEnum() == GestioneEnum.LAVORAZIONE)).toList();
|
||||||
|
|
||||||
|
List<String> alreadyMatchedArts = Stream.of(matchPickingObject)
|
||||||
|
.map(PickingObjectDTO::getCodMart).toList();
|
||||||
|
|
||||||
//Cerco se devo fare pick dell'articolo tramite codMart perché forse non risulta in nessun collo
|
//Cerco se devo fare pick dell'articolo tramite codMart perché forse non risulta in nessun collo
|
||||||
//if(matchPickingObject != null && matchPickingObject.size() == 0 && scannedUL.getMtbColr() != null && scannedUL.getMtbColr().size() > 0) {
|
//if(matchPickingObject != null && matchPickingObject.size() == 0 && scannedUL.getItem() != null && scannedUL.getItem().size() > 0) {
|
||||||
List<String> listOfCodMartsInRowCollo = Stream.of(scannedUL.getMtbColr())
|
List<String> listOfCodMartsInRowCollo = Stream.of(scannedUL.getMtbColr())
|
||||||
.map(MtbColr::getCodMart)
|
.map(MtbColr::getCodMart)
|
||||||
.withoutNulls()
|
.withoutNulls()
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<PickingObjectDTO> matchPickingObjectByArt = Stream.of(pickingList)
|
List<PickingObjectDTO> matchPickingObjectByArt = Stream.of(pickingList)
|
||||||
.filter(x -> //x.getNumCollo() == null &&
|
.filter(x -> //x.getNumCollo() == null &&
|
||||||
(listOfCodMartsInRowCollo.contains(x.getCodMart())))
|
(listOfCodMartsInRowCollo.contains(x.getCodMart()) && !alreadyMatchedArts.contains(x.getCodMart())))
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
|
|
||||||
@ -691,9 +696,31 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
|
|
||||||
private void loadMatchedRows(List<PickingObjectDTO> matchedRows) {
|
private void loadMatchedRows(List<PickingObjectDTO> matchedRows) {
|
||||||
if(matchedRows == null || matchedRows.size() == 0) {
|
if(matchedRows == null || matchedRows.size() == 0) {
|
||||||
showNoArtFoundDialog();
|
DialogCommon.showNoArtFoundDialog(mActivity, null);
|
||||||
} else if(matchedRows.size() == 1) {
|
} else if(matchedRows.size() == 1) {
|
||||||
onOrdineRowDispatch(matchedRows.get(0));
|
|
||||||
|
|
||||||
|
if(matchedRows.get(0).getTempPickData() != null &&
|
||||||
|
matchedRows.get(0).getTempPickData().getSourceMtbColt() != null) {
|
||||||
|
|
||||||
|
MtbColt tempSourceMtbColt = matchedRows.get(0).getTempPickData().getSourceMtbColt();
|
||||||
|
|
||||||
|
if(tempSourceMtbColt.getGestione().equals(matchedRows.get(0).getGestione()) &&
|
||||||
|
tempSourceMtbColt.getNumCollo() == matchedRows.get(0).getNumCollo() &&
|
||||||
|
tempSourceMtbColt.getSerCollo().equals(matchedRows.get(0).getSerCollo()) &&
|
||||||
|
tempSourceMtbColt.getDataColloS().equals(matchedRows.get(0).getDataColloS())) {
|
||||||
|
|
||||||
|
onOrdineRowDispatch(matchedRows.get(0));
|
||||||
|
} else {
|
||||||
|
//Se sto pickando da una UL diversa da quella suggerita allora non te la apro in
|
||||||
|
//automatico ma ti mostro il filtro
|
||||||
|
applyFilter("");
|
||||||
|
refreshOrderBy(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
onOrdineRowDispatch(matchedRows.get(0));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
for(int i = 0; i < mPickingList.size(); i++) {
|
for(int i = 0; i < mPickingList.size(); i++) {
|
||||||
if(!matchedRows.contains(mPickingList.get(i))) {
|
if(!matchedRows.contains(mPickingList.get(i))) {
|
||||||
@ -708,12 +735,6 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showNoArtFoundDialog() {
|
|
||||||
DialogSimpleMessageHelper.makeWarningDialog(mActivity,
|
|
||||||
new SpannableString(mActivity.getResources().getText(R.string.no_result_from_barcode)),
|
|
||||||
null, null).show();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void createNewUL() {
|
public void createNewUL() {
|
||||||
this.createNewUL(null, null, null, false, true, null);
|
this.createNewUL(null, null, null, false, true, null);
|
||||||
|
|||||||
@ -61,6 +61,8 @@ public class VersamentoMerceViewModel {
|
|||||||
mBinding = binding;
|
mBinding = binding;
|
||||||
mHelper = helper;
|
mHelper = helper;
|
||||||
mOnVersamentoCompleted = onVersamentoCompleted;
|
mOnVersamentoCompleted = onVersamentoCompleted;
|
||||||
|
|
||||||
|
BarcodeManager.enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openLU() {
|
public void openLU() {
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.text.SpannableString;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||||
|
|
||||||
|
public class DialogCommon {
|
||||||
|
|
||||||
|
|
||||||
|
public static void showNoArtFoundDialog(@NotNull Context context, @Nullable Runnable onPositiveClick) {
|
||||||
|
DialogSimpleMessageHelper.makeWarningDialog(context,
|
||||||
|
new SpannableString(context.getResources().getText(R.string.no_result_from_barcode)),
|
||||||
|
null, onPositiveClick).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,27 +1,42 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
|
import android.app.ProgressDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.text.SpannableString;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.REST.consumers.ArticoloRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.REST.consumers.BarcodeRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.REST.model.Ean128Model;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.databinding.DialogChooseArtsFromListaArtsLayoutBinding;
|
import it.integry.integrywmsnative.databinding.DialogChooseArtsFromListaArtsLayoutBinding;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||||
|
import it.integry.plugins.barcode_base_library.model.BarcodeScanDTO;
|
||||||
|
|
||||||
public class DialogChooseArtsFromListaArts {
|
public class DialogChooseArtsFromListaArts {
|
||||||
|
|
||||||
@ -33,6 +48,9 @@ public class DialogChooseArtsFromListaArts {
|
|||||||
private RunnableArgs<List<MtbColr>> mOnItemsChoosed;
|
private RunnableArgs<List<MtbColr>> mOnItemsChoosed;
|
||||||
private Runnable mOnAbort;
|
private Runnable mOnAbort;
|
||||||
|
|
||||||
|
private List<DialogChooseArtsFromListaArtsItemModel> mDataset;
|
||||||
|
private BindableBoolean filterStatus = new BindableBoolean(false);
|
||||||
|
|
||||||
public static Dialog make(final Context context, List<MtbColr> listaMtbColr, RunnableArgs<List<MtbColr>> onItemsChoosed, Runnable onAbort) {
|
public static Dialog make(final Context context, List<MtbColr> listaMtbColr, RunnableArgs<List<MtbColr>> onItemsChoosed, Runnable onAbort) {
|
||||||
return new DialogChooseArtsFromListaArts(context, listaMtbColr, onItemsChoosed, onAbort).mDialog;
|
return new DialogChooseArtsFromListaArts(context, listaMtbColr, onItemsChoosed, onAbort).mDialog;
|
||||||
}
|
}
|
||||||
@ -43,17 +61,22 @@ public class DialogChooseArtsFromListaArts {
|
|||||||
mOnItemsChoosed = onItemsChoosed;
|
mOnItemsChoosed = onItemsChoosed;
|
||||||
mOnAbort = onAbort;
|
mOnAbort = onAbort;
|
||||||
|
|
||||||
|
mDataset = new ArrayList<>();
|
||||||
|
|
||||||
if(listaMtbColr != null){
|
if(listaMtbColr != null){
|
||||||
for (MtbColr mtbColr : listaMtbColr) {
|
for (MtbColr mtbColr : listaMtbColr) {
|
||||||
if(UtilityString.isNullOrEmpty(mtbColr.getUntMis()) && mtbColr.getMtbAart() != null){
|
if(UtilityString.isNullOrEmpty(mtbColr.getUntMis()) && mtbColr.getMtbAart() != null){
|
||||||
mtbColr.setUntMis(mtbColr.getMtbAart().getUntMis());
|
mtbColr.setUntMis(mtbColr.getMtbAart().getUntMis());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mDataset.add(new DialogChooseArtsFromListaArtsItemModel().setMtbColr(mtbColr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
DialogChooseArtsFromListaArtsLayoutBinding binding = DataBindingUtil.inflate(inflater, R.layout.dialog_choose_arts_from_lista_arts_layout, null, false);
|
DialogChooseArtsFromListaArtsLayoutBinding binding = DataBindingUtil.inflate(inflater, R.layout.dialog_choose_arts_from_lista_arts_layout, null, false);
|
||||||
|
|
||||||
|
binding.setFilterStatus(filterStatus);
|
||||||
binding.emptyView.setVisibility(listaMtbColr != null && listaMtbColr.size() > 0 ? View.GONE : View.VISIBLE);
|
binding.emptyView.setVisibility(listaMtbColr != null && listaMtbColr.size() > 0 ? View.GONE : View.VISIBLE);
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||||
@ -73,38 +96,177 @@ public class DialogChooseArtsFromListaArts {
|
|||||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
|
||||||
|
|
||||||
initRecyclerView(binding, listaMtbColr);
|
initRecyclerView(binding);
|
||||||
|
|
||||||
|
initRemoveFilterButton(binding);
|
||||||
|
|
||||||
|
setupBarcode();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initRecyclerView(DialogChooseArtsFromListaArtsLayoutBinding binding, List<MtbColr> dataset) {
|
private void initRecyclerView(DialogChooseArtsFromListaArtsLayoutBinding binding) {
|
||||||
binding.dialogChooseArtsFromListaArtMainList.setNestedScrollingEnabled(false);
|
binding.dialogChooseArtsFromListaArtMainList.setNestedScrollingEnabled(false);
|
||||||
|
|
||||||
binding.dialogChooseArtsFromListaArtMainList.setHasFixedSize(true);
|
binding.dialogChooseArtsFromListaArtMainList.setHasFixedSize(true);
|
||||||
|
|
||||||
binding.dialogChooseArtsFromListaArtMainList.setLayoutManager(new LinearLayoutManager(currentContext));
|
binding.dialogChooseArtsFromListaArtMainList.setLayoutManager(new LinearLayoutManager(currentContext));
|
||||||
|
|
||||||
DividerItemDecoration itemDecorator = new DividerItemDecoration(currentContext, DividerItemDecoration.VERTICAL);
|
currentAdapter = new DialogChooseArtsFromListaArtsAdapter(currentContext, mDataset);
|
||||||
itemDecorator.setDrawable(ContextCompat.getDrawable(currentContext, R.drawable.divider));
|
|
||||||
binding.dialogChooseArtsFromListaArtMainList.addItemDecoration(itemDecorator);
|
|
||||||
|
|
||||||
currentAdapter = new DialogChooseArtsFromListaArtsAdapter(currentContext, dataset);
|
|
||||||
binding.dialogChooseArtsFromListaArtMainList.setAdapter(currentAdapter);
|
binding.dialogChooseArtsFromListaArtMainList.setAdapter(currentAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void onPositiveClick() {
|
private void initRemoveFilterButton(DialogChooseArtsFromListaArtsLayoutBinding binding) {
|
||||||
|
binding.buttonRemoveFilter.setOnClickListener(v -> {
|
||||||
|
removeListFilter();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if(mOnItemsChoosed != null) {
|
private void setupBarcode() {
|
||||||
mOnItemsChoosed.run(currentAdapter.getSelectedItems());
|
|
||||||
}
|
final boolean prevBarcodeStatus = BarcodeManager.isEnabled();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
|
||||||
|
int barcodeIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
|
.setOnScanSuccessfull(onScanSuccessfull)
|
||||||
|
.setOnScanFailed(ex -> UtilityExceptions.defaultException(currentContext, ex, false)));
|
||||||
|
|
||||||
|
mDialog.setOnDismissListener(dialog -> {
|
||||||
|
BarcodeManager.removeCallback(barcodeIstanceID);
|
||||||
|
if(prevBarcodeStatus) BarcodeManager.enable();
|
||||||
|
else BarcodeManager.disable();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private RunnableArgs<BarcodeScanDTO> onScanSuccessfull = data -> {
|
||||||
|
BarcodeManager.disable();
|
||||||
|
|
||||||
|
ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(currentContext);
|
||||||
|
|
||||||
|
if(UtilityBarcode.isEan13(data)){
|
||||||
|
this.loadArticolo(data.getStringValue(), null, progressDialog);
|
||||||
|
} else if(UtilityBarcode.isEtichetta128(data)) {
|
||||||
|
this.executeEtichettaEan128(data, progressDialog);
|
||||||
|
} else {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
private void executeEtichettaEan128(BarcodeScanDTO barcodeScanDTO, ProgressDialog progressDialog) {
|
||||||
|
BarcodeRESTConsumer.decodeEan128(barcodeScanDTO, ean128Model -> {
|
||||||
|
|
||||||
|
String barcodeProd = null;
|
||||||
|
|
||||||
|
if(!UtilityString.isNullOrEmpty(ean128Model.Sscc)) barcodeProd = ean128Model.Sscc;
|
||||||
|
if(!UtilityString.isNullOrEmpty(ean128Model.Gtin)) barcodeProd = ean128Model.Gtin;
|
||||||
|
if(!UtilityString.isNullOrEmpty(ean128Model.Content)) barcodeProd = ean128Model.Content;
|
||||||
|
|
||||||
|
|
||||||
|
if(!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||||
|
|
||||||
|
if(!UtilityString.isNullOrEmpty(ean128Model.Gtin) || !UtilityString.isNullOrEmpty(ean128Model.Content)){
|
||||||
|
this.loadArticolo(barcodeProd, ean128Model, progressDialog);
|
||||||
|
} else {
|
||||||
|
DialogCommon.showNoArtFoundDialog(currentContext, () -> {
|
||||||
|
BarcodeManager.enable();
|
||||||
|
progressDialog.dismiss();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||||
|
DialogCommon.showNoArtFoundDialog(currentContext, () -> {
|
||||||
|
BarcodeManager.enable();
|
||||||
|
progressDialog.dismiss();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}, ex-> {
|
||||||
|
UtilityExceptions.defaultException(currentContext, ex, progressDialog);
|
||||||
|
BarcodeManager.enable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void loadArticolo(String barcodeProd, Ean128Model ean128Model, ProgressDialog progressDialog) {
|
||||||
|
if(barcodeProd.length() == 14) {
|
||||||
|
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||||
|
}
|
||||||
|
|
||||||
|
ArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||||
|
|
||||||
|
if(mtbAartList != null && mtbAartList.size() > 0) {
|
||||||
|
|
||||||
|
this.searchArtInList(mtbAartList.get(0), ean128Model);
|
||||||
|
|
||||||
|
BarcodeManager.enable();
|
||||||
|
progressDialog.dismiss();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
DialogCommon.showNoArtFoundDialog(currentContext, () -> {
|
||||||
|
BarcodeManager.enable();
|
||||||
|
progressDialog.dismiss();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}, ex -> {
|
||||||
|
BarcodeManager.enable();
|
||||||
|
UtilityExceptions.defaultException(currentContext, ex, progressDialog);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void searchArtInList(MtbAart mtbAart, Ean128Model ean128Model) {
|
||||||
|
removeListFilter();
|
||||||
|
|
||||||
|
List<DialogChooseArtsFromListaArtsItemModel> foundRowsList = Stream.of(mDataset)
|
||||||
|
.filter(x -> x.getMtbColr().getMtbAart().getCodMart().equalsIgnoreCase(mtbAart.getCodMart()) &&
|
||||||
|
!x.isHidden())
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
if(foundRowsList.size() == 0) {
|
||||||
|
DialogCommon.showNoArtFoundDialog(currentContext, null);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
for(int i = 0; i < mDataset.size(); i++) {
|
||||||
|
mDataset.get(i).setHidden(!foundRowsList.contains(mDataset.get(i)));
|
||||||
|
}
|
||||||
|
|
||||||
|
filterStatus.set(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void removeListFilter() {
|
||||||
|
filterStatus.set(false);
|
||||||
|
for (DialogChooseArtsFromListaArtsItemModel itemModel : mDataset) {
|
||||||
|
itemModel.setHidden(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void onPositiveClick() {
|
||||||
|
if(mOnItemsChoosed != null) {
|
||||||
|
mOnItemsChoosed.run(currentAdapter.getSelectedItems());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void onNegativeClick() {
|
private void onNegativeClick() {
|
||||||
|
|
||||||
if(this.mOnAbort != null) mOnAbort.run();
|
if(this.mOnAbort != null) mOnAbort.run();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,12 +2,14 @@ package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.databinding.Observable;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
@ -20,18 +22,41 @@ public class DialogChooseArtsFromListaArtsAdapter extends RecyclerView.Adapter<D
|
|||||||
protected Context mContext;
|
protected Context mContext;
|
||||||
|
|
||||||
private List<CheckableMtbColr> mDataset;
|
private List<CheckableMtbColr> mDataset;
|
||||||
|
private HashMap<CheckableMtbColr, Integer> mDatasetPositions = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
public DialogChooseArtsFromListaArtsAdapter(Context context, List<MtbColr> myDataset) {
|
public DialogChooseArtsFromListaArtsAdapter(Context context, List<DialogChooseArtsFromListaArtsItemModel> myDataset) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
|
|
||||||
if(myDataset != null) {
|
if(myDataset != null) {
|
||||||
mDataset = Stream.of(myDataset)
|
mDataset = Stream.of(myDataset)
|
||||||
.withoutNulls()
|
.withoutNulls()
|
||||||
.map(CheckableMtbColr::new).toList();
|
.map(CheckableMtbColr::new).toList();
|
||||||
|
|
||||||
|
for(int i = 0; i < mDataset.size(); i++) {
|
||||||
|
final CheckableMtbColr itemModel = mDataset.get(i);
|
||||||
|
|
||||||
|
mDatasetPositions.put(itemModel, i);
|
||||||
|
|
||||||
|
itemModel.getHidden().addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||||
|
onItemHidden(itemModel);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void onItemHidden(CheckableMtbColr itemModel) {
|
||||||
|
if(itemModel.isHidden()) {
|
||||||
|
mDataset.remove(itemModel);
|
||||||
|
} else {
|
||||||
|
mDataset.add(mDatasetPositions.get(itemModel) , itemModel);
|
||||||
|
}
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected DialogChooseArtsFromListaArtsItemModelBinding mViewDataBinding;
|
protected DialogChooseArtsFromListaArtsItemModelBinding mViewDataBinding;
|
||||||
@ -76,7 +101,7 @@ public class DialogChooseArtsFromListaArtsAdapter extends RecyclerView.Adapter<D
|
|||||||
public List<MtbColr> getSelectedItems() {
|
public List<MtbColr> getSelectedItems() {
|
||||||
return Stream.of(mDataset)
|
return Stream.of(mDataset)
|
||||||
.filter(y -> y.getChecked().get())
|
.filter(y -> y.getChecked().get())
|
||||||
.map(CheckableMtbColr::getMtbColr).toList();
|
.map(x -> x.getItem().getMtbColr()).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,32 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
|
|
||||||
|
public class DialogChooseArtsFromListaArtsItemModel {
|
||||||
|
|
||||||
|
private MtbColr mtbColr;
|
||||||
|
private BindableBoolean hidden = new BindableBoolean(false);
|
||||||
|
|
||||||
|
public MtbColr getMtbColr() {
|
||||||
|
return mtbColr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogChooseArtsFromListaArtsItemModel setMtbColr(MtbColr mtbColr) {
|
||||||
|
this.mtbColr = mtbColr;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isHidden() {
|
||||||
|
return hidden.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogChooseArtsFromListaArtsItemModel setHidden(boolean hidden) {
|
||||||
|
this.hidden.set(hidden);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindableBoolean getHidden() {
|
||||||
|
return hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
<solid android:color="@color/blue_700" />
|
<solid android:color="@color/colorPrimary" />
|
||||||
|
|
||||||
<padding
|
<padding
|
||||||
android:left="1dp"
|
android:left="1dp"
|
||||||
|
|||||||
16
app/src/main/res/drawable/bg_checked_layout.xml
Normal file
16
app/src/main/res/drawable/bg_checked_layout.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<solid android:color="@android:color/white" />
|
||||||
|
|
||||||
|
<padding
|
||||||
|
android:left="4dp"
|
||||||
|
android:right="4dp"
|
||||||
|
android:top="4dp" />
|
||||||
|
|
||||||
|
<corners
|
||||||
|
android:topLeftRadius="16dp"
|
||||||
|
android:bottomLeftRadius="16dp"
|
||||||
|
android:topRightRadius="8dp"
|
||||||
|
android:bottomRightRadius="8dp" />
|
||||||
|
</shape>
|
||||||
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
|
||||||
|
|
||||||
<solid android:color="@color/colorPrimaryDark" />
|
|
||||||
|
|
||||||
<padding
|
|
||||||
android:left="1dp"
|
|
||||||
android:right="1dp"
|
|
||||||
android:top="1dp" />
|
|
||||||
|
|
||||||
<corners android:radius="@dimen/standard_rounc" />
|
|
||||||
</shape>
|
|
||||||
@ -4,6 +4,7 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
<import type="it.integry.integrywmsnative.R" />
|
||||||
<import type="android.view.View" />
|
<import type="android.view.View" />
|
||||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||||
@ -13,39 +14,43 @@
|
|||||||
</data>
|
</data>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/bg_checked_layout"
|
||||||
|
app:backgroundTintResID="@{checkableMtbColr.checked.get() ? R.color.bg_checked_layout : android.R.color.transparent}"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
|
android:onClick="@{() -> checkableMtbColr.toggleCheck()}">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatCheckBox
|
<androidx.appcompat.widget.AppCompatCheckBox
|
||||||
|
android:id="@+id/checkbox"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
app:checked="@{checkableMtbColr.checked}"/>
|
app:checked="@{checkableMtbColr.checked}"/>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingBottom="8dp"
|
|
||||||
android:onClick="@{() -> checkableMtbColr.toggleCheck()}">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintEnd_toStartOf="@id/qta_box"
|
android:layout_toEndOf="@id/checkbox"
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
android:layout_toStartOf="@id/qta_box">
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{checkableMtbColr.mtbColr.mtbAart.getCodMart()}"
|
android:text="@{checkableMtbColr.item.mtbColr.mtbAart.getCodMart()}"
|
||||||
android:textColor="@color/colorPrimary"
|
android:textColor="@color/colorPrimary"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
@ -55,11 +60,11 @@
|
|||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{checkableMtbColr.mtbColr.mtbAart.getDiacod()}"
|
android:text="@{checkableMtbColr.item.mtbColr.mtbAart.getDiacod()}"
|
||||||
android:textColor="@color/red_600"
|
android:textColor="@color/red_600"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:visibility="@{UtilityString.isNullOrEmpty(checkableMtbColr.mtbColr.mtbAart.diacod) ? View.GONE : View.VISIBLE}"
|
android:visibility="@{UtilityString.isNullOrEmpty(checkableMtbColr.item.mtbColr.mtbAart.diacod) ? View.GONE : View.VISIBLE}"
|
||||||
tools:text="DIACOD" />
|
tools:text="DIACOD" />
|
||||||
|
|
||||||
|
|
||||||
@ -68,20 +73,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:text="@{checkableMtbColr.mtbColr.mtbAart.descrizioneEstesa}"
|
android:text="@{checkableMtbColr.item.mtbColr.mtbAart.descrizioneEstesa}"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
tools:text="Descrizione lunga articolo" />
|
tools:text="Descrizione lunga articolo" />
|
||||||
|
|
||||||
|
|
||||||
<!--<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{`Lotto: ` + dtoModel.partitaMag}"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:visibility="@{UtilityString.isNullOrEmpty(dtoModel.partitaMag) ? View.INVISIBLE : View.VISIBLE}"
|
|
||||||
tools:text="Lotto: ABCDE" />-->
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
@ -92,9 +89,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:layout_alignParentEnd="true"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:layout_centerVertical="true">
|
||||||
app:layout_constraintBottom_toBottomOf="parent">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -105,7 +101,7 @@
|
|||||||
android:paddingTop="2dp"
|
android:paddingTop="2dp"
|
||||||
android:paddingRight="6dp"
|
android:paddingRight="6dp"
|
||||||
android:paddingBottom="2dp"
|
android:paddingBottom="2dp"
|
||||||
android:text="@{UtilityNumber.decimalToString(checkableMtbColr.mtbColr.getQtaCol()) + (checkableMtbColr.mtbColr.mtbAart != null && !UtilityString.isNullOrEmpty(checkableMtbColr.mtbColr.mtbAart.untMis) ? `\n` + checkableMtbColr.mtbColr.mtbAart.untMis : ``)}"
|
android:text="@{UtilityNumber.decimalToString(checkableMtbColr.item.mtbColr.getQtaCol()) + (checkableMtbColr.item.mtbColr.mtbAart != null && !UtilityString.isNullOrEmpty(checkableMtbColr.item.mtbColr.mtbAart.untMis) ? `\n` + checkableMtbColr.item.mtbColr.mtbAart.untMis : ``)}"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
@ -114,9 +110,7 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
|
||||||
</layout>
|
</layout>
|
||||||
@ -2,6 +2,14 @@
|
|||||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="filterStatus"
|
||||||
|
type="it.integry.integrywmsnative.core.di.BindableBoolean" />
|
||||||
|
</data>
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/base_root"
|
android:id="@+id/base_root"
|
||||||
@ -16,21 +24,21 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<!--<RelativeLayout-->
|
||||||
android:id="@+id/title_container"
|
<!--android:id="@+id/title_container"-->
|
||||||
android:layout_width="match_parent"
|
<!--android:layout_width="match_parent"-->
|
||||||
android:layout_height="wrap_content"
|
<!--android:layout_height="wrap_content"-->
|
||||||
android:background="@color/light_blue_300"
|
<!--android:background="@color/light_blue_300"-->
|
||||||
android:gravity="center_horizontal">
|
<!--android:gravity="center_horizontal">-->
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<!--<androidx.appcompat.widget.AppCompatImageView-->
|
||||||
android:id="@+id/title_icon"
|
<!--android:id="@+id/title_icon"-->
|
||||||
android:layout_width="wrap_content"
|
<!--android:layout_width="wrap_content"-->
|
||||||
android:layout_height="wrap_content"
|
<!--android:layout_height="wrap_content"-->
|
||||||
android:src="@drawable/ic_error_white_24dp"
|
<!--android:src="@drawable/ic_error_white_24dp"-->
|
||||||
android:layout_margin="24dp"/>
|
<!--android:layout_margin="24dp"/>-->
|
||||||
|
|
||||||
</RelativeLayout>
|
<!--</RelativeLayout>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -53,6 +61,20 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/button_remove_filter"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
style="@style/Button.DangerOutline"
|
||||||
|
app:icon="@drawable/ic_clear_24dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:visibility="@{filterStatus.get() ? View.VISIBLE : View.GONE}"
|
||||||
|
android:text="@string/remove_filter_button"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|||||||
@ -24,6 +24,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<color name="bg_checked_layout">#E8F0FE</color>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<color name="alpha_blue_500">#2d42a5f5</color>
|
<color name="alpha_blue_500">#2d42a5f5</color>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user