Finish v1.43.01(466)
14
.idea/appInsightsSettings.xml
generated
@ -4,6 +4,20 @@
|
||||
<option name="selectedTabId" value="Android Vitals" />
|
||||
<option name="tabSettings">
|
||||
<map>
|
||||
<entry key="Android Vitals">
|
||||
<value>
|
||||
<InsightsFilterSettings>
|
||||
<option name="connection">
|
||||
<ConnectionSetting>
|
||||
<option name="appId" value="it.integry.ordify.dulciar" />
|
||||
</ConnectionSetting>
|
||||
</option>
|
||||
<option name="signal" value="SIGNAL_UNSPECIFIED" />
|
||||
<option name="timeIntervalDays" value="SEVEN_DAYS" />
|
||||
<option name="visibilityType" value="ALL" />
|
||||
</InsightsFilterSettings>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="Firebase Crashlytics">
|
||||
<value>
|
||||
<InsightsFilterSettings>
|
||||
|
||||
4
.idea/deploymentTargetSelector.xml
generated
@ -4,10 +4,10 @@
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2024-09-13T09:26:42.884931500Z">
|
||||
<DropdownSelection timestamp="2025-01-17T09:18:08.345092200Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=R52T60AZ93A" />
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=21088B8EFD" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
|
||||
2
.idea/kotlinc.xml
generated
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="1.9.20" />
|
||||
<option name="version" value="1.9.25" />
|
||||
</component>
|
||||
</project>
|
||||
@ -5,13 +5,13 @@ if (!project.hasProperty("disable-performance-plugin")) {
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
apply plugin: 'kotlin-android'
|
||||
//apply plugin: 'kotlin-android'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 462
|
||||
def appVersionName = '1.42.02'
|
||||
def appVersionCode = 466
|
||||
def appVersionName = '1.43.01'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@ -34,10 +34,10 @@ android {
|
||||
defaultConfig {
|
||||
applicationId "it.integry.integrywmsnative"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 34
|
||||
targetSdkVersion 35
|
||||
versionCode appVersionCode
|
||||
versionName appVersionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
signingConfig signingConfigs.release
|
||||
|
||||
javaCompileOptions {
|
||||
@ -80,30 +80,37 @@ android {
|
||||
}
|
||||
|
||||
gradle.projectsEvaluated {
|
||||
tasks.withType(JavaCompile.class) {
|
||||
tasks.withType(JavaCompile.class).tap {
|
||||
configureEach {
|
||||
options.compilerArgs << "-Xmaxerrs" << "10000"
|
||||
}
|
||||
}
|
||||
}
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
namespace 'it.integry.integrywmsnative'
|
||||
compileSdk 34
|
||||
compileSdk 35
|
||||
}
|
||||
|
||||
configurations {
|
||||
all*.exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7'
|
||||
all*.exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.3'
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
// androidTestImplementation('androidx.test.espresso:espresso-core:3.6.1', {
|
||||
// exclude group: 'com.android.support', module: 'support-annotations'
|
||||
// })
|
||||
// implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'com.github.lupaulus:logger:2.3.2'
|
||||
|
||||
//Firebase
|
||||
|
||||
// Import the Firebase BoM
|
||||
implementation platform('com.google.firebase:firebase-bom:33.7.0')
|
||||
implementation platform('com.google.firebase:firebase-bom:33.8.0')
|
||||
implementation 'com.google.firebase:firebase-analytics'
|
||||
implementation 'com.google.firebase:firebase-crashlytics'
|
||||
implementation 'com.google.firebase:firebase-perf'
|
||||
@ -115,7 +122,7 @@ dependencies {
|
||||
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'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.4.0'
|
||||
|
||||
implementation('androidx.preference:preference-ktx:1.2.1') {
|
||||
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel'
|
||||
@ -132,7 +139,7 @@ dependencies {
|
||||
implementation 'org.apache.commons:commons-text:1.9'
|
||||
|
||||
//MVVM
|
||||
def dagger2_version = '2.49'
|
||||
def dagger2_version = '2.55'
|
||||
api "com.google.dagger:dagger:$dagger2_version"
|
||||
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
||||
api "com.google.dagger:dagger-android:$dagger2_version"
|
||||
|
||||
@ -24,8 +24,8 @@
|
||||
android:allowBackup="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true"
|
||||
|
||||
BIN
app/src/main/ic_launcher-playstore.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
@ -144,6 +144,8 @@ import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.switch_user_depo.DialogSwitchUserDepoComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.switch_user_depo.DialogSwitchUserDepoModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracciamentoImballiComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracciamentoImballiModule;
|
||||
|
||||
@ -221,7 +223,8 @@ import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracc
|
||||
ArticoliInGiacenzaModule.class,
|
||||
DialogTracciamentoImballiModule.class,
|
||||
DialogAskVettoreModule.class,
|
||||
DialogCreateNewArtModule.class
|
||||
DialogCreateNewArtModule.class,
|
||||
DialogSwitchUserDepoModule.class
|
||||
})
|
||||
public interface MainApplicationComponent {
|
||||
|
||||
@ -370,6 +373,8 @@ public interface MainApplicationComponent {
|
||||
|
||||
DialogCreateNewArtComponent.Factory dialogCreateNewArtComponent();
|
||||
|
||||
DialogSwitchUserDepoComponent.Factory dialogSwitchUserDepoComponent();
|
||||
|
||||
void inject(MainApplication mainApplication);
|
||||
|
||||
void inject(AppContext mainApplication);
|
||||
|
||||
@ -82,8 +82,8 @@ public class MainApplicationModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
public SettingsManager provideSettingsManager(SystemRESTConsumer systemRESTConsumer, AziendaRESTConsumer aziendaRESTConsumer, PosizioniRESTConsumer posizioniRESTConsumer, GestSetupRESTConsumer gestSetupRESTConsumer) {
|
||||
return new SettingsManager(mApplication, systemRESTConsumer, aziendaRESTConsumer, gestSetupRESTConsumer, posizioniRESTConsumer);
|
||||
public SettingsManager provideSettingsManager(SystemRESTConsumer systemRESTConsumer, ImballiRESTConsumer imballiRESTConsumer, AziendaRESTConsumer aziendaRESTConsumer, PosizioniRESTConsumer posizioniRESTConsumer, GestSetupRESTConsumer gestSetupRESTConsumer) {
|
||||
return new SettingsManager(mApplication, systemRESTConsumer, imballiRESTConsumer, aziendaRESTConsumer, gestSetupRESTConsumer, posizioniRESTConsumer);
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
||||
@ -103,12 +103,12 @@ public class SplashActivity extends BaseActivity implements MainContext.Listener
|
||||
|
||||
@Override
|
||||
public void onDBDataLoading(String item) {
|
||||
mBinding.loadingInfoTextview.setText("Caricamento " + item);
|
||||
runOnUiThread(() -> mBinding.loadingInfoTextview.setText("Caricamento " + item));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMenuLoading() {
|
||||
mBinding.loadingInfoTextview.setText("Caricamento menù");
|
||||
runOnUiThread(() -> mBinding.loadingInfoTextview.setText("Caricamento menù"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -105,7 +105,7 @@ public class Converters {
|
||||
view.setTag(R.id.bound_observable, new Pair<>(observableField, watcher));
|
||||
view.addTextChangedListener(watcher);
|
||||
}
|
||||
String newValue = observableField.get();
|
||||
String newValue = observableField != null ? observableField.get() : "";
|
||||
if (!view.getText().toString().equals(newValue)) {
|
||||
view.setText(newValue);
|
||||
}
|
||||
@ -819,6 +819,45 @@ public class Converters {
|
||||
}
|
||||
|
||||
|
||||
@BindingAdapter("visibilityWhenNotNull")
|
||||
public static void bindViewVisibilityWhenNotNull(View view, ObservableField<?> bindableObject) {
|
||||
if(bindableObject == null) return;
|
||||
|
||||
if (view.getTag(R.id.bound_observable) != bindableObject) {
|
||||
view.setTag(R.id.bound_observable, bindableObject);
|
||||
}
|
||||
|
||||
bindableObject.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
view.setVisibility(bindableObject.get() == null ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
view.setVisibility(bindableObject.get() == null ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
@BindingAdapter("visibilityWhenNull")
|
||||
public static void bindViewVisibilityWhenNull(View view, ObservableField<?> bindableObject) {
|
||||
|
||||
if (view.getTag(R.id.bound_observable_visibility) != bindableObject) {
|
||||
view.setTag(R.id.bound_observable_visibility, bindableObject);
|
||||
}
|
||||
|
||||
view.setVisibility(bindableObject == null || bindableObject.get() == null ? View.VISIBLE : View.GONE);
|
||||
|
||||
if(bindableObject == null) return;
|
||||
|
||||
bindableObject.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||
@Override
|
||||
public void onPropertyChanged(Observable sender, int propertyId) {
|
||||
view.setVisibility(bindableObject.get() == null ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@BindingAdapter({"reverse_visibility"})
|
||||
public static void bindViewReverseVisibility(View view, final BindableBoolean bindableBoolean) {
|
||||
if (view.getTag(R.id.bound_reverse_visibility) != bindableBoolean) {
|
||||
|
||||
@ -53,16 +53,16 @@ public class BaseActivity extends AppCompatActivity {
|
||||
|
||||
private void openProgress() {
|
||||
BarcodeManager.disable();
|
||||
//executorService.execute(() -> {
|
||||
// executorService.execute(() -> {
|
||||
this.mCurrentProgress.show(getSupportFragmentManager());
|
||||
//});
|
||||
// });
|
||||
}
|
||||
|
||||
private void closeProgress() {
|
||||
BarcodeManager.enable();
|
||||
//executorService.execute(() -> {
|
||||
// executorService.execute(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
//});
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
package it.integry.integrywmsnative.core.helper;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
|
||||
public final class GestioneToTextConverter {
|
||||
|
||||
public static String convert(GestioneEnum gestioneEnum) {
|
||||
return switch (gestioneEnum) {
|
||||
case ACQUISTO -> "Acquisto";
|
||||
case PRODUZIONE -> "Produzione";
|
||||
case LAVORAZIONE -> "Lavorazione";
|
||||
case VENDITA -> "Vendita";
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
@ -2,6 +2,7 @@ package it.integry.integrywmsnative.core.mapper;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRowRoomDTO;
|
||||
import it.integry.integrywmsnative.core.model.MtbInvenr;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
|
||||
public class InventarioRowMapper extends BaseMapper<MtbInvenr, InventarioRowRoomDTO> {
|
||||
|
||||
@ -32,6 +33,7 @@ public class InventarioRowMapper extends BaseMapper<MtbInvenr, InventarioRowRoom
|
||||
data.setDataOraInv(inputData.getDataOraInv());
|
||||
data.setScanCodBarre(inputData.getScanCodBarre());
|
||||
data.setZona(inputData.getZona());
|
||||
data.setIdDisp(SettingsManager.i().getUserSession().getDeviceId());
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package it.integry.integrywmsnative.core.model;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
@ -16,6 +17,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.dto.InternalCodAnagsDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||
@ -64,7 +66,7 @@ public class MtbColt extends EntityBase {
|
||||
private BigDecimal altezzaCm;
|
||||
private String codJcom;
|
||||
|
||||
private MtbTCol mtbTCol;
|
||||
private final ObservableField<ObservableMtbTcol> mtbTCol = new ObservableField<>();
|
||||
|
||||
private Boolean disablePrint;
|
||||
private String ragSocCliente;
|
||||
@ -258,6 +260,16 @@ public class MtbColt extends EntityBase {
|
||||
|
||||
public MtbColt setCodTcol(String codTcol) {
|
||||
this.codTcol = codTcol;
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(codTcol)) {
|
||||
var fountMtbTcolObservable = SettingsManager.iDB().getInternalImballi().stream()
|
||||
.filter(x -> x.getCodTcol().equalsIgnoreCase(codTcol))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
this.setMtbTCol(fountMtbTcolObservable);
|
||||
} else
|
||||
this.setMtbTCol(null);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -532,15 +544,19 @@ public class MtbColt extends EntityBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbTCol getMtbTCol() {
|
||||
return mtbTCol;
|
||||
public ObservableMtbTcol getMtbTCol() {
|
||||
return mtbTCol.get();
|
||||
}
|
||||
|
||||
public MtbColt setMtbTCol(MtbTCol mtbTCol) {
|
||||
this.mtbTCol = mtbTCol;
|
||||
public MtbColt setMtbTCol(ObservableMtbTcol mtbTCol) {
|
||||
this.mtbTCol.set(mtbTCol);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ObservableField<ObservableMtbTcol> mtbTcolProperty() {
|
||||
return mtbTCol;
|
||||
}
|
||||
|
||||
public void generaFiltroOrdineFromDTO(List<FiltroOrdineDTO> filtroOrdineDtos) {
|
||||
|
||||
String xmlPrefix = "{\"whereCond\": \"";
|
||||
|
||||
@ -15,7 +15,7 @@ public class MtbTCol {
|
||||
private BigDecimal taraKg;
|
||||
private String descrizione;
|
||||
private String codMart;
|
||||
private FlagUiUlEnum flagUIUL;
|
||||
private FlagUiUlEnum flagUiUl;
|
||||
private String circuito;
|
||||
|
||||
public String getCodTcol() {
|
||||
@ -90,12 +90,12 @@ public class MtbTCol {
|
||||
return this;
|
||||
}
|
||||
|
||||
public FlagUiUlEnum getFlagUIUL() {
|
||||
return flagUIUL;
|
||||
public FlagUiUlEnum getFlagUiUl() {
|
||||
return flagUiUl;
|
||||
}
|
||||
|
||||
public void setFlagUIUL(FlagUiUlEnum flagUIUL) {
|
||||
this.flagUIUL = flagUIUL;
|
||||
public void setFlagUiUl(FlagUiUlEnum flagUiUl) {
|
||||
this.flagUiUl = flagUiUl;
|
||||
}
|
||||
|
||||
public String getCircuito() {
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
package it.integry.integrywmsnative.core.model.mapper;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableList;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
|
||||
public class MtbTcolMapper {
|
||||
|
||||
public static ObservableMtbTcol fromDTO(MtbTCol dto) {
|
||||
ObservableMtbTcol mtbTcol = new ObservableMtbTcol();
|
||||
mtbTcol.updateFromDTO(dto);
|
||||
return mtbTcol;
|
||||
}
|
||||
|
||||
public static ObservableList<ObservableMtbTcol> fromDTOList(List<MtbTCol> dto) {
|
||||
ObservableList<ObservableMtbTcol> mtbTCols = new ObservableArrayList<>();
|
||||
|
||||
mtbTCols.addAll(dto.stream().map(MtbTcolMapper::fromDTO)
|
||||
.collect(Collectors.toUnmodifiableList()));
|
||||
|
||||
return mtbTCols;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,127 @@
|
||||
package it.integry.integrywmsnative.core.model.observable;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
import androidx.databinding.Bindable;
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
|
||||
public class ObservableMtbTcol extends BaseObservable {
|
||||
|
||||
private final ObservableField<String> codTcol = new ObservableField<>();
|
||||
private final ObservableField<BigDecimal> pesoKg = new ObservableField<>();
|
||||
private final ObservableField<BigDecimal> lunghezzaCm = new ObservableField<>();
|
||||
private final ObservableField<BigDecimal> larghezzaCm = new ObservableField<>();
|
||||
private final ObservableField<BigDecimal> altezzaCm = new ObservableField<>();
|
||||
private final ObservableField<BigDecimal> taraKg = new ObservableField<>();
|
||||
private final ObservableField<String> descrizione = new ObservableField<>();
|
||||
private final ObservableField<String> codMart = new ObservableField<>();
|
||||
private final ObservableField<MtbTCol.FlagUiUlEnum> flagUIUL = new ObservableField<>();
|
||||
private final ObservableField<String> circuito = new ObservableField<>();
|
||||
|
||||
@Bindable
|
||||
public String getCodTcol() {
|
||||
return codTcol.get();
|
||||
}
|
||||
|
||||
@Bindable
|
||||
public BigDecimal getPesoKg() {
|
||||
return pesoKg.get();
|
||||
}
|
||||
|
||||
@Bindable
|
||||
public BigDecimal getLunghezzaCm() {
|
||||
return lunghezzaCm.get();
|
||||
}
|
||||
|
||||
@Bindable
|
||||
public BigDecimal getLarghezzaCm() {
|
||||
return larghezzaCm.get();
|
||||
}
|
||||
|
||||
@Bindable
|
||||
public BigDecimal getAltezzaCm() {
|
||||
return altezzaCm.get();
|
||||
}
|
||||
|
||||
@Bindable
|
||||
public BigDecimal getTaraKg() {
|
||||
return taraKg.get();
|
||||
}
|
||||
|
||||
@Bindable
|
||||
public String getDescrizione() {
|
||||
return descrizione.get();
|
||||
}
|
||||
|
||||
@Bindable
|
||||
public String getCodMart() {
|
||||
return codMart.get();
|
||||
}
|
||||
|
||||
@Bindable
|
||||
public MtbTCol.FlagUiUlEnum getFlagUIUL() {
|
||||
return flagUIUL.get();
|
||||
}
|
||||
|
||||
@Bindable
|
||||
public String getCircuito() {
|
||||
return circuito.get();
|
||||
}
|
||||
|
||||
|
||||
public ObservableField<String> codTcolProperty() {
|
||||
return codTcol;
|
||||
}
|
||||
|
||||
public ObservableField<BigDecimal> pesoKgProperty() {
|
||||
return pesoKg;
|
||||
}
|
||||
|
||||
public ObservableField<BigDecimal> lunghezzaCmProperty() {
|
||||
return lunghezzaCm;
|
||||
}
|
||||
|
||||
public ObservableField<BigDecimal> larghezzaCmProperty() {
|
||||
return larghezzaCm;
|
||||
}
|
||||
|
||||
public ObservableField<BigDecimal> altezzaCmProperty() {
|
||||
return altezzaCm;
|
||||
}
|
||||
|
||||
public ObservableField<BigDecimal> taraKgProperty() {
|
||||
return taraKg;
|
||||
}
|
||||
|
||||
public ObservableField<String> descrizioneProperty() {
|
||||
return descrizione;
|
||||
}
|
||||
|
||||
public ObservableField<String> codMartProperty() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public ObservableField<MtbTCol.FlagUiUlEnum> flagUIULProperty() {
|
||||
return flagUIUL;
|
||||
}
|
||||
|
||||
public ObservableField<String> circuitoProperty() {
|
||||
return circuito;
|
||||
}
|
||||
|
||||
public void updateFromDTO(MtbTCol mtbTCol) {
|
||||
codTcol.set(mtbTCol.getCodTcol());
|
||||
pesoKg.set(mtbTCol.getPesoKg());
|
||||
lunghezzaCm.set(mtbTCol.getLunghezzaCm());
|
||||
larghezzaCm.set(mtbTCol.getLarghezzaCm());
|
||||
altezzaCm.set(mtbTCol.getAltezzaCm());
|
||||
taraKg.set(mtbTCol.getTaraKg());
|
||||
descrizione.set(mtbTCol.getDescrizione());
|
||||
codMart.set(mtbTCol.getCodMart());
|
||||
flagUIUL.set(mtbTCol.getFlagUiUl());
|
||||
circuito.set(mtbTCol.getCircuito());
|
||||
}
|
||||
}
|
||||
@ -11,6 +11,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.lang.reflect.Type;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@ -31,6 +32,8 @@ import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.SpostaULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.UpdateTipoULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||
@ -404,11 +407,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
});
|
||||
}
|
||||
|
||||
public void changePosizione(MtbColt mtbColtToMove, MtbDepoPosizione posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
String codMdep = posizione.getCodMdep();
|
||||
String posizioneString = posizione.getPosizione();
|
||||
|
||||
public void spostaUL(MtbColt mtbColtToMove, String codMdep, String posizione, boolean createDocAutomatically, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
MtbColt mtbColtToMoveClone = (MtbColt) mtbColtToMove.clone();
|
||||
|
||||
for (int i = 0; i < mtbColtToMoveClone.getMtbColr().size(); i++) {
|
||||
@ -417,26 +416,66 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
.setMtbPartitaMag(null);
|
||||
}
|
||||
|
||||
SpostaULRequestDTO spostaUlRequestDTO = new SpostaULRequestDTO()
|
||||
.setCodMdep(codMdep)
|
||||
.setPosizione(posizione)
|
||||
.setMtbColtsToMove(Collections.singletonList(mtbColtToMoveClone))
|
||||
.setCreateDocAutomatically(createDocAutomatically);
|
||||
|
||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||
colliMagazzinoRESTConsumerService
|
||||
.spostaULInPosizione(codMdep,
|
||||
posizioneString,
|
||||
mtbColtToMoveClone)
|
||||
.enqueue(new Callback<ServiceRESTResponse<Object>>() {
|
||||
.spostaUL(spostaUlRequestDTO)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||
analyzeAnswer(response, "changePosizione", mtbColts -> {
|
||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||
analyzeAnswer(response, "spostaUL", mtbColts -> {
|
||||
onComplete.run();
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
|
||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||
if (onFailed != null) onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void spostaUL(MtbColt mtbColtToMove, MtbDepoPosizione posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
String codMdep = posizione.getCodMdep();
|
||||
String posizioneString = posizione.getPosizione();
|
||||
|
||||
spostaUL(mtbColtToMove, codMdep, posizioneString, true, onComplete, onFailed);
|
||||
}
|
||||
|
||||
public void updateTipoUL(MtbColt mtbColt, String codTcol, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
MtbColt mtbColtClone = (MtbColt) mtbColt.clone();
|
||||
mtbColtClone.setMtbColr(new ObservableArrayList<>());
|
||||
|
||||
UpdateTipoULRequestDTO updateTipoULRequest = new UpdateTipoULRequestDTO()
|
||||
.setMtbColt(mtbColtClone)
|
||||
.setCodTcol(codTcol);
|
||||
|
||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||
colliMagazzinoRESTConsumerService
|
||||
.updateTipoUL(updateTipoULRequest)
|
||||
.enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||
analyzeAnswer(response, "updateTipoUL", mtbColts -> {
|
||||
onComplete.run();
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||
if (onFailed != null) onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void updateDataFine(MtbColt mtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
MtbColt cloneMtbColt = (MtbColt) mtbColt.clone();
|
||||
@ -517,14 +556,14 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||
colliMagazzinoRESTConsumerService.spostaArtsTraUL(spostaArtsTraULRequestDTO).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||
analyzeAnswer(response, "spostaArtsTraUL", data -> {
|
||||
onComplete.run();
|
||||
}, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
|
||||
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||
if (onFailed != null) onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
|
||||
@ -7,6 +7,8 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.SpostaULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.UpdateTipoULRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||
@ -31,11 +33,14 @@ public interface ColliMagazzinoRESTConsumerService {
|
||||
@POST("creaRettificaCollo")
|
||||
Call<ServiceRESTResponse<MtbColr>> creaRettificaCollo(@Query("codMdep") String codMdep, @Body RettificaULDTO rettificaULDTO);
|
||||
|
||||
@POST("wms/spostaULInPosizione")
|
||||
Call<ServiceRESTResponse<Object>> spostaULInPosizione(@Query("codMdep") String codMdep, @Query("posizione") String posizione, @Body MtbColt mtbColtToMove);
|
||||
@POST("wms/updateTipoUL")
|
||||
Call<ServiceRESTResponse<Void>> updateTipoUL(@Body UpdateTipoULRequestDTO requestDto);
|
||||
|
||||
@POST("wms/spostaUL")
|
||||
Call<ServiceRESTResponse<Void>> spostaUL(@Body SpostaULRequestDTO requestDto);
|
||||
|
||||
@POST("wms/spostaArtsTraUL")
|
||||
Call<ServiceRESTResponse<Object>> spostaArtsTraUL(@Body SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO);
|
||||
Call<ServiceRESTResponse<Void>> spostaArtsTraUL(@Body SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO);
|
||||
|
||||
@POST("wms/assegnaLottoSuColloScarico")
|
||||
Call<ServiceRESTResponse<MtbColt>> assegnaLottoSuColloScarico(@Body MtbColt mtbColt);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
@ -7,6 +8,8 @@ import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.mapper.MtbTcolMapper;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.rest.model.imballi.ImballoQuantityDTO;
|
||||
@ -24,18 +27,20 @@ public class ImballiRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
|
||||
|
||||
public List<MtbTCol> retrieveTipiColloSyncronized(MtbTCol.FlagUiUlEnum tipoImballo) throws Exception {
|
||||
public List<ObservableMtbTcol> retrieveImballiSyncronized(MtbTCol.FlagUiUlEnum tipoImballo) throws Exception {
|
||||
ImballiRESTConsumerService service = RESTBuilder.getService(ImballiRESTConsumerService.class);
|
||||
Response<ServiceRESTResponse<List<MtbTCol>>> response = service.retrieveTipiCollo(tipoImballo)
|
||||
Response<ServiceRESTResponse<List<MtbTCol>>> response = service.retrieveImballi(tipoImballo)
|
||||
.execute();
|
||||
|
||||
return analyzeAnswer(response, "retrieveTipiCollo");
|
||||
List<MtbTCol> retrieveTipiCollo = analyzeAnswer(response, "retrieveTipiCollo");
|
||||
retrieveTipiCollo = retrieveTipiCollo == null ? new ArrayList<>() : retrieveTipiCollo;
|
||||
return MtbTcolMapper.fromDTOList(retrieveTipiCollo);
|
||||
}
|
||||
|
||||
public void retrieveTipiCollo(MtbTCol.FlagUiUlEnum tipoImballo, RunnableArgs<List<MtbTCol>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
public void retrieveImballi(MtbTCol.FlagUiUlEnum tipoImballo, RunnableArgs<List<ObservableMtbTcol>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
var response = retrieveTipiColloSyncronized(tipoImballo);
|
||||
var response = retrieveImballiSyncronized(tipoImballo);
|
||||
if (onComplete != null) onComplete.run(response);
|
||||
} catch (Exception ex) {
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
|
||||
@ -16,7 +16,7 @@ public interface ImballiRESTConsumerService {
|
||||
|
||||
|
||||
@GET("wms/imballi/retrieve/{tipo}")
|
||||
Call<ServiceRESTResponse<List<MtbTCol>>> retrieveTipiCollo(@Path("tipo") MtbTCol.FlagUiUlEnum tipo);
|
||||
Call<ServiceRESTResponse<List<MtbTCol>>> retrieveImballi(@Path("tipo") MtbTCol.FlagUiUlEnum tipo);
|
||||
|
||||
@POST("wms/imballi/registraCarico")
|
||||
Call<ServiceRESTResponse<Void>> registraCarico(@Body RegistraCaricoImballiRequestDTO registraCaricoImballiRequest);
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package it.integry.integrywmsnative.core.rest.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
|
||||
public class SpostaULRequestDTO {
|
||||
|
||||
private String codMdep;
|
||||
private String posizione;
|
||||
private String annotazioni;
|
||||
private boolean createDocAutomatically = true;
|
||||
private List<MtbColt> mtbColtsToMove = new ArrayList<>();
|
||||
|
||||
|
||||
public String getCodMdep() {
|
||||
return codMdep;
|
||||
}
|
||||
|
||||
public SpostaULRequestDTO setCodMdep(String codMdep) {
|
||||
this.codMdep = codMdep;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPosizione() {
|
||||
return posizione;
|
||||
}
|
||||
|
||||
public SpostaULRequestDTO setPosizione(String posizione) {
|
||||
this.posizione = posizione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAnnotazioni() {
|
||||
return annotazioni;
|
||||
}
|
||||
|
||||
public SpostaULRequestDTO setAnnotazioni(String annotazioni) {
|
||||
this.annotazioni = annotazioni;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isCreateDocAutomatically() {
|
||||
return createDocAutomatically;
|
||||
}
|
||||
|
||||
public SpostaULRequestDTO setCreateDocAutomatically(boolean createDocAutomatically) {
|
||||
this.createDocAutomatically = createDocAutomatically;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbColt> getMtbColtsToMove() {
|
||||
return mtbColtsToMove;
|
||||
}
|
||||
|
||||
public SpostaULRequestDTO setMtbColtsToMove(List<MtbColt> mtbColtsToMove) {
|
||||
this.mtbColtsToMove = mtbColtsToMove;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package it.integry.integrywmsnative.core.rest.model;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
|
||||
public class UpdateTipoULRequestDTO {
|
||||
|
||||
private MtbColt mtbColt;
|
||||
private String codTcol;
|
||||
|
||||
public MtbColt getMtbColt() {
|
||||
return mtbColt;
|
||||
}
|
||||
|
||||
public UpdateTipoULRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||
this.mtbColt = mtbColt;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodTcol() {
|
||||
return codTcol;
|
||||
}
|
||||
|
||||
public UpdateTipoULRequestDTO setCodTcol(String codTcol) {
|
||||
this.codTcol = codTcol;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,15 @@
|
||||
package it.integry.integrywmsnative.core.settings;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.Azienda;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.dto.InternalCodAnagsDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
||||
|
||||
public class DBSettingsModel {
|
||||
@ -16,6 +20,7 @@ public class DBSettingsModel {
|
||||
|
||||
private Azienda datiAzienda = null;
|
||||
private List<InternalCodAnagsDTO> internalCodAnags = null;
|
||||
private ObservableList<ObservableMtbTcol> internalImballi = new ObservableArrayList<>();
|
||||
|
||||
private boolean enableCheckPartitaMagCheckPickingV;
|
||||
private boolean flagMultiClienteOrdV;
|
||||
@ -85,6 +90,7 @@ public class DBSettingsModel {
|
||||
private String docInterniRequestNumDoc;
|
||||
private boolean flagEnableArtCreation;
|
||||
private List<String> allowedCodMgrpForArtCreation;
|
||||
private boolean flagAccettazioneGroupListForn = false;
|
||||
|
||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||
return flagSpedizioneEnableFakeGiacenza;
|
||||
@ -131,6 +137,15 @@ public class DBSettingsModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ObservableList<ObservableMtbTcol> getInternalImballi() {
|
||||
return internalImballi;
|
||||
}
|
||||
|
||||
public DBSettingsModel setInternalImballi(ObservableList<ObservableMtbTcol> internalImballi) {
|
||||
this.internalImballi = internalImballi;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<AvailableCodMdepsDTO> getAvailableCodMdep() {
|
||||
return availableCodMdep;
|
||||
}
|
||||
@ -733,4 +748,12 @@ public class DBSettingsModel {
|
||||
this.flagPositionChangeRequest = flagPositionChangeRequest;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagAccettazioneGroupListForn() {
|
||||
return flagAccettazioneGroupListForn;
|
||||
}
|
||||
|
||||
public void setFlagAccettazioneGroupListForn(boolean flagAccettazioneGroupListForn) {
|
||||
this.flagAccettazioneGroupListForn = flagAccettazioneGroupListForn;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,8 @@ package it.integry.integrywmsnative.core.settings;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
|
||||
import com.google.firebase.perf.metrics.Trace;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
@ -16,9 +18,12 @@ import javax.inject.Singleton;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.dto.InternalCodAnagsDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.AziendaRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ImballiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
||||
@ -38,17 +43,20 @@ public class SettingsManager {
|
||||
|
||||
private static Context mContext;
|
||||
private static SystemRESTConsumer mSystemRESTConsumer;
|
||||
private static ImballiRESTConsumer mImballiRESTConsumer;
|
||||
private static AziendaRESTConsumer mAziendaRESTConsumer;
|
||||
private static GestSetupRESTConsumer mGestSetupRESTConsumer;
|
||||
private static PosizioniRESTConsumer mPosizioniRESTConsumer;
|
||||
|
||||
public SettingsManager(Context context,
|
||||
SystemRESTConsumer systemRESTConsumer,
|
||||
ImballiRESTConsumer imballiRESTConsumer,
|
||||
AziendaRESTConsumer aziendaRESTConsumer,
|
||||
GestSetupRESTConsumer gestSetupRESTConsumer,
|
||||
PosizioniRESTConsumer posizioniRESTConsumer) {
|
||||
mContext = context;
|
||||
mSystemRESTConsumer = systemRESTConsumer;
|
||||
mImballiRESTConsumer = imballiRESTConsumer;
|
||||
mAziendaRESTConsumer = aziendaRESTConsumer;
|
||||
mGestSetupRESTConsumer = gestSetupRESTConsumer;
|
||||
mPosizioniRESTConsumer = posizioniRESTConsumer;
|
||||
@ -124,10 +132,29 @@ public class SettingsManager {
|
||||
loadGestSetupValues(() -> {
|
||||
|
||||
onProgress.run("dati azienda");
|
||||
loadDatiAzienda(tmpOnComplete, tmpOnFailed);
|
||||
loadDatiAzienda(() -> {
|
||||
|
||||
loadTipiCollo(tmpOnComplete, tmpOnFailed);
|
||||
|
||||
}, tmpOnFailed);
|
||||
}, tmpOnFailed);
|
||||
}, tmpOnFailed);
|
||||
}, tmpOnFailed);
|
||||
}
|
||||
|
||||
private static void loadTipiCollo(Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
mImballiRESTConsumer.retrieveImballi(MtbTCol.FlagUiUlEnum.UL, tipiColloUl -> {
|
||||
mImballiRESTConsumer.retrieveImballi(MtbTCol.FlagUiUlEnum.UI, tipiColloUi -> {
|
||||
|
||||
var imballiList = new ObservableArrayList<ObservableMtbTcol>();
|
||||
imballiList.addAll(tipiColloUi);
|
||||
imballiList.addAll(tipiColloUl);
|
||||
|
||||
SettingsManager.iDB().setInternalImballi(imballiList);
|
||||
onComplete.run();
|
||||
}, onFailed);
|
||||
}, onFailed);
|
||||
|
||||
}
|
||||
|
||||
private static void loadDatiAzienda(Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
@ -243,6 +270,11 @@ public class SettingsManager {
|
||||
.setSection("ACCETTAZIONE")
|
||||
.setKeySection("FLAG_AUTO_OPEN_NEW_UL")
|
||||
.setSetter(dbSettingsModelIstance::setFlagCanAutoOpenNewULAccettazione));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("ACCETTAZIONE")
|
||||
.setKeySection("FLAG_GROUP_LIST_FORN")
|
||||
.setSetter(dbSettingsModelIstance::setFlagAccettazioneGroupListForn));
|
||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||
.setGestName("PICKING")
|
||||
.setSection("ACCETTAZIONE")
|
||||
|
||||
@ -25,6 +25,7 @@ import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.databinding.FragmentMainAccettazioneBollaBinding;
|
||||
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.SitBollaAccettazioneDTO;
|
||||
@ -166,7 +167,7 @@ public class MainAccettazioneBollaElencoFragment extends BaseFragment implements
|
||||
|
||||
this.mBolleInevaseMutableData.clear();
|
||||
|
||||
if(tmpList != null)
|
||||
if (tmpList != null)
|
||||
this.mBolleInevaseMutableData.addAll(convertDataModelToListModel(tmpList));
|
||||
}
|
||||
|
||||
@ -182,33 +183,44 @@ public class MainAccettazioneBollaElencoFragment extends BaseFragment implements
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private List<MainAccettazioneBolleElencoListModel> convertDataModelToListModel(List<TestataBollaAccettazioneDTO> dataList) {
|
||||
if(dataList == null)
|
||||
return null;
|
||||
boolean group = !SettingsManager.iDB().isFlagAccettazioneGroupListForn();
|
||||
if (dataList == null) return null;
|
||||
|
||||
Stream<TestataBollaAccettazioneDTO> stream = Stream.of(dataList);
|
||||
|
||||
if (group) {
|
||||
final Comparator<TestataBollaAccettazioneDTO> comparer = Comparator.comparing(TestataBollaAccettazioneDTO::getListino)
|
||||
.thenComparing(TestataBollaAccettazioneDTO::getRagSoc)
|
||||
.thenComparing(TestataBollaAccettazioneDTO::getNumDoc);
|
||||
stream = stream.sorted(comparer);
|
||||
} else {
|
||||
stream = stream.sortBy(x -> x.getRagSoc() + UtilityDate.formatDate(x.getDataDoc(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH));
|
||||
}
|
||||
|
||||
return Stream.of(dataList)
|
||||
.sorted(comparer)
|
||||
.map(x -> {
|
||||
return stream.map(x -> {
|
||||
MainAccettazioneBolleElencoListModel listModel = new MainAccettazioneBolleElencoListModel();
|
||||
|
||||
listModel.setOriginalModel(x);
|
||||
listModel.setGroupTitle(x.getListino() + " - " + x.getRagSoc());
|
||||
listModel.setDescription(String.format(getString(R.string.ord_acq_testata), x.getNumDoc(), UtilityDate.formatDate(x.getDataDoc(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)));
|
||||
|
||||
if (group)
|
||||
listModel.setGroupTitle(x.getListino() + " - " + x.getRagSoc());
|
||||
else
|
||||
listModel.setGroupTitle(x.getRagSoc());
|
||||
|
||||
listModel.setDescription(String.format(getString(R.string.ord_acq_testata),
|
||||
x.getNumDoc(),
|
||||
UtilityDate.formatDate(x.getDataDoc(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)));
|
||||
|
||||
if (group)
|
||||
listModel.setSubDescription(x.getDescrizioneListino());
|
||||
else
|
||||
listModel.setSubDescription(x.getListino() + " - " + x.getDescrizioneListino());
|
||||
|
||||
listModel.setRightDescription(x.getCodAnag());
|
||||
listModel.setRightSubDescription(x.getCodJcom());
|
||||
|
||||
return listModel;
|
||||
})
|
||||
.toList();
|
||||
}).toList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -41,8 +41,8 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||
@ -546,6 +546,16 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
this.mViewModel.deleteRow(mtbColr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestChangeMtbTcol(MtbColt mtbColt) {
|
||||
DialogInfoAggiuntiveLUView.newInstance(mtbColt, false, true, (note, mtbTcol) -> {
|
||||
onLoadingStarted();
|
||||
mViewModel.updateTipoUl(mtbTcol, this::onLoadingEnded);
|
||||
}, () -> {
|
||||
})
|
||||
.show(getSupportFragmentManager(), "dialog-note-aggiuntive");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBottomSheetLUClose() {
|
||||
this.mViewModel.closeLU();
|
||||
@ -560,7 +570,7 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInfoAggiuntiveRequest(RunnableArgss<String, MtbTCol> onComplete) {
|
||||
public void onInfoAggiuntiveRequest(RunnableArgss<String, ObservableMtbTcol> onComplete) {
|
||||
DialogInfoAggiuntiveLUView.newInstance(onComplete, this::onLoadingEnded)
|
||||
.show(getSupportFragmentManager(), DialogInfoAggiuntiveLUView.class.getName());
|
||||
}
|
||||
|
||||
@ -30,9 +30,9 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingL
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
@ -409,7 +409,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
});
|
||||
}
|
||||
|
||||
private void manageInfoAggiuntiveRequest(RunnableArgss<String, MtbTCol> onComplete) {
|
||||
private void manageInfoAggiuntiveRequest(RunnableArgss<String, ObservableMtbTcol> onComplete) {
|
||||
if (!SettingsManager.iDB().isFlagAccettazioneBollaAskTipoCollo()) {
|
||||
onComplete.run(null, null);
|
||||
return;
|
||||
@ -544,10 +544,6 @@ public class AccettazioneBollaPickingViewModel {
|
||||
initialQtaCnf = qtaCnfDaPrelevare;
|
||||
initialQtaTot = qtaColDaPrelevare;
|
||||
|
||||
} else if (totalQtaDoc != null) {
|
||||
initialNumCnf = totalNumCnfDoc;
|
||||
initialQtaCnf = qtaCnfDoc;
|
||||
initialQtaTot = totalQtaDoc;
|
||||
} else {
|
||||
initialNumCnf = BigDecimal.ONE;
|
||||
initialQtaCnf = mtbAart.getQtaCnf();
|
||||
@ -892,6 +888,13 @@ public class AccettazioneBollaPickingViewModel {
|
||||
this.mPickingList.postValue(this.mPickingList.getValue());
|
||||
}
|
||||
|
||||
public void updateTipoUl(ObservableMtbTcol newTipoUL, Runnable onComplete) {
|
||||
mColliMagazzinoRESTConsumer.updateTipoUL(mCurrentMtbColt, newTipoUL.getCodTcol(), () -> {
|
||||
mCurrentMtbColt.setCodTcol(newTipoUL.getCodTcol());
|
||||
onComplete.run();
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void addHistoryItem(@NonNull MtbColr mtbColr) {
|
||||
Optional<HistoryMtbAartDTO> optional = Stream.of(this.mHistoryUsedAarts)
|
||||
.filter(x -> (x.getCodMart() != null && x.getCodMart().equalsIgnoreCase(mtbColr.getCodMart())) ||
|
||||
@ -939,7 +942,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
if (this.mListener != null) this.mListener.onVersamentoAutomaticoULRequest(onComplete);
|
||||
}
|
||||
|
||||
private void sendOnInfoAggiuntiveRequest(RunnableArgss<String, MtbTCol> onComplete) {
|
||||
private void sendOnInfoAggiuntiveRequest(RunnableArgss<String, ObservableMtbTcol> onComplete) {
|
||||
if (this.mListener != null) this.mListener.onInfoAggiuntiveRequest(onComplete);
|
||||
}
|
||||
|
||||
@ -1041,7 +1044,7 @@ public class AccettazioneBollaPickingViewModel {
|
||||
|
||||
void onVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete);
|
||||
|
||||
void onInfoAggiuntiveRequest(RunnableArgss<String, MtbTCol> onComplete);
|
||||
void onInfoAggiuntiveRequest(RunnableArgss<String, ObservableMtbTcol> onComplete);
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
|
||||
@ -2,10 +2,12 @@ package it.integry.integrywmsnative.gest.accettazione_bolla_picking.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
@ -15,7 +17,11 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.zhukic.sectionedrecyclerview.SectionedRecyclerViewAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||
@ -62,10 +68,29 @@ public class AccettazioneBollaPickingListAdapter extends SectionedRecyclerViewAd
|
||||
this.mShowSecondaryUntMis = showSecondaryUntMis;
|
||||
|
||||
mutableDataSet.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||
@RequiresApi(api = Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
|
||||
@Override
|
||||
public void onChanged(ObservableList sender) {
|
||||
List<AccettazioneBollaPickingListModel> listaOrdinata = new ArrayList<>();
|
||||
if (!sender.isEmpty()) {
|
||||
listaOrdinata = new ArrayList<>(sender);
|
||||
|
||||
Collections.sort(listaOrdinata, (a, b) -> {
|
||||
|
||||
boolean condA = a.getQtaEvasa().subtract(a.getQtaTot()).floatValue() == 0;
|
||||
boolean condB = b.getQtaEvasa().subtract(b.getQtaTot()).floatValue() == 0;
|
||||
|
||||
if (condA && !condB) {
|
||||
return -1;
|
||||
} else if (!condA && condB) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
||||
mDataset.clear();
|
||||
mDataset.addAll(sender);
|
||||
mDataset.addAll(listaOrdinata);
|
||||
notifyDataSetChanged();
|
||||
notifyDataChanged();
|
||||
}
|
||||
|
||||
@ -44,8 +44,8 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||
@ -714,6 +714,16 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
this.mViewModel.deleteRow(mtbColr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestChangeMtbTcol(MtbColt mtbColt) {
|
||||
DialogInfoAggiuntiveLUView.newInstance(mtbColt, false, true, (note, mtbTcol) -> {
|
||||
onLoadingStarted();
|
||||
mViewModel.updateTipoUl(mtbTcol, this::onLoadingEnded);
|
||||
}, () -> {
|
||||
})
|
||||
.show(getSupportFragmentManager(), "dialog-note-aggiuntive");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBottomSheetLUClose() {
|
||||
this.mViewModel.closeLU();
|
||||
@ -725,7 +735,7 @@ public class AccettazioneOrdiniPickingActivity extends BaseActivity implements A
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInfoAggiuntiveRequest(RunnableArgss<String, MtbTCol> onComplete) {
|
||||
public void onInfoAggiuntiveRequest(RunnableArgss<String, ObservableMtbTcol> onComplete) {
|
||||
DialogInfoAggiuntiveLUView.newInstance(onComplete, this::onLoadingEnded).show(getSupportFragmentManager(), DialogInfoAggiuntiveLUView.class.getName());
|
||||
}
|
||||
|
||||
|
||||
@ -32,9 +32,9 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingL
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.dto.AlreadyRegisteredUDCDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
@ -878,6 +878,13 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
this.mPickingList.postValue(this.mPickingList.getValue());
|
||||
}
|
||||
|
||||
public void updateTipoUl(ObservableMtbTcol newTipoUL, Runnable onComplete) {
|
||||
mColliMagazzinoRESTConsumer.updateTipoUL(mCurrentMtbColt, newTipoUL.getCodTcol(), () -> {
|
||||
mCurrentMtbColt.setCodTcol(newTipoUL.getCodTcol());
|
||||
onComplete.run();
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void addHistoryItem(@NonNull MtbColr mtbColr) {
|
||||
Optional<HistoryMtbAartDTO> optional = Stream.of(this.mHistoryUsedAarts)
|
||||
.filter(x -> x.getCodMart().equalsIgnoreCase(mtbColr.getCodMart()))
|
||||
@ -931,7 +938,7 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
if (this.mListener != null) this.mListener.onVersamentoAutomaticoULRequest(onComplete);
|
||||
}
|
||||
|
||||
private void sendOnInfoAggiuntiveRequest(RunnableArgss<String, MtbTCol> onComplete) {
|
||||
private void sendOnInfoAggiuntiveRequest(RunnableArgss<String, ObservableMtbTcol> onComplete) {
|
||||
if (this.mListener != null) this.mListener.onInfoAggiuntiveRequest(onComplete);
|
||||
}
|
||||
|
||||
@ -1031,7 +1038,7 @@ public class AccettazioneOrdiniPickingViewModel {
|
||||
|
||||
void onVersamentoAutomaticoULRequest(RunnableArgs<Boolean> onComplete);
|
||||
|
||||
void onInfoAggiuntiveRequest(RunnableArgss<String, MtbTCol> onComplete);
|
||||
void onInfoAggiuntiveRequest(RunnableArgss<String, ObservableMtbTcol> onComplete);
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
|
||||
@ -88,6 +88,7 @@ public class ListaBancaliActivity extends BaseActivity implements ListaBancaliVi
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
mViewModel.setListener(this);
|
||||
|
||||
mCanRecoverUl = DataCache.retrieveItem(getIntent().getStringExtra(Key.CanRecoverUL));
|
||||
mReportName = DataCache.retrieveItem(getIntent().getStringExtra(Key.ReportName));
|
||||
|
||||
@ -41,6 +41,7 @@ import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliLavorazioneRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||
@ -51,6 +52,7 @@ import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
import it.integry.integrywmsnative.databinding.FragmentMainBinding;
|
||||
import it.integry.integrywmsnative.databinding.FragmentMainMenuGroupLayoutBinding;
|
||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
import it.integry.integrywmsnative.view.dialogs.switch_user_depo.DialogSwitchUserDepoView;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
@ -153,6 +155,8 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
||||
initSessionData();
|
||||
|
||||
initRecuperoCollo();
|
||||
|
||||
mBindings.switchDepoButton.setVisibility(SettingsManager.iDB().getAvailableCodMdep().size() > 1 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
private void initSessionData() {
|
||||
@ -278,8 +282,8 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
||||
|
||||
private void initGestMenu() {
|
||||
int menuSpanCount = 2;
|
||||
if (UtilityDimension.getDisplayInchs(this.getActivity()) > 8) menuSpanCount = 4;
|
||||
else if (UtilityDimension.getDisplayInchs(this.getActivity()) > 6.5) menuSpanCount = 3;
|
||||
if (UtilityDimension.getDisplayInchs(this.requireActivity()) > 8) menuSpanCount = 4;
|
||||
else if (UtilityDimension.getDisplayInchs(this.requireActivity()) > 6.5) menuSpanCount = 3;
|
||||
|
||||
MenuConfiguration baseMenuConfiguration = new MenuConfiguration();
|
||||
List<MenuConfiguration.MenuGroup> menuGroups = baseMenuConfiguration.getGroups();
|
||||
@ -319,7 +323,7 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
||||
|
||||
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
UtilityExceptions.defaultException(requireActivity(), exception);
|
||||
}
|
||||
}
|
||||
|
||||
@ -421,4 +425,14 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
||||
colorFadeTitleTextColor.setDuration(animationTimeMillis);
|
||||
colorFadeTitleTextColor.start();
|
||||
}
|
||||
|
||||
public void changeUserDepo() {
|
||||
DialogSwitchUserDepoView.newInstance(SettingsManager.iDB().getAvailableCodMdep(), this::onUserDepoChanged)
|
||||
.show(getParentFragmentManager(), "switch-user-depo");
|
||||
}
|
||||
|
||||
private void onUserDepoChanged(AvailableCodMdepsDTO newDepo) {
|
||||
SettingsManager.i().getUserSession().setDepo(newDepo);
|
||||
initSessionData();
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,6 @@ import android.view.ViewGroup;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
@ -60,7 +59,6 @@ import it.integry.integrywmsnative.gest.ordini_uscita_elenco.filters.FilterAutom
|
||||
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.filters.FilterClienteLayoutView;
|
||||
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.filters.FilterDepositoLayoutView;
|
||||
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.filters.FilterGruppoMercLayoutView;
|
||||
import it.integry.integrywmsnative.ui.filter_chips.filters.FilterNumeroOrdineLayoutView;
|
||||
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.filters.FilterPaeseLayoutView;
|
||||
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.filters.FilterTermConsLayoutView;
|
||||
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.filters.FilterVettoreLayoutView;
|
||||
@ -74,6 +72,7 @@ import it.integry.integrywmsnative.gest.spedizione.dialogs.row_info.BaseDialogRo
|
||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
import it.integry.integrywmsnative.ui.filter_chips.FilterChipDTO;
|
||||
import it.integry.integrywmsnative.ui.filter_chips.FilterChipView;
|
||||
import it.integry.integrywmsnative.ui.filter_chips.filters.FilterNumeroOrdineLayoutView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
|
||||
public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledFragment, IScrollableFragment, ISelectAllFragment, OrdiniUscitaElencoViewModel.Listener {
|
||||
@ -150,7 +149,7 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.fragment_main_ordini_uscita, container, false);
|
||||
mBindings = FragmentMainOrdiniUscitaBinding.inflate(inflater, container, false);
|
||||
|
||||
MainApplication.appComponent
|
||||
.prodOrdineLavorazioneElencoComponent()
|
||||
|
||||
@ -33,7 +33,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.rest.model.DocumentoResoDTO;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
@ -50,11 +50,12 @@ import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGExcep
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUView;
|
||||
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.yes_no.DialogYesNoView;
|
||||
|
||||
public class PickingResiActivity extends BaseActivity implements BottomSheetFragmentLUContentView.Listener, BottomSheetFragmentLUContentViewModel.Listener, PickingResiViewModel.Listener {
|
||||
|
||||
@ -269,13 +270,23 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
this.mViewmodel.deleteRow(mtbColr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestChangeMtbTcol(MtbColt mtbColt) {
|
||||
DialogInfoAggiuntiveLUView.newInstance(mtbColt, false, true, (note, mtbTcol) -> {
|
||||
onLoadingStarted();
|
||||
mViewmodel.updateTipoUl(mtbTcol, this::onLoadingEnded);
|
||||
}, () -> {
|
||||
})
|
||||
.show(getSupportFragmentManager(), "dialog-note-aggiuntive");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBottomSheetLUClose() {
|
||||
this.mViewmodel.closeLU(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInfoAggiuntiveRequired(RunnableArgss<String, MtbTCol> onComplete) {
|
||||
public void onInfoAggiuntiveRequired(RunnableArgss<String, ObservableMtbTcol> onComplete) {
|
||||
DialogInfoAggiuntiveLUView.newInstance(onComplete, this::onLoadingEnded)
|
||||
.show(getSupportFragmentManager(), DialogInfoAggiuntiveLUView.class.getName());
|
||||
}
|
||||
@ -392,14 +403,18 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
|
||||
@Override
|
||||
public void onLUPrintRequest(RunnableArgs<Boolean> onComplete) {
|
||||
DialogAskShouldPrint.make(this, "Packing List", onComplete).show();
|
||||
DialogYesNoView.newInstance(getString(R.string.action_print),
|
||||
String.format(getString(R.string.message_print_packing_list), "Packing List"),
|
||||
result -> {
|
||||
onComplete.run(result == DialogConsts.Results.YES);
|
||||
})
|
||||
.show(getSupportFragmentManager(), "dialog-print");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLUPrintError(Exception ex, Runnable onComplete) {
|
||||
this.onLoadingEnded();
|
||||
DialogSimpleMessageView.makeErrorDialog(
|
||||
new SpannableString(ex.getMessage()),
|
||||
DialogSimpleMessageView.makeErrorDialog(new SpannableString(ex.getMessage()),
|
||||
null,
|
||||
null,
|
||||
R.string.button_ignore_print,
|
||||
|
||||
@ -28,8 +28,8 @@ import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
@ -716,6 +716,13 @@ public class PickingResiViewModel {
|
||||
});
|
||||
}
|
||||
|
||||
public void updateTipoUl(ObservableMtbTcol newTipoUL, Runnable onComplete) {
|
||||
mColliMagazzinoRESTConsumer.updateTipoUL(mCurrentMtbColt, newTipoUL.getCodTcol(), () -> {
|
||||
mCurrentMtbColt.setCodTcol(newTipoUL.getCodTcol());
|
||||
onComplete.run();
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public void resetMatchedRows() {
|
||||
for (WithdrawableDtbDocr pickingObjectDTO : this.mPickingList.getValue()) {
|
||||
pickingObjectDTO
|
||||
@ -732,7 +739,7 @@ public class PickingResiViewModel {
|
||||
return mPickingList;
|
||||
}
|
||||
|
||||
private void sendOnInfoAggiuntiveRequired(RunnableArgss<String, MtbTCol> onComplete) {
|
||||
private void sendOnInfoAggiuntiveRequired(RunnableArgss<String, ObservableMtbTcol> onComplete) {
|
||||
if (this.mListener != null) this.mListener.onInfoAggiuntiveRequired(onComplete);
|
||||
}
|
||||
|
||||
@ -808,9 +815,10 @@ public class PickingResiViewModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public interface Listener extends ILUPrintListener, ILoadingListener, ILUBaseOperationsListener {
|
||||
|
||||
void onInfoAggiuntiveRequired(RunnableArgss<String, MtbTCol> onComplete);
|
||||
void onInfoAggiuntiveRequired(RunnableArgss<String, ObservableMtbTcol> onComplete);
|
||||
|
||||
void onError(Exception ex);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ package it.integry.integrywmsnative.gest.prod_rientro_merce.order_detail;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.JtbFasi;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
|
||||
public class ProdRientroMerceOrderDetailPickedQuantityDTO {
|
||||
|
||||
@ -14,7 +14,7 @@ public class ProdRientroMerceOrderDetailPickedQuantityDTO {
|
||||
private BigDecimal taraCol;
|
||||
private BigDecimal pesoLordo;
|
||||
|
||||
private MtbTCol mtbTCol;
|
||||
private ObservableMtbTcol mtbTCol;
|
||||
private JtbFasi jtbFasi;
|
||||
|
||||
public BigDecimal getNumCnf() {
|
||||
@ -71,11 +71,11 @@ public class ProdRientroMerceOrderDetailPickedQuantityDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbTCol getMtbTCol() {
|
||||
public ObservableMtbTcol getMtbTCol() {
|
||||
return mtbTCol;
|
||||
}
|
||||
|
||||
public ProdRientroMerceOrderDetailPickedQuantityDTO setMtbTCol(MtbTCol mtbTCol) {
|
||||
public ProdRientroMerceOrderDetailPickedQuantityDTO setMtbTCol(ObservableMtbTcol mtbTCol) {
|
||||
this.mtbTCol = mtbTCol;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ public class ProdRiposizionamentoDaProdViewModel {
|
||||
this.sendError(new ScannedPositionNotExistException());
|
||||
} else {
|
||||
if (mtbColt != null) {
|
||||
mColliMagazzinoRESTConsumer.changePosizione(mtbColt, mtbDepoPosizione, () -> {
|
||||
mColliMagazzinoRESTConsumer.spostaUL(mtbColt, mtbDepoPosizione, () -> {
|
||||
List<MvwSitArtUdcDetInventario> mvwSitArtUdcDetInventarioList = mMvwSitArtUdcDetInventarioLiveData.getValue();
|
||||
|
||||
if (mvwSitArtUdcDetInventarioList != null) {
|
||||
|
||||
@ -44,7 +44,7 @@ import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.model.OrdineUscitaInevasoDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
||||
@ -70,7 +70,6 @@ import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFrag
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLUView;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_vettore.DialogAskVettoreView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
@ -81,7 +80,6 @@ import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAgg
|
||||
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUView;
|
||||
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.input_quantity_v2.exception.OverflowQtaTotOrderedQuantityException;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtView;
|
||||
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracciamentoImballiView;
|
||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
||||
@ -818,7 +816,12 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
|
||||
@Override
|
||||
public void onLUPrintRequest(RunnableArgs<Boolean> onComplete) {
|
||||
DialogAskShouldPrint.make(this, "Packing List", onComplete).show();
|
||||
DialogYesNoView.newInstance(getString(R.string.action_print),
|
||||
String.format(getString(R.string.message_print_packing_list), "Packing List"),
|
||||
result -> {
|
||||
onComplete.run(result == DialogConsts.Results.YES);
|
||||
})
|
||||
.show(getSupportFragmentManager(), "dialog-print");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1046,6 +1049,16 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
FBToast.successToast(this, getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestChangeMtbTcol(MtbColt mtbColt) {
|
||||
DialogInfoAggiuntiveLUView.newInstance(mtbColt, false, true, (note, mtbTcol) -> {
|
||||
onLoadingStarted();
|
||||
mViewmodel.updateTipoUl(mtbTcol, this::onLoadingEnded);
|
||||
}, () -> {
|
||||
})
|
||||
.show(getSupportFragmentManager(), "dialog-note-aggiuntive");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBottomSheetLUClose() {
|
||||
this.mViewmodel.requestCloseLU(true);
|
||||
@ -1078,8 +1091,8 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInfoAggiuntiveRequired(MtbColt mtbColt, RunnableArgss<String, MtbTCol> onComplete) {
|
||||
DialogInfoAggiuntiveLUView.newInstance(mtbColt, onComplete, this::onLoadingEnded)
|
||||
public void onInfoAggiuntiveRequired(MtbColt mtbColt, RunnableArgss<String, ObservableMtbTcol> onComplete) {
|
||||
DialogInfoAggiuntiveLUView.newInstance(mtbColt, true, true, onComplete, this::onLoadingEnded)
|
||||
.show(getSupportFragmentManager(), DialogInfoAggiuntiveLUView.class.getName());
|
||||
}
|
||||
|
||||
|
||||
@ -43,10 +43,10 @@ import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.MtbPartitaMag;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.VtbVett;
|
||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
@ -855,7 +855,7 @@ public class SpedizioneViewModel {
|
||||
|
||||
|
||||
private void loadMatchedRows(List<PickingObjectDTO> matchedRows) {
|
||||
if (matchedRows == null || matchedRows.size() == 0) {
|
||||
if (matchedRows == null || matchedRows.isEmpty()) {
|
||||
this.sendError(new NoArtsFoundException());
|
||||
} else if (matchedRows.size() == 1) {
|
||||
PickingObjectDTO matchedItem = matchedRows.get(0);
|
||||
@ -898,9 +898,6 @@ public class SpedizioneViewModel {
|
||||
|
||||
public void dispatchOrdineRow(final PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, MtbColr refMtbColr, boolean canPartitaMagBeChanged) {
|
||||
|
||||
//TODO: Al posto di prelevare la prima riga bisognerebbe controllare se c'è ne una che corrisponde con la partita richiesta
|
||||
// MtbColr refMtbColr = refMtbColt != null ? refMtbColt.getMtbColr().get(0) : null;
|
||||
|
||||
|
||||
if (pickingObjectDTO.getTempPickData() != null && pickingObjectDTO.getTempPickData().getSourceMtbColt() != null && pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr() != null) {
|
||||
|
||||
@ -1100,8 +1097,12 @@ public class SpedizioneViewModel {
|
||||
BigDecimal initialQtaTot = mUseColliPedana ? initialNumCnf.multiply(initialQtaCnf) : mUseQtaOrd ? qtaColDaPrelevare : null;
|
||||
|
||||
MtbColt finalRefMtbColt = refMtbColt;
|
||||
|
||||
this.onItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), initialNumCnf, initialQtaCnf, initialQtaTot, qtaDaEvadere, numCnfDaEvadere, qtaCnfDaEvadere, qtaColDaPrelevare, numCnfDaPrelevare, qtaCnfDaPrelevare, totalQtaAvailable, totalNumCnfAvailable, qtaCnfAvailable, partitaMag, dataScad, mCanOverflowOrderQuantity, canPartitaMagBeChanged, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||
|
||||
this.saveNewRow(pickingObjectDTO, finalRefMtbColt, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag(), pickedQuantityDTO.getDataScad(), shouldCloseLU);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@ -1430,7 +1431,9 @@ public class SpedizioneViewModel {
|
||||
insertUDSRowRequestDto
|
||||
.setDataScad(dataScad);
|
||||
|
||||
this.mColliScaricoRESTConsumer.insertUDSRow(insertUDSRowRequestDto, createdMtbColr -> {
|
||||
executeDepositChangeIfNeeded(refMtbColt,
|
||||
() -> executeTipoUlChangeIfNeeded(refMtbColt,
|
||||
() -> this.mColliScaricoRESTConsumer.insertUDSRow(insertUDSRowRequestDto, createdMtbColr -> {
|
||||
pickingObjectDTO.getWithdrawMtbColrs().add(createdMtbColr);
|
||||
this.mCurrentMtbColt.getMtbColr().add(createdMtbColr);
|
||||
|
||||
@ -1448,7 +1451,7 @@ public class SpedizioneViewModel {
|
||||
|
||||
if (refMtbColt != null) {
|
||||
|
||||
MtbColr originalRefMtbColr = refMtbColt.getMtbColr() != null && refMtbColt.getMtbColr().size() > 0 ? refMtbColt.getMtbColr().get(0) : null;
|
||||
MtbColr originalRefMtbColr = refMtbColt.getMtbColr() != null && !refMtbColt.getMtbColr().isEmpty() ? refMtbColt.getMtbColr().get(0) : null;
|
||||
|
||||
if (originalRefMtbColr != null) {
|
||||
refMtbColr.setId(originalRefMtbColr.getId());
|
||||
@ -1470,10 +1473,52 @@ public class SpedizioneViewModel {
|
||||
|
||||
if (shouldCloseLU) requestCloseLU(shouldPrint);
|
||||
|
||||
}, this::sendError);
|
||||
}, this::sendError)));
|
||||
|
||||
}
|
||||
|
||||
private void executeDepositChangeIfNeeded(MtbColt refMtbColt, Runnable onComplete) {
|
||||
//Considero solo la prima UDC scansionata
|
||||
boolean shouldChangeCodMdep = refMtbColt != null && !refMtbColt.getCodMdep().equalsIgnoreCase(mCurrentMtbColt.getCodMdep()) &&
|
||||
mCurrentMtbColt.getMtbColr().isEmpty();
|
||||
String newCodMdep = shouldChangeCodMdep ? refMtbColt.getCodMdep() : null;
|
||||
|
||||
if (shouldChangeCodMdep) {
|
||||
mColliMagazzinoRESTConsumer.spostaUL(mCurrentMtbColt, newCodMdep, null, false, () -> {
|
||||
mCurrentMtbColt.setCodMdep(newCodMdep);
|
||||
onComplete.run();
|
||||
}, this::sendError);
|
||||
} else onComplete.run();
|
||||
}
|
||||
|
||||
private void executeTipoUlChangeIfNeeded(MtbColt refMtbColt, Runnable onComplete) {
|
||||
boolean shouldChangeCodTcol = refMtbColt != null && refMtbColt.getCodTcol() != null &&
|
||||
!refMtbColt.getCodTcol().equalsIgnoreCase(mCurrentMtbColt.getCodTcol()) &&
|
||||
mCurrentMtbColt.getMtbColr().isEmpty();
|
||||
String newTipoUL = shouldChangeCodTcol ? refMtbColt.getCodTcol() : null;
|
||||
|
||||
ObservableMtbTcol newMtbTcol = SettingsManager.iDB().getInternalImballi().stream().filter(x -> x.getCodTcol().equalsIgnoreCase(newTipoUL))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(newTipoUL) && newMtbTcol == null) {
|
||||
this.sendError(new Exception("Impossibile riconoscere il tipo UL " + newTipoUL));
|
||||
onComplete.run();
|
||||
return;
|
||||
}
|
||||
|
||||
if (shouldChangeCodTcol && newMtbTcol != null) {
|
||||
updateTipoUl(newMtbTcol, onComplete);
|
||||
} else onComplete.run();
|
||||
}
|
||||
|
||||
public void updateTipoUl(ObservableMtbTcol newTipoUL, Runnable onComplete) {
|
||||
mColliMagazzinoRESTConsumer.updateTipoUL(mCurrentMtbColt, newTipoUL.getCodTcol(), () -> {
|
||||
mCurrentMtbColt.setCodTcol(newTipoUL.getCodTcol());
|
||||
onComplete.run();
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, LocalDate dataScad, boolean shouldCloseLU) {
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
@ -2062,7 +2107,7 @@ public class SpedizioneViewModel {
|
||||
|
||||
void onFullItemDispatched(PickingObjectDTO pickingObjectDTO, MtbAart mtbAart, BigDecimal initialNumCnf, BigDecimal initialQtaCnf, BigDecimal initialQtaTot, BigDecimal totalQtaOrd, BigDecimal totalNumCnfOrd, BigDecimal qtaCnfOrd, BigDecimal totalQtaToBeTaken, BigDecimal totalNumCnfToBeTaken, BigDecimal qtaCnfToBeTaken, BigDecimal totalQtaAvailable, BigDecimal totalNumCnfAvailable, BigDecimal qtaCnfAvailable, String partitaMag, LocalDate dataScad, boolean canOverflowOrderQuantity, boolean canBatchLotBeChanged, RunnableArgss<PickedQuantityDTO, Boolean> onComplete);
|
||||
|
||||
void onInfoAggiuntiveRequired(MtbColt currentMtbColt, RunnableArgss<String, MtbTCol> onComplete);
|
||||
void onInfoAggiuntiveRequired(MtbColt currentMtbColt, RunnableArgss<String, ObservableMtbTcol> onComplete);
|
||||
|
||||
void onLUPositionChangeRequest(RunnableArgss<Boolean, MtbDepoPosizione> onComplete);
|
||||
|
||||
|
||||
@ -302,7 +302,7 @@ public class VersamentoMerceViewModel {
|
||||
|
||||
public void updatePosizione(MtbDepoPosizione mtbDepoPosizione) {
|
||||
this.sendOnLoadingStarted();
|
||||
mColliMagazzinoRESTConsumer.changePosizione(mCurrentMtbColt.getValue(), mtbDepoPosizione, () -> {
|
||||
mColliMagazzinoRESTConsumer.spostaUL(mCurrentMtbColt.getValue(), mtbDepoPosizione, () -> {
|
||||
this.sendOnLoadingEnded();
|
||||
this.sendOnDataSaved();
|
||||
}, this::sendError);
|
||||
|
||||
@ -5,7 +5,6 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.databinding.ObservableList;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@ -24,8 +23,8 @@ import it.integry.integrywmsnative.databinding.BottomSheetFragmentLuContentListI
|
||||
|
||||
public class BottomSheetFragmentLUContentListAdapter extends RecyclerView.Adapter<BottomSheetFragmentLUContentListAdapter.ViewHolder> {
|
||||
|
||||
private Context mContext;
|
||||
private ArrayList<MtbColr> mDataset;
|
||||
private final Context mContext;
|
||||
private final ArrayList<MtbColr> mDataset;
|
||||
private OnItemClickListener mOnItemClickListener;
|
||||
|
||||
|
||||
@ -60,7 +59,7 @@ public class BottomSheetFragmentLUContentListAdapter extends RecyclerView.Adapte
|
||||
@Override
|
||||
public BottomSheetFragmentLUContentListAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
// create a new view
|
||||
BottomSheetFragmentLuContentListItemBinding viewDataBinding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.bottom_sheet_fragment__lu_content__list_item, parent, false);
|
||||
BottomSheetFragmentLuContentListItemBinding viewDataBinding = BottomSheetFragmentLuContentListItemBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false);
|
||||
|
||||
return new BottomSheetFragmentLUContentListAdapter.ViewHolder(viewDataBinding);
|
||||
}
|
||||
|
||||
@ -8,10 +8,12 @@ import java.math.RoundingMode;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
|
||||
public class BottomSheetFragmentLUContentViewModel {
|
||||
|
||||
|
||||
|
||||
public ObservableField<MtbColt> mtbColt = new ObservableField<>();
|
||||
public ObservableField<String> pesoKg = new ObservableField<>();
|
||||
public ObservableField<String> pesoNettoKg = new ObservableField<>();
|
||||
@ -22,6 +24,10 @@ public class BottomSheetFragmentLUContentViewModel {
|
||||
if (this.mListener != null) this.mListener.onBottomSheetLUClose();
|
||||
}
|
||||
|
||||
public void requestChangeMtbTcol() {
|
||||
if (this.mListener != null) this.mListener.onRequestChangeMtbTcol(mtbColt.get());
|
||||
}
|
||||
|
||||
public BottomSheetFragmentLUContentViewModel setMtbColt(MtbColt mtbColt) {
|
||||
this.mtbColt.set(mtbColt);
|
||||
return this;
|
||||
@ -45,7 +51,7 @@ public class BottomSheetFragmentLUContentViewModel {
|
||||
MtbColt collo = this.mtbColt.get();
|
||||
if (collo == null) return;
|
||||
|
||||
MtbTCol tipoPedana = collo.getMtbTCol();
|
||||
ObservableMtbTcol tipoPedana = collo.getMtbTCol();
|
||||
BigDecimal taraPedana = tipoPedana != null ? tipoPedana.getTaraKg() : BigDecimal.ZERO;
|
||||
BigDecimal pesoNetto = BigDecimal.ZERO;
|
||||
|
||||
@ -67,6 +73,8 @@ public class BottomSheetFragmentLUContentViewModel {
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
void onRequestChangeMtbTcol(MtbColt mtbColt);
|
||||
|
||||
void onBottomSheetLUClose();
|
||||
}
|
||||
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_should_print;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.databinding.DialogAskShouldPrintBinding;
|
||||
|
||||
public class DialogAskShouldPrint {
|
||||
|
||||
private Dialog currentDialog;
|
||||
|
||||
public static Dialog make(final Context context, final String nomeEtichettaEN, RunnableArgs<Boolean> onDialogDismiss) {
|
||||
return new DialogAskShouldPrint(context, nomeEtichettaEN, onDialogDismiss).currentDialog;
|
||||
}
|
||||
|
||||
private DialogAskShouldPrint(Context context, String nomeEtichettaEN, RunnableArgs<Boolean> onDialogDismiss) {
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
DialogAskShouldPrintBinding bindings = DataBindingUtil.inflate(inflater, R.layout.dialog_ask_should_print, null, false);
|
||||
|
||||
currentDialog = new Dialog(context);
|
||||
currentDialog.setContentView(bindings.getRoot());
|
||||
|
||||
currentDialog.setCanceledOnTouchOutside(false);
|
||||
currentDialog.setCancelable(false);
|
||||
currentDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
bindings.descriptionText.setText(String.format(context.getResources().getString(R.string.message_print_packing_list), nomeEtichettaEN));
|
||||
|
||||
bindings.buttonConfirm.setOnClickListener(v -> {
|
||||
currentDialog.dismiss();
|
||||
onDialogDismiss.run(true);
|
||||
});
|
||||
|
||||
bindings.buttonAbort.setOnClickListener(v -> {
|
||||
currentDialog.dismiss();
|
||||
onDialogDismiss.run(false);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -136,31 +136,26 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
|
||||
private void initContent() {
|
||||
int colorBackgroundTitle = -1;
|
||||
Drawable titleIconRes = null;
|
||||
|
||||
switch (mType) {
|
||||
case INFO:
|
||||
Drawable titleIconRes = switch (mType) {
|
||||
case INFO -> {
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.colorPrimary);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_info_78dp, null);
|
||||
break;
|
||||
|
||||
case SUCCESS:
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.green_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_done_white_24dp, null);
|
||||
break;
|
||||
|
||||
case WARNING:
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.yellow_600);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_warning_white_24dp, null);
|
||||
break;
|
||||
|
||||
case ERROR:
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.red_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_mood_bad_24dp, null);
|
||||
break;
|
||||
yield ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_info_78dp, null);
|
||||
}
|
||||
case SUCCESS -> {
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.green_300);
|
||||
yield ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_done_white_24dp, null);
|
||||
}
|
||||
case WARNING -> {
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.yellow_600);
|
||||
yield ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_warning_white_24dp, null);
|
||||
}
|
||||
case ERROR -> {
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.red_300);
|
||||
yield ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_mood_bad_24dp, null);
|
||||
}
|
||||
};
|
||||
|
||||
this.positiveButtonText = requireContext().getText(R.string.ok).toString();
|
||||
this.positiveButtonText = requireContext().getText(mOnNegativeClick != null ? R.string.yes : R.string.ok).toString();
|
||||
this.negativeButtonText = requireContext().getText(R.string.no).toString();
|
||||
|
||||
//Title VIEW
|
||||
|
||||
@ -155,7 +155,7 @@ public class DialogCreateNewArtViewModel {
|
||||
barcodeProdotto.validate()
|
||||
) {
|
||||
ArticoloDTO articoloToSave = new ArticoloDTO()
|
||||
.setDescrizione(descrizione.get())
|
||||
.setDescrizione(descrizione.get() != null ? descrizione.get().substring(0, Math.min(40, descrizione.get().length())) : null)
|
||||
.setDescrizioneEstesa(descrizione.get())
|
||||
.setNote(UtilityString.empty2null(noteAggiuntive.get()))
|
||||
.setCodMgrp(selectedMtbGrup.get().getCodMgrp())
|
||||
|
||||
@ -2,14 +2,13 @@ package it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ImballiRESTConsumer;
|
||||
|
||||
@Module(subcomponents = DialogInfoAggiuntiveLUComponent.class)
|
||||
public class DialogInfoAggiuntiveLUModule {
|
||||
|
||||
@Provides
|
||||
DialogInfoAggiuntiveLUViewModel providesDialogInfoAggiuntiveLUViewModel(ImballiRESTConsumer imballiRESTConsumer) {
|
||||
return new DialogInfoAggiuntiveLUViewModel(imballiRESTConsumer);
|
||||
DialogInfoAggiuntiveLUViewModel providesDialogInfoAggiuntiveLUViewModel() {
|
||||
return new DialogInfoAggiuntiveLUViewModel();
|
||||
}
|
||||
|
||||
}
|
||||
@ -24,7 +24,7 @@ import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityObservable;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.DialogInfoAggiuntiveLuBinding;
|
||||
@ -46,26 +46,38 @@ public class DialogInfoAggiuntiveLUView extends BaseDialogFragment implements Di
|
||||
private Context mContext;
|
||||
|
||||
|
||||
private final RunnableArgss<String, MtbTCol> mOnComplete;
|
||||
private final boolean askNotes;
|
||||
private final boolean askTipoUl;
|
||||
private final RunnableArgss<String, ObservableMtbTcol> mOnComplete;
|
||||
private final Runnable mOnAbort;
|
||||
private final MtbColt currentMtbColt;
|
||||
|
||||
|
||||
public static DialogInfoAggiuntiveLUView newInstance(@NotNull RunnableArgss<String, MtbTCol> onComplete, @NotNull Runnable onAbort) {
|
||||
return new DialogInfoAggiuntiveLUView(null, onComplete, onAbort);
|
||||
public static DialogInfoAggiuntiveLUView newInstance(@NotNull RunnableArgss<String, ObservableMtbTcol> onComplete, @NotNull Runnable onAbort) {
|
||||
return new DialogInfoAggiuntiveLUView(null, true, true, onComplete, onAbort);
|
||||
}
|
||||
|
||||
public static DialogInfoAggiuntiveLUView newInstance(MtbColt mtbColt, @NotNull RunnableArgss<String, MtbTCol> onComplete, @NotNull Runnable onAbort) {
|
||||
return new DialogInfoAggiuntiveLUView(mtbColt, onComplete, onAbort);
|
||||
public static DialogInfoAggiuntiveLUView newInstance(MtbColt mtbColt, boolean askNotes, boolean askTipoUl, @NotNull RunnableArgss<String, ObservableMtbTcol> onComplete, @NotNull Runnable onAbort) {
|
||||
return new DialogInfoAggiuntiveLUView(mtbColt, askNotes, askTipoUl, onComplete, onAbort);
|
||||
}
|
||||
|
||||
private DialogInfoAggiuntiveLUView(MtbColt mtbColt, @NotNull RunnableArgss<String, MtbTCol> onComplete, @NotNull Runnable onAbort) {
|
||||
private DialogInfoAggiuntiveLUView(MtbColt mtbColt, boolean askNotes, boolean askTipoUl, @NotNull RunnableArgss<String, ObservableMtbTcol> onComplete, @NotNull Runnable onAbort) {
|
||||
super();
|
||||
this.mOnComplete = onComplete;
|
||||
this.mOnAbort = onAbort;
|
||||
this.currentMtbColt = mtbColt;
|
||||
|
||||
this.askNotes = askNotes;
|
||||
this.askTipoUl = askTipoUl;
|
||||
}
|
||||
|
||||
public boolean isAskNotes() {
|
||||
return askNotes;
|
||||
}
|
||||
|
||||
public boolean isAskTipoUl() {
|
||||
return askTipoUl;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
@ -109,8 +121,8 @@ public class DialogInfoAggiuntiveLUView extends BaseDialogFragment implements Di
|
||||
public void onInit(DialogInterface dialogInterface) {
|
||||
super.onInit(dialogInterface);
|
||||
|
||||
this.init();
|
||||
this.mViewModel.init();
|
||||
this.init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
@ -123,15 +135,12 @@ public class DialogInfoAggiuntiveLUView extends BaseDialogFragment implements Di
|
||||
|
||||
mBindings.filledExposedDropdownCodTcol.setAdapter(codTcolArrayAdapter);
|
||||
|
||||
this.mViewModel.getTipiCollo().observe(this, tipiCollo -> {
|
||||
|
||||
if (currentMtbColt != null && !UtilityString.isNullOrEmpty(currentMtbColt.getCodTcol()) && UtilityString.isNullOrEmpty(this.selectedMtbTcol.get())) {
|
||||
tipiCollo.stream()
|
||||
mViewModel.getTipiCollo().getValue().stream()
|
||||
.filter(x -> x.getCodTcol().equalsIgnoreCase(currentMtbColt.getCodTcol()))
|
||||
.findFirst()
|
||||
.ifPresent(tipoPedana -> this.selectedMtbTcol.set(tipoPedana.getCodTcol() + " - " + tipoPedana.getDescrizione()));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
UtilityObservable.addPropertyChanged(this.selectedMtbTcol, (value) -> {
|
||||
@ -160,6 +169,5 @@ public class DialogInfoAggiuntiveLUView extends BaseDialogFragment implements Di
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,38 +2,35 @@ package it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ImballiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
|
||||
public class DialogInfoAggiuntiveLUViewModel {
|
||||
|
||||
private final MutableLiveData<List<MtbTCol>> tipiCollo = new MutableLiveData<>();
|
||||
private final MutableLiveData<List<ObservableMtbTcol>> tipiCollo = new MutableLiveData<>();
|
||||
|
||||
private Listener mListener;
|
||||
private final ImballiRESTConsumer imballiRESTConsumer;
|
||||
|
||||
@Inject
|
||||
public DialogInfoAggiuntiveLUViewModel(ImballiRESTConsumer imballiRESTConsumer) {
|
||||
this.imballiRESTConsumer = imballiRESTConsumer;
|
||||
public DialogInfoAggiuntiveLUViewModel() {
|
||||
}
|
||||
|
||||
|
||||
public void init() {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
imballiRESTConsumer.retrieveTipiCollo(MtbTCol.FlagUiUlEnum.UL, tipiCollo -> {
|
||||
this.tipiCollo.postValue(tipiCollo == null ? new ArrayList<>() : tipiCollo);
|
||||
this.sendOnLoadingEnded();
|
||||
}, this::sendError);
|
||||
var imballiList = SettingsManager.iDB().getInternalImballi().stream()
|
||||
.filter(x -> x.getFlagUIUL() == MtbTCol.FlagUiUlEnum.UL)
|
||||
.collect(Collectors.toUnmodifiableList());
|
||||
this.tipiCollo.setValue(imballiList);
|
||||
}
|
||||
|
||||
public MutableLiveData<List<MtbTCol>> getTipiCollo() {
|
||||
public MutableLiveData<List<ObservableMtbTcol>> getTipiCollo() {
|
||||
return tipiCollo;
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ package it.integry.integrywmsnative.view.dialogs.input_lu_prod;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.JtbFasi;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
|
||||
public class DialogInputLUProdResultDTO {
|
||||
|
||||
@ -14,7 +14,7 @@ public class DialogInputLUProdResultDTO {
|
||||
private BigDecimal taraCol;
|
||||
private BigDecimal pesoLordo;
|
||||
|
||||
private MtbTCol mtbTCol;
|
||||
private ObservableMtbTcol mtbTCol;
|
||||
private JtbFasi jtbFasi;
|
||||
|
||||
|
||||
@ -72,11 +72,11 @@ public class DialogInputLUProdResultDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MtbTCol getMtbTCol() {
|
||||
public ObservableMtbTcol getMtbTCol() {
|
||||
return mtbTCol;
|
||||
}
|
||||
|
||||
public DialogInputLUProdResultDTO setMtbTCol(MtbTCol mtbTCol) {
|
||||
public DialogInputLUProdResultDTO setMtbTCol(ObservableMtbTcol mtbTCol) {
|
||||
this.mtbTCol = mtbTCol;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.JtbFasi;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityObservable;
|
||||
import it.integry.integrywmsnative.databinding.DialogInputLuProdBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
@ -335,7 +335,7 @@ public class DialogInputLUProdView extends BaseDialogFragment implements DialogI
|
||||
|
||||
|
||||
if (mDialogInputLUProdDTO.getCodTcol() != null) {
|
||||
Optional<MtbTCol> optTCol = Stream.of(tipiCollo)
|
||||
java.util.Optional<ObservableMtbTcol> optTCol = tipiCollo.stream()
|
||||
.filter(x -> x.getCodTcol().equalsIgnoreCase(mDialogInputLUProdDTO.getCodTcol()))
|
||||
.findFirst();
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingL
|
||||
import it.integry.integrywmsnative.core.model.JtbFasi;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ImballiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
@ -30,7 +31,7 @@ public class DialogInputLUProdViewModel {
|
||||
public ObservableField<Boolean> blockedTaraCol = new ObservableField<>(false);
|
||||
public ObservableField<Boolean> blockedPesoLordo = new ObservableField<>(false);
|
||||
|
||||
private final MutableLiveData<List<MtbTCol>> mTipiColloLiveData = new MutableLiveData<>();
|
||||
private final MutableLiveData<List<ObservableMtbTcol>> mTipiColloLiveData = new MutableLiveData<>();
|
||||
private final MutableLiveData<List<JtbFasi>> mLineeProdLiveData = new MutableLiveData<>();
|
||||
|
||||
private BigDecimal initialNumCnf;
|
||||
@ -43,7 +44,7 @@ public class DialogInputLUProdViewModel {
|
||||
private BigDecimal internalTaraCol;
|
||||
private BigDecimal internalPesoLordo;
|
||||
|
||||
private MtbTCol internalTipoPed;
|
||||
private ObservableMtbTcol internalTipoPed;
|
||||
private JtbFasi internalLineaProd;
|
||||
|
||||
private boolean isLineeProdRequired;
|
||||
@ -62,7 +63,7 @@ public class DialogInputLUProdViewModel {
|
||||
public void init(String codJfasParent) {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
imballiRESTConsumer.retrieveTipiCollo(MtbTCol.FlagUiUlEnum.UL, tipiCollo -> {
|
||||
imballiRESTConsumer.retrieveImballi(MtbTCol.FlagUiUlEnum.UL, tipiCollo -> {
|
||||
this.mTipiColloLiveData.postValue(tipiCollo);
|
||||
|
||||
mMesRESTConsumer.getLineeProduzione(codJfasParent, jtbFasi -> {
|
||||
@ -76,7 +77,7 @@ public class DialogInputLUProdViewModel {
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
public MutableLiveData<List<MtbTCol>> getTipiCollo() {
|
||||
public MutableLiveData<List<ObservableMtbTcol>> getTipiCollo() {
|
||||
return this.mTipiColloLiveData;
|
||||
}
|
||||
|
||||
@ -200,7 +201,7 @@ public class DialogInputLUProdViewModel {
|
||||
this.mListener.onDataChanged();
|
||||
}
|
||||
|
||||
public DialogInputLUProdViewModel setInternalTipoPed(MtbTCol internalTipoPed) {
|
||||
public DialogInputLUProdViewModel setInternalTipoPed(ObservableMtbTcol internalTipoPed) {
|
||||
this.internalTipoPed = internalTipoPed;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -6,35 +6,40 @@ import android.widget.ArrayAdapter;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
|
||||
public class DialogInputLUProdTipoColloAdapter extends ArrayAdapter<DialogInputLUProdTipoColloListModel> {
|
||||
|
||||
private List<DialogInputLUProdTipoColloListModel> mDataset;
|
||||
|
||||
public DialogInputLUProdTipoColloAdapter(@NonNull Context context, int resource, @NonNull MutableLiveData<List<MtbTCol>> inputData) {
|
||||
public DialogInputLUProdTipoColloAdapter(@NonNull Context context, int resource, @NonNull MutableLiveData<List<ObservableMtbTcol>> inputData) {
|
||||
super(context, resource);
|
||||
|
||||
inputData.observeForever(data -> {
|
||||
mDataset = Stream.of(data)
|
||||
mDataset = data.stream()
|
||||
.map(x -> new DialogInputLUProdTipoColloListModel()
|
||||
.setOriginalModel(x))
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
|
||||
clear();
|
||||
addAll(mDataset);
|
||||
});
|
||||
|
||||
if (inputData.getValue() != null)
|
||||
mDataset = inputData.getValue().stream()
|
||||
.map(x -> new DialogInputLUProdTipoColloListModel()
|
||||
.setOriginalModel(x))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public List<DialogInputLUProdTipoColloListModel> getDataset() {
|
||||
return this.mDataset;
|
||||
}
|
||||
|
||||
public MtbTCol getOriginalModelItem(int position) {
|
||||
public ObservableMtbTcol getOriginalModelItem(int position) {
|
||||
return mDataset.get(position).getOriginalModel();
|
||||
}
|
||||
|
||||
|
||||
@ -2,17 +2,17 @@ package it.integry.integrywmsnative.view.dialogs.input_lu_prod.adapter;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
|
||||
public class DialogInputLUProdTipoColloListModel {
|
||||
|
||||
private MtbTCol originalModel;
|
||||
private ObservableMtbTcol originalModel;
|
||||
|
||||
public MtbTCol getOriginalModel() {
|
||||
public ObservableMtbTcol getOriginalModel() {
|
||||
return originalModel;
|
||||
}
|
||||
|
||||
public DialogInputLUProdTipoColloListModel setOriginalModel(MtbTCol originalModel) {
|
||||
public DialogInputLUProdTipoColloListModel setOriginalModel(ObservableMtbTcol originalModel) {
|
||||
this.originalModel = originalModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -9,12 +9,13 @@ import android.widget.ArrayAdapter;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@ -24,7 +25,9 @@ import it.integry.integrywmsnative.core.di.BindableString;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ImballiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.databinding.DialogInputPesoLuBinding;
|
||||
@ -47,7 +50,7 @@ public class DialogInputPesoLUView extends BaseDialogFragment {
|
||||
public BindableString grossWeight = new BindableString();
|
||||
|
||||
|
||||
private List<MtbTCol> codTcolList = null;
|
||||
private List<ObservableMtbTcol> codTcolList = null;
|
||||
private ArrayAdapter<String> codTcolArrayAdapter = null;
|
||||
|
||||
|
||||
@ -95,34 +98,31 @@ public class DialogInputPesoLUView extends BaseDialogFragment {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void init() {
|
||||
|
||||
imballiRESTConsumer.retrieveTipiCollo(MtbTCol.FlagUiUlEnum.UL, codTcols -> {
|
||||
this.codTcolList = codTcols;
|
||||
this.codTcolList = SettingsManager.iDB().getInternalImballi().stream()
|
||||
.filter(x -> x.getFlagUIUL() == MtbTCol.FlagUiUlEnum.UL)
|
||||
.collect(Collectors.toUnmodifiableList());
|
||||
|
||||
List<String> codTcolDescriptions = Stream.of(codTcols)
|
||||
List<String> codTcolDescriptions = codTcolList.stream()
|
||||
.map(codTcol -> codTcol.getCodTcol() + " - " + codTcol.getDescrizione())
|
||||
.toList();
|
||||
|
||||
if(codTcol.get() != null) {
|
||||
Optional<String> newCodTcol = Stream.of(codTcols)
|
||||
if (codTcol.get() != null) {
|
||||
Optional<String> newCodTcol = this.codTcolList.stream()
|
||||
.filter(x -> x.getCodTcol().equalsIgnoreCase(codTcol.get()))
|
||||
.map(codTcol -> codTcol.getCodTcol() + " - " + codTcol.getDescrizione())
|
||||
.findSingle();
|
||||
.findFirst();
|
||||
|
||||
if(newCodTcol.isPresent()) codTcol.set(newCodTcol.get());
|
||||
if (newCodTcol.isPresent()) codTcol.set(newCodTcol.get());
|
||||
}
|
||||
|
||||
codTcolArrayAdapter = new ArrayAdapter(requireContext(), R.layout.array_adapter_single_item);
|
||||
codTcolArrayAdapter = new ArrayAdapter<>(requireContext(), R.layout.array_adapter_single_item);
|
||||
codTcolArrayAdapter.addAll(codTcolDescriptions);
|
||||
mBindings.filledExposedDropdownCodTcol.setAdapter(codTcolArrayAdapter);
|
||||
|
||||
// progressDialog.dismiss();
|
||||
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(requireContext(), ex);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.switch_user_depo;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface DialogSwitchUserDepoComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
DialogSwitchUserDepoComponent create();
|
||||
}
|
||||
|
||||
void inject(DialogSwitchUserDepoView dialogSwitchUserDepoView);
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.switch_user_depo;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
|
||||
@Module(subcomponents = DialogSwitchUserDepoComponent.class)
|
||||
public class DialogSwitchUserDepoModule {
|
||||
|
||||
@Provides
|
||||
DialogSwitchUserDepoViewModel providesDialogSwitchUserDepoViewModel() {
|
||||
return new DialogSwitchUserDepoViewModel();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.switch_user_depo;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.BR;
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.di.binders.recyclerview.BindingRecyclerViewAdapter;
|
||||
import it.integry.integrywmsnative.core.di.binders.recyclerview.ItemBinder;
|
||||
import it.integry.integrywmsnative.core.di.binders.recyclerview.ItemBinderBase;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
||||
import it.integry.integrywmsnative.databinding.DialogSwitchUserDepoBinding;
|
||||
|
||||
public class DialogSwitchUserDepoView extends BaseDialogFragment {
|
||||
|
||||
@Inject
|
||||
DialogSwitchUserDepoViewModel mViewModel;
|
||||
|
||||
private DialogSwitchUserDepoBinding mBindings;
|
||||
private Context mContext;
|
||||
|
||||
private final List<AvailableCodMdepsDTO> availableCodMdeps;
|
||||
private final RunnableArgs<AvailableCodMdepsDTO> onComplete;
|
||||
|
||||
//Pass here all external parameters
|
||||
public static DialogSwitchUserDepoView newInstance(List<AvailableCodMdepsDTO> availableCodMdeps, RunnableArgs<AvailableCodMdepsDTO> onComplete) {
|
||||
return new DialogSwitchUserDepoView(availableCodMdeps, onComplete);
|
||||
}
|
||||
|
||||
private DialogSwitchUserDepoView(List<AvailableCodMdepsDTO> availableCodMdeps, RunnableArgs<AvailableCodMdepsDTO> onComplete) {
|
||||
super();
|
||||
|
||||
this.availableCodMdeps = availableCodMdeps;
|
||||
this.onComplete = onComplete;
|
||||
|
||||
MainApplication.appComponent
|
||||
.dialogSwitchUserDepoComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
this.mContext = requireContext();
|
||||
|
||||
mBindings = DialogSwitchUserDepoBinding.inflate(LayoutInflater.from(this.mContext), null, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
|
||||
setCancelable(true);
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(this.mContext)
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(isCancelable())
|
||||
.create();
|
||||
|
||||
alertDialog.setCanceledOnTouchOutside(isCancelable());
|
||||
alertDialog.setOnShowListener(this);
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInit(DialogInterface dialogInterface) {
|
||||
super.onInit(dialogInterface);
|
||||
|
||||
ItemBinder<AvailableCodMdepsDTO> itemBinder = new ItemBinderBase<>(BR.item, R.layout.dialog_switch_user_depo__list_item);
|
||||
|
||||
BindingRecyclerViewAdapter<AvailableCodMdepsDTO> adapter = new BindingRecyclerViewAdapter<>(itemBinder, availableCodMdeps);
|
||||
adapter.setClickHandler(data -> {
|
||||
onComplete.run(data);
|
||||
dismiss();
|
||||
});
|
||||
|
||||
mBindings.availableDepoList.setAdapter(adapter);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.switch_user_depo;
|
||||
|
||||
public class DialogSwitchUserDepoViewModel {
|
||||
|
||||
}
|
||||
@ -2,14 +2,13 @@ package it.integry.integrywmsnative.view.dialogs.tracciamento_imballi;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ImballiRESTConsumer;
|
||||
|
||||
@Module(subcomponents = DialogTracciamentoImballiComponent.class)
|
||||
public class DialogTracciamentoImballiModule {
|
||||
|
||||
@Provides
|
||||
DialogTracciamentoImballiViewModel providesDialogTracciamentoImballiViewModel(ImballiRESTConsumer imballiRESTConsumer) {
|
||||
return new DialogTracciamentoImballiViewModel(imballiRESTConsumer);
|
||||
DialogTracciamentoImballiViewModel providesDialogTracciamentoImballiViewModel() {
|
||||
return new DialogTracciamentoImballiViewModel();
|
||||
}
|
||||
|
||||
}
|
||||
@ -7,33 +7,29 @@ import androidx.lifecycle.MutableLiveData;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ImballiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
|
||||
public class DialogTracciamentoImballiViewModel {
|
||||
|
||||
private final ImballiRESTConsumer imballiRESTConsumer;
|
||||
|
||||
private final MutableLiveData<List<TracciamentoImballoDTO>> imballiRegistrati = new MutableLiveData<>(new ArrayList<>());
|
||||
private final ObservableArrayList<MtbTCol> imballiDisponibili = new ObservableArrayList<>();
|
||||
private final ObservableArrayList<ObservableMtbTcol> imballiDisponibili = new ObservableArrayList<>();
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
public DialogTracciamentoImballiViewModel(ImballiRESTConsumer imballiRESTConsumer) {
|
||||
this.imballiRESTConsumer = imballiRESTConsumer;
|
||||
public DialogTracciamentoImballiViewModel() {
|
||||
}
|
||||
|
||||
|
||||
public void init() {
|
||||
this.imballiRESTConsumer.retrieveTipiCollo(MtbTCol.FlagUiUlEnum.UI, tipiCollo -> {
|
||||
imballiDisponibili.addAll(SettingsManager.iDB().getInternalImballi().stream()
|
||||
.filter(x -> x.getFlagUIUL() == MtbTCol.FlagUiUlEnum.UI)
|
||||
.collect(Collectors.toUnmodifiableList()));
|
||||
|
||||
if (tipiCollo == null || tipiCollo.isEmpty())
|
||||
return;
|
||||
|
||||
imballiDisponibili.addAll(tipiCollo);
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
|
||||
@ -41,7 +37,7 @@ public class DialogTracciamentoImballiViewModel {
|
||||
return imballiRegistrati;
|
||||
}
|
||||
|
||||
public ObservableArrayList<MtbTCol> getImballiDisponibili() {
|
||||
public ObservableArrayList<ObservableMtbTcol> getImballiDisponibili() {
|
||||
return imballiDisponibili;
|
||||
}
|
||||
|
||||
|
||||
@ -9,11 +9,11 @@ import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.model.observable.ObservableMtbTcol;
|
||||
|
||||
public class DialogTracciamentoImballi_TipoColloAdapter extends ArrayAdapter<DialogTracciamentoImballi_TipoColloAdapter.ListModel> {
|
||||
|
||||
public DialogTracciamentoImballi_TipoColloAdapter(@NonNull Context context, int resource, List<MtbTCol> inputData) {
|
||||
public DialogTracciamentoImballi_TipoColloAdapter(@NonNull Context context, int resource, List<ObservableMtbTcol> inputData) {
|
||||
super(context, resource);
|
||||
|
||||
if(inputData == null) return;
|
||||
@ -28,12 +28,12 @@ public class DialogTracciamentoImballi_TipoColloAdapter extends ArrayAdapter<Dia
|
||||
|
||||
public static class ListModel {
|
||||
|
||||
private MtbTCol originalModel;
|
||||
private ObservableMtbTcol originalModel;
|
||||
|
||||
public MtbTCol getOriginalModel() {
|
||||
public ObservableMtbTcol getOriginalModel() {
|
||||
return originalModel;
|
||||
}
|
||||
public ListModel setOriginalModel(MtbTCol originalModel) {
|
||||
public ListModel setOriginalModel(ObservableMtbTcol originalModel) {
|
||||
this.originalModel = originalModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.DialogYesNoBinding;
|
||||
@ -56,10 +57,10 @@ public class DialogYesNoView extends DialogFragment {
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(binding.getRoot())
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Ok", (dialog, which) -> {
|
||||
.setPositiveButton(R.string.yes, (dialog, which) -> {
|
||||
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.YES);
|
||||
})
|
||||
.setNegativeButton("Annulla", (dialog, which) -> {
|
||||
.setNegativeButton(R.string.no, (dialog, which) -> {
|
||||
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.NO);
|
||||
})
|
||||
.create();
|
||||
|
||||
@ -1,37 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="128dp"
|
||||
android:height="128dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
|
||||
android:width="222.9dp"
|
||||
android:height="222.9dp"
|
||||
android:viewportWidth="222.9"
|
||||
android:viewportHeight="222.9">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M256,485.5c-61.3,0-118.9-23.9-162.3-67.2c-43.3-43.3-67.2-101-67.2-162.3S50.4,137.1,93.7,93.7 c43.3-43.3,101-67.2,162.3-67.2s118.9,23.9,162.3,67.2c43.3,43.3,67.2,101,67.2,162.3s-23.9,118.9-67.2,162.3 C374.9,461.6,317.3,485.5,256,485.5z" />
|
||||
android:pathData="M190.62,137.94c-0.67,0 -1.34,-0.06 -2.02,-0.18 -6.2,-1.11 -10.33,-7.04 -9.22,-13.24 0.72,-4 1.08,-8.11 1.08,-12.21 0,-8.6 -1.56,-16.98 -4.64,-24.91 -2.28,-5.88 0.63,-12.49 6.51,-14.77 5.88,-2.28 12.49,0.64 14.77,6.51 4.1,10.58 6.18,21.73 6.18,33.17 0,5.45 -0.48,10.91 -1.43,16.23 -0.99,5.52 -5.8,9.4 -11.22,9.4Z"
|
||||
android:fillColor="#269c38"/>
|
||||
<path
|
||||
android:fillColor="#CCCCCC"
|
||||
android:pathData="M256,27c30.9,0,60.9,6.1,89.1,18c27.3,11.5,51.8,28,72.8,49.1c21,21,37.5,45.5,49.1,72.8 c11.9,28.2,18,58.2,18,89.1s-6.1,60.9-18,89.1c-11.5,27.3-28,51.8-49.1,72.8c-21,21-45.5,37.5-72.8,49.1 c-28.2,11.9-58.2,18-89.1,18s-60.9-6.1-89.1-18c-27.3-11.5-51.8-28-72.8-49.1c-21-21-37.5-45.5-49.1-72.8 c-11.9-28.2-18-58.2-18-89.1s6.1-60.9,18-89.1c11.5-27.3,28-51.8,49.1-72.8c21-21,45.5-37.5,72.8-49.1C195.1,33.1,225.1,27,256,27 M256,26C129,26,26,129,26,256s103,230,230,230s230-103,230-230S383,26,256,26L256,26z" />
|
||||
android:pathData="M167.26,65.87c-2.85,0 -5.7,-1.06 -7.91,-3.19 -12.9,-12.42 -29.87,-19.27 -47.78,-19.27 -4.06,0 -8.12,0.35 -12.07,1.05 -6.2,1.09 -12.13,-3.05 -13.22,-9.25 -1.1,-6.21 3.05,-12.13 9.25,-13.22 5.26,-0.93 10.66,-1.4 16.04,-1.4 23.85,0 46.44,9.11 63.62,25.65 4.54,4.37 4.67,11.6 0.3,16.13 -2.24,2.33 -5.23,3.5 -8.22,3.5Z"
|
||||
android:fillColor="#e62400"/>
|
||||
<path
|
||||
android:fillColor="#FF9900"
|
||||
android:pathData="M443.6,222.4C427.8,132.9,349.7,65,255.8,65c-23.9,0-46.7,4.4-67.8,12.4l14.3,36.4c16-5.8,33.4-9,51.4-9 c74.1,0,135.8,53.4,148.5,123.9L443.6,222.4z" />
|
||||
android:pathData="M111.45,111.45m-111.45,0a111.45,111.45 0,1 1,222.9 0a111.45,111.45 0,1 1,-222.9 0"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:fillColor="#EC0200"
|
||||
android:pathData="M250.9,446.5c1.6,0,3.2,0.1,4.9,0.1c105.4,0,190.8-85.4,190.8-190.8c0-3.3-0.1-6.6-0.3-9.9l-41.8,1.4 c0.2,2.8,0.2,5.6,0.2,8.5c0,83.4-69.5,150.9-152.9,150.9L250.9,446.5" />
|
||||
android:pathData="M35.21,149.37c-4.78,0 -9.23,-3.02 -10.83,-7.79 -3.16,-9.41 -4.76,-19.26 -4.76,-29.27 0,-29.92 14.63,-58.06 39.14,-75.28 5.17,-3.63 12.29,-2.38 15.92,2.78 3.63,5.16 2.38,12.29 -2.78,15.92 -18.43,12.94 -29.43,34.1 -29.43,56.58 0,7.54 1.2,14.94 3.57,22 2.01,5.98 -1.21,12.46 -7.2,14.47 -1.21,0.4 -2.43,0.6 -3.64,0.6Z"
|
||||
android:fillColor="#f39200"/>
|
||||
<path
|
||||
android:fillColor="#349933"
|
||||
android:pathData="M126.1,395.7c26,24.1,58.8,41,95.1,47.7l6.6-38.9c-28.8-5-55.3-18.7-76.1-37.5L126.1,395.7" />
|
||||
android:pathData="M111.56,204.25c-24.94,0 -48.28,-9.82 -65.72,-27.64 -4.41,-4.51 -4.33,-11.74 0.17,-16.16s11.74,-4.33 16.16,0.18c13.11,13.4 30.65,20.77 49.39,20.77 22.28,0 43.32,-10.84 56.28,-29 3.67,-5.14 10.8,-6.33 15.94,-2.66 5.14,3.67 6.33,10.8 2.66,15.94 -17.24,24.16 -45.24,38.58 -74.88,38.58Z"
|
||||
android:fillColor="#00a0de"/>
|
||||
<path
|
||||
android:fillColor="#0199CB"
|
||||
android:pathData="M160.6,90.4C103.5,123.3,65,185,65,255.8c0,45.3,15.8,86.9,42.1,119.6l29.7-24c-21.3-26-34.1-59.3-34.1-95.6 c0-56.4,30.9-105.5,76.7-131.5L160.6,90.4" />
|
||||
android:pathData="M190.62,137.94c-0.67,0 -1.34,-0.06 -2.02,-0.18 -6.2,-1.11 -10.33,-7.04 -9.22,-13.24 0.72,-4 1.08,-8.11 1.08,-12.21 0,-8.6 -1.56,-16.98 -4.64,-24.91 -2.28,-5.88 0.63,-12.49 6.51,-14.77 5.88,-2.28 12.49,0.64 14.77,6.51 4.1,10.58 6.18,21.73 6.18,33.17 0,5.45 -0.48,10.91 -1.43,16.23 -0.99,5.52 -5.8,9.4 -11.22,9.4Z"
|
||||
android:fillColor="#269c38"/>
|
||||
<path
|
||||
android:pathData="M 113.4 205 H 471.3 V 346.3 H 113.4 V 205 Z" />
|
||||
android:pathData="M167.26,65.87c-2.85,0 -5.7,-1.06 -7.91,-3.19 -12.9,-12.42 -29.87,-19.27 -47.78,-19.27 -4.06,0 -8.12,0.35 -12.07,1.05 -6.2,1.09 -12.13,-3.05 -13.22,-9.25 -1.1,-6.21 3.05,-12.13 9.25,-13.22 5.26,-0.93 10.66,-1.4 16.04,-1.4 23.85,0 46.44,9.11 63.62,25.65 4.54,4.37 4.67,11.6 0.3,16.13 -2.24,2.33 -5.23,3.5 -8.22,3.5Z"
|
||||
android:fillColor="#e62400"/>
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M168,250.1l-13.8,45.3h-19.4l-23.2-66.4h18.4l14.6,46.5l14.5-46.5h18.6l14.8,46.5l14.6-46.5h18l-22.5,66.4h-20.2L168,250.1 z" />
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M144.99,151.22c-2.08,0 -4.13,-0.28 -6.15,-0.83 -2.03,-0.56 -3.89,-1.33 -5.58,-2.32 -1.69,-0.99 -3.16,-2.14 -4.42,-3.44l6.37,-6.37c1.21,1.26 2.59,2.23 4.16,2.93 1.57,0.7 3.32,1.05 5.25,1.05 1.21,0 2.16,-0.19 2.86,-0.58 0.7,-0.39 1.05,-0.94 1.05,-1.67 0,-0.87 -0.41,-1.51 -1.23,-1.92 -0.82,-0.41 -1.9,-0.8 -3.22,-1.16 -1.33,-0.36 -2.71,-0.77 -4.16,-1.23 -1.45,-0.46 -2.82,-1.07 -4.13,-1.85 -1.3,-0.77 -2.37,-1.83 -3.19,-3.18 -0.82,-1.35 -1.23,-3.11 -1.23,-5.29s0.58,-4.24 1.74,-5.9c1.16,-1.67 2.8,-2.98 4.92,-3.95s4.66,-1.45 7.6,-1.45 5.7,0.52 8.26,1.56c2.56,1.04 4.61,2.57 6.15,4.6l-6.3,6.45c-1.11,-1.3 -2.35,-2.23 -3.73,-2.79 -1.38,-0.55 -2.71,-0.83 -4.02,-0.83s-2.2,0.19 -2.82,0.58c-0.63,0.39 -0.94,0.89 -0.94,1.52 0,0.72 0.42,1.3 1.27,1.74 0.84,0.43 1.91,0.82 3.19,1.16 1.28,0.34 2.64,0.74 4.09,1.2 1.45,0.46 2.82,1.11 4.13,1.95 1.3,0.84 2.36,1.95 3.19,3.33 0.82,1.37 1.23,3.17 1.23,5.39 0,3.43 -1.29,6.17 -3.87,8.22 -2.58,2.05 -6.07,3.08 -10.46,3.08Z"/>
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M225.2,229.1h67.3c9.8,0,16.8,1.9,21.1,5.7s6.5,10,6.5,18.6v42.1h-17.7v-39.8c0-4.9-0.7-8.1-2.2-9.7 c-1.5-1.6-4.5-2.3-9.1-2.3h-9.8v51.8h-17.9v-51.8h-20.5v51.8h-17.7V229.1z" />
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M129.58,69.43l-6.28,20.92l-6.8,-20.92l-9.41,0l-6.76,20.99l-6.24,-20.99l-11.28,0l12.55,36.31l9.41,0l7.09,-20.88l6.96,20.88l9.41,0l12.63,-36.31l-11.28,0z"/>
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M328.8,281.6h37c3.3,0,5.7-0.5,7.2-1.5c1.5-1,2.2-2.7,2.2-4.9c0-2.3-0.8-3.9-2.3-5c-1.5-1-3.9-1.6-7.1-1.6h-15.1 c-9,0-15.1-1.4-18.2-4.1c-3.2-2.7-4.7-7.6-4.7-14.6c0-7.1,1.9-12.4,5.7-15.8c3.8-3.4,9.7-5,17.7-5h37.7v13.8h-30.9 c-5,0-8.3,0.4-9.8,1.3c-1.5,0.9-2.3,2.5-2.3,4.7c0,2.1,0.7,3.6,2,4.5c1.3,1,3.4,1.4,6.3,1.4h15.9c7.3,0,12.8,1.7,16.6,5.1 c3.8,3.4,5.7,8.3,5.7,14.7c0,6.2-1.7,11.2-5.1,15c-3.4,3.9-7.7,5.8-13.1,5.8h-45.3V281.6z" />
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M119.23,120.88c-1.21,-2.08 -2.87,-3.68 -5,-4.82 -2.13,-1.13 -4.51,-1.7 -7.17,-1.7s-5.24,0.58 -7.46,1.74c-1.5,0.78 -2.76,1.81 -3.84,3.05 -1.01,-1.27 -2.23,-2.31 -3.65,-3.12 -1.96,-1.11 -4.14,-1.67 -6.55,-1.67 -2.66,0 -5.01,0.54 -7.06,1.63 -0.93,0.49 -1.77,1.1 -2.53,1.78l0.04,-2.68h-11.15l-0.2,14.83h11.35s0,-0.2 0,-0.2c0,-1.16 0.25,-2.15 0.76,-2.97 0.51,-0.82 1.2,-1.46 2.06,-1.92 0.87,-0.46 1.86,-0.69 2.97,-0.69 1.59,0 2.93,0.5 4.02,1.48 1.09,0.99 1.63,2.35 1.63,4.09v20.56h11.15v-20.56c0,-1.16 0.24,-2.15 0.72,-2.97 0.48,-0.82 1.17,-1.46 2.06,-1.92 0.89,-0.46 1.87,-0.69 2.93,-0.69 1.54,0 2.86,0.5 3.95,1.48 1.09,0.99 1.63,2.35 1.63,4.09v20.56h11.15v-21.87c0,-2.94 -0.6,-5.45 -1.81,-7.53Z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M70.36,142.69m-7.58,0a7.58,7.58 0,1 1,15.16 0a7.58,7.58 0,1 1,-15.16 0"/>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/circle_background.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="?attr/colorPrimaryContainer"/>
|
||||
</shape>
|
||||
41
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="222.9"
|
||||
android:viewportHeight="222.9">
|
||||
<group android:scaleX="0.72"
|
||||
android:scaleY="0.72"
|
||||
android:translateX="31.206"
|
||||
android:translateY="31.206">
|
||||
<path
|
||||
android:pathData="M190.6,137.9c-0.7,0 -1.3,0 -2,-0.2 -6.2,-1.1 -10.3,-7 -9.2,-13.2 0.7,-4 1.1,-8.1 1.1,-12.2 0,-8.6 -1.6,-17 -4.6,-24.9 -2.3,-5.9 0.6,-12.5 6.5,-14.8 5.9,-2.3 12.5,0.6 14.8,6.5 4.1,10.6 6.2,21.7 6.2,33.2s-0.5,10.9 -1.4,16.2c-1,5.5 -5.8,9.4 -11.2,9.4h0Z"
|
||||
android:fillColor="#269c38"/>
|
||||
<path
|
||||
android:pathData="M167.3,65.9c-2.9,0 -5.7,-1.1 -7.9,-3.2 -12.9,-12.4 -29.9,-19.3 -47.8,-19.3s-8.1,0.3 -12.1,1c-6.2,1.1 -12.1,-3 -13.2,-9.2 -1.1,-6.2 3.1,-12.1 9.2,-13.2 5.3,-0.9 10.7,-1.4 16,-1.4 23.9,0 46.4,9.1 63.6,25.6 4.5,4.4 4.7,11.6 0.3,16.1 -2.2,2.3 -5.2,3.5 -8.2,3.5h0Z"
|
||||
android:fillColor="#e62400"/>
|
||||
<path
|
||||
android:pathData="M35.2,149.4c-4.8,0 -9.2,-3 -10.8,-7.8 -3.2,-9.4 -4.8,-19.3 -4.8,-29.3 0,-29.9 14.6,-58.1 39.1,-75.3 5.2,-3.6 12.3,-2.4 15.9,2.8 3.6,5.2 2.4,12.3 -2.8,15.9 -18.4,12.9 -29.4,34.1 -29.4,56.6s1.2,14.9 3.6,22c2,6 -1.2,12.5 -7.2,14.5 -1.2,0.4 -2.4,0.6 -3.6,0.6h0Z"
|
||||
android:fillColor="#f39200"/>
|
||||
<path
|
||||
android:pathData="M111.6,204.3c-24.9,0 -48.3,-9.8 -65.7,-27.6 -4.4,-4.5 -4.3,-11.7 0.2,-16.2s11.7,-4.3 16.2,0.2c13.1,13.4 30.6,20.8 49.4,20.8s43.3,-10.8 56.3,-29c3.7,-5.1 10.8,-6.3 15.9,-2.7s6.3,10.8 2.7,15.9c-17.2,24.2 -45.2,38.6 -74.9,38.6h0Z"
|
||||
android:fillColor="#00a0de"/>
|
||||
<path
|
||||
android:pathData="M190.6,137.9c-0.7,0 -1.3,0 -2,-0.2 -6.2,-1.1 -10.3,-7 -9.2,-13.2 0.7,-4 1.1,-8.1 1.1,-12.2 0,-8.6 -1.6,-17 -4.6,-24.9 -2.3,-5.9 0.6,-12.5 6.5,-14.8 5.9,-2.3 12.5,0.6 14.8,6.5 4.1,10.6 6.2,21.7 6.2,33.2s-0.5,10.9 -1.4,16.2c-1,5.5 -5.8,9.4 -11.2,9.4h0Z"
|
||||
android:fillColor="#269c38"/>
|
||||
<path
|
||||
android:pathData="M167.3,65.9c-2.9,0 -5.7,-1.1 -7.9,-3.2 -12.9,-12.4 -29.9,-19.3 -47.8,-19.3s-8.1,0.3 -12.1,1c-6.2,1.1 -12.1,-3 -13.2,-9.2 -1.1,-6.2 3.1,-12.1 9.2,-13.2 5.3,-0.9 10.7,-1.4 16,-1.4 23.9,0 46.4,9.1 63.6,25.6 4.5,4.4 4.7,11.6 0.3,16.1 -2.2,2.3 -5.2,3.5 -8.2,3.5h0Z"
|
||||
android:fillColor="#e62400"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M145,151.2c-2.1,0 -4.1,-0.3 -6.1,-0.8 -2,-0.6 -3.9,-1.3 -5.6,-2.3s-3.2,-2.1 -4.4,-3.4l6.4,-6.4c1.2,1.3 2.6,2.2 4.2,2.9s3.3,1.1 5.2,1.1 2.2,-0.2 2.9,-0.6 1.1,-0.9 1.1,-1.7 -0.4,-1.5 -1.2,-1.9c-0.8,-0.4 -1.9,-0.8 -3.2,-1.2 -1.3,-0.4 -2.7,-0.8 -4.2,-1.2 -1.4,-0.5 -2.8,-1.1 -4.1,-1.9 -1.3,-0.8 -2.4,-1.8 -3.2,-3.2 -0.8,-1.4 -1.2,-3.1 -1.2,-5.3s0.6,-4.2 1.7,-5.9c1.2,-1.7 2.8,-3 4.9,-3.9s4.7,-1.4 7.6,-1.4 5.7,0.5 8.3,1.6 4.6,2.6 6.1,4.6l-6.3,6.4c-1.1,-1.3 -2.4,-2.2 -3.7,-2.8 -1.4,-0.6 -2.7,-0.8 -4,-0.8s-2.2,0.2 -2.8,0.6c-0.6,0.4 -0.9,0.9 -0.9,1.5s0.4,1.3 1.3,1.7c0.8,0.4 1.9,0.8 3.2,1.2 1.3,0.3 2.6,0.7 4.1,1.2 1.4,0.5 2.8,1.1 4.1,1.9 1.3,0.8 2.4,1.9 3.2,3.3 0.8,1.4 1.2,3.2 1.2,5.4 0,3.4 -1.3,6.2 -3.9,8.2s-6.1,3.1 -10.5,3.1h0Z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M129.6,69.4l-6.3,20.9l-6.8,-20.9l-9.4,0l-6.8,21l-6.2,-21l-11.3,0l12.6,36.3l9.4,0l7.1,-20.8l6.9,20.8l9.4,0l12.7,-36.3l-11.3,0z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M119.2,120.9c-1.2,-2.1 -2.9,-3.7 -5,-4.8 -2.1,-1.1 -4.5,-1.7 -7.2,-1.7s-5.2,0.6 -7.5,1.7c-1.5,0.8 -2.8,1.8 -3.8,3.1 -1,-1.3 -2.2,-2.3 -3.7,-3.1 -2,-1.1 -4.1,-1.7 -6.6,-1.7s-5,0.5 -7.1,1.6c-0.9,0.5 -1.8,1.1 -2.5,1.8v-2.7s-11.1,0 -11.1,0l-0.2,14.8h11.3v-0.2c0,-1.2 0.2,-2.2 0.8,-3s1.2,-1.5 2.1,-1.9c0.9,-0.5 1.9,-0.7 3,-0.7 1.6,0 2.9,0.5 4,1.5 1.1,1 1.6,2.3 1.6,4.1v20.6h11.2v-20.6c0,-1.2 0.2,-2.2 0.7,-3s1.2,-1.5 2.1,-1.9 1.9,-0.7 2.9,-0.7c1.5,0 2.9,0.5 3.9,1.5 1.1,1 1.6,2.3 1.6,4.1v20.6h11.2v-21.9c0,-2.9 -0.6,-5.4 -1.8,-7.5h0Z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M70.4,142.7m-7.6,0a7.6,7.6 0,1 1,15.2 0a7.6,7.6 0,1 1,-15.2 0"/>
|
||||
</group>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/ic_round_business_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="M12,7L12,5c0,-1.1 -0.9,-2 -2,-2L4,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,9c0,-1.1 -0.9,-2 -2,-2h-8zM6,19L4,19v-2h2v2zM6,15L4,15v-2h2v2zM6,11L4,11L4,9h2v2zM6,7L4,7L4,5h2v2zM10,19L8,19v-2h2v2zM10,15L8,15v-2h2v2zM10,11L8,11L8,9h2v2zM10,7L8,7L8,5h2v2zM19,19h-7v-2h2v-2h-2v-2h2v-2h-2L12,9h7c0.55,0 1,0.45 1,1v8c0,0.55 -0.45,1 -1,1zM18,11h-2v2h2v-2zM18,15h-2v2h2v-2z"/>
|
||||
|
||||
</vector>
|
||||
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="960" android:viewportWidth="960" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M483,619Q454,620 427.5,609.5Q401,599 381,579Q361,559 350.5,534Q340,509 340,481Q340,471 341,461.5Q342,452 345,443Q349,431 344.5,419Q340,407 329,402Q317,397 305.5,402Q294,407 290,419Q285,434 282.5,449Q280,464 280,480Q280,520 295.5,556.5Q311,593 339,621Q366,649 402.5,664Q439,679 478,680L461,697Q452,706 452,718Q452,730 461,739Q470,748 482,748Q494,748 503,739L567,675Q579,663 579,647Q579,631 567,619L503,555Q494,546 482,546Q470,546 461,555Q452,564 452,576Q452,588 461,597L483,619ZM476,340Q505,340 532,350.5Q559,361 579,381Q599,401 609.5,426Q620,451 620,479Q620,489 619,498.5Q618,508 615,517Q611,529 615.5,541.5Q620,554 631,559Q643,564 654.5,559Q666,554 670,542Q675,527 677.5,511.5Q680,496 680,480Q680,440 665.5,403.5Q651,367 622,338Q594,310 557.5,295.5Q521,281 482,281L500,263Q508,254 508,242Q508,230 499,221Q490,212 478,212Q466,212 457,221L393,285Q381,297 381,313Q381,329 393,341L457,405Q466,414 478,414Q490,414 499,405Q508,396 508,384Q508,372 499,363L476,340ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,563 848.5,636Q817,709 763,763Q709,817 636,848.5Q563,880 480,880ZM480,800Q614,800 707,707Q800,614 800,480Q800,346 707,253Q614,160 480,160Q346,160 253,253Q160,346 160,480Q160,614 253,707Q346,800 480,800ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Z"/>
|
||||
|
||||
</vector>
|
||||
@ -33,12 +33,10 @@
|
||||
android:layout_gravity="center">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/app_round_icon"
|
||||
android:adjustViewBounds="true"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
|
||||
@ -24,20 +24,13 @@
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/full_white"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/bottom_sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ffffffff"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -136,19 +129,327 @@
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<!-- Header con Numero e Data -->
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/unit_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{"UL #" + viewModel.mtbColt.numCollo.toString()}"
|
||||
app:chipStrokeWidth="0dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="UL #89" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:text="@{viewModel.mtbColt.dataColloHumanLong}"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
|
||||
app:layout_constraintBottom_toBottomOf="@id/unit_number"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/unit_number"
|
||||
tools:text="20 Gen 2025" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="18dp"
|
||||
app:cardElevation="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/client_card"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(viewModel.mtbColt.posizione) ? View.GONE : View.VISIBLE}">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.mtbColt.posizione}"
|
||||
android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
android:layout_gravity="end"
|
||||
tools:text="ME1AL2" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/position_text"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
|
||||
android:textColor="?attr/colorOutline"
|
||||
android:layout_gravity="end"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
app:cardElevation="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/unit_number"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:onClick="@{() -> viewModel.requestChangeMtbTcol()}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/circle_background"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_pallet"
|
||||
app:tint="?attr/colorPrimary" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:visibilityWhenNotNull="@{viewModel.mtbColt.mtbTcolProperty()}"
|
||||
android:text="@{viewModel.mtbColt.mtbTcolProperty().descrizioneProperty()}"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
tools:text="120x120 EPAL" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:visibilityWhenNull="@{viewModel.mtbColt.mtbTcolProperty()}"
|
||||
android:text="Non indicata"
|
||||
android:textColor="?attr/colorOutline"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/lu_type"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
|
||||
android:textColor="?attr/colorOutline" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Client Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/client_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:cardElevation="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/unit_number"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(viewModel.mtbColt.ragSocCliente) ? View.GONE : View.VISIBLE}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/circle_background"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_round_business_24"
|
||||
app:tint="?attr/colorPrimary" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.mtbColt.ragSocCliente}"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
tools:text="47TH PARALLEL LTD" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/customer"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
|
||||
android:textColor="?attr/colorOutline" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Weight Info -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/weight_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:cardElevation="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/client_card"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(viewModel.pesoNettoKg) ? View.GONE : View.VISIBLE}">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.pesoNettoKg}"
|
||||
android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
tools:text="0.00" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/net_weight"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
|
||||
android:textColor="?attr/colorOutline" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorOutline" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.pesoKg}"
|
||||
android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall"
|
||||
tools:text="0.00" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/gross_weight"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
|
||||
android:textColor="?attr/colorOutline" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Prepared Info -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(viewModel.mtbColt.posizione) ? View.GONE : View.VISIBLE}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/weight_card">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="4dp"
|
||||
android:text="@string/prepared_by_text"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
|
||||
android:textColor="?attr/colorOutline" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.mtbColt.preparatoDa}"
|
||||
tools:text="nome utente"
|
||||
android:layout_marginStart="4dp"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
|
||||
android:textColor="?attr/colorOutline" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -159,7 +460,7 @@
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
@ -207,16 +508,16 @@
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#57535D"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="(serie: " />
|
||||
android:text="(serie: "
|
||||
android:textColor="#57535D" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#57535D"
|
||||
android:text="@{viewModel.mtbColt.serCollo}"
|
||||
android:textColor="#57535D"
|
||||
android:textStyle="bold"
|
||||
tools:text="TextView" />
|
||||
|
||||
@ -224,8 +525,8 @@
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#57535D"
|
||||
android:text=")" />
|
||||
android:text=")"
|
||||
android:textColor="#57535D" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -433,7 +734,7 @@
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:binding="@{viewModel.pesoKg}"
|
||||
android:text="@{viewModel.pesoKg}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline6"
|
||||
@ -442,24 +743,90 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</LinearLayout>
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/lu_type"
|
||||
android:textColor="@android:color/black"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline7"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/edit_tipo_ul_button"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:src="@drawable/ic_edit_24dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline7"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/edit_tipo_ul_button"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:visibilityWhenNotNull="@{viewModel.mtbColt.mtbTcolProperty()}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.mtbColt.mtbTcolProperty().codTcol}"
|
||||
tools:text="Cod" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=" - " />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@{viewModel.mtbColt.mtbTcolProperty().descrizione}"
|
||||
tools:text="Descrizione" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:background="#ededed" />
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -470,13 +837,13 @@
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="14dp">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
@ -501,7 +868,7 @@
|
||||
android:textColor="@color/empty_view_gray"
|
||||
android:textSize="20sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
@ -513,10 +880,10 @@
|
||||
app:dividerThickness="0.5dp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
@ -526,7 +893,5 @@
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
@ -7,6 +7,8 @@
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.helper.GestioneToTextConverter" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityDate.COMMONS_DATE_FORMATS" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
|
||||
@ -25,7 +27,10 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp">
|
||||
android:padding="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/art_detail"
|
||||
@ -134,187 +139,73 @@
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/new_card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{mtbColr.numColloRif != null ? View.VISIBLE : View.GONE}"
|
||||
android:focusable="false"
|
||||
android:clickable="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/art_detail">
|
||||
app:layout_constraintTop_toBottomOf="@id/art_detail"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/green_600"
|
||||
android:orientation="horizontal"
|
||||
android:padding="2dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@android:color/white"
|
||||
android:orientation="horizontal"
|
||||
android:padding="0dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="4dp">
|
||||
android:padding="12dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:src="@drawable/ic_box"
|
||||
android:tint="@color/green_600" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/refs_title"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Prelevato da"
|
||||
android:textColor="@color/green_600"
|
||||
android:textStyle="bold" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/green_600" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/circle_background"
|
||||
android:padding="10dp"
|
||||
android:weightSum="2">
|
||||
android:src="@drawable/ic_box"
|
||||
app:tint="?attr/colorPrimary" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:text="@{"#" + mtbColr.numColloRif + " (" + mtbColr.serCollo + ")"}"
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
tools:text="#5230 (/)" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Num: "
|
||||
android:textColor="@android:color/black" />
|
||||
android:text="@{GestioneToTextConverter.convert(mtbColr.gestioneEnum)}"
|
||||
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
|
||||
android:textColor="?attr/colorOutline"
|
||||
tools:text="Lavorazione"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{mtbColr.numColloRif.toString()}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold"
|
||||
tools:text="5230" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Gest: "
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{mtbColr.gestioneRif}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold"
|
||||
tools:text="V" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Data: "
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{UtilityDate.formatDate(mtbColr.dataColloRifD, UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold"
|
||||
tools:text="02 mar 2020" />
|
||||
android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
tools:text="20 gennaio 2025" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal">
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Serie: "
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{mtbColr.serColloRif}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textStyle="bold"
|
||||
tools:text="UL" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@ -1,177 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/light_blue_300"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="24dp"
|
||||
android:src="@drawable/ic_error_white_24dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/action_print" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description_text"
|
||||
style="@style/TextViewMaterial"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="left"
|
||||
android:text="@string/message_print_packing_list" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_buttons_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_abort"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:text="@string/no"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:strokeColor="?colorPrimary" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_confirm"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:text="@string/yes"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:text="@string/action_print"-->
|
||||
<!--style="@style/TextViewMaterial.Dialog.HeadlineText"-->
|
||||
<!--android:gravity="center_horizontal"/>-->
|
||||
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:orientation="vertical"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="match_parent"-->
|
||||
<!--android:padding="16dp">-->
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="match_parent"-->
|
||||
<!--android:orientation="horizontal"-->
|
||||
<!--android:gravity="center_horizontal">-->
|
||||
|
||||
<!--<androidx.appcompat.widget.AppCompatTextView-->
|
||||
<!--android:id="@+id/print_message"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:layout_margin="16dp"-->
|
||||
<!--style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"-->
|
||||
<!--android:textColor="#5F6368"-->
|
||||
<!--android:textSize="16sp"-->
|
||||
<!--android:layout_gravity="center"-->
|
||||
<!--android:gravity="center_horizontal"-->
|
||||
<!--tools:text="La procedura stamperà una packing list"/>-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="match_parent"-->
|
||||
<!--android:orientation="horizontal"-->
|
||||
<!--android:paddingTop="8dp"-->
|
||||
<!--android:gravity="bottom|center_horizontal">-->
|
||||
|
||||
|
||||
<!--<com.google.android.material.button.MaterialButton-->
|
||||
<!--android:id="@+id/button_abort"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--style="@style/Button.PrimaryOutline"-->
|
||||
<!--app:icon="@drawable/ic_clear_24dp"-->
|
||||
<!--android:layout_marginEnd="8dp"-->
|
||||
<!--android:text="@android:string/no"/>-->
|
||||
|
||||
|
||||
<!--<com.google.android.material.button.MaterialButton-->
|
||||
<!--android:id="@+id/button_confirm"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--style="@style/Button.PrimaryFull"-->
|
||||
<!--app:icon="@drawable/ic_print_24dp"-->
|
||||
<!--android:text="@android:string/yes"/>-->
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
<!--</androidx.cardview.widget.CardView>-->
|
||||
|
||||
</layout>
|
||||
@ -53,7 +53,7 @@
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_text"
|
||||
app:layout_constraintBottom_toTopOf="@id/level_number_layout"
|
||||
android:visibility="@{viewModel.tipiCollo == null || viewModel.tipiCollo.empty ? View.GONE : View.VISIBLE}"
|
||||
app:visibility="@{view.askTipoUl}"
|
||||
android:hint="@string/lu_type">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
@ -76,6 +76,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:visibility="@{view.askNotes}"
|
||||
app:layout_constraintTop_toBottomOf="@id/input_cod_tcol">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
|
||||
54
app/src/main/res/layout/dialog_switch_user_depo.xml
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/switch_depo_title" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/description_text"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/switch_depo_description" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/available_depo_list"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</layout>
|
||||
@ -0,0 +1,50 @@
|
||||
<?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="item"
|
||||
type="it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO" />
|
||||
</data>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/code"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:layout_marginEnd="4dp"
|
||||
style="@style/TextAppearance.AppCompat.Medium"
|
||||
android:text="@{item.descrizione}"
|
||||
tools:text="Deposito centrale" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/code"
|
||||
style="@style/TextAppearance.AppCompat.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:textColor="?colorOnPrimaryContainer"
|
||||
android:background="@drawable/bg_checked_layout"
|
||||
android:backgroundTint="?colorPrimaryContainer"
|
||||
android:paddingHorizontal="6dp"
|
||||
android:paddingVertical="2dp"
|
||||
android:text="@{item.codMdep}"
|
||||
tools:text="01" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
@ -79,7 +79,7 @@
|
||||
android:padding="16dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
@ -87,9 +87,11 @@
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/user_icon"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:adjustViewBounds="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
@ -98,9 +100,13 @@
|
||||
android:tint="@android:color/white" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/user_detail_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_toEndOf="@id/user_icon"
|
||||
android:layout_toStartOf="@id/switch_depo_button">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/current_user_name"
|
||||
@ -108,7 +114,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/white"
|
||||
tools:text="Android Studio" />
|
||||
tools:text="MARIO ROSSI" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/current_deposito"
|
||||
@ -116,11 +122,26 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
tools:text="android.studio@android.com" />
|
||||
tools:text="Deposito: 01 - Centrale" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/switch_depo_button"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:onClick="@{() -> view.changeUserDepo()}"
|
||||
android:src="@drawable/ic_rounded_change_circle_24"
|
||||
android:tint="@android:color/white" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<net.cachapa.expandablelayout.ExpandableLayout
|
||||
|
||||
@ -21,8 +21,7 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white"
|
||||
tools:context=".gest.vendita.MainVenditaFragment">
|
||||
android:background="@android:color/white">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
@ -33,8 +32,7 @@
|
||||
android:id="@+id/filter_chips"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none"
|
||||
android:background="@color/gray_050">
|
||||
android:scrollbars="none">
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/filter_chips_group"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 3.3 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |