Finish v1.42.00(460)
This commit is contained in:
commit
856592e1fe
@ -10,7 +10,7 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 459
|
||||
def appVersionCode = 460
|
||||
def appVersionName = '1.41.11'
|
||||
|
||||
signingConfigs {
|
||||
@ -75,7 +75,7 @@ android {
|
||||
build {
|
||||
doLast {
|
||||
delete "$projectDir/build/outputs/apk/release/version.txt"
|
||||
file("$projectDir/build/outputs/apk/release/version.txt").text = appVersionCode + '\n' + appVersionName
|
||||
file("$projectDir/build/outputs/apk/release/version.txt").text = appVersionCode + '\n' + appVersionName + '\n' + 'forced=true'
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.3'
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
@ -103,17 +103,17 @@ dependencies {
|
||||
//Firebase
|
||||
|
||||
// Import the Firebase BoM
|
||||
implementation platform('com.google.firebase:firebase-bom:32.8.1')
|
||||
implementation platform('com.google.firebase:firebase-bom:33.7.0')
|
||||
implementation 'com.google.firebase:firebase-analytics'
|
||||
implementation 'com.google.firebase:firebase-crashlytics'
|
||||
implementation 'com.google.firebase:firebase-perf'
|
||||
implementation 'com.google.android.gms:play-services-basement:18.3.0'
|
||||
implementation 'com.google.android.gms:play-services-basement:18.5.0'
|
||||
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.11.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'com.google.android.material:material:1.12.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
||||
|
||||
@ -127,12 +127,12 @@ dependencies {
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
implementation 'com.annimon:stream:1.2.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.7'
|
||||
// implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'org.apache.commons:commons-text:1.9'
|
||||
|
||||
//MVVM
|
||||
def dagger2_version = '2.46.1'
|
||||
def dagger2_version = '2.49'
|
||||
api "com.google.dagger:dagger:$dagger2_version"
|
||||
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
||||
api "com.google.dagger:dagger-android:$dagger2_version"
|
||||
@ -182,6 +182,9 @@ dependencies {
|
||||
// RxJava is also required.
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||
|
||||
//Barcode generator
|
||||
implementation group: 'com.google.zxing', name: 'core', version: '3.5.3'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@ -126,6 +126,8 @@ import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.Di
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.create_new_art.DialogCreateNewArtComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.create_new_art.DialogCreateNewArtModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdComponent;
|
||||
@ -218,7 +220,8 @@ import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracc
|
||||
DialogInfoGiacenzaModule.class,
|
||||
ArticoliInGiacenzaModule.class,
|
||||
DialogTracciamentoImballiModule.class,
|
||||
DialogAskVettoreModule.class
|
||||
DialogAskVettoreModule.class,
|
||||
DialogCreateNewArtModule.class
|
||||
})
|
||||
public interface MainApplicationComponent {
|
||||
|
||||
@ -365,6 +368,8 @@ public interface MainApplicationComponent {
|
||||
|
||||
DialogAskVettoreComponent.Factory dialogAskVettoreComponent();
|
||||
|
||||
DialogCreateNewArtComponent.Factory dialogCreateNewArtComponent();
|
||||
|
||||
void inject(MainApplication mainApplication);
|
||||
|
||||
void inject(AppContext mainApplication);
|
||||
|
||||
@ -111,6 +111,28 @@ public class Converters {
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindEditText(AppCompatTextView view, final ValidatableObservableField<String> observableField) {
|
||||
Pair<ValidatableObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != observableField) {
|
||||
if (pair != null) {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
if (observableField != null) observableField.set(s.toString());
|
||||
}
|
||||
};
|
||||
view.setTag(R.id.bound_observable, new Pair<>(observableField, watcher));
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
String newValue = observableField.get();
|
||||
if (!view.getText().toString().equals(newValue)) {
|
||||
view.setText(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindEditText(EditText view, final BindableString bindableString) {
|
||||
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
@ -156,6 +178,28 @@ public class Converters {
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindEditText(EditText view, final ValidatableObservableField<String> observableString) {
|
||||
Pair<ValidatableObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != observableString) {
|
||||
if (pair != null) {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
observableString.set(s.toString());
|
||||
}
|
||||
};
|
||||
view.setTag(R.id.bound_observable, new Pair<>(observableString, watcher));
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
String newValue = observableString.get();
|
||||
if (!view.getText().toString().equals(newValue)) {
|
||||
view.setText(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindEditText(AutoCompleteTextView view, final ObservableField<String> observableString) {
|
||||
Pair<ObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
@ -260,6 +304,36 @@ public class Converters {
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindTextInputEditTextBigDecimal(EditText view, final ValidatableObservableField<BigDecimal> observableBigDecimal) {
|
||||
Pair<ValidatableObservableField<BigDecimal>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
if (pair == null || pair.first != observableBigDecimal) {
|
||||
if (pair != null) {
|
||||
view.removeTextChangedListener(pair.second);
|
||||
}
|
||||
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
BigDecimal value = null;
|
||||
String newValueString = s.toString().trim();
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(newValueString))
|
||||
value = new BigDecimal(newValueString);
|
||||
|
||||
observableBigDecimal.set(value);
|
||||
}
|
||||
};
|
||||
view.setTag(R.id.bound_observable, new Pair<>(observableBigDecimal, watcher));
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
BigDecimal newValue = observableBigDecimal.get();
|
||||
BigDecimal viewValue = !view.getText().toString().trim().isEmpty() ? new BigDecimal(view.getText().toString()) : null;
|
||||
|
||||
if (!UtilityBigDecimal.equalsTo(viewValue, newValue)) {
|
||||
view.setText(UtilityNumber.decimalToString(newValue));
|
||||
}
|
||||
}
|
||||
|
||||
@BindingAdapter("binding")
|
||||
public static void bindTextInputEditTextBigDecimal(TextInputEditText view, final BindableBigDecimal bindableBigDecimal) {
|
||||
Pair<BindableBigDecimal, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
@ -657,6 +731,30 @@ public class Converters {
|
||||
view.setChecked(newValue);
|
||||
}
|
||||
|
||||
@BindingAdapter("checked")
|
||||
public static void bindCheckbox(AppCompatCheckBox view, final ObservableField<Boolean> bindableBoolean) {
|
||||
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||
view.setTag(R.id.bound_observable, bindableBoolean);
|
||||
view.setOnCheckedChangeListener((compoundButton, b) -> {
|
||||
bindableBoolean.set(b);
|
||||
});
|
||||
}
|
||||
Boolean newValue = bindableBoolean.get();
|
||||
view.setChecked(newValue);
|
||||
}
|
||||
|
||||
@BindingAdapter("checked")
|
||||
public static void bindCheckbox(AppCompatCheckBox view, final ValidatableObservableField<Boolean> bindableBoolean) {
|
||||
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||
view.setTag(R.id.bound_observable, bindableBoolean);
|
||||
view.setOnCheckedChangeListener((compoundButton, b) -> {
|
||||
bindableBoolean.set(b);
|
||||
});
|
||||
}
|
||||
Boolean newValue = bindableBoolean.get();
|
||||
view.setChecked(newValue);
|
||||
}
|
||||
|
||||
@BindingAdapter("checked")
|
||||
public static void bindCheckbox(CheckBox view, final BindableBoolean bindableBoolean) {
|
||||
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||
@ -723,8 +821,8 @@ public class Converters {
|
||||
|
||||
@BindingAdapter({"reverse_visibility"})
|
||||
public static void bindViewReverseVisibility(View view, final BindableBoolean bindableBoolean) {
|
||||
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||
view.setTag(R.id.bound_observable, bindableBoolean);
|
||||
if (view.getTag(R.id.bound_reverse_visibility) != bindableBoolean) {
|
||||
view.setTag(R.id.bound_reverse_visibility, bindableBoolean);
|
||||
}
|
||||
bindableBoolean.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||
@Override
|
||||
|
||||
@ -0,0 +1,65 @@
|
||||
package it.integry.integrywmsnative.core.di;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.BaseObservable;
|
||||
import androidx.databinding.Bindable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.BR;
|
||||
import it.integry.integrywmsnative.core.di.validators.Validator;
|
||||
|
||||
public class ValidatableObservableField<T> extends BaseObservable {
|
||||
private T mValue;
|
||||
private final List<Validator<T>> validators = new ArrayList<>();
|
||||
public String errorMessage;
|
||||
|
||||
public ValidatableObservableField() {
|
||||
}
|
||||
|
||||
public ValidatableObservableField(T value) {
|
||||
mValue = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the stored value.
|
||||
*/
|
||||
@Nullable
|
||||
public T get() {
|
||||
return mValue;
|
||||
}
|
||||
|
||||
public void set(T value) {
|
||||
if (value != mValue) {
|
||||
mValue = value;
|
||||
notifyChange();
|
||||
validate();
|
||||
}
|
||||
}
|
||||
|
||||
public void addValidator(Validator<T> validator) {
|
||||
validators.add(validator);
|
||||
}
|
||||
|
||||
public boolean validate() {
|
||||
for (Validator<T> validator : validators) {
|
||||
if (!validator.isValid(mValue)) {
|
||||
setErrorMessage(validator.getErrorMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
setErrorMessage(null);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Bindable
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
private void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
notifyPropertyChanged(BR.errorMessage); // Notifica il cambiamento di errorMessage
|
||||
}
|
||||
}
|
||||
@ -2,5 +2,25 @@ package it.integry.integrywmsnative.core.di.binders;
|
||||
|
||||
public class AutoCompleteTextViewBinders {
|
||||
|
||||
|
||||
// @BindingAdapter("binding")
|
||||
// public static void bindUntMisText(AppCompatAutoCompleteTextView view, ObservableField<MtbUntMis> untMisField) {
|
||||
// Pair<ObservableField<MtbUntMis>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||
// if (pair == null || pair.first != untMisField) {
|
||||
// if (pair != null) {
|
||||
// view.removeTextChangedListener(pair.second);
|
||||
// }
|
||||
// TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||
// @Override
|
||||
// public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
// if (untMisField != null) untMisField.set(s.toString());
|
||||
// }
|
||||
// };
|
||||
// view.setTag(R.id.bound_observable, new Pair<>(untMisField, watcher));
|
||||
// view.addTextChangedListener(watcher);
|
||||
// }
|
||||
// String newValue = untMisField != null && untMisField.get() != null ? Objects.requireNonNull(untMisField.get()).getUntMis() : "";
|
||||
// if (!view.getText().toString().equals(newValue)) {
|
||||
// view.setText(newValue);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.di.binders;
|
||||
|
||||
import androidx.databinding.BindingAdapter;
|
||||
|
||||
import com.google.android.material.textfield.TextInputLayout;
|
||||
|
||||
public class TextInputLayoutBinders {
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
package it.integry.integrywmsnative.core.di.validators;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class GreaterThenValidator implements Validator<BigDecimal> {
|
||||
private final String errorMessage;
|
||||
private final BigDecimal greaterThanValue;
|
||||
|
||||
public GreaterThenValidator(BigDecimal greaterThanValue, String errorMessage) {
|
||||
this.greaterThanValue = greaterThanValue;
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(BigDecimal value) {
|
||||
return value != null && value.compareTo(greaterThanValue) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package it.integry.integrywmsnative.core.di.validators;
|
||||
|
||||
public class MinLengthValidator implements Validator<String> {
|
||||
private final int minLength;
|
||||
private final String errorMessage;
|
||||
|
||||
public MinLengthValidator(int minLength, String errorMessage) {
|
||||
this.minLength = minLength;
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(String value) {
|
||||
return value != null && value.length() >= minLength;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package it.integry.integrywmsnative.core.di.validators;
|
||||
|
||||
public class NotEmptyValidator implements Validator<String> {
|
||||
private final String errorMessage;
|
||||
|
||||
public NotEmptyValidator(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(String value) {
|
||||
return value != null && !value.trim().isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package it.integry.integrywmsnative.core.di.validators;
|
||||
|
||||
public class NotNullValidator<T> implements Validator<T>{
|
||||
private final String errorMessage;
|
||||
|
||||
public NotNullValidator(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(T value) {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package it.integry.integrywmsnative.core.di.validators;
|
||||
|
||||
public interface Validator<T> {
|
||||
boolean isValid(T value);
|
||||
|
||||
String getErrorMessage();
|
||||
}
|
||||
@ -1,5 +1,8 @@
|
||||
package it.integry.integrywmsnative.core.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MtbGrup extends EntityBase {
|
||||
|
||||
private String codMgrp;
|
||||
@ -8,6 +11,7 @@ public class MtbGrup extends EntityBase {
|
||||
private String logoWeb;
|
||||
private String criterioVal;
|
||||
private String tipoMgrp;
|
||||
private List<MtbSgrp> mtbSgrp = new ArrayList<>();
|
||||
|
||||
public MtbGrup() {
|
||||
this.type = "mtb_grup";
|
||||
@ -66,4 +70,13 @@ public class MtbGrup extends EntityBase {
|
||||
this.tipoMgrp = tipoMgrp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbSgrp> getMtbSgrp() {
|
||||
return mtbSgrp;
|
||||
}
|
||||
|
||||
public MtbGrup setMtbSgrp(List<MtbSgrp> mtbSgrp) {
|
||||
this.mtbSgrp = mtbSgrp;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
package it.integry.integrywmsnative.core.model;
|
||||
|
||||
public class MtbSfam extends EntityBase {
|
||||
|
||||
private String codMgrp;
|
||||
private String codMsgr;
|
||||
private String codMsfa;
|
||||
private String descrizione;
|
||||
|
||||
public MtbSfam() {
|
||||
this.type = "mtb_sfam";
|
||||
}
|
||||
|
||||
public String getCodMgrp() {
|
||||
return codMgrp;
|
||||
}
|
||||
|
||||
public MtbSfam setCodMgrp(String codMgrp) {
|
||||
this.codMgrp = codMgrp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMsgr() {
|
||||
return codMsgr;
|
||||
}
|
||||
|
||||
public MtbSfam setCodMsgr(String codMsgr) {
|
||||
this.codMsgr = codMsgr;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMsfa() {
|
||||
return codMsfa;
|
||||
}
|
||||
|
||||
public MtbSfam setCodMsfa(String codMsfa) {
|
||||
this.codMsfa = codMsfa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public MtbSfam setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,112 @@
|
||||
package it.integry.integrywmsnative.core.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MtbSgrp extends EntityBase {
|
||||
|
||||
private String codMgrp;
|
||||
private String codMsgr;
|
||||
private String descrizione;
|
||||
private String inclInStat;
|
||||
private String contoRimFin;
|
||||
private Integer ordinamento;
|
||||
private Boolean chkGiacenzaNeg;
|
||||
private Boolean flagReso;
|
||||
private String codCconWip;
|
||||
private List<MtbSfam> mtbSfam = new ArrayList<>();
|
||||
|
||||
public MtbSgrp() {
|
||||
this.type = "mtb_sgrp";
|
||||
}
|
||||
|
||||
public String getCodMgrp() {
|
||||
return codMgrp;
|
||||
}
|
||||
|
||||
public MtbSgrp setCodMgrp(String codMgrp) {
|
||||
this.codMgrp = codMgrp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMsgr() {
|
||||
return codMsgr;
|
||||
}
|
||||
|
||||
public MtbSgrp setCodMsgr(String codMsgr) {
|
||||
this.codMsgr = codMsgr;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public MtbSgrp setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getInclInStat() {
|
||||
return inclInStat;
|
||||
}
|
||||
|
||||
public MtbSgrp setInclInStat(String inclInStat) {
|
||||
this.inclInStat = inclInStat;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getContoRimFin() {
|
||||
return contoRimFin;
|
||||
}
|
||||
|
||||
public MtbSgrp setContoRimFin(String contoRimFin) {
|
||||
this.contoRimFin = contoRimFin;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getOrdinamento() {
|
||||
return ordinamento;
|
||||
}
|
||||
|
||||
public MtbSgrp setOrdinamento(Integer ordinamento) {
|
||||
this.ordinamento = ordinamento;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getChkGiacenzaNeg() {
|
||||
return chkGiacenzaNeg;
|
||||
}
|
||||
|
||||
public MtbSgrp setChkGiacenzaNeg(Boolean chkGiacenzaNeg) {
|
||||
this.chkGiacenzaNeg = chkGiacenzaNeg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getFlagReso() {
|
||||
return flagReso;
|
||||
}
|
||||
|
||||
public MtbSgrp setFlagReso(Boolean flagReso) {
|
||||
this.flagReso = flagReso;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodCconWip() {
|
||||
return codCconWip;
|
||||
}
|
||||
|
||||
public MtbSgrp setCodCconWip(String codCconWip) {
|
||||
this.codCconWip = codCconWip;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbSfam> getMtbSfam() {
|
||||
return mtbSfam;
|
||||
}
|
||||
|
||||
public MtbSgrp setMtbSfam(List<MtbSfam> mtbSfam) {
|
||||
this.mtbSfam = mtbSfam;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -18,7 +18,10 @@ import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.ArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCodMartRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.SaveArticoloRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.SaveArticoloResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.UpdateBarcodeImballoRequestDTO;
|
||||
@ -36,6 +39,41 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
this.systemRESTConsumer = systemRESTConsumer;
|
||||
}
|
||||
|
||||
|
||||
public void retrieveAvailableUntMis(RunnableArgs<List<MtbUntMis>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
articoloRESTConsumerService
|
||||
.retrieveAvailableUntMis()
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbUntMis>> call, Response<ServiceRESTResponse<MtbUntMis>> response) {
|
||||
analyzeAnswerList(response, "retrieveAvailableUntMis", onComplete, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<MtbUntMis>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void retrieveAvailableGruppiMerceologici(RunnableArgs<List<MtbGrup>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
articoloRESTConsumerService
|
||||
.retrieveAvailableGruppiMerceologici()
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbGrup>> call, Response<ServiceRESTResponse<MtbGrup>> response) {
|
||||
analyzeAnswerList(response, "retrieveAvailableGruppiMerceologici", onComplete, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<MtbGrup>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void searchByBarcode(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
|
||||
@ -205,4 +243,28 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void saveArticolo(ArticoloDTO articoloToSave, RunnableArgs<String> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
|
||||
var request = new SaveArticoloRequestDTO()
|
||||
.setArtToSave(articoloToSave);
|
||||
|
||||
articoloRESTConsumerService
|
||||
.saveArticolo(request)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<SaveArticoloResponseDTO>> call, Response<ServiceRESTResponse<SaveArticoloResponseDTO>> response) {
|
||||
analyzeAnswer(response, "saveArticolo", data -> {
|
||||
onComplete.run(data.getCodMart());
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<SaveArticoloResponseDTO>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,9 +3,13 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||
import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCodMartRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.SaveArticoloRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.SaveArticoloResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.UpdateBarcodeImballoRequestDTO;
|
||||
@ -17,6 +21,13 @@ import retrofit2.http.Query;
|
||||
|
||||
public interface ArticoloRESTConsumerService {
|
||||
|
||||
|
||||
@GET("wms/articolo/availableUntMis")
|
||||
Call<ServiceRESTResponse<MtbUntMis>> retrieveAvailableUntMis();
|
||||
|
||||
@GET("wms/articolo/availableGruppiMerceologici")
|
||||
Call<ServiceRESTResponse<MtbGrup>> retrieveAvailableGruppiMerceologici();
|
||||
|
||||
@POST("wms/articolo/searchByBarcode")
|
||||
Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> searchByBarcode(@Body() SearchArticoloByBarcodeRequestDTO searchArticoloByBarcodeRequest);
|
||||
|
||||
@ -29,4 +40,7 @@ public interface ArticoloRESTConsumerService {
|
||||
@GET("getProductLotStatus")
|
||||
Call<ServiceRESTResponse<List<StatoArticoloDTO>>> getStatoPartita(@Query("codMart") String codMart, @Query("partitaMag") String partitaMag);
|
||||
|
||||
@POST("wms/articolo/saveArticolo")
|
||||
Call<ServiceRESTResponse<SaveArticoloResponseDTO>> saveArticolo(@Body SaveArticoloRequestDTO saveArticoloRequest);
|
||||
|
||||
}
|
||||
|
||||
@ -286,7 +286,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
|
||||
analyzeAnswer(response, "GetBySSCC", mtbColt -> {
|
||||
|
||||
if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
|
||||
if (mtbColt != null && mtbColt.getMtbColr() != null && !mtbColt.getMtbColr().isEmpty()) {
|
||||
List<MtbColt> mtbColtList = new ArrayList<>();
|
||||
mtbColtList.add(mtbColt);
|
||||
fillMtbAartsOfMtbColts(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed);
|
||||
|
||||
@ -4,9 +4,6 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
@ -15,7 +12,6 @@ import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.lang.reflect.Type;
|
||||
import java.net.ConnectException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
@ -29,9 +25,9 @@ import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.NativeSqlRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.system.LatestAppVersionInfoDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.system.RegisterDeviceRequestDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityGson;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import retrofit2.Call;
|
||||
@ -42,6 +38,23 @@ import retrofit2.Response;
|
||||
public class SystemRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
|
||||
public void retrieveUpdatesInfo(final RunnableArgs<LatestAppVersionInfoDTO> onSuccess, final RunnableArgs<Exception> onFailed) {
|
||||
SystemRESTConsumerService systemRESTConsumerService = RESTBuilder.getService(SystemRESTConsumerService.class);
|
||||
systemRESTConsumerService.retrieveUpdatesInfo()
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<LatestAppVersionInfoDTO> call, Response<LatestAppVersionInfoDTO> response) {
|
||||
analyzeAnswerGeneric(response, "updates", onSuccess, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<LatestAppVersionInfoDTO> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void registerDevice(final Runnable onSuccess, final RunnableArgs<Exception> onFailed) {
|
||||
RegisterDeviceRequestDTO registerDeviceRequestDTO = new RegisterDeviceRequestDTO()
|
||||
.setApp("WMS");
|
||||
|
||||
@ -6,6 +6,7 @@ import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.NativeSqlRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.system.LatestAppVersionInfoDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.system.RegisterDeviceRequestDTO;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
@ -15,6 +16,9 @@ import retrofit2.http.Query;
|
||||
|
||||
public interface SystemRESTConsumerService {
|
||||
|
||||
@GET("wms/currentVersion")
|
||||
Call<LatestAppVersionInfoDTO> retrieveUpdatesInfo();
|
||||
|
||||
@POST("device/register")
|
||||
Call<ServiceRESTResponse<Void>> registerDevice(@Body RegisterDeviceRequestDTO registerDeviceRequestDTO);
|
||||
|
||||
|
||||
@ -15,6 +15,32 @@ import retrofit2.Response;
|
||||
|
||||
public abstract class _BaseRESTConsumer {
|
||||
|
||||
|
||||
public static <T> void analyzeAnswerGeneric(Response<T> response, String logTitle, RunnableArgs<T> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
try {
|
||||
var data = analyzeAnswerGeneric(response, logTitle);
|
||||
onComplete.run(data);
|
||||
} catch (Exception e) {
|
||||
onFailed.run(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T analyzeAnswerGeneric(Response<T> response, String logTitle) throws Exception {
|
||||
if (response.isSuccessful()) {
|
||||
return response.body();
|
||||
} else {
|
||||
if (response.code() == 404) {
|
||||
Log.e(logTitle, "Errore " + response.code() + ": risorsa non trovata (" + response.raw().request().url() + ")");
|
||||
throw new Exception("Errore " + response.code() + ": risorsa non trovata (" + logTitle + ")");
|
||||
} else if (response.code() == 550)
|
||||
throw new InvalidLicenseException();
|
||||
else {
|
||||
Log.e(logTitle, "Status " + response.code() + ": " + response.message());
|
||||
throw new Exception("Status " + response.code() + ": " + response.message());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T analyzeAnswer(Response<ServiceRESTResponse<T>> response, String logTitle) throws Exception {
|
||||
if (response.isSuccessful()) {
|
||||
if (response.body() != null) {
|
||||
|
||||
@ -0,0 +1,257 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.articolo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class ArticoloDTO {
|
||||
|
||||
private String codMart;
|
||||
private String descrizione;
|
||||
private String untMis;
|
||||
private String barcode;
|
||||
private BigDecimal qtaCnf;
|
||||
private String codAliq;
|
||||
private String articoloComposto;
|
||||
private String descrizioneEstesa;
|
||||
private String note;
|
||||
private String posizione;
|
||||
private String codMgrp;
|
||||
private String codMsfa;
|
||||
private String codMsgr;
|
||||
private String codMstp;
|
||||
private String codMtip;
|
||||
private boolean flagStato;
|
||||
private String barcodeImballo;
|
||||
private String diacod;
|
||||
private boolean flagQtaCnfFissa;
|
||||
private String idArtEqui;
|
||||
private boolean flagKit;
|
||||
private String precode;
|
||||
private String gruppo;
|
||||
private String sottoGruppo;
|
||||
private String sottoFamiglia;
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public ArticoloDTO setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizione() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public ArticoloDTO setDescrizione(String descrizione) {
|
||||
this.descrizione = descrizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUntMis() {
|
||||
return untMis;
|
||||
}
|
||||
|
||||
public ArticoloDTO setUntMis(String untMis) {
|
||||
this.untMis = untMis;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBarcode() {
|
||||
return barcode;
|
||||
}
|
||||
|
||||
public ArticoloDTO setBarcode(String barcode) {
|
||||
this.barcode = barcode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaCnf() {
|
||||
return qtaCnf;
|
||||
}
|
||||
|
||||
public ArticoloDTO setQtaCnf(BigDecimal qtaCnf) {
|
||||
this.qtaCnf = qtaCnf;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodAliq() {
|
||||
return codAliq;
|
||||
}
|
||||
|
||||
public ArticoloDTO setCodAliq(String codAliq) {
|
||||
this.codAliq = codAliq;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getArticoloComposto() {
|
||||
return articoloComposto;
|
||||
}
|
||||
|
||||
public ArticoloDTO setArticoloComposto(String articoloComposto) {
|
||||
this.articoloComposto = articoloComposto;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDescrizioneEstesa() {
|
||||
return descrizioneEstesa;
|
||||
}
|
||||
|
||||
public ArticoloDTO setDescrizioneEstesa(String descrizioneEstesa) {
|
||||
this.descrizioneEstesa = descrizioneEstesa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public ArticoloDTO setNote(String note) {
|
||||
this.note = note;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPosizione() {
|
||||
return posizione;
|
||||
}
|
||||
|
||||
public ArticoloDTO setPosizione(String posizione) {
|
||||
this.posizione = posizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMgrp() {
|
||||
return codMgrp;
|
||||
}
|
||||
|
||||
public ArticoloDTO setCodMgrp(String codMgrp) {
|
||||
this.codMgrp = codMgrp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMsfa() {
|
||||
return codMsfa;
|
||||
}
|
||||
|
||||
public ArticoloDTO setCodMsfa(String codMsfa) {
|
||||
this.codMsfa = codMsfa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMsgr() {
|
||||
return codMsgr;
|
||||
}
|
||||
|
||||
public ArticoloDTO setCodMsgr(String codMsgr) {
|
||||
this.codMsgr = codMsgr;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMstp() {
|
||||
return codMstp;
|
||||
}
|
||||
|
||||
public ArticoloDTO setCodMstp(String codMstp) {
|
||||
this.codMstp = codMstp;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMtip() {
|
||||
return codMtip;
|
||||
}
|
||||
|
||||
public ArticoloDTO setCodMtip(String codMtip) {
|
||||
this.codMtip = codMtip;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagStato() {
|
||||
return flagStato;
|
||||
}
|
||||
|
||||
public ArticoloDTO setFlagStato(boolean flagStato) {
|
||||
this.flagStato = flagStato;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBarcodeImballo() {
|
||||
return barcodeImballo;
|
||||
}
|
||||
|
||||
public ArticoloDTO setBarcodeImballo(String barcodeImballo) {
|
||||
this.barcodeImballo = barcodeImballo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDiacod() {
|
||||
return diacod;
|
||||
}
|
||||
|
||||
public ArticoloDTO setDiacod(String diacod) {
|
||||
this.diacod = diacod;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagQtaCnfFissa() {
|
||||
return flagQtaCnfFissa;
|
||||
}
|
||||
|
||||
public ArticoloDTO setFlagQtaCnfFissa(boolean flagQtaCnfFissa) {
|
||||
this.flagQtaCnfFissa = flagQtaCnfFissa;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIdArtEqui() {
|
||||
return idArtEqui;
|
||||
}
|
||||
|
||||
public ArticoloDTO setIdArtEqui(String idArtEqui) {
|
||||
this.idArtEqui = idArtEqui;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagKit() {
|
||||
return flagKit;
|
||||
}
|
||||
|
||||
public ArticoloDTO setFlagKit(boolean flagKit) {
|
||||
this.flagKit = flagKit;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPrecode() {
|
||||
return precode;
|
||||
}
|
||||
|
||||
public ArticoloDTO setPrecode(String precode) {
|
||||
this.precode = precode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGruppo() {
|
||||
return gruppo;
|
||||
}
|
||||
|
||||
public ArticoloDTO setGruppo(String gruppo) {
|
||||
this.gruppo = gruppo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSottoGruppo() {
|
||||
return sottoGruppo;
|
||||
}
|
||||
|
||||
public ArticoloDTO setSottoGruppo(String sottoGruppo) {
|
||||
this.sottoGruppo = sottoGruppo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSottoFamiglia() {
|
||||
return sottoFamiglia;
|
||||
}
|
||||
|
||||
public ArticoloDTO setSottoFamiglia(String sottoFamiglia) {
|
||||
this.sottoFamiglia = sottoFamiglia;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.articolo;
|
||||
|
||||
public class SaveArticoloRequestDTO {
|
||||
private ArticoloDTO artToSave;
|
||||
|
||||
public ArticoloDTO getArtToSave() {
|
||||
return artToSave;
|
||||
}
|
||||
|
||||
public SaveArticoloRequestDTO setArtToSave(ArticoloDTO artToSave) {
|
||||
this.artToSave = artToSave;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.articolo;
|
||||
|
||||
public class SaveArticoloResponseDTO {
|
||||
private String codMart;
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package it.integry.integrywmsnative.core.rest.model.system;
|
||||
|
||||
public class LatestAppVersionInfoDTO {
|
||||
private String latestVersion;
|
||||
private int latestVersionCode;
|
||||
private String url;
|
||||
private boolean forced;
|
||||
|
||||
public String getLatestVersion() {
|
||||
return latestVersion;
|
||||
}
|
||||
|
||||
public LatestAppVersionInfoDTO setLatestVersion(String latestVersion) {
|
||||
this.latestVersion = latestVersion;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getLatestVersionCode() {
|
||||
return latestVersionCode;
|
||||
}
|
||||
|
||||
public LatestAppVersionInfoDTO setLatestVersionCode(int latestVersionCode) {
|
||||
this.latestVersionCode = latestVersionCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public LatestAppVersionInfoDTO setUrl(String url) {
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isForced() {
|
||||
return forced;
|
||||
}
|
||||
|
||||
public LatestAppVersionInfoDTO setForced(boolean forced) {
|
||||
this.forced = forced;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -83,6 +83,8 @@ public class DBSettingsModel {
|
||||
private boolean suggestDataScad = false;
|
||||
private boolean flagPositionChangeRequest = false;
|
||||
private String docInterniRequestNumDoc;
|
||||
private boolean flagEnableArtCreation;
|
||||
private List<String> allowedCodMgrpForArtCreation;
|
||||
|
||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||
return flagSpedizioneEnableFakeGiacenza;
|
||||
@ -705,6 +707,24 @@ public class DBSettingsModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getAllowedCodMgrpForArtCreation() {
|
||||
return allowedCodMgrpForArtCreation;
|
||||
}
|
||||
|
||||
public DBSettingsModel setAllowedCodMgrpForArtCreation(List<String> allowedCodMgrpForArtCreation) {
|
||||
this.allowedCodMgrpForArtCreation = allowedCodMgrpForArtCreation;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagEnableArtCreation() {
|
||||
return flagEnableArtCreation;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagEnableArtCreation(boolean flagEnableArtCreation) {
|
||||
this.flagEnableArtCreation = flagEnableArtCreation;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagPositionChangeRequest() {
|
||||
return flagPositionChangeRequest;
|
||||
}
|
||||
|
||||
@ -569,6 +569,21 @@ public class SettingsManager {
|
||||
.setKeySection("REQUEST_NUM_DOC")
|
||||
.setSetter(dbSettingsModelIstance::setDocInterniRequestNumDoc));
|
||||
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("SETUP")
|
||||
.setKeySection("ENABLE_ART_CREATION")
|
||||
.setSetter(dbSettingsModelIstance::setFlagEnableArtCreation));
|
||||
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("SETUP")
|
||||
.setKeySection("ENABLE_ART_CREATION_GRP_MERC")
|
||||
.setSetter(data -> {
|
||||
if (data != null)
|
||||
dbSettingsModelIstance.setAllowedCodMgrpForArtCreation(Arrays.asList(data.split("\\|")));
|
||||
}));
|
||||
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
|
||||
|
||||
|
||||
@ -15,16 +15,19 @@ import java.io.File;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.FileDownloader;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
|
||||
@Singleton
|
||||
public class UpdatesManager {
|
||||
|
||||
|
||||
private AppCompatActivity mContext;
|
||||
|
||||
public void init(AppCompatActivity activityContext) {
|
||||
public void init(AppCompatActivity activityContext, SystemRESTConsumer systemRESTConsumer) {
|
||||
this.mContext = activityContext;
|
||||
|
||||
final String baseEndpoint = SettingsManager.i().getServer().getProtocol() + "://" + SettingsManager.i().getServer().getHost() +
|
||||
@ -34,15 +37,22 @@ public class UpdatesManager {
|
||||
final String currentDownloadUrl = baseEndpoint + "/ems-api/wms/android-release.apk";
|
||||
|
||||
|
||||
AppUpdater appUpdater = new AppUpdater(mContext)
|
||||
.setDisplay(Display.DIALOG)
|
||||
.setUpdateFrom(UpdateFrom.JSON)
|
||||
.setUpdateJSON(currentVersionUrl)
|
||||
.setButtonDoNotShowAgain(null)
|
||||
.setButtonUpdateClickListener((dialog, which) -> {
|
||||
installAPK(currentDownloadUrl);
|
||||
});
|
||||
appUpdater.start();
|
||||
systemRESTConsumer.retrieveUpdatesInfo(latestData -> {
|
||||
|
||||
AppUpdater appUpdater = new AppUpdater(mContext)
|
||||
.setDisplay(Display.DIALOG)
|
||||
.setUpdateFrom(UpdateFrom.JSON)
|
||||
.setUpdateJSON(currentVersionUrl)
|
||||
.setButtonDoNotShowAgain(null)
|
||||
.setButtonUpdateClickListener((dialog, which) -> {
|
||||
installAPK(currentDownloadUrl);
|
||||
});
|
||||
|
||||
if(latestData.isForced())
|
||||
appUpdater.setButtonDismiss(null);
|
||||
|
||||
appUpdater.start();
|
||||
}, ex -> UtilityExceptions.defaultException(mContext, ex));
|
||||
}
|
||||
|
||||
|
||||
@ -67,6 +77,11 @@ public class UpdatesManager {
|
||||
mContext.runOnUiThread(() -> {
|
||||
progressDialogBuilder.dismiss();
|
||||
|
||||
if (!destination.exists()) {
|
||||
UtilityExceptions.defaultException(mContext, new Exception("Errore durante il download dell'aggiornamento"));
|
||||
return;
|
||||
}
|
||||
|
||||
Uri fileLoc;
|
||||
Intent intent;
|
||||
|
||||
@ -93,7 +108,8 @@ public class UpdatesManager {
|
||||
try {
|
||||
fileDownloader.download();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
progressDialogBuilder.dismissAllowingStateLoss();
|
||||
UtilityExceptions.defaultException(mContext, e);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
@ -61,6 +61,8 @@ public class FileDownloader {
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
if(downloadFile != null && downloadFile.exists())
|
||||
downloadFile.delete();
|
||||
throw e;
|
||||
|
||||
} finally {
|
||||
|
||||
@ -1,6 +1,12 @@
|
||||
package it.integry.integrywmsnative.core.utility;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.MultiFormatWriter;
|
||||
import com.google.zxing.common.BitMatrix;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
@ -109,12 +115,12 @@ public class UtilityBarcode {
|
||||
}
|
||||
|
||||
|
||||
public static String convertITF14toEAN13(String barcodeITF14) {
|
||||
public static String convertITF14toEAN13(String barcodeITF14) throws Exception {
|
||||
String barcodeEAN13 = null;
|
||||
|
||||
if (barcodeITF14.length() == 14) {
|
||||
barcodeEAN13 = barcodeITF14.substring(1, barcodeITF14.length() - 1).trim();
|
||||
barcodeEAN13 += getEAN13CheckDigit(barcodeEAN13);
|
||||
barcodeEAN13 += calculateEAN13CheckDigit(barcodeEAN13);
|
||||
}
|
||||
|
||||
return barcodeEAN13;
|
||||
@ -131,18 +137,69 @@ public class UtilityBarcode {
|
||||
}
|
||||
|
||||
|
||||
private static String getEAN13CheckDigit(String ean) {
|
||||
|
||||
if (ean.length() != 12) {
|
||||
UtilityLogger.error(new Exception("Please provide an input string of 12 chars. Current lenght: " + ean.length()));
|
||||
return null;
|
||||
public static boolean isValidEan13(String ean13) {
|
||||
// Verifica che il codice sia lungo esattamente 13 cifre
|
||||
if (ean13.length() != 13 || !ean13.matches("\\d+")) {
|
||||
return false;
|
||||
}
|
||||
long tot = 0;
|
||||
|
||||
for (int i = 0; i < 12; i++) {
|
||||
tot = tot + (Long.parseLong(String.valueOf(ean.charAt(i))) * (i % 2 == 0 ? 1 : 3));
|
||||
}
|
||||
return tot % 10 == 0 ? "0" : "" + (10 - (tot % 10));
|
||||
// Calcola il check digit dalle prime 12 cifre
|
||||
int calculatedCheckDigit = calculateEAN13CheckDigit(ean13.substring(0, 12));
|
||||
int providedCheckDigit = Character.getNumericValue(ean13.charAt(12));
|
||||
|
||||
// Confronta il check digit calcolato con quello fornito
|
||||
return calculatedCheckDigit == providedCheckDigit;
|
||||
}
|
||||
|
||||
private static int calculateEAN13CheckDigit(String ean12) {
|
||||
int sum = 0;
|
||||
for (int i = 0; i < ean12.length(); i++) {
|
||||
int digit = Character.getNumericValue(ean12.charAt(i));
|
||||
sum += (i % 2 == 0) ? digit : digit * 3;
|
||||
}
|
||||
return (10 - (sum % 10)) % 10;
|
||||
}
|
||||
|
||||
public static Bitmap generateBarcodeImage(String barcode, int width, int height) throws Exception {
|
||||
if(barcode == null) return null;
|
||||
|
||||
BarcodeType barcodeType;
|
||||
|
||||
if(barcode.length() == 8)
|
||||
barcodeType = BarcodeType.EAN8;
|
||||
else if(barcode.length() == 13)
|
||||
barcodeType = BarcodeType.EAN13;
|
||||
else if(barcode.length() == 14)
|
||||
barcodeType = BarcodeType.INTERLEAVED_2OF5;
|
||||
else throw new Exception("Barcode " + barcode + " non valido");
|
||||
|
||||
return generateBarcodeImage(barcode, barcodeType, width, height);
|
||||
}
|
||||
|
||||
public static Bitmap generateBarcodeImage(String barcode, BarcodeType type, int width, int height) throws Exception {
|
||||
// Genera la matrice del codice a barre
|
||||
MultiFormatWriter writer = new MultiFormatWriter();
|
||||
|
||||
BarcodeFormat barcodeFormat = switch (type) {
|
||||
case EAN8 -> BarcodeFormat.EAN_8;
|
||||
case EAN13 -> BarcodeFormat.EAN_13;
|
||||
case INTERLEAVED_2OF5 -> BarcodeFormat.ITF;
|
||||
case CODE128 -> BarcodeFormat.CODE_128;
|
||||
default -> throw new Exception("Barcode " + barcode + " non valido (tipo: " + type + ")");
|
||||
};
|
||||
|
||||
BitMatrix bitMatrix = writer.encode(barcode, barcodeFormat, width, height);
|
||||
|
||||
// Crea un bitmap a partire dalla matrice
|
||||
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
|
||||
for (int x = 0; x < width; x++) {
|
||||
for (int y = 0; y < height; y++) {
|
||||
bitmap.setPixel(x, y, bitMatrix.get(x, y) ? Color.BLACK : Color.WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,9 +1,16 @@
|
||||
package it.integry.integrywmsnative.core.utility;
|
||||
|
||||
import androidx.databinding.Observable;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableField;
|
||||
import androidx.databinding.ObservableList;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.OnGeneralChangedCallback;
|
||||
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsWithReturn;
|
||||
|
||||
public class UtilityObservable {
|
||||
|
||||
@ -16,4 +23,36 @@ public class UtilityObservable {
|
||||
});
|
||||
}
|
||||
|
||||
public static <T, R> ObservableField<R> convertObservable(ObservableField<T> observableField, RunnableArgsWithReturn<T, R> dataConverter) {
|
||||
ObservableField<R> returnObservable = new ObservableField<>();
|
||||
|
||||
observableField.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||
@Override
|
||||
public void run() {
|
||||
returnObservable.set(dataConverter.run(observableField.get()));
|
||||
}
|
||||
});
|
||||
|
||||
returnObservable.set(dataConverter.run(observableField.get()));
|
||||
|
||||
return returnObservable;
|
||||
}
|
||||
|
||||
public static <T, R> ObservableArrayList<R> convertObservableArrayList(ObservableArrayList<T> observableField, RunnableArgsWithReturn<T, R> dataConverter) {
|
||||
ObservableArrayList<R> returnObservable = new ObservableArrayList<>();
|
||||
|
||||
observableField.addOnListChangedCallback(new OnListGeneralChangedCallback<T>() {
|
||||
@Override
|
||||
public void onChanged(ObservableList<T> sender) {
|
||||
|
||||
returnObservable.clear();
|
||||
returnObservable.addAll(sender.stream().map(dataConverter::run).collect(Collectors.toUnmodifiableList()));
|
||||
}
|
||||
});
|
||||
|
||||
returnObservable.addAll(observableField.stream().map(dataConverter::run).collect(Collectors.toUnmodifiableList()));
|
||||
|
||||
return returnObservable;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -41,6 +41,7 @@ import it.integry.integrywmsnative.core.interfaces.ISearchableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ISelectAllFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.menu.MenuService;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||
import it.integry.integrywmsnative.core.update.UpdatesManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityContext;
|
||||
@ -69,6 +70,9 @@ public class MainActivity extends BaseActivity
|
||||
@Inject
|
||||
UpdatesManager updatesManager;
|
||||
|
||||
@Inject
|
||||
SystemRESTConsumer systemRESTConsumer;
|
||||
|
||||
@Inject
|
||||
DialogProgressView mDialogProgressView;
|
||||
|
||||
@ -85,7 +89,7 @@ public class MainActivity extends BaseActivity
|
||||
mBinding = DataBindingUtil.inflate(LayoutInflater.from(this), R.layout.activity_main, null, false);
|
||||
setContentView(mBinding.getRoot());
|
||||
|
||||
updatesManager.init(this);
|
||||
updatesManager.init(this, systemRESTConsumer);
|
||||
UtilityContext.initMainActivity(this);
|
||||
|
||||
setSupportActionBar(mBinding.appBarMain.toolbar);
|
||||
|
||||
@ -195,6 +195,9 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
mtbColtScarico.getMtbColr().add(mtbColrScarico);
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
BigDecimal qtaColToSave;
|
||||
BigDecimal numCnfToSave;
|
||||
if (SettingsManager.iDB().isFlagForceAllToColli() || (item.getMtbAart() != null && !item.getMtbAart().isFlagQtaCnfFissaBoolean())) {
|
||||
|
||||
@ -97,7 +97,7 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity implements PVOrdi
|
||||
}
|
||||
String testataOrdString = String.format(this.getString(R.string.ord_acq_testata), ordine.getOrdineId(), UtilityDate.formatDate(ordine.getDataIns(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||
mBinding.orderIdentifier.setText(Html.fromHtml(testataOrdString));
|
||||
FabMenuCustomAnimations.changeIconOnFocus(mBinding.closeActivityFab, R.drawable.ic_check_white_24dp, R.drawable.ic_close_24dp);
|
||||
FabMenuCustomAnimations.changeIconOnFocus(mBinding.closeActivityFab, R.drawable.ic_round_check_24, R.drawable.ic_close_24dp);
|
||||
|
||||
|
||||
initBarcodeReader();
|
||||
|
||||
@ -15,8 +15,6 @@ import android.view.inputmethod.EditorInfo;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableField;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
@ -63,6 +61,7 @@ import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLUView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArtsView;
|
||||
import it.integry.integrywmsnative.view.dialogs.create_new_art.DialogCreateNewArtView;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView;
|
||||
@ -142,7 +141,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
setRetainInstance(true);
|
||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_main_rettifica_giacenze, container, false);
|
||||
mBinding = FragmentMainRettificaGiacenzeBinding.inflate(inflater, container, false);
|
||||
|
||||
|
||||
mBinding.setLifecycleOwner(this);
|
||||
@ -205,15 +204,18 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
private void init() {
|
||||
mBinding.autoCompleteFornitori.setOnFocusChangeListener((v, hasFocus) -> {
|
||||
setUIToForn();
|
||||
if (hasFocus)
|
||||
setUIToForn();
|
||||
});
|
||||
|
||||
mBinding.inputCodArtDescrForn.setOnFocusChangeListener((v, hasFocus) -> {
|
||||
setUIToForn();
|
||||
if (hasFocus)
|
||||
setUIToForn();
|
||||
});
|
||||
|
||||
mBinding.inputCodArtDescrInt.setOnFocusChangeListener((v, hasFocus) -> {
|
||||
setUIToIntArt();
|
||||
if (hasFocus)
|
||||
setUIToIntArt();
|
||||
});
|
||||
|
||||
mViewModel.init(
|
||||
@ -238,23 +240,30 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
public void setUIToForn() {
|
||||
mBinding.rettificaGiacenzeFornCheckBox.setChecked(true);
|
||||
mBinding.rettificaGiacenzeFornLayout.setBackground(ResourcesCompat.getDrawable(getActivity().getResources(), R.drawable.circular_background_left, null));
|
||||
mBinding.rettificaGiacenzeFornLayout.setBackgroundTintList(ColorStateList.valueOf(getActivity().getResources().getColor(R.color.alpha_blue_500)));
|
||||
|
||||
mBinding.rettificaGiacenzeArtIntCheckBox.setChecked(false);
|
||||
mBinding.rettificaGiacenzeArtIntLayout.setBackground(null);
|
||||
mBinding.rettificaGiacenzeArtIntLayout.setBackgroundTintList(null);
|
||||
|
||||
mBinding.inputCodArtDescrInt.clearFocus();
|
||||
|
||||
if (!mBinding.inputCodArtDescrForn.hasFocus() && !mBinding.autoCompleteFornitori.hasFocus()) {
|
||||
mBinding.inputCodArtDescrForn.clearFocus();
|
||||
mBinding.autoCompleteFornitori.requestFocusFromTouch();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setUIToIntArt() {
|
||||
mBinding.rettificaGiacenzeArtIntCheckBox.setChecked(true);
|
||||
mBinding.rettificaGiacenzeArtIntLayout.setBackground(ResourcesCompat.getDrawable(getActivity().getResources(), R.drawable.circular_background_left, null));
|
||||
mBinding.rettificaGiacenzeArtIntLayout.setBackgroundTintList(ColorStateList.valueOf(getActivity().getResources().getColor(R.color.alpha_blue_500)));
|
||||
|
||||
mBinding.rettificaGiacenzeFornCheckBox.setChecked(false);
|
||||
mBinding.rettificaGiacenzeFornLayout.setBackground(null);
|
||||
mBinding.rettificaGiacenzeFornLayout.setBackgroundTintList(null);
|
||||
|
||||
mBinding.inputCodArtDescrForn.clearFocus();
|
||||
mBinding.autoCompleteFornitori.clearFocus();
|
||||
mBinding.inputCodArtDescrInt.requestFocusFromTouch();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -295,13 +304,22 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
return true;
|
||||
}
|
||||
|
||||
mViewModel.searchArtInt(mBinding.inputCodArtDescrInt.getText().toString(), null);
|
||||
mViewModel.searchArtInt(mBinding.inputCodArtDescrInt.getText().toString(), null, null);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestNewArtCreation(String description, BarcodeScanDTO barcode) {
|
||||
DialogCreateNewArtView.newInstance(description, barcode, currentMtbColtObs.get().getPosizione(),
|
||||
createdCodMart -> {
|
||||
mViewModel.searchArtInt(createdCodMart, null, null);
|
||||
})
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed) {
|
||||
new DialogChooseArtFromListaArtsView(true, artList, onArtChoosed)
|
||||
@ -418,10 +436,11 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||
})
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}, () -> {});
|
||||
}, () -> {
|
||||
});
|
||||
}
|
||||
|
||||
private void checkIfItemIsActive(String flagStato, String codMart, Runnable onContinue, Runnable onNegativeClick){
|
||||
private void checkIfItemIsActive(String flagStato, String codMart, Runnable onContinue, Runnable onNegativeClick) {
|
||||
if (flagStato.equalsIgnoreCase("I")) {
|
||||
DialogSimpleMessageView.makeWarningDialog(
|
||||
new SpannableString(Html.fromHtml(String.format(UtilityResources.getString(R.string.item_not_enabled), codMart))),
|
||||
|
||||
@ -111,7 +111,10 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||
if(UtilityBarcode.isEtichettaPosizione(barcodeScanDTO)) {
|
||||
//Not implemented now
|
||||
onComplete.run();
|
||||
} else if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
||||
this.executeEtichettaEan128(barcodeScanDTO, onComplete);
|
||||
|
||||
@ -120,7 +123,7 @@ public class RettificaGiacenzeViewModel {
|
||||
this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
||||
|
||||
} else if (UtilityBarcode.isEtichettaArt(barcodeScanDTO)) {
|
||||
this.searchArtInt(barcodeScanDTO.getStringValue(), onComplete);
|
||||
this.searchArtInt(null, barcodeScanDTO, onComplete);
|
||||
|
||||
} else {
|
||||
onComplete.run();
|
||||
@ -145,9 +148,9 @@ public class RettificaGiacenzeViewModel {
|
||||
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||
|
||||
PickDataDTO pickDataDTO = PickDataDTO.fromEan128(ean128Model);
|
||||
this.loadArticolo(barcodeProd, pickDataDTO, onComplete);
|
||||
this.loadArticolo(barcodeProd, pickDataDTO, barcodeScanDTO, onComplete);
|
||||
} else if (!UtilityString.isNullOrEmpty(codMart)) {
|
||||
this.searchArtInt(codMart, onComplete);
|
||||
this.searchArtInt(codMart, barcodeScanDTO, onComplete);
|
||||
} else {
|
||||
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||
onComplete.run();
|
||||
@ -158,18 +161,18 @@ public class RettificaGiacenzeViewModel {
|
||||
private void executeEtichettaEanPeso(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
try {
|
||||
Ean13PesoModel ean13PesoModel = Ean13PesoModel.fromBarcode(barcodeScanDTO.getStringValue());
|
||||
this.loadArticolo(ean13PesoModel.getPrecode(), PickDataDTO.fromEan128(ean13PesoModel.toEan128()), onComplete);
|
||||
this.loadArticolo(ean13PesoModel.getPrecode(), PickDataDTO.fromEan128(ean13PesoModel.toEan128()), barcodeScanDTO, onComplete);
|
||||
} catch (Exception ex) {
|
||||
this.sendError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {
|
||||
private void loadArticolo(String barcodeProd, PickDataDTO pickData, BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
this.mArticoloRESTConsumer.searchByBarcode(barcodeProd, mtbAartList -> {
|
||||
if (onComplete != null) onComplete.run();
|
||||
|
||||
if (mtbAartList != null && !mtbAartList.isEmpty()) {
|
||||
this.dispatchArts(mtbAartList, pickData);
|
||||
this.dispatchArts(mtbAartList, pickData, null, barcodeScanDTO);
|
||||
} else {
|
||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||
}
|
||||
@ -190,25 +193,28 @@ public class RettificaGiacenzeViewModel {
|
||||
.map(x -> (MtbAart) x.getMtbAart())
|
||||
.toList();
|
||||
|
||||
dispatchArts(mtbAarts, null);
|
||||
dispatchArts(mtbAarts, null, queryText, null);
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public void searchArtInt(String queryText, Runnable onComplete) {
|
||||
public void searchArtInt(String queryText, BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
mRettificaGiacenzeRESTConsumer.searchArtInt(queryText, listaArts -> {
|
||||
mRettificaGiacenzeRESTConsumer.searchArtInt(UtilityString.isNull(queryText, barcodeScanDTO.getStringValue()), listaArts -> {
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
dispatchArts(listaArts, null);
|
||||
dispatchArts(listaArts, null, queryText, barcodeScanDTO);
|
||||
|
||||
if (onComplete != null) onComplete.run();
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void dispatchArts(List<MtbAart> artsList, PickDataDTO pickData) {
|
||||
if (artsList == null || artsList.size() == 0) {
|
||||
this.sendError(new NoArtsFoundException());
|
||||
private void dispatchArts(List<MtbAart> artsList, PickDataDTO pickData, String description, BarcodeScanDTO barcodeProd) {
|
||||
if (artsList == null || artsList.isEmpty()) {
|
||||
if(SettingsManager.iDB().isFlagEnableArtCreation())
|
||||
this.sendRequestNewArtCreation(description, barcodeProd);
|
||||
else
|
||||
this.sendError(new NoArtsFoundException());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -556,8 +562,6 @@ public class RettificaGiacenzeViewModel {
|
||||
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, LocalDate dataScad, boolean shouldCloseLU) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
// if(!mIsCreatedLU && mCurrentMtbColt.isDocumentPresent()) {
|
||||
|
||||
this.mColliMagazzinoRESTConsumer.creaRettificaCollo(
|
||||
mtbColrToUpdate,
|
||||
numCnf,
|
||||
@ -579,47 +583,6 @@ public class RettificaGiacenzeViewModel {
|
||||
},
|
||||
this::sendError
|
||||
);
|
||||
|
||||
// } else {
|
||||
//
|
||||
// MtbColt mtbColt = new MtbColt()
|
||||
// .setNumCollo(mtbColrToUpdate.getNumCollo())
|
||||
// .setDataCollo(mtbColrToUpdate.getDataColloS())
|
||||
// .setSerCollo(mtbColrToUpdate.getSerCollo())
|
||||
// .setGestione(mtbColrToUpdate.getGestione())
|
||||
// .setMtbColr(new ObservableArrayList<>());
|
||||
// mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
//
|
||||
// final MtbColr mtbColr = (MtbColr) mtbColrToUpdate.clone();
|
||||
// mtbColr
|
||||
// .setNumCnf(numCnf.subtract(mtbColr.getNumCnf()))
|
||||
// .setQtaCnf(qtaCnf)
|
||||
// .setQtaCol(qtaTot.subtract(mtbColr.getQtaCol()))
|
||||
// .setPartitaMag(partitaMag)
|
||||
// .setDataScadPartita(dataScad)
|
||||
// .setUtente(SettingsManager.i().getUser().getFullname())
|
||||
// .setCausale(MtbColr.Causale.RETTIFICA)
|
||||
// .setDatetimeRow(UtilityDate.getDateInstance())
|
||||
// .setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
//
|
||||
// mtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
||||
//
|
||||
// mtbColr.setNumCnf(numCnf)
|
||||
// .setQtaCnf(qtaCnf)
|
||||
// .setQtaCol(qtaTot);
|
||||
//
|
||||
// this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
||||
// this.mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// this.mAnyEditDone = true;
|
||||
//
|
||||
// this.sendOnRowSaved();
|
||||
// this.sendOnLoadingEnded();
|
||||
//
|
||||
// }, this::sendError);
|
||||
// }
|
||||
}
|
||||
|
||||
public void deleteRow(MtbColr mtbColrToDelete) {
|
||||
@ -627,7 +590,6 @@ public class RettificaGiacenzeViewModel {
|
||||
if (shouldDelete) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
// if(!mIsCreatedLU && mCurrentMtbColt.isDocumentPresent()) {
|
||||
this.mColliMagazzinoRESTConsumer.creaRettificaCollo(
|
||||
mtbColrToDelete,
|
||||
BigDecimal.ZERO,
|
||||
@ -639,37 +601,6 @@ public class RettificaGiacenzeViewModel {
|
||||
},
|
||||
this::sendError
|
||||
);
|
||||
// } else {
|
||||
// MtbColt mtbColt = new MtbColt()
|
||||
// .setNumCollo(mtbColrToDelete.getNumCollo())
|
||||
// .setDataCollo(mtbColrToDelete.getDataColloS())
|
||||
// .setSerCollo(mtbColrToDelete.getSerCollo())
|
||||
// .setGestione(mtbColrToDelete.getGestione())
|
||||
// .setMtbColr(new ObservableArrayList<>());
|
||||
// mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
//
|
||||
// MtbColr mtbColr = (MtbColr) mtbColrToDelete.clone();
|
||||
// mtbColr
|
||||
// .setNumCnf(mtbColr.getNumCnf().multiply(new BigDecimal(-1)))
|
||||
// .setQtaCnf(mtbColr.getQtaCnf())
|
||||
// .setQtaCol(mtbColr.getQtaCol().multiply(new BigDecimal(-1)))
|
||||
// .setPartitaMag(mtbColr.getPartitaMag())
|
||||
// .setDataScadPartita(mtbColr.getDataScadPartitaD())
|
||||
// .setUtente(SettingsManager.i().getUser().getFullname())
|
||||
// .setCausale(MtbColr.Causale.RETTIFICA)
|
||||
// .setDatetimeRow(UtilityDate.getDateInstance())
|
||||
// .setOperation(CommonModelConsts.OPERATION.INSERT);
|
||||
//
|
||||
// mtbColt.getMtbColr().add(mtbColr);
|
||||
//
|
||||
// this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
||||
// this.mCurrentMtbColt.getMtbColr().remove(mtbColrToDelete);
|
||||
//
|
||||
// this.sendOnRowSaved();
|
||||
// this.sendOnLoadingEnded();
|
||||
//
|
||||
// }, this::sendError);
|
||||
// }
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -686,6 +617,10 @@ public class RettificaGiacenzeViewModel {
|
||||
if (this.mListener != null) mListener.onFornitoriLoaded(fornitoriList);
|
||||
}
|
||||
|
||||
private void sendRequestNewArtCreation(String description, BarcodeScanDTO barcode) {
|
||||
if(this.mListener != null) mListener.onRequestNewArtCreation(description, barcode);
|
||||
}
|
||||
|
||||
|
||||
private void sendOnArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed) {
|
||||
if (this.mListener != null) mListener.onArtListLoaded(artList, onArtChoosed);
|
||||
@ -777,6 +712,8 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
void onFornitoriLoaded(ArrayList<FornitoreDTO> fornitoriList);
|
||||
|
||||
void onRequestNewArtCreation(String description, BarcodeScanDTO barcode);
|
||||
|
||||
void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed);
|
||||
|
||||
void onLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgss<MtbColt, Boolean> onComplete);
|
||||
|
||||
@ -104,7 +104,8 @@ public class DialogUltimeConsegneFiltroAvanzato {
|
||||
|
||||
private void initView(DialogUltimeConsegneFiltroAvanzatoBinding bindings, DialogUltimeConsegneFiltroAvanzatoViewModel viewModel) {
|
||||
|
||||
arrayAdapterRagSoc = new SimpleAutoCompleteDropdownAdapter(mContext, R.layout.dialog_vendita_filtro_avanzato__single_item, getAvailableRagSocs(false));
|
||||
arrayAdapterRagSoc = new SimpleAutoCompleteDropdownAdapter<>(mContext, R.layout.dialog_vendita_filtro_avanzato__single_item, getAvailableRagSocs(false));
|
||||
arrayAdapterRagSoc.addAll();
|
||||
bindings.filledExposedDropdownRagSoc.setAdapter(arrayAdapterRagSoc);
|
||||
|
||||
bindings.filledExposedDropdownDataDoc.setOnClickListener(view -> {
|
||||
|
||||
@ -1,105 +1,116 @@
|
||||
package it.integry.integrywmsnative.ui.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Filter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class SimpleAutoCompleteDropdownAdapter extends ArrayAdapter {
|
||||
public class SimpleAutoCompleteDropdownAdapter<T> extends ArrayAdapter<T> {
|
||||
|
||||
private List<Object> mObjects;
|
||||
private final ObservableArrayList<T> objects;
|
||||
private final LayoutInflater mInflater;
|
||||
private int mDropDownResource;
|
||||
|
||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource) {
|
||||
super(context, resource);
|
||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, @NonNull List<T> objects) {
|
||||
this(context, resource, new ObservableArrayList<>());
|
||||
this.objects.addAll(objects);
|
||||
}
|
||||
|
||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, int textViewResourceId) {
|
||||
super(context, resource, textViewResourceId);
|
||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, @NonNull ObservableArrayList<T> objects) {
|
||||
super(context, resource, new ArrayList<>(objects));
|
||||
mInflater = LayoutInflater.from(context);
|
||||
mDropDownResource = resource;
|
||||
this.objects = objects;
|
||||
|
||||
// Listener per aggiornare l'adapter quando la lista cambia
|
||||
this.objects.addOnListChangedCallback(new ObservableList.OnListChangedCallback<ObservableList<T>>() {
|
||||
@Override
|
||||
public void onChanged(ObservableList<T> sender) {
|
||||
updateAdapter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeChanged(ObservableList<T> sender, int positionStart, int itemCount) {
|
||||
updateAdapter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeInserted(ObservableList<T> sender, int positionStart, int itemCount) {
|
||||
updateAdapter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeMoved(ObservableList<T> sender, int fromPosition, int toPosition, int itemCount) {
|
||||
updateAdapter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemRangeRemoved(ObservableList<T> sender, int positionStart, int itemCount) {
|
||||
updateAdapter();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, @NonNull Object[] objects) {
|
||||
super(context, resource, objects);
|
||||
mObjects = Arrays.asList(objects);
|
||||
private void updateAdapter() {
|
||||
clear();
|
||||
addAll(objects);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, int textViewResourceId, @NonNull Object[] objects) {
|
||||
super(context, resource, textViewResourceId, objects);
|
||||
mObjects = Arrays.asList(objects);
|
||||
}
|
||||
|
||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, @NonNull List objects) {
|
||||
super(context, resource, objects);
|
||||
mObjects = objects;
|
||||
}
|
||||
|
||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, int textViewResourceId, @NonNull List objects) {
|
||||
super(context, resource, textViewResourceId, objects);
|
||||
mObjects = objects;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Filter getFilter() {
|
||||
return new StringFilter(mObjects);
|
||||
return new StringFilter(objects);
|
||||
}
|
||||
|
||||
private class StringFilter extends Filter {
|
||||
|
||||
|
||||
|
||||
private class StringFilter<T> extends Filter {
|
||||
|
||||
private ArrayList<T> sourceObjects;
|
||||
private final List<T> sourceObjects;
|
||||
|
||||
public StringFilter(List<T> objects) {
|
||||
if(objects == null) return;
|
||||
sourceObjects = new ArrayList<T>();
|
||||
synchronized (this) {
|
||||
sourceObjects.addAll(objects);
|
||||
}
|
||||
this.sourceObjects = objects;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FilterResults performFiltering(CharSequence chars) {
|
||||
String filterSeq = chars.toString().toLowerCase();
|
||||
String filterSeq = chars == null ? "" : chars.toString().toLowerCase();
|
||||
FilterResults result = new FilterResults();
|
||||
if (filterSeq != null && filterSeq.length() > 0) {
|
||||
ArrayList<T> filter = new ArrayList<T>();
|
||||
|
||||
for (T object : sourceObjects) {
|
||||
// the filtering itself:
|
||||
if (object.toString().toLowerCase().contains(filterSeq))
|
||||
filter.add(object);
|
||||
}
|
||||
result.count = filter.size();
|
||||
result.values = filter;
|
||||
if (filterSeq.isEmpty()) {
|
||||
result.values = new ArrayList<>(sourceObjects);
|
||||
result.count = sourceObjects.size();
|
||||
} else {
|
||||
// add all objects
|
||||
synchronized (this) {
|
||||
result.values = sourceObjects;
|
||||
result.count = sourceObjects.size();
|
||||
ArrayList<T> filtered = new ArrayList<>();
|
||||
for (T object : sourceObjects) {
|
||||
String stringObject = object.toString();
|
||||
|
||||
if (stringObject.toLowerCase().contains(filterSeq)) {
|
||||
filtered.add(object);
|
||||
}
|
||||
}
|
||||
result.values = filtered;
|
||||
result.count = filtered.size();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void publishResults(CharSequence constraint,
|
||||
FilterResults results) {
|
||||
// NOTE: this function is *always* called from the UI thread.
|
||||
if(constraint != null && constraint.length() > 2) {
|
||||
ArrayList<T> filtered = (ArrayList<T>) results.values;
|
||||
notifyDataSetChanged();
|
||||
clear();
|
||||
for (int i = 0, l = filtered.size(); i < l; i++)
|
||||
add(filtered.get(i));
|
||||
notifyDataSetInvalidated();
|
||||
protected void publishResults(CharSequence constraint, FilterResults results) {
|
||||
List<T> filtered = (List<T>) results.values;
|
||||
if (filtered != null) {
|
||||
synchronized (this) {
|
||||
clear();
|
||||
addAll(filtered);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.create_new_art;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface DialogCreateNewArtComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
DialogCreateNewArtComponent create();
|
||||
}
|
||||
|
||||
void inject(DialogCreateNewArtView dialogCreateNewArtView);
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.create_new_art;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
|
||||
@Module(subcomponents = DialogCreateNewArtComponent.class)
|
||||
public class DialogCreateNewArtModule {
|
||||
|
||||
@Provides
|
||||
DialogCreateNewArtViewModel providesDialogCreateNewArtViewModel(ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
return new DialogCreateNewArtViewModel(articoloRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,302 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.create_new_art;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.text.InputFilter;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.ObservableField;
|
||||
import androidx.databinding.ObservableList;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
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.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.OnGeneralChangedCallback;
|
||||
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||
import it.integry.integrywmsnative.core.model.MtbSfam;
|
||||
import it.integry.integrywmsnative.core.model.MtbSgrp;
|
||||
import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityObservable;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.DialogCreateNewArtBinding;
|
||||
import it.integry.integrywmsnative.ui.adapter.SimpleAutoCompleteDropdownAdapter;
|
||||
|
||||
public class DialogCreateNewArtView extends BaseDialogFragment implements DialogCreateNewArtViewModel.Listener {
|
||||
|
||||
public final ObservableField<String> selectedUntMisText = new ObservableField<>();
|
||||
public final ObservableField<String> selectedMtbGrupText = new ObservableField<>();
|
||||
public final ObservableField<String> selectedMtbSubGrupText = new ObservableField<>();
|
||||
public final ObservableField<String> selectedMtbSubSubGrupText = new ObservableField<>();
|
||||
public final ObservableField<String> selectedPosizioneText = new ObservableField<>();
|
||||
public final BindableBoolean editingBarcode = new BindableBoolean(false);
|
||||
|
||||
@Inject
|
||||
DialogCreateNewArtViewModel mViewModel;
|
||||
|
||||
private DialogCreateNewArtBinding mBindings;
|
||||
private Context mContext;
|
||||
|
||||
public final BarcodeScanDTO mScannedBarcode;
|
||||
private int mBarcodeScannerIstanceID;
|
||||
|
||||
private final String initialPosizione;
|
||||
private final RunnableArgs<String> onArticleCreated;
|
||||
|
||||
//Pass here all external parameters
|
||||
public static DialogCreateNewArtView newInstance() {
|
||||
return newInstance(null, null, null);
|
||||
}
|
||||
|
||||
//Pass here all external parameters
|
||||
public static DialogCreateNewArtView newInstance(String description, BarcodeScanDTO barcode, String posizione) {
|
||||
return new DialogCreateNewArtView(description, barcode, posizione, null);
|
||||
}
|
||||
|
||||
public static DialogCreateNewArtView newInstance(String description, BarcodeScanDTO barcode, String posizione, RunnableArgs<String> onArticleCreated) {
|
||||
return new DialogCreateNewArtView(description, barcode, posizione, onArticleCreated);
|
||||
}
|
||||
|
||||
private DialogCreateNewArtView(String description, BarcodeScanDTO barcode, String posizione, RunnableArgs<String> onArticleCreated) {
|
||||
super();
|
||||
this.mScannedBarcode = barcode;
|
||||
this.onArticleCreated = onArticleCreated;
|
||||
this.initialPosizione = posizione;
|
||||
|
||||
MainApplication.appComponent
|
||||
.dialogCreateNewArtComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
mViewModel.setListener(this);
|
||||
if (description != null) mViewModel.descrizione.set(description.toUpperCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTheme() {
|
||||
return R.style.AppTheme_NewMaterial_Dialog_FullscreenDialog;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
this.mContext = requireContext();
|
||||
|
||||
mBindings = DialogCreateNewArtBinding.inflate(LayoutInflater.from(this.mContext), null, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
mBindings.setViewmodel(mViewModel);
|
||||
mBindings.setView(this);
|
||||
mBindings.toolbar.setTitle("Nuovo articolo");
|
||||
|
||||
this.initBarcodeReader();
|
||||
this.initObservable();
|
||||
this.initBarcodes();
|
||||
|
||||
mBindings.inputDescrizioneText.setFilters(new InputFilter.AllCaps[]{
|
||||
new InputFilter.AllCaps()
|
||||
});
|
||||
|
||||
SimpleAutoCompleteDropdownAdapter<String> arrayAdapterPosizioni = new SimpleAutoCompleteDropdownAdapter<>(mContext,
|
||||
android.R.layout.simple_dropdown_item_1line,
|
||||
UtilityObservable.convertObservableArrayList(mViewModel.retrieveAvailablePosizioni(), MtbDepoPosizione::getPosizione));
|
||||
mBindings.inputDefaultPosText.setAdapter(arrayAdapterPosizioni);
|
||||
mViewModel.retrieveAvailablePosizioni().addOnListChangedCallback(new OnListGeneralChangedCallback<MtbDepoPosizione>() {
|
||||
@Override
|
||||
public void onChanged(ObservableList<MtbDepoPosizione> sender) {
|
||||
if(!UtilityString.isNullOrEmpty(initialPosizione)) {
|
||||
selectedPosizioneText.set(initialPosizione);
|
||||
} else if(sender.size() == 1) {
|
||||
selectedPosizioneText.set(sender.get(0).getPosizione());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
SimpleAutoCompleteDropdownAdapter<String> arrayAdapterUntMis = new SimpleAutoCompleteDropdownAdapter<>(mContext,
|
||||
android.R.layout.simple_dropdown_item_1line,
|
||||
UtilityObservable.convertObservableArrayList(mViewModel.retrieveAvailableUntMis(), MtbUntMis::getUntMis));
|
||||
mBindings.filledUntMisText.setAdapter(arrayAdapterUntMis);
|
||||
mViewModel.retrieveAvailableUntMis().addOnListChangedCallback(new OnListGeneralChangedCallback<MtbUntMis>() {
|
||||
@Override
|
||||
public void onChanged(ObservableList<MtbUntMis> sender) {
|
||||
if(sender.size() == 1) {
|
||||
selectedUntMisText.set(sender.get(0).getUntMis());
|
||||
} else if(sender.stream().anyMatch(x -> x.getUntMis().equalsIgnoreCase("PZ"))) {
|
||||
MtbUntMis pzUntMis = sender.stream().filter(x -> x.getUntMis().equalsIgnoreCase("PZ")).findFirst().get();
|
||||
selectedUntMisText.set(pzUntMis.getUntMis());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
SimpleAutoCompleteDropdownAdapter<String> arrayAdapterGruppoArt = new SimpleAutoCompleteDropdownAdapter<>(mContext,
|
||||
android.R.layout.simple_dropdown_item_1line,
|
||||
UtilityObservable.convertObservableArrayList(mViewModel.retrieveAvailableArtGroups(), x -> String.format("%s - %s", x.getCodMgrp(), x.getDescrizione())));
|
||||
mBindings.filledGruppoText.setAdapter(arrayAdapterGruppoArt);
|
||||
mViewModel.retrieveAvailableArtGroups().addOnListChangedCallback(new OnListGeneralChangedCallback<MtbGrup>() {
|
||||
@Override
|
||||
public void onChanged(ObservableList<MtbGrup> sender) {
|
||||
if(sender.size() == 1) {
|
||||
selectedMtbGrupText.set(String.format("%s - %s", sender.get(0).getCodMgrp(), sender.get(0).getDescrizione()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
SimpleAutoCompleteDropdownAdapter<String> arrayAdapterSottoGruppoArt = new SimpleAutoCompleteDropdownAdapter<>(mContext,
|
||||
android.R.layout.simple_dropdown_item_1line,
|
||||
UtilityObservable.convertObservableArrayList(mViewModel.retrieveAvailableArtSubGroups(), x -> String.format("%s - %s", x.getCodMsgr(), x.getDescrizione())));
|
||||
mBindings.filledSottoGruppoText.setAdapter(arrayAdapterSottoGruppoArt);
|
||||
mViewModel.retrieveAvailableArtSubGroups().addOnListChangedCallback(new OnListGeneralChangedCallback<MtbSgrp>() {
|
||||
@Override
|
||||
public void onChanged(ObservableList<MtbSgrp> sender) {
|
||||
if(sender.size() == 1) {
|
||||
selectedMtbSubGrupText.set(String.format("%s - %s", sender.get(0).getCodMsgr(), sender.get(0).getDescrizione()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
SimpleAutoCompleteDropdownAdapter<String> arrayAdapterSottoSottoGruppoArt = new SimpleAutoCompleteDropdownAdapter<>(mContext,
|
||||
android.R.layout.simple_dropdown_item_1line,
|
||||
UtilityObservable.convertObservableArrayList(mViewModel.retrieveAvailableArtSubSubGroups(), x -> String.format("%s - %s", x.getCodMsfa(), x.getDescrizione())));
|
||||
mBindings.filledSottoSottoGruppoText.setAdapter(arrayAdapterSottoSottoGruppoArt);
|
||||
mViewModel.retrieveAvailableArtSubSubGroups().addOnListChangedCallback(new OnListGeneralChangedCallback<MtbSfam>() {
|
||||
@Override
|
||||
public void onChanged(ObservableList<MtbSfam> sender) {
|
||||
if(sender.size() == 1) {
|
||||
selectedMtbSubSubGrupText.set(String.format("%s - %s", sender.get(0).getCodMsfa(), sender.get(0).getDescrizione()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mViewModel.init();
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
private void initBarcodeReader() {
|
||||
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||
.setOnScanSuccessful(data -> {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
|
||||
if (UtilityBarcode.isEtichettaPosizione(data)) {
|
||||
selectedPosizioneText.set(data.getStringValue());
|
||||
} else if (editingBarcode.get()) {
|
||||
mViewModel.barcodeProdotto.set(data.getStringValue());
|
||||
saveBarcode();
|
||||
}
|
||||
});
|
||||
})
|
||||
.setOnScanFailed(this::onError));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
super.onDismiss(dialog);
|
||||
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||
}
|
||||
|
||||
private void initObservable() {
|
||||
this.selectedUntMisText.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||
@Override
|
||||
public void run() {
|
||||
mViewModel.selectedUntMis.set(mViewModel.retrieveAvailableUntMis().stream()
|
||||
.filter(x -> x.getUntMis().equals(selectedUntMisText.get()))
|
||||
.findFirst().orElse(null));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.selectedMtbGrupText.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||
@Override
|
||||
public void run() {
|
||||
mViewModel.selectedMtbGrup.set(mViewModel.retrieveAvailableArtGroups().stream()
|
||||
.filter(x -> String.format("%s - %s", x.getCodMgrp(), x.getDescrizione()).equals(selectedMtbGrupText.get()))
|
||||
.findFirst().orElse(null));
|
||||
|
||||
selectedMtbSubGrupText.set(null);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.selectedMtbSubGrupText.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||
@Override
|
||||
public void run() {
|
||||
mViewModel.selectedMtbSubGrup.set(mViewModel.retrieveAvailableArtSubGroups().stream()
|
||||
.filter(x -> String.format("%s - %s", x.getCodMsgr(), x.getDescrizione()).equals(selectedMtbSubGrupText.get()))
|
||||
.findFirst().orElse(null));
|
||||
|
||||
selectedMtbSubSubGrupText.set(null);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.selectedMtbSubSubGrupText.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||
@Override
|
||||
public void run() {
|
||||
mViewModel.selectedMtbSubSubGrup.set(mViewModel.retrieveAvailableArtSubSubGroups().stream()
|
||||
.filter(x -> String.format("%s - %s", x.getCodMsfa(), x.getDescrizione()).equals(selectedMtbSubSubGrupText.get()))
|
||||
.findFirst().orElse(null));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
this.selectedPosizioneText.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||
@Override
|
||||
public void run() {
|
||||
mViewModel.selectedPosizioneDefault.set(mViewModel.retrieveAvailablePosizioni().stream()
|
||||
.filter(x -> x.getPosizione().equals(selectedPosizioneText.get()))
|
||||
.findFirst().orElse(null));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void initBarcodes() {
|
||||
if (mScannedBarcode != null) {
|
||||
mViewModel.barcodeProdotto.set(mScannedBarcode.getStringValue());
|
||||
try {
|
||||
generateBarcodeBitmap();
|
||||
} catch (Exception e) {
|
||||
onError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void saveBarcode() {
|
||||
try {
|
||||
generateBarcodeBitmap();
|
||||
editingBarcode.toggle();
|
||||
} catch (Exception e) {
|
||||
onError(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateBarcodeBitmap() throws Exception {
|
||||
Bitmap barcodeBitmap = UtilityBarcode.generateBarcodeImage(mViewModel.barcodeProdotto.get(), 500, 170);
|
||||
mBindings.barcodeProdottoImage.setImageBitmap(barcodeBitmap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaved(String codMart) {
|
||||
this.dismiss();
|
||||
|
||||
if (this.onArticleCreated != null) this.onArticleCreated.run(codMart);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,209 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.create_new_art;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import it.integry.integrywmsnative.core.di.ValidatableObservableField;
|
||||
import it.integry.integrywmsnative.core.di.validators.GreaterThenValidator;
|
||||
import it.integry.integrywmsnative.core.di.validators.NotEmptyValidator;
|
||||
import it.integry.integrywmsnative.core.di.validators.NotNullValidator;
|
||||
import it.integry.integrywmsnative.core.expansion.OnGeneralChangedCallback;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||
import it.integry.integrywmsnative.core.model.MtbSfam;
|
||||
import it.integry.integrywmsnative.core.model.MtbSgrp;
|
||||
import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.articolo.ArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
|
||||
public class DialogCreateNewArtViewModel {
|
||||
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
private final ArticoloRESTConsumer articoloRESTConsumer;
|
||||
|
||||
private final ObservableArrayList<MtbUntMis> availableUntMis = new ObservableArrayList<>();
|
||||
private final ObservableArrayList<MtbGrup> availableMtbGroups = new ObservableArrayList<>();
|
||||
private final ObservableArrayList<MtbSgrp> availableMtbSubGroups = new ObservableArrayList<>();
|
||||
private final ObservableArrayList<MtbSfam> availableMtbSubSubGroups = new ObservableArrayList<>();
|
||||
|
||||
private final ObservableArrayList<MtbDepoPosizione> availablePosizioni = new ObservableArrayList<>();
|
||||
|
||||
public ValidatableObservableField<String> descrizione = new ValidatableObservableField<>() {{
|
||||
addValidator(new NotEmptyValidator("La descrizione non può essere vuota"));
|
||||
}};
|
||||
|
||||
public final ValidatableObservableField<String> noteAggiuntive = new ValidatableObservableField<>();
|
||||
public final ValidatableObservableField<BigDecimal> qtaCnf = new ValidatableObservableField<>(BigDecimal.ONE) {{
|
||||
addValidator(new NotNullValidator<>("La qta x cnf deve essere > 0"));
|
||||
addValidator(new GreaterThenValidator(BigDecimal.ZERO, "La qta x cnf deve essere > 0"));
|
||||
}};
|
||||
|
||||
public final ValidatableObservableField<String> barcodeProdotto = new ValidatableObservableField<>();
|
||||
public final ValidatableObservableField<Boolean> qtaCnfFissa = new ValidatableObservableField<>(true);
|
||||
|
||||
public ValidatableObservableField<MtbUntMis> selectedUntMis = new ValidatableObservableField<>(null) {{
|
||||
addValidator(new NotNullValidator<>("Seleziona un'unità di misura"));
|
||||
}};
|
||||
public ValidatableObservableField<MtbGrup> selectedMtbGrup = new ValidatableObservableField<>(null) {{
|
||||
addValidator(new NotNullValidator<>("Seleziona un gruppo"));
|
||||
}};
|
||||
public ValidatableObservableField<MtbSgrp> selectedMtbSubGrup = new ValidatableObservableField<>(null) {{
|
||||
addValidator(new NotNullValidator<>("Seleziona un sotto gruppo"));
|
||||
}};
|
||||
public ValidatableObservableField<MtbSfam> selectedMtbSubSubGrup = new ValidatableObservableField<>(null) {{
|
||||
addValidator(new NotNullValidator<>("Seleziona un sotto-sotto gruppo"));
|
||||
}};
|
||||
|
||||
public ValidatableObservableField<MtbDepoPosizione> selectedPosizioneDefault = new ValidatableObservableField<>(null) {{
|
||||
addValidator(new NotNullValidator<>("Seleziona una posizione"));
|
||||
}};
|
||||
|
||||
|
||||
public DialogCreateNewArtViewModel(ArticoloRESTConsumer articoloRESTConsumer) {
|
||||
this.articoloRESTConsumer = articoloRESTConsumer;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
this.availablePosizioni.addAll(SettingsManager.iDB().getAvailablePosizioni());
|
||||
|
||||
this.articoloRESTConsumer.retrieveAvailableUntMis(untMisList -> {
|
||||
this.availableUntMis.addAll(untMisList);
|
||||
|
||||
this.articoloRESTConsumer.retrieveAvailableGruppiMerceologici(mtbGrupList -> {
|
||||
|
||||
List<String> allowedCodMgrpForArtCreation = SettingsManager.iDB().getAllowedCodMgrpForArtCreation();
|
||||
|
||||
if(allowedCodMgrpForArtCreation != null && !allowedCodMgrpForArtCreation.isEmpty()) {
|
||||
mtbGrupList = mtbGrupList.stream()
|
||||
.filter(x -> allowedCodMgrpForArtCreation.contains(x.getCodMgrp()))
|
||||
.collect(Collectors.toUnmodifiableList());
|
||||
}
|
||||
|
||||
if(mtbGrupList.size() == 1)
|
||||
this.selectedMtbGrup.set(mtbGrupList.get(0));
|
||||
|
||||
this.availableMtbGroups.addAll(mtbGrupList);
|
||||
|
||||
this.sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
}, this::sendError);
|
||||
|
||||
this.selectedMtbGrup.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||
@Override
|
||||
public void run() {
|
||||
availableMtbSubGroups.clear();
|
||||
|
||||
if (selectedMtbGrup != null && selectedMtbGrup.get() != null)
|
||||
availableMtbSubGroups.addAll(Objects.requireNonNull(selectedMtbGrup.get()).getMtbSgrp());
|
||||
}
|
||||
});
|
||||
|
||||
this.selectedMtbSubGrup.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||
@Override
|
||||
public void run() {
|
||||
availableMtbSubSubGroups.clear();
|
||||
|
||||
if (selectedMtbSubGrup != null && selectedMtbSubGrup.get() != null)
|
||||
availableMtbSubSubGroups.addAll(Objects.requireNonNull(selectedMtbSubGrup.get()).getMtbSfam());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public ObservableArrayList<MtbDepoPosizione> retrieveAvailablePosizioni() {
|
||||
return availablePosizioni;
|
||||
}
|
||||
|
||||
public ObservableArrayList<MtbUntMis> retrieveAvailableUntMis() {
|
||||
return availableUntMis;
|
||||
}
|
||||
|
||||
public ObservableArrayList<MtbGrup> retrieveAvailableArtGroups() {
|
||||
return availableMtbGroups;
|
||||
}
|
||||
|
||||
public ObservableArrayList<MtbSgrp> retrieveAvailableArtSubGroups() {
|
||||
return availableMtbSubGroups;
|
||||
}
|
||||
|
||||
public ObservableArrayList<MtbSfam> retrieveAvailableArtSubSubGroups() {
|
||||
return availableMtbSubSubGroups;
|
||||
}
|
||||
|
||||
|
||||
public void save() {
|
||||
if (descrizione.validate() &
|
||||
noteAggiuntive.validate() &
|
||||
selectedMtbGrup.validate() &
|
||||
selectedMtbSubGrup.validate() &
|
||||
selectedMtbSubSubGrup.validate() &
|
||||
selectedUntMis.validate() &
|
||||
qtaCnf.validate() &
|
||||
qtaCnfFissa.validate() &
|
||||
selectedPosizioneDefault.validate() &
|
||||
barcodeProdotto.validate()
|
||||
) {
|
||||
ArticoloDTO articoloToSave = new ArticoloDTO()
|
||||
.setDescrizione(descrizione.get())
|
||||
.setDescrizioneEstesa(descrizione.get())
|
||||
.setNote(UtilityString.empty2null(noteAggiuntive.get()))
|
||||
.setCodMgrp(selectedMtbGrup.get().getCodMgrp())
|
||||
.setCodMsgr(selectedMtbSubGrup.get().getCodMsgr())
|
||||
.setCodMsfa(selectedMtbSubSubGrup.get().getCodMsfa())
|
||||
.setUntMis(selectedUntMis.get().getUntMis())
|
||||
.setFlagQtaCnfFissa(qtaCnfFissa.get().booleanValue())
|
||||
.setQtaCnf(qtaCnf.get())
|
||||
.setPosizione(selectedPosizioneDefault.get().getPosizione())
|
||||
.setBarcode(UtilityString.empty2null(barcodeProdotto.get()))
|
||||
.setFlagStato(true);
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
articoloRESTConsumer.saveArticolo(articoloToSave, codMart -> {
|
||||
this.sendOnLoadingEnded();
|
||||
this.sendOnSaved(codMart);
|
||||
}, this::sendError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void sendOnLoadingStarted() {
|
||||
if (this.mListener != null) mListener.onLoadingStarted();
|
||||
}
|
||||
|
||||
private void sendOnLoadingEnded() {
|
||||
if (this.mListener != null) mListener.onLoadingEnded();
|
||||
}
|
||||
|
||||
private void sendError(Exception ex) {
|
||||
if (this.mListener != null) mListener.onError(ex);
|
||||
}
|
||||
|
||||
private void sendOnSaved(String codMart) {
|
||||
if (this.mListener != null) mListener.onSaved(codMart);
|
||||
}
|
||||
|
||||
public void setListener(Listener listener) {
|
||||
this.mListener = listener;
|
||||
}
|
||||
|
||||
|
||||
interface Listener extends ILoadingListener {
|
||||
|
||||
void onSaved(String codMart);
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -188,7 +188,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
this.initProductLotStatusNotification();
|
||||
}
|
||||
|
||||
MtbUntMis mtbUntMis = mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis() != null && mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis().size() > 0 ? mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis().get(0) : null;
|
||||
MtbUntMis mtbUntMis = mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis() != null && !mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis().isEmpty() ? mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis().get(0) : null;
|
||||
if (!(mtbUntMis != null && mtbUntMis.isFlagDig())) {
|
||||
mBindings.inputQtaTotText.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
|
||||
}
|
||||
@ -231,7 +231,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), com.tfb.fbtoast.R.color.error_color)));
|
||||
}
|
||||
case NON_IN_SCADENZA -> {
|
||||
this.mBindings.inputDataScadLayout.setEndIconDrawable(R.drawable.ic_check_white_24dp);
|
||||
this.mBindings.inputDataScadLayout.setEndIconDrawable(R.drawable.ic_round_check_24);
|
||||
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), com.tfb.fbtoast.R.color.success_color)));
|
||||
}
|
||||
}
|
||||
@ -295,6 +295,8 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
int onNumCnfInputChanged = SettingsManager.iDB().getOnNumCnfInputChanged();
|
||||
int onQtaTotInputChanged = SettingsManager.iDB().getOnQtaTotInputChanged();
|
||||
|
||||
onNumCnfInputChanged = onNumCnfInputChanged == 0 && mViewModel.getMtbAart().isFlagQtaCnfFissaBoolean() ? 2 : onNumCnfInputChanged;
|
||||
|
||||
this.mViewModel.setListener(this);
|
||||
this.mViewModel.init(onNumCnfInputChanged, onQtaTotInputChanged);
|
||||
}
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
|
||||
</vector>
|
||||
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/ic_round_check_24.xml
Normal file
5
app/src/main/res/drawable/ic_round_check_24.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M9,16.17L5.53,12.7c-0.39,-0.39 -1.02,-0.39 -1.41,0 -0.39,0.39 -0.39,1.02 0,1.41l4.18,4.18c0.39,0.39 1.02,0.39 1.41,0L20.29,7.71c0.39,-0.39 0.39,-1.02 0,-1.41 -0.39,-0.39 -1.02,-0.39 -1.41,0L9,16.17z"/>
|
||||
|
||||
</vector>
|
||||
@ -177,7 +177,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_num_cnf_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -200,7 +200,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_qta_cnf_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -224,7 +224,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_qta_tot_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -257,7 +257,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_tara_ped_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -282,7 +282,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_tara_col_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -306,7 +306,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_peso_lordo_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
@ -712,7 +712,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_partita_mag_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? 1f : 2f}"
|
||||
@ -721,7 +721,7 @@
|
||||
android:visibility="@{viewmodel.canPartitaMagBeChanged() || viewmodel.partitaMag != null ? View.VISIBLE : View.GONE}"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_partita_mag_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -735,14 +735,14 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_data_scad_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:enabled="@{view.enabledChangePartitaMag}"
|
||||
android:visibility="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_data_scad_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -768,7 +768,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_num_cnf_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||
@ -777,7 +777,7 @@
|
||||
android:paddingEnd="4dp"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_num_cnf_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -791,7 +791,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_qta_cnf_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -800,7 +800,7 @@
|
||||
android:paddingEnd="4dp"
|
||||
android:visibility="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_qta_cnf_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -814,7 +814,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_qta_tot_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||
@ -823,7 +823,7 @@
|
||||
android:imeOptions="actionDone"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_qta_tot_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -848,7 +848,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_tara_ped_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -857,7 +857,7 @@
|
||||
android:paddingEnd="4dp"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_tara_ped_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -872,7 +872,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_tara_col_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -880,7 +880,7 @@
|
||||
android:focusableInTouchMode="false"
|
||||
android:paddingEnd="4dp">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_tara_col_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -896,7 +896,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_peso_lordo_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -905,7 +905,7 @@
|
||||
android:imeOptions="actionDone"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_peso_lordo_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -929,13 +929,13 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_note_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{view.enabledNotes}"
|
||||
android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_note_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -959,7 +959,7 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/close_lu_btn"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
@ -975,7 +975,7 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/abort_btn"
|
||||
style="@style/Button.DangerFull"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
@ -983,14 +983,14 @@
|
||||
android:layout_weight="1"
|
||||
android:onClick="@{() -> view.dismiss()}"
|
||||
android:paddingEnd="3dp"
|
||||
app:icon="@drawable/ic_close_24dp"
|
||||
app:iconGravity="textStart"
|
||||
android:textColor="@color/red_400"
|
||||
app:strokeColor="@color/red_400"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/save_btn"
|
||||
style="@style/Button.PrimaryFull"
|
||||
style="@style/Widget.Material3.Button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
|
||||
@ -46,13 +46,12 @@
|
||||
|
||||
<!-- Username Label -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:errorText="@{view.usernameError}"
|
||||
app:hintTextAppearance="@style/hint_text">
|
||||
app:errorText="@{view.usernameError}">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_username"
|
||||
@ -66,13 +65,12 @@
|
||||
|
||||
<!-- Password Label -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:errorText="@{view.passwordError}"
|
||||
app:hintTextAppearance="@style/hint_text"
|
||||
app:passwordToggleEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
@ -102,19 +100,18 @@
|
||||
app:el_duration="400"
|
||||
app:el_expanded_bind="@{view.customSettingsCheckboxChecked}">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--Host Label-->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:errorText="@{view.codAziendaError}"
|
||||
app:hintTextAppearance="@style/hint_text">
|
||||
app:errorText="@{view.codAziendaError}">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_cod_azienda"
|
||||
@ -125,7 +122,7 @@
|
||||
app:binding="@{view.codAzienda}" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||
|
||||
|
||||
@ -10,124 +10,121 @@
|
||||
</data>
|
||||
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingTop="56dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="72dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:src="@drawable/logo_integry_testo" />
|
||||
|
||||
<!-- Username Label -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:errorText="@{view.usernameError}">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Username"
|
||||
android:inputType="textEmailAddress"
|
||||
app:binding="@{view.username}" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Password Label -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:errorText="@{view.passwordError}"
|
||||
app:passwordToggleEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Password"
|
||||
android:inputType="textPassword"
|
||||
app:binding="@{view.password}" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/login_checkbox_custom_server"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{view.customSettingsCheckboxEnabled}"
|
||||
android:text="@string/action_customize_server_settings"
|
||||
app:checked="@{view.customSettingsCheckboxChecked}" />
|
||||
|
||||
<net.cachapa.expandablelayout.ExpandableLayout
|
||||
android:id="@+id/login_layout_server_details"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="12dp"
|
||||
app:el_duration="400"
|
||||
app:el_expanded_bind="@{view.customSettingsCheckboxChecked}">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingTop="56dp"
|
||||
android:paddingRight="24dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="72dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:src="@drawable/logo_integry_testo" />
|
||||
|
||||
<!-- Username Label -->
|
||||
<!--Host Label-->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:errorText="@{view.usernameError}"
|
||||
app:hintTextAppearance="@style/hint_text">
|
||||
app:errorText="@{view.codAziendaError}">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_username"
|
||||
android:id="@+id/input_cod_azienda"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Username"
|
||||
android:inputType="textEmailAddress"
|
||||
app:binding="@{view.username}" />
|
||||
android:hint="Codice azienda"
|
||||
android:inputType="text"
|
||||
app:binding="@{view.codAzienda}" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Password Label -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:errorText="@{view.passwordError}"
|
||||
app:hintTextAppearance="@style/hint_text"
|
||||
app:passwordToggleEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Password"
|
||||
android:inputType="textPassword"
|
||||
app:binding="@{view.password}" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/login_checkbox_custom_server"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{view.customSettingsCheckboxEnabled}"
|
||||
android:text="@string/action_customize_server_settings"
|
||||
app:checked="@{view.customSettingsCheckboxChecked}" />
|
||||
|
||||
<net.cachapa.expandablelayout.ExpandableLayout
|
||||
android:id="@+id/login_layout_server_details"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="12dp"
|
||||
app:el_duration="400"
|
||||
app:el_expanded_bind="@{view.customSettingsCheckboxChecked}">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--Host Label-->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:errorText="@{view.codAziendaError}"
|
||||
app:hintTextAppearance="@style/hint_text">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_cod_azienda"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Codice azienda"
|
||||
android:inputType="text"
|
||||
app:binding="@{view.codAzienda}" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_login"
|
||||
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:enabled="@{view.loginButtonEnabled}"
|
||||
android:text="@string/login"
|
||||
app:onClick="@{() -> view.login()}" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</ScrollView>
|
||||
|
||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_login"
|
||||
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:enabled="@{view.loginButtonEnabled}"
|
||||
android:text="@string/login"
|
||||
app:onClick="@{() -> view.login()}" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
</layout>
|
||||
@ -209,7 +209,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:menu_icon="@drawable/ic_check_white_24dp"
|
||||
app:menu_icon="@drawable/ic_round_check_24"
|
||||
fab:menu_animationDelayPerItem="50"
|
||||
fab:menu_backgroundColor="@color/white_bg_alpha"
|
||||
fab:menu_buttonSpacing="0dp"
|
||||
@ -255,7 +255,7 @@
|
||||
android:id="@+id/pv_ordine_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_check_black_24dp"
|
||||
android:src="@drawable/ic_round_check_24"
|
||||
android:visibility="visible"
|
||||
app:fab_colorNormal="@color/white"
|
||||
app:fab_colorPressed="@color/white_pressed"
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:visibility="gone"
|
||||
android:layout_toStartOf="@id/main_filter"
|
||||
android:src="@drawable/ic_check_black_24dp"
|
||||
android:src="@drawable/ic_round_check_24"
|
||||
android:tint="@android:color/black"/>
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_inventory_id"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/inventory_id"
|
||||
@ -61,7 +61,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_zone"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/zone"
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/TextInputLayout.OutlinePrimary">
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/level_number"
|
||||
|
||||
@ -132,7 +132,7 @@
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:layout_margin="16dp"-->
|
||||
<!--style="@style/TextInputLayout.OutlinePrimary"-->
|
||||
<!--style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"-->
|
||||
<!--android:textColor="#5F6368"-->
|
||||
<!--android:textSize="16sp"-->
|
||||
<!--android:layout_gravity="center"-->
|
||||
|
||||
424
app/src/main/res/layout/dialog_create_new_art.xml
Normal file
424
app/src/main/res/layout/dialog_create_new_art.xml
Normal file
@ -0,0 +1,424 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="viewmodel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.create_new_art.DialogCreateNewArtViewModel" />
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.view.dialogs.create_new_art.DialogCreateNewArtView" />
|
||||
</data>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:titleTextColor="@android:color/white">
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
|
||||
<TextView
|
||||
style="?android:attr/textAppearanceSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:text="Informazioni generali"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_descrizione_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:error="@{viewmodel.descrizione.errorMessage}"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_descrizione_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/description"
|
||||
android:inputType="textMultiLine"
|
||||
android:lines="3"
|
||||
android:nextFocusDown="@id/input_note_text"
|
||||
app:binding="@{viewmodel.descrizione}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_note_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
app:error="@{viewmodel.noteAggiuntive.errorMessage}"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_note_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_additional_notes"
|
||||
android:inputType="textMultiLine"
|
||||
android:lines="2"
|
||||
android:nextFocusDown="@id/filled_unt_mis_text"
|
||||
app:binding="@{viewmodel.noteAggiuntive}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
style="?android:attr/textAppearanceSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:text="Classificazione merceologica"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_gruppo_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/group"
|
||||
android:imeOptions="actionNext"
|
||||
app:error="@{viewmodel.selectedMtbGrup.errorMessage}"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/filled_gruppo_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:ellipsize="end"
|
||||
android:focusable="false"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="none"
|
||||
android:nextFocusDown="@id/filled_sotto_gruppo_text"
|
||||
android:singleLine="true"
|
||||
app:binding="@{view.selectedMtbGrupText}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_sotto_gruppo_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/sub_group"
|
||||
android:imeOptions="actionNext"
|
||||
app:error="@{viewmodel.selectedMtbSubGrup.errorMessage}"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/filled_sotto_gruppo_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:ellipsize="end"
|
||||
android:focusable="false"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="none"
|
||||
android:nextFocusDown="@id/filled_sotto_sotto_gruppo_text"
|
||||
android:singleLine="true"
|
||||
app:binding="@{view.selectedMtbSubGrupText}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_sotto_sotto_gruppo_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/sub_sub_group"
|
||||
android:imeOptions="actionNext"
|
||||
app:error="@{viewmodel.selectedMtbSubSubGrup.errorMessage}"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/filled_sotto_sotto_gruppo_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:ellipsize="end"
|
||||
android:focusable="false"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="none"
|
||||
android:nextFocusDown="@id/input_qta_cnf_text"
|
||||
android:singleLine="true"
|
||||
app:binding="@{view.selectedMtbSubSubGrupText}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="?android:attr/textAppearanceSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:text="Dati magazzino"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Quantità per confezione fissa"
|
||||
app:checked="@{viewmodel.qtaCnfFissa}"/>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="10">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_unt_mis_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:hint="@string/unt_mis"
|
||||
android:imeOptions="actionNext"
|
||||
app:error="@{viewmodel.selectedUntMis.errorMessage}"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/filled_unt_mis_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:ellipsize="end"
|
||||
android:focusable="false"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="none"
|
||||
android:nextFocusDown="@id/input_qta_cnf_text"
|
||||
android:singleLine="true"
|
||||
app:binding="@{view.selectedUntMisText}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_qta_cnf_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="6"
|
||||
android:hint="@string/qty_x_pck"
|
||||
android:imeOptions="actionDone"
|
||||
app:error="@{viewmodel.qtaCnf.errorMessage}"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/input_qta_cnf_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberDecimal"
|
||||
android:nextFocusDown="@id/input_default_pos_text"
|
||||
android:singleLine="true"
|
||||
app:binding="@{viewmodel.qtaCnf}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_default_pos_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:hint="@string/position_text"
|
||||
android:imeOptions="actionNext"
|
||||
app:error="@{viewmodel.selectedPosizioneDefault.errorMessage}"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/input_default_pos_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:ellipsize="end"
|
||||
android:focusable="false"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="none"
|
||||
android:nextFocusDown="@id/filled_gruppo_text"
|
||||
android:singleLine="true"
|
||||
app:binding="@{view.selectedPosizioneText}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="?android:attr/textAppearanceSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:text="Barcode prodotto" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/barcode_prodotto_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="10">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="monospace"
|
||||
app:binding="@{viewmodel.barcodeProdotto}"
|
||||
android:textSize="18sp"
|
||||
app:reverse_visibility="@{view.editingBarcode}"
|
||||
tools:visibility="gone"
|
||||
tools:text="809462372" />
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_barcode_layout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="5"
|
||||
android:hint="Barcode"
|
||||
android:imeOptions="actionNext"
|
||||
tools:visibility="gone"
|
||||
app:errorEnabled="true"
|
||||
app:visibility="@{view.editingBarcode}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/input_barcode_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
app:binding="@{viewmodel.barcodeProdotto}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
style="@style/Widget.Material3.Button"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_edit_24dp"
|
||||
android:tint="?attr/colorTertiary"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="8dp"
|
||||
android:onClick="@{() -> view.editingBarcode.toggle()}"
|
||||
app:reverse_visibility="@{view.editingBarcode}"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
style="@style/Widget.Material3.Button"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_round_check_24"
|
||||
android:tint="?attr/colorPrimary"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="8dp"
|
||||
android:onClick="@{() -> view.saveBarcode()}"
|
||||
app:visibility="@{view.editingBarcode}"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="?attr/borderlessButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_gravity="start"
|
||||
android:text="@string/abort"
|
||||
android:onClick="@{() -> view.dismissAllowingStateLoss()}"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/save_button"
|
||||
style="?attr/borderlessButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/action_save"
|
||||
android:onClick="@{() -> viewmodel.save()}"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</ScrollView>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
@ -72,7 +72,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/level_number_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/level_number_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
|
||||
@ -162,7 +162,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_num_cnf_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{view.enabledNumCnf}"
|
||||
@ -185,7 +185,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_qta_cnf_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -209,7 +209,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_qta_tot_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -242,7 +242,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_tara_ped_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -267,7 +267,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_tara_col_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -291,7 +291,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_peso_lordo_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
app:layout_constraintGuide_percent="0.51" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
@ -129,7 +129,7 @@
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
app:layout_constraintStart_toStartOf="@id/guide_left"
|
||||
app:layout_constraintEnd_toStartOf="@id/guide_right"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/TextInputLayout.OutlinePrimary">
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/additional_notes_text"
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/full_white"
|
||||
@ -723,7 +723,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_partita_mag_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? 1f : 2f}"
|
||||
@ -732,7 +732,7 @@
|
||||
android:visibility="@{viewmodel.canPartitaMagBeChanged() || viewmodel.partitaMag != null ? View.VISIBLE : View.GONE}"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_partita_mag_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -746,14 +746,14 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_data_scad_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:enabled="@{view.enabledChangePartitaMag}"
|
||||
android:visibility="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_data_scad_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -779,7 +779,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_num_cnf_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||
@ -788,7 +788,7 @@
|
||||
android:paddingEnd="4dp"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_num_cnf_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -804,7 +804,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_qta_cnf_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -813,7 +813,7 @@
|
||||
android:paddingEnd="4dp"
|
||||
android:visibility="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_qta_cnf_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -829,7 +829,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_qta_tot_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||
@ -837,7 +837,7 @@
|
||||
android:focusableInTouchMode="false"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_qta_tot_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -864,7 +864,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_tara_ped_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -873,7 +873,7 @@
|
||||
android:paddingEnd="4dp"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_tara_ped_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -888,7 +888,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_tara_col_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -896,7 +896,7 @@
|
||||
android:focusableInTouchMode="false"
|
||||
android:paddingEnd="4dp">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_tara_col_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -912,7 +912,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_peso_lordo_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -922,7 +922,7 @@
|
||||
tools:enabled="false"
|
||||
tools:layout_weight="1">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_peso_lordo_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -945,13 +945,13 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_note_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{view.enabledNotes}"
|
||||
android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_note_text"
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
@ -971,16 +971,15 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
android:weightSum="11">
|
||||
|
||||
<Button
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:id="@+id/close_lu_btn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="4"
|
||||
android:onClick="@{() -> view.saveAndCloseLU()}"
|
||||
android:text="@string/action_close_ul"
|
||||
app:strokeColor="?colorPrimary"
|
||||
@ -989,33 +988,32 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/abort_btn"
|
||||
style="@style/Button.DangerOutline"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="4"
|
||||
android:onClick="@{() -> view.dismiss()}"
|
||||
android:text="@string/abort"
|
||||
app:iconGravity="start" />
|
||||
android:textColor="@color/red_400"
|
||||
app:strokeColor="@color/red_400"/>
|
||||
|
||||
|
||||
<Button
|
||||
style="@style/Widget.Material3.Button"
|
||||
android:id="@+id/save_btn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="3"
|
||||
android:onClick="@{() -> view.save()}"
|
||||
android:text="@string/action_save"
|
||||
app:icon="@drawable/ic_save_24"
|
||||
app:iconGravity="start" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
@ -627,7 +627,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_num_cnf_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusableInTouchMode="false"
|
||||
@ -648,7 +648,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_qta_cnf_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@ -671,7 +671,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_qta_tot_layout"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusableInTouchMode="false"
|
||||
|
||||
@ -90,7 +90,7 @@
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:onClick="@{() -> view.dispatchBolle()}"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
app:srcCompat="@drawable/ic_round_check_24"
|
||||
app:visibility="@{view.fabVisible}"
|
||||
style="?attr/floatingActionButtonPrimaryStyle" />
|
||||
</FrameLayout>
|
||||
|
||||
@ -90,7 +90,7 @@
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:onClick="@{() -> view.dispatchOrders()}"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
app:srcCompat="@drawable/ic_round_check_24"
|
||||
app:visibility="@{view.fabVisible}"
|
||||
style="?attr/floatingActionButtonPrimaryStyle" />
|
||||
</FrameLayout>
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="Dispatch orders"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
app:srcCompat="@drawable/ic_round_check_24"
|
||||
android:onClick="@{() -> view.dispatchOrders()}"
|
||||
app:visibility="@{view.fabVisible}"
|
||||
style="?attr/floatingActionButtonPrimaryStyle" />
|
||||
|
||||
@ -5,8 +5,14 @@
|
||||
|
||||
<data>
|
||||
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
|
||||
<import type="android.text.Html" />
|
||||
|
||||
<import type="androidx.databinding.ObservableList" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
@ -53,55 +59,45 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="?colorPrimary"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="num:"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="@{view.currentMtbColtObs.numCollo.toString()}"
|
||||
android:text="@{Html.fromHtml(String.format(context.getString(R.string.lu_number_data_text), view.currentMtbColtObs.numCollo, UtilityDate.formatDate(view.currentMtbColtObs.getDataColloD(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)))}"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
tools:text="2156" />
|
||||
tools:text="UL n° 4894 - 09 dic 2024" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="pos:"
|
||||
android:textColor="@android:color/white"
|
||||
android:visibility="@{!UtilityString.isNullOrEmpty(viewmodel.currentMtbColt.posizione) ? View.VISIBLE : View.GONE}" />
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{view.currentMtbColtObs.posizione}"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{!UtilityString.isNullOrEmpty(viewmodel.currentMtbColt.posizione) ? View.VISIBLE : View.GONE}"
|
||||
tools:text="ME1FS032" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Posizione: "
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{view.currentMtbColtObs.posizione}"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
|
||||
tools:text="ME1FS032" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||
@ -111,16 +107,20 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="@drawable/circular_background_left"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="6dp"
|
||||
android:paddingTop="0dp">
|
||||
|
||||
<RadioButton
|
||||
<androidx.appcompat.widget.AppCompatRadioButton
|
||||
android:id="@+id/rettifica_giacenze_forn_check_box"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:minWidth="38dp"
|
||||
android:minHeight="0dp"
|
||||
android:onClick="@{() -> view.setUIToForn()}" />
|
||||
|
||||
|
||||
@ -132,11 +132,10 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/auto_complete_fornitori_layout"
|
||||
style="@style/TextInputLayout.NoLine"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
app:hintTextAppearance="@style/hint_text">
|
||||
android:layout_weight="3">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/auto_complete_fornitori"
|
||||
@ -152,12 +151,11 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/layout_cod_art_descr_forn"
|
||||
style="@style/TextInputLayout.NoLine"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="7"
|
||||
app:hintTextAppearance="@style/hint_text">
|
||||
android:layout_weight="7">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_cod_art_descr_forn"
|
||||
@ -174,56 +172,50 @@
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/rettifica_giacenze_art_int_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="@drawable/circular_background_left"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:paddingBottom="6dp">
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="6dp">
|
||||
|
||||
<RadioButton
|
||||
<androidx.appcompat.widget.AppCompatRadioButton
|
||||
android:id="@+id/rettifica_giacenze_art_int_check_box"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:minWidth="38dp"
|
||||
android:minHeight="0dp"
|
||||
android:onClick="@{() -> view.setUIToIntArt()}" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/layout_cod_art_descr_int"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/layout_cod_art_descr_int"
|
||||
style="@style/TextInputLayout.NoLine"
|
||||
android:layout_width="0dp"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_cod_art_descr_int"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:hintTextAppearance="@style/hint_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_cod_art_descr_int"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/cod_art_or_description"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true" />
|
||||
android:hint="@string/cod_art_or_description"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true" />
|
||||
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
@ -307,7 +299,7 @@
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:onClick="@{() -> viewmodel.closeLU(true)}"
|
||||
android:tint="@android:color/white"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
app:srcCompat="@drawable/ic_round_check_24"
|
||||
app:visibility="@{view.thereIsAnOpenedUL}" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
app:srcCompat="@drawable/ic_round_check_24"
|
||||
style="?attr/floatingActionButtonPrimaryStyle" />
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@ -117,7 +117,7 @@
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription=""
|
||||
app:srcCompat="@drawable/ic_check_white_24dp"
|
||||
app:srcCompat="@drawable/ic_round_check_24"
|
||||
android:onClick="@{() -> view.closeLU()}"
|
||||
app:visibility="@{view.thereIsAnOpenedUL}"
|
||||
style="?attr/floatingActionButtonSecondaryStyle" />
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="Dispatch orders"
|
||||
android:onClick="@{() -> view.dispatchOrders()}"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
app:srcCompat="@drawable/ic_round_check_24"
|
||||
app:visibility="@{view.fabVisible}" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:onClick="@{() -> view.dispatchOrders()}"
|
||||
android:tint="@android:color/white"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
app:srcCompat="@drawable/ic_round_check_24"
|
||||
app:visibility="@{view.fabVisible}" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
@ -215,7 +215,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
app:srcCompat="@drawable/ic_round_check_24"
|
||||
app:visibility="@{view.fabVisible}"
|
||||
app:singleClick="@{view::onConfirmClicked}"
|
||||
style="?attr/floatingActionButtonPrimaryStyle" />
|
||||
|
||||
@ -104,7 +104,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
app:srcCompat="@drawable/ic_round_check_24"
|
||||
style="?attr/floatingActionButtonPrimaryStyle" />
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@ -11,7 +11,7 @@
|
||||
android:title="@string/delete_document" />
|
||||
<item
|
||||
android:id="@+id/hold_document"
|
||||
android:icon="@drawable/ic_check_black_24dp"
|
||||
android:icon="@drawable/ic_round_check_24"
|
||||
android:title="@string/save_document" />
|
||||
|
||||
</menu>
|
||||
@ -407,8 +407,10 @@
|
||||
<string name="dialog_doc_interni_choose_dtip_mgrp_pair_title">Seleziona estremi documento</string>
|
||||
<string name="doc_type">Tipo documento</string>
|
||||
<string name="art_group">Gruppo articolo</string>
|
||||
<string name="group">Gruppo</string>
|
||||
<string name="sub_group">Sotto gruppo</string>
|
||||
<string name="sub_sub_group">Sotto sotto gruppo</string>
|
||||
<string name="cod_dtip_name">Tipo doc.</string>
|
||||
<string name="cod_mgrp_name">Gruppo art.</string>
|
||||
<string name="articoli_disponibili">Articoli disponibili</string>
|
||||
<string name="no_doc_found_message">Nessun documento trovato</string>
|
||||
<string name="document_label">Documento:</string>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
<resources>
|
||||
<color name="seed">#4c4dcf</color>
|
||||
<color name="md_theme_light_primary">#4C4DCF</color>
|
||||
<color name="md_theme_light_primary">@color/colorPrimary</color>
|
||||
<color name="md_theme_light_onPrimary">#FFFFFF</color>
|
||||
<color name="md_theme_light_primaryContainer">#E1DFFF</color>
|
||||
<color name="md_theme_light_onPrimaryContainer">#08006C</color>
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
<resources>
|
||||
|
||||
<item name="bound_observable" type="id" />
|
||||
<item name="bound_reverse_visibility" type="id" />
|
||||
|
||||
|
||||
|
||||
<item name="nav_group_acquisto" type="id" />
|
||||
|
||||
@ -413,8 +413,10 @@
|
||||
<string name="dialog_doc_interni_choose_dtip_mgrp_pair_title">Choose Document details</string>
|
||||
<string name="doc_type">Document type</string>
|
||||
<string name="art_group">Product group</string>
|
||||
<string name="group">Group</string>
|
||||
<string name="sub_group">Product sub-group</string>
|
||||
<string name="sub_sub_group">Product sub-sub-group</string>
|
||||
<string name="cod_dtip_name">Doc type</string>
|
||||
<string name="cod_mgrp_name">Product group</string>
|
||||
<string name="articoli_disponibili">Available products</string>
|
||||
<string name="no_doc_found_message">No document found</string>
|
||||
<string name="document_label">Document:</string>
|
||||
@ -425,7 +427,7 @@
|
||||
<string name="save_document">Save document</string>
|
||||
<string name="fornitore">Supplier</string>
|
||||
<string name="cod_anag_name">Supplier</string>
|
||||
<string name="delete_document">Elimina documento</string>
|
||||
<string name="delete_document">Delete document</string>
|
||||
<string name="document_rif_label">Ref:</string>
|
||||
<string name="gg_scadenza">Shelf life:</string>
|
||||
<string name="selling_prediction">Sales prediction</string>
|
||||
|
||||
@ -1,47 +1,12 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<!-- <style name="AppTheme" parent="Theme.Material3.Light.NoActionBar">-->
|
||||
|
||||
<!-- <!– Customize your theme here. –>-->
|
||||
<!-- <item name="colorPrimary">@color/colorPrimary</item>-->
|
||||
<!-- <item name="colorPrimaryDark">@color/colorPrimaryDark</item>-->
|
||||
<!-- <item name="colorAccent">@color/colorAccent</item>-->
|
||||
|
||||
<!-- <item name="fontFamily">@font/google_sans_regular</item> <!– target android sdk versions < 26 and > 14 if theme other than AppCompat –>-->
|
||||
|
||||
<!-- <!– Add these –>-->
|
||||
<!-- <item name="materialCalendarStyle">@style/Widget.MaterialComponents.MaterialCalendar</item>-->
|
||||
<!-- <item name="materialCalendarFullscreenTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar.Fullscreen</item>-->
|
||||
<!-- <item name="materialCalendarTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar</item>-->
|
||||
|
||||
<!-- <item name="bottomSheetDialogTheme">@style/CustomBottomSheetDialog</item>-->
|
||||
|
||||
<!-- </style>-->
|
||||
|
||||
|
||||
<style name="Light" parent="Theme.Material3.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="23">true</item>
|
||||
<item name="android:statusBarColor">@android:color/white</item>
|
||||
|
||||
<item name="fontFamily">@font/google_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
|
||||
<item name="materialCalendarStyle">@style/Widget.Material3.MaterialCalendar</item>
|
||||
<item name="materialCalendarFullscreenTheme">@style/Widget.Material3.MaterialCalendar.Fullscreen</item>
|
||||
<item name="materialCalendarTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar</item>
|
||||
|
||||
<item name="bottomSheetDialogTheme">@style/CustomBottomSheetDialog</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="SplashTheme" parent="AppTheme.NoActionBar">
|
||||
<item name="android:windowBackground">@drawable/splash_background</item>
|
||||
<item name="android:statusBarColor">@color/colorPrimary</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="23">false</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar" parent="@style/Light">
|
||||
<style name="AppTheme.NoActionBar" parent="@style/AppTheme">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
@ -115,19 +80,20 @@
|
||||
</style>
|
||||
|
||||
|
||||
<style name="AppTheme.NewMaterial.Dialog.FullscreenDialog" parent="Theme.Material3.Light.DialogWhenLarge">
|
||||
<style name="AppTheme.NewMaterial.Dialog.FullscreenDialog" parent="Theme.Material3.DayNight">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
|
||||
<item name="fontFamily">@font/google_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||
|
||||
<item name="android:statusBarColor">@android:color/white</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="android:windowAnimationStyle">@style/Animation.AppCompat.Dialog</item>
|
||||
<item name="android:windowIsFloating">false</item>
|
||||
<item name="android:windowAnimationStyle">@style/Animation.AppCompat.Dialog</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowCloseOnTouchOutside">false</item>
|
||||
<item name="android:statusBarColor">@color/colorPrimaryDark</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="23">false</item>
|
||||
</style>
|
||||
|
||||
|
||||
@ -188,10 +154,6 @@
|
||||
<item name="colorButtonNormal">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="hint_text" parent="TextAppearance.Design.Hint">
|
||||
<item name="android:textColor">@color/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!-- <style name="MaterialToolbar.Base" parent="">-->
|
||||
<!-- <item name="popupTheme">@style/AppTheme.PopupOverlay</item>-->
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<resources>
|
||||
<style name="AppTheme" parent="Theme.Material3.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/md_theme_light_primary</item>
|
||||
<item name="colorOnPrimary">@color/md_theme_light_onPrimary</item>
|
||||
@ -29,7 +29,13 @@
|
||||
<item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item>
|
||||
|
||||
|
||||
|
||||
<item name="android:fontFamily">@font/google_sans_regular</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="23">true</item>
|
||||
<item name="android:statusBarColor">@android:color/white</item>
|
||||
<item name="materialCalendarStyle">@style/Widget.Material3.MaterialCalendar</item>
|
||||
<item name="materialCalendarFullscreenTheme">@style/Widget.Material3.MaterialCalendar.Fullscreen</item>
|
||||
<item name="materialCalendarTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar</item>
|
||||
|
||||
<item name="bottomSheetDialogTheme">@style/CustomBottomSheetDialog</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user