Compare commits
48 Commits
v1.29.3(30
...
v1.29.11(3
| Author | SHA1 | Date | |
|---|---|---|---|
| b0de2dda40 | |||
| f6fdc45e1a | |||
| 5e88833039 | |||
| 2c521c5f96 | |||
| 8530309244 | |||
| 57dd0cef76 | |||
| 8df31407ac | |||
| 8134a64a43 | |||
| 0c2fd117d5 | |||
| d2b5fe917d | |||
| 3de49545b7 | |||
| 7163d91c53 | |||
| b8b3d2f2bb | |||
| 7555e3d90f | |||
| 46e438e0e9 | |||
| 439eada61b | |||
| 48548b7c92 | |||
| 79afe0155b | |||
| 730dabc2bb | |||
| 44255f08b4 | |||
| fb23009fcc | |||
| c0310e492f | |||
| bf1fc455e1 | |||
| c7c2700dbe | |||
| c89e4869ef | |||
| 5e147c9d96 | |||
| 95fc680823 | |||
| 3cd1b8eb9f | |||
| ca04b87a8e | |||
| 10ab47a1b7 | |||
| fdaa2b7f21 | |||
| e9b179ca7f | |||
| 04d811af93 | |||
| cb2421f263 | |||
| 16a565fc51 | |||
| f68691df6b | |||
| f4f7f4a6f0 | |||
| b129bb51c6 | |||
| 8c80918521 | |||
| e8dea4cef0 | |||
| b51bf1d9cb | |||
| 3c25e223ab | |||
| 16d9f2f6ff | |||
| fd3dfb9afe | |||
| 2916d2b5d0 | |||
| dac12905ef | |||
| bf56c8e4c7 | |||
| 020c99e700 |
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 307
|
||||
def appVersionName = '1.29.3'
|
||||
def appVersionCode = 315
|
||||
def appVersionName = '1.29.11'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@@ -83,6 +83,7 @@ android {
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
namespace 'it.integry.integrywmsnative'
|
||||
|
||||
|
||||
}
|
||||
@@ -93,7 +94,7 @@ dependencies {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'com.orhanobut:logger:2.2.0'
|
||||
implementation 'com.github.lupaulus:logger:2.3.2'
|
||||
|
||||
//Firebase
|
||||
|
||||
@@ -106,21 +107,25 @@ dependencies {
|
||||
implementation 'com.google.android.gms:play-services-basement:18.1.0'
|
||||
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.6.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||
|
||||
implementation('androidx.preference:preference-ktx:1.2.0') {
|
||||
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel'
|
||||
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
|
||||
}
|
||||
|
||||
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
implementation 'com.annimon:stream:1.2.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.5.1'
|
||||
// implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'org.apache.commons:commons-text:1.9'
|
||||
|
||||
//MVVM
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="it.integry.integrywmsnative">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
|
||||
@@ -17,6 +17,7 @@ import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.CommessaRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.DepositoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.DocumentiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.EntityRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GestSetupRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
|
||||
@@ -207,4 +208,10 @@ public class MainApplicationModule {
|
||||
return new ProductionLinesRESTConsumer();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
DocumentiRESTConsumer provideDocumentiRESTConsumer() {
|
||||
return new DocumentiRESTConsumer();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.List;
|
||||
import it.integry.barcode_base_android_library.interfaces.BarcodeReaderInterface;
|
||||
import it.integry.barcode_base_android_library.model.BarcodeSetting;
|
||||
import it.integry.honeywellscannerlibrary.HoneyWellBarcodeReader;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
||||
import it.integry.keyobardemulatorscannerlibrary.KeyboardEmulatorBarcodeReader;
|
||||
import it.integry.pointmobilescannerlibrary.PointMobileBarcodeReader;
|
||||
@@ -135,10 +136,12 @@ public class BarcodeManager {
|
||||
|
||||
public static void disable() {
|
||||
mEnabled = false;
|
||||
UtilityLogger.trace("Barcode reader disabled");
|
||||
}
|
||||
|
||||
public static void enable() {
|
||||
mEnabled = true;
|
||||
UtilityLogger.trace("Barcode reader enabled");
|
||||
}
|
||||
|
||||
public static boolean isEnabled() {
|
||||
|
||||
@@ -4,8 +4,11 @@ import android.content.Context;
|
||||
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||
import com.orhanobut.logger.AndroidLogAdapter;
|
||||
import com.orhanobut.logger.DiskLogAdapter;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
@@ -36,8 +39,6 @@ public class AppContext {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Inject
|
||||
public void init() {
|
||||
this.initUtilities();
|
||||
@@ -56,10 +57,10 @@ public class AppContext {
|
||||
}
|
||||
|
||||
private void initCrashlytics() {
|
||||
if(!BuildConfig.DEBUG) {
|
||||
if (!BuildConfig.DEBUG) {
|
||||
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
|
||||
|
||||
if( SettingsManager.isInstanceAvailable() &&
|
||||
if (SettingsManager.isInstanceAvailable() &&
|
||||
(SettingsManager.i().getUserSession() != null && !UtilityString.isNullOrEmpty(SettingsManager.i().getUserSession().getProfileDB())) &&
|
||||
(SettingsManager.i().getUser() != null && !UtilityString.isNullOrEmpty(SettingsManager.i().getUser().getFullname()))) {
|
||||
|
||||
@@ -77,6 +78,11 @@ public class AppContext {
|
||||
|
||||
private void initLogger() {
|
||||
Logger.addLogAdapter(new AndroidLogAdapter());
|
||||
|
||||
File logsFolder = new File(mApplicationContext.getExternalFilesDir(null).getAbsolutePath());
|
||||
int maxBytesSize = 5000;
|
||||
Logger.addLogAdapter(new DiskLogAdapter(logsFolder, maxBytesSize));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ExceptionsHandler implements Thread.UncaughtExceptionHandler {
|
||||
@Override
|
||||
public void uncaughtException(final Thread thread, final Throwable ex) {
|
||||
try {
|
||||
UtilityLogger.errorMe(new Exception(ex));
|
||||
UtilityLogger.error(new Exception(ex));
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Exception Logger failed!", e);
|
||||
MainApplication.exit();
|
||||
|
||||
@@ -49,7 +49,7 @@ public class BaseActivity extends AppCompatActivity {
|
||||
public void onError(Exception ex) {
|
||||
this.runOnUiThread(() -> {
|
||||
this.closeProgress();
|
||||
UtilityExceptions.defaultException(this, ex, mCurrentProgress);
|
||||
UtilityExceptions.defaultException(this, ex);
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public abstract class BaseFragment extends Fragment {
|
||||
if (progressOpened) {
|
||||
this.progressOpened = false;
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
mCurrentProgress.dismiss();
|
||||
mCurrentProgress.dismissAllowingStateLoss();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public abstract class BaseFragment extends Fragment {
|
||||
public void onError(Exception ex) {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
this.closeProgress();
|
||||
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
|
||||
UtilityExceptions.defaultException(getActivity(), ex);
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -175,7 +175,7 @@ public class MtbColt extends EntityBase {
|
||||
try {
|
||||
dataColloD = getDataColloD();
|
||||
} catch (Exception ex) {
|
||||
UtilityLogger.errorMe(ex);
|
||||
UtilityLogger.error(ex);
|
||||
}
|
||||
|
||||
if (dataColloD != null) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package it.integry.integrywmsnative.core.model;
|
||||
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
|
||||
public class MtbDepoPosizione {
|
||||
@@ -19,7 +18,7 @@ public class MtbDepoPosizione {
|
||||
return (MtbDepoPosizione) super.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
e.printStackTrace();
|
||||
UtilityLogger.errorMe(e);
|
||||
UtilityLogger.error(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
package it.integry.integrywmsnative.core.model.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class StatoArticoloDTO {
|
||||
private String codMart;
|
||||
|
||||
private String partitaMag;
|
||||
|
||||
private Date dataScad;
|
||||
|
||||
private Integer ggScadPartita;
|
||||
|
||||
private Integer ggMax;
|
||||
|
||||
private Integer ggScadEffettivi;
|
||||
|
||||
private Integer ggUtili;
|
||||
|
||||
private Integer statoArt;
|
||||
|
||||
public String getCodMart() {
|
||||
return codMart;
|
||||
}
|
||||
|
||||
public StatoArticoloDTO setCodMart(String codMart) {
|
||||
this.codMart = codMart;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPartitaMag() {
|
||||
return partitaMag;
|
||||
}
|
||||
|
||||
public StatoArticoloDTO setPartitaMag(String partitaMag) {
|
||||
this.partitaMag = partitaMag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataScad() {
|
||||
return dataScad;
|
||||
}
|
||||
|
||||
public StatoArticoloDTO setDataScad(Date dataScad) {
|
||||
this.dataScad = dataScad;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getGgScadPartita() {
|
||||
return ggScadPartita;
|
||||
}
|
||||
|
||||
public StatoArticoloDTO setGgScadPartita(Integer ggScadPartita) {
|
||||
this.ggScadPartita = ggScadPartita;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getGgMax() {
|
||||
return ggMax;
|
||||
}
|
||||
|
||||
public StatoArticoloDTO setGgMax(Integer ggMax) {
|
||||
this.ggMax = ggMax;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getGgScadEffettivi() {
|
||||
return ggScadEffettivi;
|
||||
}
|
||||
|
||||
public StatoArticoloDTO setGgScadEffettivi(Integer ggScadEffettivi) {
|
||||
this.ggScadEffettivi = ggScadEffettivi;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getGgUtili() {
|
||||
return ggUtili;
|
||||
}
|
||||
|
||||
public StatoArticoloDTO setGgUtili(Integer ggUtili) {
|
||||
this.ggUtili = ggUtili;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getStatoArt() {
|
||||
return statoArt;
|
||||
}
|
||||
|
||||
public StatoArticoloDTO setStatoArt(Integer statoArt) {
|
||||
this.statoArt = statoArt;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package it.integry.integrywmsnative.core.model.secondary;
|
||||
|
||||
public enum StatoPartitaMag {
|
||||
|
||||
IN_SCADENZA(1),
|
||||
SCADUTO(2),
|
||||
NON_IN_SCADENZA(3);
|
||||
|
||||
private final int text;
|
||||
|
||||
StatoPartitaMag(int text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public int getText() {
|
||||
return this.text;
|
||||
}
|
||||
|
||||
public static StatoPartitaMag from(int text) {
|
||||
for (StatoPartitaMag b : StatoPartitaMag.values()) {
|
||||
if (b.text == text) return b;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import javax.inject.Singleton;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityQuery;
|
||||
@@ -32,7 +33,7 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
public void getByBarcodeProd(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
articoloRESTConsumerService.getByBarcodeProd(barcodeProd).enqueue(new Callback<ServiceRESTResponse<MtbAart>>() {
|
||||
articoloRESTConsumerService.getByBarcodeProd(barcodeProd).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||
analyzeAnswer(response, "getByBarcodeProd", (m) -> {
|
||||
@@ -61,7 +62,7 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
|
||||
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
articoloRESTConsumer.getByCodMart(joinedCods).enqueue(new Callback<ServiceRESTResponse<MtbAart>>() {
|
||||
articoloRESTConsumer.getByCodMart(joinedCods).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
||||
@@ -77,11 +78,28 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
}
|
||||
|
||||
public void getStatoPartita(String codMart, String partitaMag, RunnableArgs<List<StatoArticoloDTO>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
articoloRESTConsumer.getStatoPartita(codMart, partitaMag).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<List<StatoArticoloDTO>>> call, Response<ServiceRESTResponse<List<StatoArticoloDTO>>> response) {
|
||||
analyzeAnswer(response, "getStatoPartita", onComplete, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<StatoArticoloDTO>>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void getByCodMart(String codMartToFind, RunnableArgs<MtbAart> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
ArticoloRESTConsumerService articoloRESTConsumer = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||
articoloRESTConsumer.getByCodMart(codMartToFind).enqueue(new Callback<ServiceRESTResponse<MtbAart>>() {
|
||||
articoloRESTConsumer.getByCodMart(codMartToFind).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<MtbAart>> call, Response<ServiceRESTResponse<MtbAart>> response) {
|
||||
analyzeAnswer(response, "getByCodMart", (m) -> {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
@@ -16,4 +19,7 @@ public interface ArticoloRESTConsumerService {
|
||||
@GET("SM2getArticoloByCodMart")
|
||||
Call<ServiceRESTResponse<MtbAart>> getByCodMart(@Query("codMart") String barcodeProd);
|
||||
|
||||
@GET("getProductLotStatus")
|
||||
Call<ServiceRESTResponse<List<StatoArticoloDTO>>> getStatoPartita(@Query("codMart") String codMart, @Query("partitaMag") String partitaMag);
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class BarcodeRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
IBarcodeCustomization barcodeCustomization = ClassRouter.getInstance(ClassRouter.PATH.BARCODE_CUSTOMIZATION);
|
||||
|
||||
if(barcodeCustomization != null && barcodeCustomization.shouldForceToEan13(barcodeObj.getStringValue())){
|
||||
if (barcodeCustomization != null && barcodeCustomization.shouldForceToEan13(barcodeObj.getStringValue())) {
|
||||
Ean128Model ean128Model = new Ean128Model();
|
||||
ean128Model.Gtin = barcodeObj.getStringValue();
|
||||
onComplete.run(ean128Model);
|
||||
@@ -30,7 +30,7 @@ public class BarcodeRESTConsumer extends _BaseRESTConsumer {
|
||||
String ean128 = barcodeObj.getStringValue().replaceAll("" + ((char) 29), "|");
|
||||
|
||||
BarcodeRESTConsumerService barcodeRESTConsumerService = RESTBuilder.getService(BarcodeRESTConsumerService.class);
|
||||
barcodeRESTConsumerService.decodeEan128(ean128).enqueue(new Callback<ServiceRESTResponse<Ean128Model>>() {
|
||||
barcodeRESTConsumerService.decodeEan128(ean128).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<Ean128Model>> call, Response<ServiceRESTResponse<Ean128Model>> response) {
|
||||
analyzeAnswer(response, "DecodeEan128", onComplete, onFailed);
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.DtbDoct;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.model.LoadColliDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
|
||||
@Singleton
|
||||
public class DocumentiRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
|
||||
public void createDocsFromColli(List<LoadColliDTO> listColli, RunnableArgs<List<DtbDoct>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
DocumentiRESTConsumerService documentiRESTConsumerService = RESTBuilder.getService(DocumentiRESTConsumerService.class);
|
||||
documentiRESTConsumerService.createDocsFromColli(listColli).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<List<DtbDoct>>> call, Response<ServiceRESTResponse<List<DtbDoct>>> response) {
|
||||
analyzeAnswer(response, "createDocsFromColli", onComplete, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<DtbDoct>>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void createDocFromColli(LoadColliDTO loadColliDTO, RunnableArgs<DtbDoct> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
DocumentiRESTConsumerService documentiRESTConsumerService = RESTBuilder.getService(DocumentiRESTConsumerService.class);
|
||||
documentiRESTConsumerService.createDocFromColli(loadColliDTO).enqueue(new Callback<>() {
|
||||
@Override
|
||||
public void onResponse(Call<ServiceRESTResponse<DtbDoct>> call, Response<ServiceRESTResponse<DtbDoct>> response) {
|
||||
analyzeAnswer(response, "createDocFromColli", onComplete, onFailed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<DtbDoct>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package it.integry.integrywmsnative.core.rest.consumers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.DtbDoct;
|
||||
import it.integry.integrywmsnative.core.rest.model.LoadColliDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface DocumentiRESTConsumerService {
|
||||
|
||||
@POST("getDatiColliForDocs")
|
||||
Call<ServiceRESTResponse<List<DtbDoct>>> createDocsFromColli(@Body List<LoadColliDTO> listColli);
|
||||
|
||||
@POST("createDocFromColli")
|
||||
Call<ServiceRESTResponse<DtbDoct>> createDocFromColli(@Body LoadColliDTO listColli);
|
||||
|
||||
}
|
||||
@@ -61,7 +61,7 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<GestSetupDTO>> call, Throwable t) {
|
||||
Log.e("PrintCollo", t.toString());
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
UtilityLogger.error(new Exception(t));
|
||||
if (onFailed != null) onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
@@ -88,7 +88,7 @@ public class GestSetupRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<StbGestSetup>>> call, Throwable t) {
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
UtilityLogger.error(new Exception(t));
|
||||
if (onFailed != null) onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -109,7 +109,7 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<PickingObjectDTO>>> call, Throwable t) {
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
UtilityLogger.error(new Exception(t));
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
@@ -174,7 +174,7 @@ public class OrdiniRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<SitArtOrdDTO>>> call, Throwable t) {
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
UtilityLogger.error(new Exception(t));
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -79,7 +79,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<GrigliaDTO>> call, Throwable t) {
|
||||
Log.e("getArticoliListino_pv", t.toString());
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
UtilityLogger.error(new Exception(t));
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
@@ -130,7 +130,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
@Override
|
||||
public void onFailure(Call<List<ServiceRESTResponse<DtbOrdt>>> call, Throwable t) {
|
||||
Log.e("saveOrdineTerminale_pv", t.toString());
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
UtilityLogger.error(new Exception(t));
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -51,7 +51,7 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<String>>> call, Throwable t) {
|
||||
Log.e("GetAvailablePrinters", t.toString());
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
UtilityLogger.error(new Exception(t));
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -115,7 +115,7 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
|
||||
public void onFailure(Call<ServiceRESTResponse<List<String>>> call, final Throwable t) {
|
||||
Log.e("ProfilesAvailable", t.toString());
|
||||
onFailed.run(new Exception(t));
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
UtilityLogger.error(new Exception(t));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
package it.integry.integrywmsnative.core.rest.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
|
||||
public class LoadColliDTO {
|
||||
|
||||
private String gestione;
|
||||
private String codDtip;
|
||||
private String codAnag;
|
||||
private String codVdes;
|
||||
private Date dataDoc;
|
||||
private String serDoc;
|
||||
private Integer numDoc;
|
||||
private String codMdep;
|
||||
private String calcPrz;
|
||||
private boolean datiOrd;
|
||||
private Date dataOrd;
|
||||
private Integer numOrd;
|
||||
private String flagEvasoForzato;
|
||||
private Date dataVers;
|
||||
private String note;
|
||||
private boolean saveDoc = true;
|
||||
|
||||
private List<MtbColt> colli = new ArrayList<>();
|
||||
|
||||
public String getGestione() {
|
||||
return gestione;
|
||||
}
|
||||
|
||||
public LoadColliDTO setGestione(String gestione) {
|
||||
this.gestione = gestione;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodDtip() {
|
||||
return codDtip;
|
||||
}
|
||||
|
||||
public LoadColliDTO setCodDtip(String codDtip) {
|
||||
this.codDtip = codDtip;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodAnag() {
|
||||
return codAnag;
|
||||
}
|
||||
|
||||
public LoadColliDTO setCodAnag(String codAnag) {
|
||||
this.codAnag = codAnag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodVdes() {
|
||||
return codVdes;
|
||||
}
|
||||
|
||||
public LoadColliDTO setCodVdes(String codVdes) {
|
||||
this.codVdes = codVdes;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataDoc() {
|
||||
return dataDoc;
|
||||
}
|
||||
|
||||
public LoadColliDTO setDataDoc(Date dataDoc) {
|
||||
this.dataDoc = dataDoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSerDoc() {
|
||||
return serDoc;
|
||||
}
|
||||
|
||||
public LoadColliDTO setSerDoc(String serDoc) {
|
||||
this.serDoc = serDoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getNumDoc() {
|
||||
return numDoc;
|
||||
}
|
||||
|
||||
public LoadColliDTO setNumDoc(Integer numDoc) {
|
||||
this.numDoc = numDoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodMdep() {
|
||||
return codMdep;
|
||||
}
|
||||
|
||||
public LoadColliDTO setCodMdep(String codMdep) {
|
||||
this.codMdep = codMdep;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCalcPrz() {
|
||||
return calcPrz;
|
||||
}
|
||||
|
||||
public LoadColliDTO setCalcPrz(String calcPrz) {
|
||||
this.calcPrz = calcPrz;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isDatiOrd() {
|
||||
return datiOrd;
|
||||
}
|
||||
|
||||
public LoadColliDTO setDatiOrd(boolean datiOrd) {
|
||||
this.datiOrd = datiOrd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataOrd() {
|
||||
return dataOrd;
|
||||
}
|
||||
|
||||
public LoadColliDTO setDataOrd(Date dataOrd) {
|
||||
this.dataOrd = dataOrd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getNumOrd() {
|
||||
return numOrd;
|
||||
}
|
||||
|
||||
public LoadColliDTO setNumOrd(Integer numOrd) {
|
||||
this.numOrd = numOrd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlagEvasoForzato() {
|
||||
return flagEvasoForzato;
|
||||
}
|
||||
|
||||
public LoadColliDTO setFlagEvasoForzato(String flagEvasoForzato) {
|
||||
this.flagEvasoForzato = flagEvasoForzato;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getDataVers() {
|
||||
return dataVers;
|
||||
}
|
||||
|
||||
public LoadColliDTO setDataVers(Date dataVers) {
|
||||
this.dataVers = dataVers;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public LoadColliDTO setNote(String note) {
|
||||
this.note = note;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isSaveDoc() {
|
||||
return saveDoc;
|
||||
}
|
||||
|
||||
public LoadColliDTO setSaveDoc(boolean saveDoc) {
|
||||
this.saveDoc = saveDoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbColt> getColli() {
|
||||
return colli;
|
||||
}
|
||||
|
||||
public LoadColliDTO setColli(List<MtbColt> colli) {
|
||||
this.colli = colli;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -45,6 +45,8 @@ public class OrdineUscitaInevasoDTO extends OrdineInevasoDTO {
|
||||
private String nomeAgente;
|
||||
private String codJfas;
|
||||
private List<AvailableClassMerc> availableClassMerc;
|
||||
private boolean ordTrasf;
|
||||
|
||||
|
||||
public Integer getIdViaggio() {
|
||||
return idViaggio;
|
||||
@@ -56,7 +58,6 @@ public class OrdineUscitaInevasoDTO extends OrdineInevasoDTO {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getListino() {
|
||||
return listino;
|
||||
}
|
||||
@@ -371,6 +372,14 @@ public class OrdineUscitaInevasoDTO extends OrdineInevasoDTO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isOrdTrasf() {
|
||||
return ordTrasf;
|
||||
}
|
||||
|
||||
public OrdineUscitaInevasoDTO setOrdTrasf(boolean ordTrasf) {
|
||||
this.ordTrasf = ordTrasf;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
@@ -27,6 +27,7 @@ public class SitArtOrdDTO {
|
||||
private String codMsfa;
|
||||
private String descrizioneMsfa;
|
||||
private String untord;
|
||||
private BigDecimal qtaOmg;
|
||||
|
||||
private final HashMap<String, Object> extraInfo = new HashMap<>();
|
||||
|
||||
@@ -222,4 +223,13 @@ public class SitArtOrdDTO {
|
||||
this.untord = untord;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getQtaOmg() {
|
||||
return qtaOmg;
|
||||
}
|
||||
|
||||
public SitArtOrdDTO setQtaOmg(BigDecimal qtaOmg) {
|
||||
this.qtaOmg = qtaOmg;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,8 @@ public class DBSettingsModel {
|
||||
private boolean flagPickLiberoAllowEmptyDest = false;
|
||||
private boolean flagAskInfoAggiuntiveSpedizione = false;
|
||||
private String filterFornitoreProd;
|
||||
private String codDtipOrdTrasfV;
|
||||
private boolean notifyLotStatus = false;
|
||||
|
||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||
return flagSpedizioneEnableFakeGiacenza;
|
||||
@@ -384,4 +386,22 @@ public class DBSettingsModel {
|
||||
this.filterFornitoreProd = filterFornitoreProd;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodDtipOrdTrasfV() {
|
||||
return codDtipOrdTrasfV;
|
||||
}
|
||||
|
||||
public DBSettingsModel setCodDtipOrdTrasfV(String codDtipOrdTrasfV) {
|
||||
this.codDtipOrdTrasfV = codDtipOrdTrasfV;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isNotifyLotStatus() {
|
||||
return notifyLotStatus;
|
||||
}
|
||||
|
||||
public DBSettingsModel setNotifyLotStatus(boolean notifyLotStatus) {
|
||||
this.notifyLotStatus = notifyLotStatus;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,6 +326,14 @@ public class SettingsManager {
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("FLAG_ASK_INFO_AGGIUNTIVE"));
|
||||
stbGestSetupList.add(new StbGestSetup()
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("COD_DTIP_ORD_TRASF"));
|
||||
stbGestSetupList.add(new StbGestSetup()
|
||||
.setGestName("PICKING")
|
||||
.setSection("SPEDIZIONE")
|
||||
.setKeySection("FLAG_NOTIFICA_STATO_PARTITA"));
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
|
||||
GestSetupRESTConsumer.getValues(codMdep, stbGestSetupList, list -> {
|
||||
@@ -357,6 +365,8 @@ public class SettingsManager {
|
||||
dbSettingsModelIstance.setFlagPrintEtichetteOnOrderClose(getValueFromList(list, "SPEDIZIONE", "FLAG_PRINT_ETICHETTE_ON_CLOSE", Boolean.class));
|
||||
dbSettingsModelIstance.setFlagAskInfoAggiuntiveSpedizione(getValueFromList(list, "SPEDIZIONE", "FLAG_ASK_INFO_AGGIUNTIVE", Boolean.class));
|
||||
dbSettingsModelIstance.setFilterFornitoreProd(getValueFromList(list, "PRODUZIONE", "FILTER_FORNTIORE_PROD", String.class));
|
||||
dbSettingsModelIstance.setCodDtipOrdTrasfV(getValueFromList(list, "SPEDIZIONE", "COD_DTIP_ORD_TRASF", String.class));
|
||||
dbSettingsModelIstance.setNotifyLotStatus(getValueFromList(list, "SPEDIZIONE", "FLAG_NOTIFICA_STATO_PARTITA", Boolean.class));
|
||||
|
||||
String notePerdita = getValueFromList(list, "DOC_INTERNI", "NOTE_PERDITA", String.class);
|
||||
if (notePerdita != null)
|
||||
|
||||
@@ -61,8 +61,8 @@ public class UpdatesManager {
|
||||
|
||||
String destination = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/";
|
||||
|
||||
var progressDialog = DialogProgressView.newInstance("Download", null, false);
|
||||
progressDialog.show(mContext.getSupportFragmentManager(), "tag");
|
||||
var progressDialogBuilder = new DialogProgressView("Download", null, false);
|
||||
progressDialogBuilder.show(mContext.getSupportFragmentManager(), "tag");
|
||||
|
||||
|
||||
var fileDownloader = new FileDownloader()
|
||||
@@ -70,13 +70,13 @@ public class UpdatesManager {
|
||||
.setUrlString(downloadURL)
|
||||
.setOnProgressUpdate(progress -> {
|
||||
mContext.runOnUiThread(() -> {
|
||||
progressDialog.setProgress(progress);
|
||||
progressDialogBuilder.setProgress(progress);
|
||||
});
|
||||
})
|
||||
.setOnDownloadCompleted(destPath -> {
|
||||
|
||||
mContext.runOnUiThread(() -> {
|
||||
progressDialog.dismiss();
|
||||
progressDialogBuilder.dismiss();
|
||||
|
||||
Uri fileLoc;
|
||||
Intent intent;
|
||||
|
||||
@@ -130,7 +130,7 @@ public class UtilityBarcode {
|
||||
private static String getEAN13CheckDigit(String ean) {
|
||||
|
||||
if (ean.length() != 12) {
|
||||
UtilityLogger.errorMe(new Exception("Please provide an input string of 12 chars. Current lenght: " + ean.length()));
|
||||
UtilityLogger.error(new Exception("Please provide an input string of 12 chars. Current lenght: " + ean.length()));
|
||||
return null;
|
||||
}
|
||||
long tot = 0;
|
||||
|
||||
@@ -37,7 +37,7 @@ public class UtilityDate {
|
||||
try{
|
||||
return UtilityDate.recognizeDate(dateString);
|
||||
} catch (ParseException | DateNotRecognizedException | TimeNotRecognizedException pex){
|
||||
UtilityLogger.errorMe(pex);
|
||||
UtilityLogger.error(pex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import it.integry.integrywmsnative.core.exception.InvalidConnectionException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLUException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLUGestioneException;
|
||||
import it.integry.integrywmsnative.core.rest.CommonRESTException;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
|
||||
public class UtilityExceptions {
|
||||
@@ -25,12 +24,6 @@ public class UtilityExceptions {
|
||||
InvalidLUGestioneException.class,
|
||||
InvalidLUException.class
|
||||
};
|
||||
|
||||
public static void defaultException(Context context, Exception ex, DialogProgressView progressDialog) {
|
||||
defaultException(context, ex);
|
||||
if (progressDialog != null && progressDialog.isVisible()) progressDialog.dismiss();
|
||||
}
|
||||
|
||||
public static void defaultException(Context context, Exception ex) {
|
||||
defaultException(context, ex, false);
|
||||
}
|
||||
@@ -68,7 +61,7 @@ public class UtilityExceptions {
|
||||
Stream.of(FIREBASE_IGNORED_EXCEPTIONS).anyMatch(x -> x.isAssignableFrom(ex.getClass()));
|
||||
|
||||
if (!BuildConfig.DEBUG && !toIgnore) {
|
||||
if (sendEmail) UtilityLogger.errorMe(ex);
|
||||
if (sendEmail) UtilityLogger.error(ex);
|
||||
FirebaseCrashlytics.getInstance().recordException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,48 +3,30 @@ package it.integry.integrywmsnative.core.utility;
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
|
||||
public class UtilityLogger {
|
||||
|
||||
public static void logMe(String message) {
|
||||
StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
|
||||
public static void trace(String message) {
|
||||
Logger.d(message, getPreviousStackTraceElement());
|
||||
}
|
||||
|
||||
String caller = "UtilityLogger";
|
||||
|
||||
for (int i = 0; i < stackTraceElements.length; i++) {
|
||||
|
||||
if (stackTraceElements[i].getMethodName().equalsIgnoreCase("logMe")) {
|
||||
caller = stackTraceElements[i + 1].getFileName() + "->" + stackTraceElements[i + 1].getMethodName();
|
||||
}
|
||||
|
||||
}
|
||||
public static void info(String message) {
|
||||
Logger.i(message);
|
||||
}
|
||||
|
||||
public static void debug(String message) {
|
||||
Logger.d(message);
|
||||
}
|
||||
|
||||
public static void errorMe(Exception ex) {
|
||||
errorMe(ex, null, null, null);
|
||||
public static void error(Exception ex) {
|
||||
error(ex, "");
|
||||
}
|
||||
|
||||
public static void errorMe(Exception ex, String additionalText) {
|
||||
errorMe(ex, additionalText, null, null);
|
||||
}
|
||||
public static void error(Exception ex, String additionalText) {
|
||||
if (!BuildConfig.DEBUG) FirebaseCrashlytics.getInstance().recordException(ex);
|
||||
|
||||
public static void errorMe(Exception ex, String additionalText, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
if(!BuildConfig.DEBUG) FirebaseCrashlytics.getInstance().recordException(ex);
|
||||
|
||||
logMe(ex.getMessage());
|
||||
Logger.e(ex, additionalText);
|
||||
|
||||
// if ((!(ex instanceof SocketTimeoutException) && !(ex.getCause() instanceof SocketTimeoutException)) ||
|
||||
// (!(ex instanceof SocketException) && !(ex.getCause() instanceof SocketException)) ||
|
||||
@@ -82,4 +64,52 @@ public class UtilityLogger {
|
||||
// }
|
||||
}
|
||||
|
||||
private static String getPreviousStackTraceElement() {
|
||||
StackTraceElement[] stackTraceElementsArr = Thread.currentThread().getStackTrace();
|
||||
String caller = "UtilityLogger";
|
||||
StringBuilder callerNew = new StringBuilder();
|
||||
|
||||
int found = 0;
|
||||
|
||||
for (int i = 0; i < stackTraceElementsArr.length; i++) {
|
||||
|
||||
if(!stackTraceElementsArr[i].getClassName().startsWith("it.integry"))
|
||||
continue;
|
||||
|
||||
if (stackTraceElementsArr[i].getMethodName().equalsIgnoreCase("getPreviousStackTraceElement")) {
|
||||
found = i;
|
||||
}
|
||||
|
||||
if (found > 0 && i >= found + 2) {
|
||||
callerNew
|
||||
.append(stackTraceElementsArr[i].getClassName())
|
||||
.append("->")
|
||||
.append(stackTraceElementsArr[i].getMethodName())
|
||||
.append(":")
|
||||
.append(stackTraceElementsArr[i].getLineNumber())
|
||||
.append("\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return callerNew.length() > 0 ? callerNew.toString() : caller;
|
||||
}
|
||||
|
||||
|
||||
// public static void logMe(String message) {
|
||||
// StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
|
||||
//
|
||||
// String caller = "UtilityLogger";
|
||||
//
|
||||
// for (int i = 0; i < stackTraceElements.length; i++) {
|
||||
//
|
||||
// if (stackTraceElements[i].getMethodName().equalsIgnoreCase("logMe")) {
|
||||
// caller = stackTraceElements[i + 1].getFileName() + "->" + stackTraceElements[i + 1].getMethodName();
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// Logger.d(message);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
public class UtilityProgress {
|
||||
|
||||
public static DialogProgressView createDefaultProgressDialog(FragmentActivity mContext) {
|
||||
var progress = DialogProgressView.newInstance();
|
||||
var progress = DialogProgressView.newInstance(null, null, true);
|
||||
progress.show(mContext.getSupportFragmentManager(), "tag");
|
||||
return progress;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class OrdiniAccettazioneRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<SitArtOrdDTO>>> call, Throwable t) {
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
UtilityLogger.error(new Exception(t));
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -798,7 +798,7 @@ public class AccettazionePickingActivity extends BaseActivity implements Accetta
|
||||
if (ex instanceof InvalidPesoKGException) {
|
||||
UtilityToast.showToast(ex.getMessage());
|
||||
} else {
|
||||
UtilityExceptions.defaultException(this, ex, mCurrentProgress);
|
||||
UtilityExceptions.defaultException(this, ex);
|
||||
}
|
||||
|
||||
BarcodeManager.enable();
|
||||
|
||||
@@ -319,17 +319,12 @@ public class AccettazionePickingViewModel {
|
||||
}
|
||||
|
||||
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {
|
||||
if (barcodeProd.length() == 14) {
|
||||
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||
}
|
||||
|
||||
String finalBarcodeProd = barcodeProd;
|
||||
this.mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||
|
||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||
this.searchArtFromAnag(mtbAartList.get(0), pickData, onComplete);
|
||||
} else {
|
||||
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||
}
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
@@ -43,7 +43,7 @@ public class AccettazionePickingRESTConsumer {
|
||||
|
||||
whereCondListMap.add(whereCondMap);
|
||||
} catch (Exception ex) {
|
||||
UtilityLogger.errorMe(ex);
|
||||
UtilityLogger.error(ex);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ import it.integry.integrywmsnative.core.utility.UtilityContext;
|
||||
import it.integry.integrywmsnative.databinding.ActivityMainBinding;
|
||||
import it.integry.integrywmsnative.gest.login.LoginActivity;
|
||||
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
|
||||
public class MainActivity extends BaseActivity
|
||||
implements NavigationView.OnNavigationItemSelectedListener, IPoppableActivity {
|
||||
@@ -71,9 +71,8 @@ public class MainActivity extends BaseActivity
|
||||
@Inject
|
||||
UpdatesManager updatesManager;
|
||||
|
||||
|
||||
@Inject
|
||||
DialogInputQuantityV2View mDialogInputQuantityV2View;
|
||||
DialogProgressView mDialogProgressView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -81,6 +80,7 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
MainApplication.appComponent
|
||||
.mainActivityComponent()
|
||||
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
@@ -108,14 +108,6 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
init();
|
||||
|
||||
|
||||
// mDialogInputQuantityV2View
|
||||
// .setDialogInputQuantityV2DTO(new DialogInputQuantityV2DTO()
|
||||
// .setMtbAart(new MtbAart()
|
||||
// .setCodMart("AAAA")
|
||||
// .setFlagQtaCnfFissa("S")))
|
||||
// .show(getSupportFragmentManager(), "tag");
|
||||
|
||||
}
|
||||
|
||||
private void startLoginActivity() {
|
||||
|
||||
@@ -241,18 +241,18 @@ 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.getActivity()) > 8) menuSpanCount = 4;
|
||||
else if (UtilityDimension.getDisplayInchs(this.getActivity()) > 6.5) menuSpanCount = 3;
|
||||
|
||||
MenuConfiguration baseMenuConfiguration = new MenuConfiguration();
|
||||
List<MenuConfiguration.MenuGroup> menuGroups = baseMenuConfiguration.getGroups();
|
||||
|
||||
for(int i = 0; i < menuGroups.size(); i++) {
|
||||
for (int i = 0; i < menuGroups.size(); i++) {
|
||||
try {
|
||||
|
||||
BaseMenuConfiguration.MenuGroup menuGroup = menuGroups.get(i);
|
||||
|
||||
if(menuService.isGroupEnabled(menuGroup)) {
|
||||
if (menuService.isGroupEnabled(menuGroup)) {
|
||||
|
||||
FragmentMainMenuGroupLayoutBinding groupBinding = DataBindingUtil.inflate(mLayoutInflater, R.layout.fragment_main_menu_group_layout, null, false);
|
||||
|
||||
@@ -261,8 +261,8 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
||||
|
||||
List<BaseMenuConfiguration.MenuItem> enableMenuItems = new ArrayList<>();
|
||||
|
||||
for(int j = 0; j < menuGroup.getItems().size(); j++) {
|
||||
if(menuService.isItemEnabled(menuGroup.getItems().get(j))) {
|
||||
for (int j = 0; j < menuGroup.getItems().size(); j++) {
|
||||
if (menuService.isItemEnabled(menuGroup.getItems().get(j))) {
|
||||
enableMenuItems.add(menuGroup.getItems().get(j));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,10 +171,10 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
private void initRecyclerView() {
|
||||
mBindings.pickingLiberoMainList.setNestedScrollingEnabled(false);
|
||||
mBindings.pickingLiberoMainList.setHasFixedSize(true);
|
||||
mBindings.pickingLiberoMainList.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
mBindings.pickingLiberoMainList.setLayoutManager(new LinearLayoutManager(requireActivity()));
|
||||
|
||||
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(getActivity(), SimpleDividerItemDecoration.VERTICAL);
|
||||
itemDecorator.setDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.divider));
|
||||
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(requireActivity(), SimpleDividerItemDecoration.VERTICAL);
|
||||
itemDecorator.setDrawable(ContextCompat.getDrawable(requireActivity(), R.drawable.divider));
|
||||
mBindings.pickingLiberoMainList.addItemDecoration(itemDecorator);
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
if (ex instanceof InvalidPesoKGException) {
|
||||
UtilityToast.showToast(ex.getMessage());
|
||||
} else {
|
||||
UtilityExceptions.defaultException(getActivity(), ex, mCurrentProgress);
|
||||
UtilityExceptions.defaultException(getActivity(), ex);
|
||||
}
|
||||
|
||||
BarcodeManager.enable();
|
||||
|
||||
@@ -200,12 +200,6 @@ public class PickingLiberoViewModel {
|
||||
}
|
||||
|
||||
private void loadArticolo(String barcodeProd, Ean128Model ean128Model, Runnable onComplete) {
|
||||
if (barcodeProd.length() == 14) {
|
||||
// barcodeProd = UtilityBarcode.convertITF14toNeutral(barcodeProd);
|
||||
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||
}
|
||||
|
||||
String finalBarcodeProd = barcodeProd;
|
||||
mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||
MtbAart articolo = mtbAartList.get(0);
|
||||
@@ -217,11 +211,11 @@ public class PickingLiberoViewModel {
|
||||
this.dispatchArt(articolo, ean128Model);
|
||||
onComplete.run();
|
||||
} else {
|
||||
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||
}
|
||||
|
||||
} else {
|
||||
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||
}
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
@@ -287,7 +287,7 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
||||
if (ex instanceof InvalidPesoKGException) {
|
||||
UtilityToast.showToast(ex.getMessage());
|
||||
} else {
|
||||
UtilityExceptions.defaultException(this, ex, mCurrentProgress);
|
||||
UtilityExceptions.defaultException(this, ex);
|
||||
}
|
||||
|
||||
BarcodeManager.enable();
|
||||
|
||||
@@ -18,6 +18,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -291,9 +292,10 @@ public class ProdOrdineProduzioneElencoFragment extends BaseFragment implements
|
||||
} else {
|
||||
tmpList = mViewModel.getOrderList().getValue();
|
||||
}
|
||||
|
||||
this.mOrdiniInevasiMutableData.clear();
|
||||
this.mOrdiniInevasiMutableData.addAll(convertDataModelToListModel(tmpList));
|
||||
if (tmpList != null) {
|
||||
this.mOrdiniInevasiMutableData.addAll(convertDataModelToListModel(tmpList));
|
||||
}
|
||||
}
|
||||
|
||||
private List<MainListProdOrdineProduzioneElencoListModel> convertDataModelToListModel(List<OrdineAccettazioneInevasoDTO> dataList) {
|
||||
@@ -384,6 +386,11 @@ public class ProdOrdineProduzioneElencoFragment extends BaseFragment implements
|
||||
|
||||
|
||||
private void initJtbComtCache(Runnable onComplete) {
|
||||
if (this.mViewModel.getOrderList().getValue() == null) {
|
||||
this.jtbComtCache = new ArrayList<>();
|
||||
onComplete.run();
|
||||
return;
|
||||
}
|
||||
var jtbComts = Stream.of(Objects.requireNonNull(this.mViewModel.getOrderList().getValue()))
|
||||
.flatMap(x -> Stream.of(x.getCodJcom()))
|
||||
.toList();
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ProdOrdineProduzioneRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<List<SitArtOrdDTO>>> call, Throwable t) {
|
||||
UtilityLogger.errorMe(new Exception(t));
|
||||
UtilityLogger.error(new Exception(t));
|
||||
onFailed.run(new Exception(t));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -10,7 +10,6 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableArrayList;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.ravikoradiya.liveadapter.LiveAdapter;
|
||||
@@ -34,7 +33,6 @@ import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.databinding.ActivityPvOrdineAcquistoEditBinding;
|
||||
import it.integry.integrywmsnative.databinding.FragmentPvArticoliOrdineAcquistoListSingleItemBinding;
|
||||
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.dialog.DialogEditArticoloView;
|
||||
import it.integry.integrywmsnative.gest.pv_ordine_acquisto_edit.ui.OrdineAcquistoArtListModel;
|
||||
import it.integry.integrywmsnative.ui.FabMenuCustomAnimations;
|
||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogAskAction;
|
||||
@@ -53,8 +51,6 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity implements PVOrdi
|
||||
@Inject
|
||||
PVOrdineAcquistoEditViewModel mViewModel;
|
||||
|
||||
private final ObservableArrayList<OrdineAcquistoArtListModel> mArticoliMutableData = new ObservableArrayList<>();
|
||||
|
||||
|
||||
public static Intent newInstance(Context context, Ordine ordine) {
|
||||
Intent myIntent = new Intent(context, PVOrdineAcquistoEditActivity.class);
|
||||
|
||||
@@ -117,6 +117,27 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
this.mArticoli.postValue(newList);
|
||||
}
|
||||
|
||||
public void saveArticoli(List<ArticoloOrdine> articoli) {
|
||||
var newList = this.mArticoli.getValue();
|
||||
if (newList == null) {
|
||||
newList = new ArrayList<>();
|
||||
}
|
||||
|
||||
for (ArticoloOrdine articolo : articoli) {
|
||||
setBgTint(articolo);
|
||||
|
||||
var alreadySavedItem = Stream.of(newList)
|
||||
.filter(x -> Objects.equals(x.getCodMart(), articolo.getCodMart()))
|
||||
.findFirst();
|
||||
|
||||
if (alreadySavedItem.isPresent()) newList.remove(alreadySavedItem.get());
|
||||
newList.add(articolo);
|
||||
}
|
||||
|
||||
|
||||
this.mArticoli.postValue(newList);
|
||||
}
|
||||
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
this.checkArticolo(
|
||||
@@ -225,8 +246,7 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
});
|
||||
if (!articoliToSave.isEmpty()) {
|
||||
mArticoliOrdineRepository.saveArticoliToOrdine(articoliToSave, () -> {
|
||||
Stream.of(articoliToSave).forEach(this::saveArticolo);
|
||||
|
||||
this.saveArticoli(articoliToSave);
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
@@ -53,9 +53,7 @@ public class OrdineAcquistoPvHelper {
|
||||
|
||||
|
||||
mGrigliaRepository.saveGriglia(griglia, id -> {
|
||||
saveLisAToGriglia(dto.getGrigliaAcquistiChild(), griglia, grigliaResult -> {
|
||||
onSaved.run(grigliaResult);
|
||||
}, onFail);
|
||||
saveLisAToGriglia(dto.getGrigliaAcquistiChild(), griglia, onSaved, onFail);
|
||||
}, onFail);
|
||||
});
|
||||
}, onFail);
|
||||
|
||||
@@ -59,11 +59,11 @@ import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLU;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArts;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArtsView;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView;
|
||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNo;
|
||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
||||
|
||||
public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFragment, ILifecycleFragment, RettificaGiacenzeViewModel.Listener, BottomSheetMtbColrEditView.Listener {
|
||||
|
||||
@@ -157,8 +157,8 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
mBinding.rettificaGiacenzeMainList.setHasFixedSize(true);
|
||||
mBinding.rettificaGiacenzeMainList.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
|
||||
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(getActivity(), SimpleDividerItemDecoration.VERTICAL);
|
||||
itemDecorator.setDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.divider));
|
||||
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(requireActivity(), SimpleDividerItemDecoration.VERTICAL);
|
||||
itemDecorator.setDrawable(ContextCompat.getDrawable(requireActivity(), R.drawable.divider));
|
||||
mBinding.rettificaGiacenzeMainList.addItemDecoration(itemDecorator);
|
||||
}
|
||||
|
||||
@@ -215,9 +215,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
this.onLoadingStarted();
|
||||
|
||||
this.mViewModel.processBarcodeDTO(data, () -> {
|
||||
this.onLoadingEnded();
|
||||
});
|
||||
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||
};
|
||||
|
||||
|
||||
@@ -289,7 +287,8 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
@Override
|
||||
public void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed) {
|
||||
DialogChooseArtFromListaArts.make(getActivity(), artList, onArtChoosed).show();
|
||||
new DialogChooseArtFromListaArtsView(artList, onArtChoosed)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -300,7 +299,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
} else {
|
||||
onComplete.run(mtbColt, created);
|
||||
}
|
||||
}).show(getActivity().getSupportFragmentManager(), "tag");
|
||||
}).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -341,7 +340,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
if (ex instanceof InvalidPesoKGException) {
|
||||
UtilityToast.showToast(ex.getMessage());
|
||||
} else {
|
||||
UtilityExceptions.defaultException(requireActivity(), ex, mCurrentProgress);
|
||||
UtilityExceptions.defaultException(requireActivity(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,12 +470,12 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
null,
|
||||
R.string.button_ignore_print,
|
||||
onComplete)
|
||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLUPositionChangeRequest(RunnableArgss<Boolean, MtbDepoPosizione> onComplete) {
|
||||
DialogYesNo.make(getActivity(), "Posiziona UL", "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
new DialogYesNoView(null, "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
switch (result) {
|
||||
case YES:
|
||||
DialogAskPositionOfLU.makeBase(getActivity(), false, (status, mtbDepoPosizione) -> {
|
||||
@@ -496,12 +495,12 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
onComplete.run(false, null);
|
||||
break;
|
||||
}
|
||||
}).show();
|
||||
}).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPreDestroy(Runnable onComplete) {
|
||||
if(mViewModel.getCurrentMtbColt() != null)
|
||||
if (mViewModel.getCurrentMtbColt() != null)
|
||||
mViewModel.closeLU(false);
|
||||
else {
|
||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||
|
||||
@@ -77,7 +77,6 @@ public class RettificaGiacenzeViewModel {
|
||||
this.mDefaultCausale = defaultCausale;
|
||||
this.mCurrentCodMdep = currentCodMdep;
|
||||
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
this.mRettificaGiacenzeRESTConsumer.loadListaFornitori(fornitori -> {
|
||||
@@ -105,11 +104,6 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
// if (UtilityBarcode.isEanPeso(barcodeScanDTO)) {
|
||||
// //Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
||||
// this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
||||
//
|
||||
// } else
|
||||
if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
||||
this.executeEtichettaEan128(barcodeScanDTO, onComplete);
|
||||
@@ -126,21 +120,25 @@ public class RettificaGiacenzeViewModel {
|
||||
mBarcodeRESTConsumer.decodeEan128(barcodeScanDTO, ean128Model -> {
|
||||
|
||||
String barcodeProd = null;
|
||||
String codMart = null;
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Sscc)) barcodeProd = ean128Model.Sscc;
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Gtin)) barcodeProd = ean128Model.Gtin;
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Content))
|
||||
barcodeProd = ean128Model.Content;
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(ean128Model.Internal1)) codMart = ean128Model.Internal1;
|
||||
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||
|
||||
if (barcodeProd.startsWith("0") || barcodeProd.startsWith("9")) {
|
||||
barcodeProd = barcodeProd.substring(1);
|
||||
}
|
||||
|
||||
PickDataDTO pickDataDTO = PickDataDTO.fromEan128(ean128Model);
|
||||
this.loadArticolo(barcodeProd, pickDataDTO, onComplete);
|
||||
} else if(!UtilityString.isNullOrEmpty(codMart)) {
|
||||
this.searchArtInt(codMart, onComplete);
|
||||
} else {
|
||||
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||
onComplete.run();
|
||||
@@ -149,18 +147,13 @@ public class RettificaGiacenzeViewModel {
|
||||
}
|
||||
|
||||
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {
|
||||
if (barcodeProd.length() == 14) {
|
||||
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||
}
|
||||
|
||||
String finalBarcodeProd = barcodeProd;
|
||||
this.mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||
if (onComplete != null) onComplete.run();
|
||||
|
||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||
this.dispatchArt(mtbAartList.get(0), pickData);
|
||||
} else {
|
||||
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||
}
|
||||
|
||||
}, this::sendError);
|
||||
|
||||
@@ -72,13 +72,14 @@ import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPosi
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArtsView;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotView;
|
||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.InfoAggiuntiveLUDialog;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPeso;
|
||||
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.scan_art.DialogScanArtView;
|
||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNo;
|
||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
||||
|
||||
public class SpedizioneActivity extends BaseActivity implements SpedizioneViewModel.Listener, BottomSheetFragmentLUContentViewModel.Listener, BottomSheetFragmentLUContentView.Listener {
|
||||
|
||||
@@ -196,7 +197,10 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
this.initBarcodeReader();
|
||||
this.initRecyclerView();
|
||||
|
||||
closeOrderButtonEnabled.set(SettingsManager.iDB().isFlagPrintEtichetteOnOrderClose() || SettingsManager.iDB().isFlagPrintPackingListOnOrderClose());
|
||||
closeOrderButtonEnabled.set(SettingsManager.iDB().isFlagPrintEtichetteOnOrderClose()
|
||||
|| SettingsManager.iDB().isFlagPrintPackingListOnOrderClose()
|
||||
|| (this.isOrdTrasf() && !UtilityString.isNullOrEmpty(SettingsManager.iDB().getCodDtipOrdTrasfV()))
|
||||
);
|
||||
|
||||
|
||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||
@@ -220,6 +224,16 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
useQtaOrd);
|
||||
}
|
||||
|
||||
private boolean isOrdTrasf() {
|
||||
|
||||
return mTestateOrdini != null && !mTestateOrdini.isEmpty() && Stream.of(mTestateOrdini)
|
||||
.map(OrdineUscitaInevasoDTO::isOrdTrasf)
|
||||
.withoutNulls()
|
||||
.distinctBy(x -> x)
|
||||
.findFirst()
|
||||
.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSupportNavigateUp() {
|
||||
onBackPressed();
|
||||
@@ -342,6 +356,11 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
spedizioneListModel.setUntMis(x.getMtbAart().getUntMis());
|
||||
}
|
||||
|
||||
BigDecimal qtaOmg = x.getSitArtOrdDTO().getQtaOmg();
|
||||
if (qtaOmg != null && qtaOmg.compareTo(BigDecimal.ZERO) > 0) {
|
||||
spedizioneListModel.setFreeQuantity(String.format(getString(R.string.ord_ven_qta_omaggio), qtaOmg.stripTrailingZeros().toPlainString(), spedizioneListModel.getUntMis()));
|
||||
}
|
||||
|
||||
spedizioneListModel.setOriginalModel(x);
|
||||
spedizioneListModels.add(spedizioneListModel);
|
||||
} else {
|
||||
@@ -703,9 +722,15 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
|
||||
@Override
|
||||
public void onLUPesoRequired(String codTcol, BigDecimal netWeightKG, BigDecimal grossWeightKG, RunnableArgsss<String, BigDecimal, BigDecimal> onComplete) {
|
||||
DialogInputPeso.make(this, codTcol, netWeightKG, grossWeightKG, (newCodTcol, newNetWeight, newGrossWeight) -> {
|
||||
onComplete.run(newCodTcol, netWeightKG, grossWeightKG);
|
||||
}).show();
|
||||
// DialogInputPesoView.make(this, codTcol, netWeightKG, grossWeightKG, (newCodTcol, newNetWeight, newGrossWeight) -> {
|
||||
// onComplete.run(newCodTcol, netWeightKG, grossWeightKG);
|
||||
// }).show();
|
||||
|
||||
|
||||
new DialogInputPesoLuView(null, new BigDecimal(50), new BigDecimal(55), (newCodTcol, newNetWeight, newGrossWeight) -> {
|
||||
// onComplete.run(newCodTcol, netWeightKG, grossWeightKG);
|
||||
})
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -772,25 +797,26 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemDispatched(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,
|
||||
Date dataScad,
|
||||
boolean canOverflowOrderQuantity,
|
||||
boolean canPartitaMagBeChanged,
|
||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
public 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,
|
||||
Date dataScad,
|
||||
boolean canOverflowOrderQuantity,
|
||||
boolean canPartitaMagBeChanged,
|
||||
RunnableArgss<PickedQuantityDTO, Boolean> onComplete) {
|
||||
|
||||
DialogInputQuantityV2DTO dialogInputQuantityV2DTO = new DialogInputQuantityV2DTO()
|
||||
.setMtbAart(mtbAart)
|
||||
.setInitialNumCnf(initialNumCnf)
|
||||
@@ -809,7 +835,9 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
.setDataScad(dataScad)
|
||||
.setCanOverflowOrderQuantity(canOverflowOrderQuantity)
|
||||
.setCanLUBeClosed(true)
|
||||
.setCanPartitaMagBeChanged(canPartitaMagBeChanged);
|
||||
.setCanPartitaMagBeChanged(canPartitaMagBeChanged)
|
||||
.setStatoPartitaMag(pickingObjectDTO.getStatoArticoloDTO())
|
||||
.setNotifyProductLotStatus(SettingsManager.iDB().isNotifyLotStatus());
|
||||
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
mDialogInputQuantityV2View
|
||||
@@ -834,7 +862,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
|
||||
@Override
|
||||
public void onLUPositionChangeRequest(RunnableArgss<Boolean, MtbDepoPosizione> onComplete) {
|
||||
DialogYesNo.make(this, "Posiziona UL", "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
new DialogYesNoView(null, "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||
switch (result) {
|
||||
case YES:
|
||||
DialogAskPositionOfLU.makeBase(this, false, (status, mtbDepoPosizione) -> {
|
||||
@@ -850,7 +878,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
onComplete.run(false, null);
|
||||
break;
|
||||
}
|
||||
}).show();
|
||||
}).show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
public void askShouldPrintPackingList(PrintOrderCloseDTO printOrderCloseDTO, RunnableArgs<PrintOrderCloseDTO> onComplete) {
|
||||
@@ -899,6 +927,19 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateDocsRequest() {
|
||||
new DialogYesNoView("Chiusura ordine", "Vuoi creare i documenti per gli ordini selezionati?", result -> {
|
||||
this.mViewmodel.onCreateDocsAnswered(result);
|
||||
}).show(this.getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChooseArtRequest(List<MtbAart> artsList, RunnableArgs<MtbAart> onComplete) {
|
||||
new DialogChooseArtFromListaArtsView(artsList, onComplete)
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOrderClosed() {
|
||||
this.onLoadingEnded();
|
||||
|
||||
@@ -6,6 +6,7 @@ import it.integry.integrywmsnative.core.data_recover.ColliDataRecoverService;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.DocumentiRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
|
||||
@@ -20,8 +21,8 @@ public class SpedizioneModule {
|
||||
}
|
||||
|
||||
@Provides
|
||||
SpedizioneViewModel providesSpedizioneViewModel(ArticoloRESTConsumer articoloRESTConsumer, ColliDataRecoverService colliDataRecoverService, OrdiniRESTConsumer ordiniRESTConsumer, ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, PrinterRESTConsumer printerRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer, PosizioniRESTConsumer posizioniRESTConsumer) {
|
||||
return new SpedizioneViewModel(articoloRESTConsumer, barcodeRESTConsumer, colliDataRecoverService, ordiniRESTConsumer, colliMagazzinoRESTConsumer, printerRESTConsumer, posizioniRESTConsumer);
|
||||
SpedizioneViewModel providesSpedizioneViewModel(ArticoloRESTConsumer articoloRESTConsumer, ColliDataRecoverService colliDataRecoverService, OrdiniRESTConsumer ordiniRESTConsumer, ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, PrinterRESTConsumer printerRESTConsumer, BarcodeRESTConsumer barcodeRESTConsumer, PosizioniRESTConsumer posizioniRESTConsumer, DocumentiRESTConsumer documentiRESTConsumer) {
|
||||
return new SpedizioneViewModel(articoloRESTConsumer, barcodeRESTConsumer, colliDataRecoverService, ordiniRESTConsumer, colliMagazzinoRESTConsumer, printerRESTConsumer, posizioniRESTConsumer, documentiRESTConsumer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,7 @@ 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.dto.PickDataDTO;
|
||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.rest.model.SitArtOrdDTO;
|
||||
|
||||
public class PickingObjectDTO implements Cloneable {
|
||||
@@ -18,6 +19,7 @@ public class PickingObjectDTO implements Cloneable {
|
||||
private List<MtbColt> mtbColts;
|
||||
|
||||
private PickDataDTO tempPickData;
|
||||
private StatoArticoloDTO statoArticoloDTO;
|
||||
private MtbColt refMtbColt;
|
||||
private List<MtbColr> withdrawMtbColrs = new ArrayList<>();
|
||||
|
||||
@@ -100,4 +102,13 @@ public class PickingObjectDTO implements Cloneable {
|
||||
this.withdrawMtbColrs = withdrawMtbColrs;
|
||||
return this;
|
||||
}
|
||||
|
||||
public StatoArticoloDTO getStatoArticoloDTO() {
|
||||
return statoArticoloDTO;
|
||||
}
|
||||
|
||||
public PickingObjectDTO setStatoArticoloDTO(StatoArticoloDTO statoArticoloDTO) {
|
||||
this.statoArticoloDTO = statoArticoloDTO;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,6 +143,13 @@ public class SpedizioneListAdapter extends SectionedRecyclerViewAdapter<Spedizio
|
||||
holder.mBinding.subdescrizione2.setText(UtilityString.isNullOrEmpty(pickingObjectDTO.getSubDescrizione2()) ? null : Html.fromHtml(pickingObjectDTO.getSubDescrizione2()));
|
||||
holder.mBinding.subdescrizione2.setVisibility(UtilityString.isNullOrEmpty(pickingObjectDTO.getSubDescrizione2()) ? View.GONE : View.VISIBLE);
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(pickingObjectDTO.getFreeQuantity())) {
|
||||
holder.mBinding.freeQty.setText(Html.fromHtml(pickingObjectDTO.getFreeQuantity()));
|
||||
holder.mBinding.freeQty.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holder.mBinding.freeQty.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
holder.mBinding.qtaEvasa.setText(UtilityNumber.decimalToString(pickingObjectDTO.getQtaEvasa()));
|
||||
holder.mBinding.qtaTot.setText(UtilityNumber.decimalToString(pickingObjectDTO.getQtaTot()));
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ public class SpedizioneListModel implements Cloneable {
|
||||
private BigDecimal qtaEvasa;
|
||||
private BigDecimal qtaTot;
|
||||
private String untMis;
|
||||
private String freeQuantity;
|
||||
|
||||
private boolean active;
|
||||
|
||||
@@ -164,4 +165,13 @@ public class SpedizioneListModel implements Cloneable {
|
||||
this.mSourceMtbColr = sourceMtbColr;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFreeQuantity() {
|
||||
return freeQuantity;
|
||||
}
|
||||
|
||||
public SpedizioneListModel setFreeQuantity(String freeQuantity) {
|
||||
this.freeQuantity = freeQuantity;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,13 +29,13 @@ public class FilterChipView extends Chip {
|
||||
this.defaultChipBackgroundColor = getChipBackgroundColor();
|
||||
this.defaultChipTextColor = getTextColors();
|
||||
|
||||
setShapeAppearanceModel(
|
||||
getShapeAppearanceModel()
|
||||
.withCornerSize(4)
|
||||
.toBuilder()
|
||||
.build());
|
||||
|
||||
setChipMinHeight(getChipMinHeight() * 1.25f);
|
||||
// setShapeAppearanceModel(
|
||||
// getShapeAppearanceModel()
|
||||
// .withCornerSize(4)
|
||||
// .toBuilder()
|
||||
// .build());
|
||||
//
|
||||
// setChipMinHeight(getChipMinHeight() * 1.25f);
|
||||
|
||||
setOnCloseIconClickListener(v -> {
|
||||
if (onResetClicked != null) onResetClicked.run();
|
||||
|
||||
@@ -64,7 +64,7 @@ public abstract class BottomSheetFragmentBaseView extends ConstraintLayout {
|
||||
|
||||
public void expand() {
|
||||
if(this.mBottomSheetBehavior == null) {
|
||||
UtilityLogger.errorMe(new BottomSheetFragmentViewNotInitializedException());
|
||||
UtilityLogger.error(new BottomSheetFragmentViewNotInitializedException());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public abstract class BottomSheetFragmentBaseView extends ConstraintLayout {
|
||||
|
||||
public void collapse() {
|
||||
if(this.mBottomSheetBehavior == null) {
|
||||
UtilityLogger.errorMe(new BottomSheetFragmentViewNotInitializedException());
|
||||
UtilityLogger.error(new BottomSheetFragmentViewNotInitializedException());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public abstract class BottomSheetFragmentBaseView extends ConstraintLayout {
|
||||
|
||||
public State getState() {
|
||||
if(this.mBottomSheetBehavior == null) {
|
||||
UtilityLogger.errorMe(new BottomSheetFragmentViewNotInitializedException());
|
||||
UtilityLogger.error(new BottomSheetFragmentViewNotInitializedException());
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class BottomSheetMtbColrEditView extends BottomSheetFragmentBaseView {
|
||||
@Override
|
||||
public void expand() {
|
||||
if(this.mViewModel.getMtbColr() == null) {
|
||||
UtilityLogger.errorMe(new NullMtbColrException());
|
||||
UtilityLogger.error(new NullMtbColrException());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
package it.integry.integrywmsnative.view.dialogs;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.app.Dialog;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
@@ -29,36 +27,53 @@ public class DialogProgressView extends DialogFragment {
|
||||
private boolean indeterminateProgress;
|
||||
|
||||
public static DialogProgressView newInstance(String title, String subtitle, boolean indeterminate) {
|
||||
return new DialogProgressView()
|
||||
.setIndeterminateProgress(indeterminate)
|
||||
.setTitle(title)
|
||||
.setSubtitle(subtitle);
|
||||
return new DialogProgressView(title, subtitle, indeterminate);
|
||||
}
|
||||
|
||||
public static DialogProgressView newInstance() {
|
||||
return newInstance(null, null, true);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_progress, container, false);
|
||||
|
||||
setCancelable(false);
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
mBindings.setTitle(UtilityString.isNullOrEmpty(title) ? requireActivity().getString(R.string.loading) : title);
|
||||
|
||||
mBindings.setSubtitle(subtitle);
|
||||
mBindings.progressBar.setIndeterminate(isIndeterminateProgress());
|
||||
|
||||
if(!isIndeterminateProgress()){
|
||||
mBindings.progressBar.setMax(100);
|
||||
}
|
||||
|
||||
return mBindings.getRoot();
|
||||
public DialogProgressView(String title, String subtitle, boolean indeterminate) {
|
||||
this.setTitle(title);
|
||||
this.setSubtitle(subtitle);
|
||||
this.setIndeterminateProgress(indeterminate);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
mBindings = DialogProgressBinding.inflate(LayoutInflater.from(requireContext()));
|
||||
|
||||
mBindings.setTitle(UtilityString.isNullOrEmpty(title) ? requireContext().getString(R.string.loading) : title);
|
||||
if (!UtilityString.isNullOrEmpty(subtitle)) mBindings.setSubtitle(subtitle);
|
||||
|
||||
mBindings.progressBar.setIndeterminate(isIndeterminateProgress());
|
||||
if (!isIndeterminateProgress()) mBindings.progressBar.setMax(100);
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(false)
|
||||
.create();
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getSubtitle() {
|
||||
return subtitle;
|
||||
}
|
||||
|
||||
public void setSubtitle(String subtitle) {
|
||||
this.subtitle = subtitle;
|
||||
}
|
||||
|
||||
public boolean isIndeterminateProgress() {
|
||||
return indeterminateProgress;
|
||||
@@ -69,17 +84,6 @@ public class DialogProgressView extends DialogFragment {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public DialogProgressView setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogProgressView setSubtitle(String subtitle) {
|
||||
this.subtitle = subtitle;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setProgress(int progress) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
mBindings.progressBar.setProgress(progress, true);
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.base;
|
||||
|
||||
import android.content.Context;
|
||||
import android.app.Dialog;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.Spanned;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -19,7 +16,8 @@ import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.widget.LinearLayoutCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -66,7 +64,8 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
private final HashMap<String, String> mHashmapContent;
|
||||
private final Runnable mOnPositiveClick;
|
||||
private final Runnable mOnNegativeClick;
|
||||
private final @StringRes Integer mRNeutralButtonString;
|
||||
private final @StringRes
|
||||
Integer mRNeutralButtonString;
|
||||
private final Runnable mOnNeutralClick;
|
||||
|
||||
|
||||
@@ -76,13 +75,12 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
|
||||
|
||||
private DialogBaseBinding mBindings;
|
||||
private Context mContext;
|
||||
|
||||
public static DialogSimpleMessageView newInstance(@NonNull TYPE type, @NonNull String titleText, @NonNull Spanned messageText, HashMap<String, String> hashmapContent , Runnable onPositiveClick, Runnable onNegativeClick, @StringRes Integer rNeutralButtonString, Runnable onNeutralClick) {
|
||||
public static DialogSimpleMessageView newInstance(@NonNull TYPE type, @NonNull String titleText, @NonNull Spanned messageText, HashMap<String, String> hashmapContent, Runnable onPositiveClick, Runnable onNegativeClick, @StringRes Integer rNeutralButtonString, Runnable onNeutralClick) {
|
||||
return new DialogSimpleMessageView(type, titleText, messageText, hashmapContent, onPositiveClick, onNegativeClick, rNeutralButtonString, onNeutralClick);
|
||||
}
|
||||
|
||||
private DialogSimpleMessageView(@NonNull TYPE type, @NonNull String titleText, @NonNull Spanned messageText, HashMap<String, String> hashmapContent , Runnable onPositiveClick, Runnable onNegativeClick, @StringRes Integer rNeutralButtonString, Runnable onNeutralClick) {
|
||||
private DialogSimpleMessageView(@NonNull TYPE type, @NonNull String titleText, @NonNull Spanned messageText, HashMap<String, String> hashmapContent, Runnable onPositiveClick, Runnable onNegativeClick, @StringRes Integer rNeutralButtonString, Runnable onNeutralClick) {
|
||||
super();
|
||||
|
||||
this.mType = type;
|
||||
@@ -99,57 +97,79 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
|
||||
UtilityDialog.setTo90PercentWidth(this.mContext, this);
|
||||
UtilityDialog.setTo90PercentWidth(this.requireContext(), this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@NonNull
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
this.mContext = getActivity();
|
||||
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_base, container, false);
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
mBindings = DialogBaseBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||
|
||||
mBindings.setView(this);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
|
||||
getDialog().setCanceledOnTouchOutside(false);
|
||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
this.initContent();
|
||||
|
||||
var alertDialogBuilder = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(false);
|
||||
|
||||
if (isPositiveVisible())
|
||||
alertDialogBuilder.setPositiveButton(getPositiveButtonText(), (dialog, which) -> {
|
||||
if(this.mOnPositiveClick != null) this.mOnPositiveClick.run();
|
||||
});
|
||||
|
||||
if (isNeutralVisible())
|
||||
alertDialogBuilder.setNeutralButton(getNeutralButtonText(), (dialog, which) -> {
|
||||
this.mOnNeutralClick.run();
|
||||
});
|
||||
|
||||
if (isNegativeVisible())
|
||||
alertDialogBuilder.setNegativeButton(getNegativeButtonText(), (dialog, which) -> {
|
||||
this.mOnNegativeClick.run();
|
||||
});
|
||||
|
||||
var alertDialog = alertDialogBuilder.create();
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
private void initContent() {
|
||||
int colorBackgroundTitle = -1;
|
||||
Drawable titleIconRes = null;
|
||||
|
||||
switch (mType) {
|
||||
case INFO:
|
||||
colorBackgroundTitle = ContextCompat.getColor(mContext, R.color.light_blue_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(mContext.getResources(), R.drawable.ic_info_78dp, null);
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.colorPrimary);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_info_78dp, null);
|
||||
break;
|
||||
|
||||
case SUCCESS:
|
||||
colorBackgroundTitle = ContextCompat.getColor(mContext, R.color.green_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(mContext.getResources(), R.drawable.ic_done_white_24dp, null);
|
||||
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(mContext, R.color.yellow_600);
|
||||
titleIconRes = ResourcesCompat.getDrawable(mContext.getResources(), R.drawable.ic_warning_white_24dp, null);
|
||||
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(mContext, R.color.red_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(mContext.getResources(), R.drawable.ic_mood_bad_24dp, null);
|
||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.red_300);
|
||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_mood_bad_24dp, null);
|
||||
break;
|
||||
}
|
||||
|
||||
this.positiveButtonText = mContext.getText(R.string.ok).toString();
|
||||
this.negativeButtonText = mContext.getText(R.string.no).toString();
|
||||
this.positiveButtonText = requireContext().getText(R.string.ok).toString();
|
||||
this.negativeButtonText = requireContext().getText(R.string.no).toString();
|
||||
|
||||
//Title VIEW
|
||||
mBindings.titleText.setText(mTitleText);
|
||||
ColorStateList colorStateList = ColorStateList.valueOf(Color.WHITE);
|
||||
ColorStateList colorStateList = ColorStateList.valueOf(colorBackgroundTitle);
|
||||
mBindings.titleIcon.setImageTintList(colorStateList);
|
||||
mBindings.titleIcon.setImageDrawable(titleIconRes);
|
||||
|
||||
mBindings.titleContainer.setBackgroundColor(colorBackgroundTitle);
|
||||
// mBindings.titleContainer.setBackgroundColor(colorBackgroundTitle);
|
||||
|
||||
//Content View
|
||||
mBindings.descriptionText.setText(mMessageText);
|
||||
@@ -161,20 +181,20 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
String currentKey = mHashmapContent.keySet().toArray()[i].toString();
|
||||
String currentValue = mHashmapContent.get(currentKey);
|
||||
|
||||
RelativeLayout singleMapContent = (RelativeLayout) inflater.inflate(R.layout.dialog_custom_content_hashmap_viewmodel, hashMapContainer);
|
||||
RelativeLayout singleMapContent = (RelativeLayout) LayoutInflater.from(requireContext()).inflate(R.layout.dialog_custom_content_hashmap_viewmodel, hashMapContainer);
|
||||
((TextView) singleMapContent.findViewById(R.id.dialog_content_hashmap_key)).setText(currentKey);
|
||||
((TextView) singleMapContent.findViewById(R.id.dialog_content_hashmap_value)).setText(currentValue);
|
||||
|
||||
hashMapContainer.addView(singleMapContent);
|
||||
}
|
||||
} else {
|
||||
hashMapContainer.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
|
||||
public boolean isPositiveVisible() {
|
||||
return mOnPositiveClick != null;
|
||||
return mOnPositiveClick != null || (!isNeutralVisible() && !isNegativeVisible());
|
||||
}
|
||||
|
||||
public boolean isNeutralVisible() {
|
||||
@@ -191,7 +211,7 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
}
|
||||
|
||||
public String getNeutralButtonText() {
|
||||
return mRNeutralButtonString != null && mRNeutralButtonString != -1 ? mContext.getText(mRNeutralButtonString).toString() : null;
|
||||
return mRNeutralButtonString != null && mRNeutralButtonString != -1 ? requireContext().getText(mRNeutralButtonString).toString() : null;
|
||||
}
|
||||
|
||||
public String getNegativeButtonText() {
|
||||
@@ -200,17 +220,17 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
||||
|
||||
public void onPositiveClick() {
|
||||
dismiss();
|
||||
if(mOnPositiveClick != null) mOnPositiveClick.run();
|
||||
if (mOnPositiveClick != null) mOnPositiveClick.run();
|
||||
}
|
||||
|
||||
public void onNeutralClick() {
|
||||
dismiss();
|
||||
if(mOnNeutralClick != null) mOnNeutralClick.run();
|
||||
if (mOnNeutralClick != null) mOnNeutralClick.run();
|
||||
}
|
||||
|
||||
public void onNegativeClick() {
|
||||
dismiss();
|
||||
if(mOnNegativeClick != null) mOnNegativeClick.run();
|
||||
if (mOnNegativeClick != null) mOnNegativeClick.run();
|
||||
}
|
||||
|
||||
public static DialogSimpleMessageView makeInfoDialog(String titleText, Spanned messageText, HashMap<String, String> hashmapContent, Runnable onPositiveClick) {
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.basket_lu;
|
||||
|
||||
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 java.util.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||
import it.integry.integrywmsnative.databinding.DialogBasketLuBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page1.DialogBasketLU_Page1_ViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page2.DialogBasketLU_Page2_ViewModel;
|
||||
|
||||
public class DialogBasketLU {
|
||||
|
||||
private Context mContext;
|
||||
private Dialog mDialog;
|
||||
private DialogBasketLuBinding mBinding;
|
||||
|
||||
private RunnableArgs<MtbColt> mOnComplete;
|
||||
|
||||
public static Dialog make(final Context context, RunnableArgs<MtbColt> onComplete) {
|
||||
return new DialogBasketLU(context, onComplete).mDialog;
|
||||
}
|
||||
|
||||
|
||||
private DialogBasketLU(Context context, RunnableArgs<MtbColt> onComplete) {
|
||||
mContext = context;
|
||||
mOnComplete = onComplete;
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.dialog_basket_lu, null, false);
|
||||
|
||||
mDialog = new Dialog(context);
|
||||
|
||||
mDialog.setContentView(mBinding.getRoot());
|
||||
|
||||
mDialog.setCanceledOnTouchOutside(false);
|
||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
UtilityDialog.setTo90PercentWidth(context, mDialog);
|
||||
|
||||
this.initViewPager();
|
||||
}
|
||||
|
||||
private void initViewPager() {
|
||||
List<Map.Entry<Integer, Class<?>>> views = new ArrayList<>();
|
||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_basket_lu__page1, DialogBasketLU_Page1_ViewModel.class));
|
||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_basket_lu__page2, DialogBasketLU_Page2_ViewModel.class));
|
||||
|
||||
DialogBasketLU_ViewPagerAdapter viewPagerAdapter = new DialogBasketLU_ViewPagerAdapter(mContext, views);
|
||||
mBinding.viewpager.setAdapter(viewPagerAdapter);
|
||||
mBinding.viewpager.beginFakeDrag();
|
||||
mBinding.viewpager.addOnPageChangeListener(viewPagerAdapter);
|
||||
mBinding.viewpager.setEnabled(false);
|
||||
|
||||
|
||||
mDialog.setOnShowListener(v -> {
|
||||
|
||||
|
||||
viewPagerAdapter.getViewModel(R.layout.dialog_basket_lu__page2).setOnConfirmClickListener(data -> {
|
||||
MtbColt mtbColt = (MtbColt) data;
|
||||
|
||||
mOnComplete.run(mtbColt);
|
||||
mDialog.dismiss();
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.basket_lu;
|
||||
|
||||
import android.app.Dialog;
|
||||
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.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.databinding.DialogBasketLuBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page1.DialogBasketLU_Page1_ViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page2.DialogBasketLU_Page2_ViewModel;
|
||||
|
||||
public class DialogBasketLUView extends BaseDialogFragment {
|
||||
|
||||
private final RunnableArgs<MtbColt> mOnComplete;
|
||||
private DialogBasketLuBinding mBindings;
|
||||
|
||||
|
||||
|
||||
public DialogBasketLUView(RunnableArgs<MtbColt> onComplete) {
|
||||
mOnComplete = onComplete;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
mBindings = DialogBasketLuBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(false)
|
||||
.create();
|
||||
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
this.initViewPager(alertDialog);
|
||||
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
private void initViewPager(Dialog dialog) {
|
||||
List<Map.Entry<Integer, Class<?>>> views = new ArrayList<>();
|
||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_basket_lu__page1, DialogBasketLU_Page1_ViewModel.class));
|
||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_basket_lu__page2, DialogBasketLU_Page2_ViewModel.class));
|
||||
|
||||
DialogBasketLU_ViewPagerAdapter viewPagerAdapter = new DialogBasketLU_ViewPagerAdapter(requireContext(), views);
|
||||
mBindings.viewpager.setAdapter(viewPagerAdapter);
|
||||
mBindings.viewpager.beginFakeDrag();
|
||||
mBindings.viewpager.addOnPageChangeListener(viewPagerAdapter);
|
||||
mBindings.viewpager.setEnabled(false);
|
||||
|
||||
|
||||
dialog.setOnShowListener(v -> {
|
||||
viewPagerAdapter.getViewModel(R.layout.dialog_basket_lu__page2).setOnConfirmClickListener(data -> {
|
||||
MtbColt mtbColt = (MtbColt) data;
|
||||
|
||||
mOnComplete.run(mtbColt);
|
||||
dialog.dismiss();
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.IRecyclerItemClicked;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||
import it.integry.integrywmsnative.databinding.DialogChooseArtFromListaArtBinding;
|
||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||
|
||||
public class DialogChooseArtFromListaArts {
|
||||
|
||||
|
||||
private Context currentContext;
|
||||
private Dialog mDialog;
|
||||
|
||||
private DialogChooseArtFromListaArtsAdapter currentAdapter;
|
||||
|
||||
private RunnableArgs<MtbAart> mOnItemChoosed;
|
||||
|
||||
public static Dialog make(final Context context, List<MtbAart> listaArts, RunnableArgs<MtbAart> onItemChoosed) {
|
||||
return new DialogChooseArtFromListaArts(context, listaArts, onItemChoosed).mDialog;
|
||||
}
|
||||
|
||||
|
||||
private DialogChooseArtFromListaArts(Context context, List<MtbAart> listaArts, RunnableArgs<MtbAart> onItemChoosed) {
|
||||
currentContext = context;
|
||||
mOnItemChoosed = onItemChoosed;
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
DialogChooseArtFromListaArtBinding bindings = DataBindingUtil.inflate(inflater, R.layout.dialog_choose_art_from_lista_art, null, false);
|
||||
|
||||
mDialog = new Dialog(context);
|
||||
|
||||
mDialog.setContentView(bindings.getRoot());
|
||||
|
||||
mDialog.setCanceledOnTouchOutside(false);
|
||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
UtilityDialog.setTo90PercentWidth(context, mDialog);
|
||||
|
||||
initRecyclerView(bindings, listaArts);
|
||||
}
|
||||
|
||||
private void initRecyclerView(DialogChooseArtFromListaArtBinding binding, List<MtbAart> dataset) {
|
||||
binding.dialogChooseArtFromListaArtMainList.setNestedScrollingEnabled(false);
|
||||
|
||||
binding.dialogChooseArtFromListaArtMainList.setHasFixedSize(true);
|
||||
|
||||
binding.dialogChooseArtFromListaArtMainList.setLayoutManager(new LinearLayoutManager(currentContext));
|
||||
|
||||
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(currentContext, SimpleDividerItemDecoration.VERTICAL);
|
||||
itemDecorator.setDrawable(ContextCompat.getDrawable(currentContext, R.drawable.divider));
|
||||
binding.dialogChooseArtFromListaArtMainList.addItemDecoration(itemDecorator);
|
||||
|
||||
currentAdapter = new DialogChooseArtFromListaArtsAdapter(currentContext, dataset, onItemClicked);
|
||||
binding.dialogChooseArtFromListaArtMainList.setAdapter(currentAdapter);
|
||||
}
|
||||
|
||||
private IRecyclerItemClicked<MtbAart> onItemClicked = (item, position) -> {
|
||||
if(mOnItemChoosed != null) {
|
||||
mOnItemChoosed.run(item);
|
||||
}
|
||||
|
||||
mDialog.dismiss();
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.databinding.DialogChooseArtFromListaArtBinding;
|
||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||
|
||||
public class DialogChooseArtFromListaArtsView extends DialogFragment {
|
||||
|
||||
|
||||
private final List<MtbAart> mListaArts;
|
||||
private final RunnableArgs<MtbAart> mOnItemChoosed;
|
||||
|
||||
|
||||
public DialogChooseArtFromListaArtsView(List<MtbAart> listaArts, RunnableArgs<MtbAart> onItemChoosed) {
|
||||
super();
|
||||
this.mListaArts = listaArts;
|
||||
this.mOnItemChoosed = onItemChoosed;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
var binding = DialogChooseArtFromListaArtBinding.inflate(LayoutInflater.from(requireContext()));
|
||||
|
||||
initRecyclerView(binding, mListaArts);
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(binding.getRoot())
|
||||
.setCancelable(false)
|
||||
.create();
|
||||
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
private void initRecyclerView(DialogChooseArtFromListaArtBinding binding, List<MtbAart> dataset) {
|
||||
binding.dialogChooseArtFromListaArtMainList.setNestedScrollingEnabled(false);
|
||||
binding.dialogChooseArtFromListaArtMainList.setHasFixedSize(true);
|
||||
binding.dialogChooseArtFromListaArtMainList.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||
|
||||
SimpleDividerItemDecoration itemDecorator = new SimpleDividerItemDecoration(requireContext(), SimpleDividerItemDecoration.VERTICAL);
|
||||
itemDecorator.setDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.divider));
|
||||
binding.dialogChooseArtFromListaArtMainList.addItemDecoration(itemDecorator);
|
||||
|
||||
DialogChooseArtFromListaArtsAdapter mCurrentAdapter = new DialogChooseArtFromListaArtsAdapter(requireContext(), dataset,
|
||||
((item, position) -> {
|
||||
if (mOnItemChoosed != null) {
|
||||
mOnItemChoosed.run(item);
|
||||
}
|
||||
|
||||
dismiss();
|
||||
}));
|
||||
binding.dialogChooseArtFromListaArtMainList.setAdapter(mCurrentAdapter);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -207,7 +207,10 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
||||
.filter(x -> {
|
||||
String codMart = x.getMtbColr().getMtbAart().getCodMart().toLowerCase();
|
||||
String descrizioneArt = x.getMtbColr().getMtbAart().getDescrizioneEstesa().toLowerCase();
|
||||
String diacod = x.getMtbColr().getMtbAart().getDiacod().toLowerCase();
|
||||
String diacod = x.getMtbColr().getMtbAart().getDiacod();
|
||||
if (!UtilityString.isNullOrEmpty(diacod)) {
|
||||
diacod = diacod.toLowerCase();
|
||||
}
|
||||
|
||||
return ((codMart.startsWith(finalNewText) ||
|
||||
codMart.endsWith(finalNewText) ||
|
||||
@@ -217,10 +220,10 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
||||
descrizioneArt.endsWith(finalNewText) ||
|
||||
descrizioneArt.contains(finalNewText) ||
|
||||
descrizioneArt.equalsIgnoreCase(finalNewText)) ||
|
||||
(diacod.startsWith(finalNewText) ||
|
||||
(!UtilityString.isNullOrEmpty(diacod) && (diacod.startsWith(finalNewText) ||
|
||||
diacod.endsWith(finalNewText) ||
|
||||
diacod.contains(finalNewText) ||
|
||||
diacod.equalsIgnoreCase(finalNewText))) &&
|
||||
diacod.equalsIgnoreCase(finalNewText)))) &&
|
||||
!x.isHidden();
|
||||
})
|
||||
.toList();
|
||||
@@ -305,15 +308,10 @@ public class DialogChooseArtsFromListaArts extends BaseDialogFragment {
|
||||
|
||||
|
||||
private void loadArticolo(String barcodeProd, Ean128Model ean128Model) {
|
||||
if (barcodeProd.length() == 14) {
|
||||
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||
}
|
||||
|
||||
String finalBarcodeProd = barcodeProd;
|
||||
this.articoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||
|
||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||
this.mBindings.mainSearch.setQuery(finalBarcodeProd, false);
|
||||
this.mBindings.mainSearch.setQuery(barcodeProd, false);
|
||||
|
||||
this.searchArtInList(mtbAartList.get(0), ean128Model);
|
||||
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.input_peso_lu;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.annimon.stream.Optional;
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.di.BindableString;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||
import it.integry.integrywmsnative.databinding.DialogInputPesoLuBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||
|
||||
public class DialogInputPeso {
|
||||
|
||||
|
||||
private final FragmentActivity mContext;
|
||||
private final DialogInputPesoLuBinding mBindings;
|
||||
private final DialogInputPesoViewModel mViewModel;
|
||||
private final Dialog currentDialog;
|
||||
|
||||
private List<MtbTCol> codTcolList = null;
|
||||
private ArrayAdapter<String> codTcolArrayAdapter = null;
|
||||
|
||||
public static Dialog make(final FragmentActivity context, String codTcol, BigDecimal netWeight, BigDecimal grossWeight, RunnableArgsss<String, BigDecimal, BigDecimal> onDialogDismiss) {
|
||||
return new DialogInputPeso(context, codTcol, netWeight, grossWeight, onDialogDismiss).currentDialog;
|
||||
}
|
||||
|
||||
|
||||
private DialogInputPeso(final FragmentActivity context, String codTcol, BigDecimal netWeight, BigDecimal grossWeight, RunnableArgsss<String, BigDecimal, BigDecimal> onDialogDismiss) {
|
||||
this.mContext = context;
|
||||
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_input_peso_lu, null, false);
|
||||
|
||||
currentDialog = new Dialog(context);
|
||||
currentDialog.setContentView(mBindings.getRoot());
|
||||
|
||||
currentDialog.setCanceledOnTouchOutside(false);
|
||||
currentDialog.setCancelable(false);
|
||||
currentDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
mViewModel = new DialogInputPesoViewModel();
|
||||
mViewModel.codTcol.set(codTcol);
|
||||
mViewModel.netWeight.set(UtilityNumber.decimalToString(netWeight));
|
||||
mViewModel.grossWeight.set(UtilityNumber.decimalToString(grossWeight));
|
||||
|
||||
mBindings.setViewModel(mViewModel);
|
||||
|
||||
mBindings.buttonConfirm.setOnClickListener(v -> {
|
||||
currentDialog.dismiss();
|
||||
|
||||
String newCodTcol = null;
|
||||
|
||||
if(mViewModel.codTcol.get() != null) {
|
||||
Optional<MtbTCol> newCodTcolOptional = Stream.of(codTcolList)
|
||||
.filter(x -> (x.getCodTcol() + " - " + x.getDescrizione()).equalsIgnoreCase(mViewModel.codTcol.get()))
|
||||
.findSingle();
|
||||
|
||||
if(newCodTcolOptional.isPresent()) newCodTcol = newCodTcolOptional.get().getCodTcol();
|
||||
}
|
||||
|
||||
|
||||
BigDecimal netWeightDecimal = new BigDecimal(mViewModel.netWeight.get());
|
||||
BigDecimal grossWeightDecimal = new BigDecimal(mViewModel.grossWeight.get());
|
||||
|
||||
onDialogDismiss.run(newCodTcol, netWeightDecimal, grossWeightDecimal);
|
||||
});
|
||||
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void init() {
|
||||
|
||||
final DialogProgressView progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||
|
||||
MagazzinoRESTConsumer.getTipiColloStatic(codTcols -> {
|
||||
this.codTcolList = codTcols;
|
||||
|
||||
List<String> codTcolDescriptions = Stream.of(codTcols)
|
||||
.map(codTcol -> codTcol.getCodTcol() + " - " + codTcol.getDescrizione())
|
||||
.toList();
|
||||
|
||||
if(mViewModel.codTcol.get() != null) {
|
||||
Optional<String> newCodTcol = Stream.of(codTcols)
|
||||
.filter(x -> x.getCodTcol().equalsIgnoreCase(mViewModel.codTcol.get()))
|
||||
.map(codTcol -> codTcol.getCodTcol() + " - " + codTcol.getDescrizione())
|
||||
.findSingle();
|
||||
|
||||
if(newCodTcol.isPresent()) mViewModel.codTcol.set(newCodTcol.get());
|
||||
}
|
||||
|
||||
codTcolArrayAdapter = new ArrayAdapter(mContext, R.layout.array_adapter_single_item);
|
||||
codTcolArrayAdapter.addAll(codTcolDescriptions);
|
||||
mBindings.filledExposedDropdownCodTcol.setAdapter(codTcolArrayAdapter);
|
||||
|
||||
progressDialog.dismiss();
|
||||
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class DialogInputPesoViewModel {
|
||||
public BindableString codTcol = new BindableString();
|
||||
public BindableString netWeight = new BindableString();
|
||||
public BindableString grossWeight = new BindableString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.input_peso_lu;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
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 it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.di.BindableString;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsss;
|
||||
import it.integry.integrywmsnative.core.model.MtbTCol;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
import it.integry.integrywmsnative.databinding.DialogInputPesoLuBinding;
|
||||
|
||||
public class DialogInputPesoLuView extends DialogFragment {
|
||||
|
||||
private DialogInputPesoLuBinding mBindings;
|
||||
private RunnableArgsss<String, BigDecimal, BigDecimal> onDialogDismiss;
|
||||
|
||||
public BindableString codTcol = new BindableString();
|
||||
public BindableString netWeight = new BindableString();
|
||||
public BindableString grossWeight = new BindableString();
|
||||
|
||||
|
||||
private List<MtbTCol> codTcolList = null;
|
||||
private ArrayAdapter<String> codTcolArrayAdapter = null;
|
||||
|
||||
|
||||
public DialogInputPesoLuView(String codTcol, BigDecimal netWeight, BigDecimal grossWeight, RunnableArgsss<String, BigDecimal, BigDecimal> onDialogDismiss) {
|
||||
this.onDialogDismiss = onDialogDismiss;
|
||||
|
||||
this.codTcol.set(codTcol);
|
||||
this.netWeight.set(UtilityNumber.decimalToString(netWeight));
|
||||
this.grossWeight.set(UtilityNumber.decimalToString(grossWeight));
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
mBindings = DialogInputPesoLuBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||
mBindings.setView(this);
|
||||
|
||||
this.init();
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(R.string.confirm, (dialog, which) -> {
|
||||
String newCodTcol = null;
|
||||
|
||||
if(codTcol.get() != null) {
|
||||
Optional<MtbTCol> newCodTcolOptional = Stream.of(codTcolList)
|
||||
.filter(x -> (x.getCodTcol() + " - " + x.getDescrizione()).equalsIgnoreCase(codTcol.get()))
|
||||
.findSingle();
|
||||
|
||||
if(newCodTcolOptional.isPresent()) newCodTcol = newCodTcolOptional.get().getCodTcol();
|
||||
}
|
||||
|
||||
|
||||
BigDecimal netWeightDecimal = new BigDecimal(netWeight.get());
|
||||
BigDecimal grossWeightDecimal = new BigDecimal(grossWeight.get());
|
||||
|
||||
onDialogDismiss.run(newCodTcol, netWeightDecimal, grossWeightDecimal);
|
||||
})
|
||||
.create();
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
|
||||
// final DialogProgressView progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||
|
||||
MagazzinoRESTConsumer.getTipiColloStatic(codTcols -> {
|
||||
this.codTcolList = codTcols;
|
||||
|
||||
List<String> codTcolDescriptions = Stream.of(codTcols)
|
||||
.map(codTcol -> codTcol.getCodTcol() + " - " + codTcol.getDescrizione())
|
||||
.toList();
|
||||
|
||||
if(codTcol.get() != null) {
|
||||
Optional<String> newCodTcol = Stream.of(codTcols)
|
||||
.filter(x -> x.getCodTcol().equalsIgnoreCase(codTcol.get()))
|
||||
.map(codTcol -> codTcol.getCodTcol() + " - " + codTcol.getDescrizione())
|
||||
.findSingle();
|
||||
|
||||
if(newCodTcol.isPresent()) codTcol.set(newCodTcol.get());
|
||||
}
|
||||
|
||||
codTcolArrayAdapter = new ArrayAdapter(requireContext(), R.layout.array_adapter_single_item);
|
||||
codTcolArrayAdapter.addAll(codTcolDescriptions);
|
||||
mBindings.filledExposedDropdownCodTcol.setAdapter(codTcolArrayAdapter);
|
||||
|
||||
// progressDialog.dismiss();
|
||||
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(requireContext(), ex);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import java.util.Date;
|
||||
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgsWithReturn;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
|
||||
public class DialogInputQuantityV2DTO {
|
||||
@@ -40,6 +41,9 @@ public class DialogInputQuantityV2DTO {
|
||||
private boolean isFocusOnStart = true;
|
||||
private boolean canLUBeClosed;
|
||||
private boolean saveOnImeDone = false;
|
||||
private boolean notifyProductLotStatus = false;
|
||||
|
||||
private StatoArticoloDTO statoPartitaMag;
|
||||
|
||||
private String partitaMag;
|
||||
private String note;
|
||||
@@ -317,4 +321,22 @@ public class DialogInputQuantityV2DTO {
|
||||
this.saveOnImeDone = saveOnImeDone;
|
||||
return this;
|
||||
}
|
||||
|
||||
public StatoArticoloDTO getStatoPartitaMag() {
|
||||
return statoPartitaMag;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2DTO setStatoPartitaMag(StatoArticoloDTO statoPartitaMag) {
|
||||
this.statoPartitaMag = statoPartitaMag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isNotifyProductLotStatus() {
|
||||
return notifyProductLotStatus;
|
||||
}
|
||||
|
||||
public DialogInputQuantityV2DTO setNotifyProductLotStatus(boolean notifyProductLotStatus) {
|
||||
this.notifyProductLotStatus = notifyProductLotStatus;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.input_quantity_v2;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.os.Bundle;
|
||||
@@ -10,6 +11,7 @@ import android.text.SpannableString;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -40,6 +42,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||
import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||
import it.integry.integrywmsnative.core.model.secondary.StatoPartitaMag;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityFocus;
|
||||
@@ -81,6 +84,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
public ObservableField<Boolean> enabledChangePartitaMag = new ObservableField<>(true);
|
||||
public ObservableField<Boolean> enabledNotes = new ObservableField<>(false);
|
||||
public ObservableField<Boolean> enabledLUCloseButton = new ObservableField<>(true);
|
||||
public ObservableField<Boolean> showProductLotStatus = new ObservableField<>(false);
|
||||
|
||||
private final Handler mHandler = new Handler();
|
||||
|
||||
@@ -121,6 +125,14 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
this.initBarcode();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
var dialog = super.onCreateDialog(savedInstanceState);
|
||||
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
return dialog;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
@@ -163,6 +175,10 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
mBindings.setView(this);
|
||||
mBindings.setViewmodel(this.mViewModel);
|
||||
|
||||
if (mDialogInputQuantityV2DTO.isNotifyProductLotStatus() && mDialogInputQuantityV2DTO.getStatoPartitaMag() != null) {
|
||||
this.initProductLotStatusNotification();
|
||||
}
|
||||
|
||||
MtbUntMis mtbUntMis = mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis() != null && mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis().size() > 0 ? mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis().get(0) : null;
|
||||
if (!(mtbUntMis != null && mtbUntMis.isFlagDig())) {
|
||||
mBindings.inputQtaTotText.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
|
||||
@@ -180,20 +196,41 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
});
|
||||
}
|
||||
this.onLoadingEnded();
|
||||
if (mDialogInputQuantityV2DTO.isFocusOnStart()) {
|
||||
mHandler.postDelayed(() -> {
|
||||
|
||||
if (mDialogInputQuantityV2DTO.isFocusOnStart()) {
|
||||
getDialog().setOnShowListener(dialog -> {
|
||||
if (mDialogInputQuantityV2DTO.isNumCnfEditable()) {
|
||||
UtilityFocus.focusTextBox(requireContext(), mBindings.inputNumCnfText);
|
||||
// mBindings.inputNumCnfText.requestFocus();
|
||||
} else {
|
||||
UtilityFocus.focusTextBox(requireContext(), mBindings.inputQtaTotText);
|
||||
}
|
||||
}, 1500);
|
||||
});
|
||||
}
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
private void initProductLotStatusNotification() {
|
||||
StatoPartitaMag statoPartitaMag = StatoPartitaMag.from(this.mDialogInputQuantityV2DTO.getStatoPartitaMag().getStatoArt());
|
||||
if (statoPartitaMag == null)
|
||||
return;
|
||||
|
||||
this.mBindings.inputDataScadLayout.setEndIconMode(TextInputLayout.END_ICON_CUSTOM);
|
||||
switch (statoPartitaMag) {
|
||||
case SCADUTO:
|
||||
this.mBindings.inputDataScadLayout.setEndIconDrawable(R.drawable.ic_baseline_warning_24);
|
||||
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), R.color.warn_color)));
|
||||
break;
|
||||
case IN_SCADENZA:
|
||||
this.mBindings.inputDataScadLayout.setEndIconDrawable(R.drawable.ic_baseline_warning_24);
|
||||
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), R.color.error_color)));
|
||||
break;
|
||||
default:
|
||||
this.mBindings.inputDataScadLayout.setEndIconDrawable(R.drawable.ic_check_white_24dp);
|
||||
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), R.color.success_color)));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
@@ -426,6 +463,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
this.enabledChangePartitaMag.set(this.mDialogInputQuantityV2DTO.isCanPartitaMagBeChanged());
|
||||
this.mViewModel.shouldAskDataScad = this.mDialogInputQuantityV2DTO.isDataScadMandatory();
|
||||
this.enabledNotes.set(this.mDialogInputQuantityV2DTO.isNotesAllowed());
|
||||
this.showProductLotStatus.set(SettingsManager.iDB().isNotifyLotStatus());
|
||||
this.enabledLUCloseButton.set(this.mDialogInputQuantityV2DTO.isCanLUBeClosed());
|
||||
this.currentTaraArticolo.set(this.mViewModel.getMtbAart().getTaraKg());
|
||||
|
||||
|
||||
@@ -149,11 +149,6 @@ public class DialogScanArtViewModel {
|
||||
|
||||
|
||||
private void loadArticolo(@NotNull String barcodeProd, Ean128Model ean128Model, RunnableArgssss<DialogConsts.Results, MtbAart, Ean128Model, List<MtbColr>> onComplete) {
|
||||
if (barcodeProd.length() == 14) {
|
||||
barcodeProd = UtilityBarcode.convertITF14toEAN13(barcodeProd);
|
||||
}
|
||||
|
||||
String finalBarcodeProd = barcodeProd;
|
||||
this.mArticoloRESTConsumer.getByBarcodeProd(barcodeProd, mtbAartList -> {
|
||||
if (mtbAartList != null && mtbAartList.size() > 0) {
|
||||
|
||||
@@ -165,11 +160,11 @@ public class DialogScanArtViewModel {
|
||||
} else if (!mForceOnlyUL) {
|
||||
onComplete.run(DialogConsts.Results.YES, mtbAartList.get(0), ean128Model, null);
|
||||
} else {
|
||||
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||
}
|
||||
|
||||
} else {
|
||||
this.sendError(new NoResultFromBarcodeException(finalBarcodeProd));
|
||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||
}
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
@@ -2,17 +2,14 @@ package it.integry.integrywmsnative.view.dialogs.scan_or_create_lu;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -30,7 +27,7 @@ import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.databinding.DialogScanOrCreateLuBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.DialogBasketLU;
|
||||
import it.integry.integrywmsnative.view.dialogs.basket_lu.DialogBasketLUView;
|
||||
|
||||
public class DialogScanOrCreateLUView extends BaseDialogFragment implements DialogScanOrCreateLUViewModel.Listener {
|
||||
|
||||
@@ -40,12 +37,12 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
private DialogScanOrCreateLuBinding mBindings;
|
||||
private int mBarcodeScannerIstanceID;
|
||||
|
||||
private RunnableArgss<MtbColt, Boolean> mOnComplete;
|
||||
private final RunnableArgss<MtbColt, Boolean> mOnComplete;
|
||||
private MtbColt openedMtbColt;
|
||||
|
||||
private boolean mShouldCheckResiduo;
|
||||
private boolean mShouldCheckIfExistDoc;
|
||||
private boolean mEnableCreation;
|
||||
private final boolean mShouldCheckResiduo;
|
||||
private final boolean mShouldCheckIfExistDoc;
|
||||
private final boolean mEnableCreation;
|
||||
|
||||
private final BindableBoolean basketEnabled = new BindableBoolean();
|
||||
private final BindableBoolean creationEnabled = new BindableBoolean();
|
||||
@@ -73,22 +70,21 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
|
||||
mEnableCreation = enableCreation;
|
||||
mOnComplete = onComplete;
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
this.initBarcode();
|
||||
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_scan_or_create_lu, container, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
mBindings.setView(this);
|
||||
|
||||
MainApplication.appComponent
|
||||
.dialogScanOrCreateLUComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
this.initBarcode();
|
||||
|
||||
mBindings = DialogScanOrCreateLuBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||
mBindings.setLifecycleOwner(this);
|
||||
mBindings.setView(this);
|
||||
|
||||
this.mViewModel
|
||||
.setListener(this);
|
||||
@@ -98,26 +94,21 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
||||
|
||||
mBindings.createNewLuButton.setOnClickListener(v -> {
|
||||
this.mViewModel.createNewLU();
|
||||
// dismiss();
|
||||
});
|
||||
|
||||
mBindings.viewBasket.setOnClickListener(v -> {
|
||||
DialogBasketLU.make(getActivity(), mtbColt -> {
|
||||
new DialogBasketLUView(mtbColt -> {
|
||||
onLUOpened(mtbColt, false);
|
||||
}).show();
|
||||
}).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
});
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
var dialog = super.onCreateDialog(savedInstanceState);
|
||||
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
return dialog;
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(mBindings.getRoot())
|
||||
.setCancelable(false)
|
||||
.create();
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
return alertDialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.yes_no;
|
||||
|
||||
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.DialogYesNoBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
|
||||
public class DialogYesNo {
|
||||
|
||||
private Dialog currentDialog;
|
||||
|
||||
public static Dialog make(final Context context, final String title, final String description, RunnableArgs<DialogConsts.Results> onDialogDismiss) {
|
||||
return new DialogYesNo(context, title, description, onDialogDismiss).currentDialog;
|
||||
}
|
||||
|
||||
private DialogYesNo(Context context, String title, String description, RunnableArgs<DialogConsts.Results> onDialogDismiss) {
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
DialogYesNoBinding bindings = DataBindingUtil.inflate(inflater, R.layout.dialog_yes_no, null, false);
|
||||
|
||||
currentDialog = new Dialog(context);
|
||||
|
||||
currentDialog.setContentView(bindings.getRoot());
|
||||
|
||||
currentDialog.setCancelable(false);
|
||||
currentDialog.setCanceledOnTouchOutside(false);
|
||||
currentDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
|
||||
bindings.titleText.setText(title);
|
||||
bindings.descriptionText.setText(description);
|
||||
|
||||
bindings.buttonYes.setOnClickListener(v -> {
|
||||
onDialogDismiss.run(DialogConsts.Results.YES);
|
||||
currentDialog.dismiss();
|
||||
});
|
||||
|
||||
bindings.buttonNo.setOnClickListener(v -> {
|
||||
onDialogDismiss.run(DialogConsts.Results.NO);
|
||||
currentDialog.dismiss();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.yes_no;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
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;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
|
||||
public class DialogYesNoView extends DialogFragment {
|
||||
|
||||
private final String title;
|
||||
private final String description;
|
||||
private final RunnableArgs<DialogConsts.Results> onDialogDismiss;
|
||||
|
||||
public DialogYesNoView(final String title, final String description, RunnableArgs<DialogConsts.Results> onDialogDismiss) {
|
||||
super();
|
||||
|
||||
this.title = title;
|
||||
this.description = description;
|
||||
this.onDialogDismiss = onDialogDismiss;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
var binding = DialogYesNoBinding.inflate(LayoutInflater.from(requireContext()));
|
||||
binding.executePendingBindings();
|
||||
|
||||
if(UtilityString.isNullOrEmpty(title)) {
|
||||
binding.titleText.setVisibility(View.GONE);
|
||||
binding.descriptionText.setTextAppearance(requireContext(), R.style.TextAppearance_Material3_BodyLarge);
|
||||
} else {
|
||||
binding.titleText.setText(title);
|
||||
binding.titleText.setVisibility(View.VISIBLE);
|
||||
binding.descriptionText.setTextAppearance(requireContext(), R.style.TextAppearance_Material3_BodyMedium);
|
||||
}
|
||||
|
||||
binding.descriptionText.setText(description);
|
||||
|
||||
|
||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setView(binding.getRoot())
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Ok", (dialog, which) -> {
|
||||
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.YES);
|
||||
})
|
||||
.setNegativeButton("Annulla", (dialog, which) -> {
|
||||
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.NO);
|
||||
})
|
||||
.create();
|
||||
|
||||
alertDialog.setCanceledOnTouchOutside(false);
|
||||
return alertDialog;
|
||||
}
|
||||
}
|
||||
@@ -8,5 +8,5 @@
|
||||
android:right="6dp"
|
||||
android:top="1dp" />
|
||||
|
||||
<corners android:radius="5dp" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/ic_baseline_warning_24.xml
Normal file
5
app/src/main/res/drawable/ic_baseline_warning_24.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#000000"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M1,21h22L12,2 1,21zM13,18h-2v-2h2v2zM13,14h-2v-4h2v4z"/>
|
||||
</vector>
|
||||
@@ -295,6 +295,7 @@
|
||||
android:backgroundTint="@color/light_blue_100"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:visibility="@{viewmodel.totalNumCnfInWarehouse != null || viewmodel.totalQtaInWarehouse != null ? View.VISIBLE : View.GONE}">
|
||||
|
||||
|
||||
@@ -394,6 +395,7 @@
|
||||
android:backgroundTint="@color/light_blue_100"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:visibility="@{viewmodel.totalNumCnfCommitted != null || viewmodel.totalQtaCommitted != null ? View.VISIBLE : View.GONE}">
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -17,262 +17,243 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/title_container"
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@id/title_icon"
|
||||
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:background="@color/green_300"
|
||||
android:gravity="center_horizontal">
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="Title here" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/title_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="24dp"
|
||||
android:src="@drawable/ic_error_white_24dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/description_text"
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
tools:text="Description here" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/base_buttons_layout"
|
||||
android:id="@+id/dialog_content_hashmap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<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"
|
||||
tools:text="Title here" />
|
||||
|
||||
<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"
|
||||
tools:text="Description here" />
|
||||
android:paddingHorizontal="12dp" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/dialog_content_hashmap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp">
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:visibility="@{view.negativeVisible && !view.neutralVisible ? View.VISIBLE : View.GONE}">-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/center_guideline"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.5" />-->
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.OutlinedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- android:onClick="@{() -> view.onNegativeClick()}"-->
|
||||
<!-- android:text="@{view.negativeButtonText}"-->
|
||||
<!-- tools:text="Neutral"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/center_guideline"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{view.negativeVisible && !view.neutralVisible ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_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-->
|
||||
<!-- style="@style/Widget.Material3.Button.UnelevatedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||
<!-- android:text="@{view.positiveButtonText}"-->
|
||||
<!-- tools:text="Positive"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/center_guideline"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onNegativeClick()}"
|
||||
android:text="@{view.negativeButtonText}"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:strokeColor="@color/colorPrimary" />
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:visibility="@{!view.negativeVisible && !view.neutralVisible ? View.VISIBLE : View.GONE}">-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@{view.positiveButtonText}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/ok_left_buttons_guideline"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.25" />-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/ok_right_buttons_guideline"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.75" />-->
|
||||
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.UnelevatedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Positive"-->
|
||||
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||
<!-- android:text="@{view.positiveButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="@id/ok_right_buttons_guideline"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/ok_left_buttons_guideline"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{!view.negativeVisible && !view.neutralVisible ? View.VISIBLE : View.GONE}">
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:visibility="@{view.negativeVisible && view.neutralVisible ? View.VISIBLE : View.GONE}">-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/left_buttons_guideline"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.33" />-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/right_buttons_guideline"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintGuide_percent="0.66" />-->
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/ok_left_buttons_guideline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.25" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/ok_right_buttons_guideline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.75" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@{view.positiveButtonText}"
|
||||
app:layout_constraintEnd_toEndOf="@id/ok_right_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="@id/ok_left_buttons_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Button.DangerFull"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Negative"-->
|
||||
<!-- android:onClick="@{() -> view.onNegativeClick()}"-->
|
||||
<!-- android:text="@{view.negativeButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/left_buttons_guideline"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{view.negativeVisible && view.neutralVisible ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/left_buttons_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.33" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/right_buttons_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.66" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.OutlinedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Neutral"-->
|
||||
<!-- android:onClick="@{() -> view.onNeutralClick()}"-->
|
||||
<!-- android:text="@{view.neutralButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/right_buttons_guideline"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/left_buttons_guideline"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:strokeColor="@color/colorPrimary" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.DangerFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onNegativeClick()}"
|
||||
android:text="@{view.negativeButtonText}"
|
||||
app:layout_constraintEnd_toStartOf="@id/left_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.UnelevatedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Positive"-->
|
||||
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||
<!-- android:text="@{view.positiveButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/right_buttons_guideline"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onNeutralClick()}"
|
||||
android:text="@{view.neutralButtonText}"
|
||||
app:layout_constraintEnd_toStartOf="@id/right_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="@id/left_buttons_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:strokeColor="@color/colorPrimary" />
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:visibility="@{!view.negativeVisible && view.neutralVisible ? View.VISIBLE : View.GONE}">-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.Guideline-->
|
||||
<!-- android:id="@+id/center_guideline2"-->
|
||||
<!-- 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
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@{view.positiveButtonText}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/right_buttons_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<!-- <com.google.android.material.button.MaterialButton-->
|
||||
<!-- style="@style/Widget.Material3.Button.OutlinedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Neutral"-->
|
||||
<!-- android:onClick="@{() -> view.onNeutralClick()}"-->
|
||||
<!-- android:text="@{view.neutralButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/center_guideline2"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:strokeColor="@color/colorPrimary" />-->
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{!view.negativeVisible && view.neutralVisible ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_guideline2"
|
||||
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-->
|
||||
<!-- style="@style/Widget.Material3.Button.UnelevatedButton"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="8dp"-->
|
||||
<!-- android:layout_marginRight="8dp"-->
|
||||
<!-- tools:text="Positive"-->
|
||||
<!-- android:onClick="@{() -> view.onPositiveClick()}"-->
|
||||
<!-- android:text="@{view.positiveButtonText}"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@id/center_guideline2"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onNeutralClick()}"
|
||||
android:text="@{view.neutralButtonText}"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_guideline2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:strokeColor="@color/colorPrimary" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:onClick="@{() -> view.onPositiveClick()}"
|
||||
android:text="@{view.positiveButtonText}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_guideline2"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
@@ -1,45 +1,36 @@
|
||||
<?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:id="@+id/base_root"
|
||||
android:orientation="vertical"
|
||||
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<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:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="16dp">
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/basket" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:text="@string/basket"
|
||||
android:gravity="center_horizontal"/>
|
||||
<it.integry.integrywmsnative.ui.DeactivatableViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<it.integry.integrywmsnative.ui.DeactivatableViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:animateLayoutChanges="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</it.integry.integrywmsnative.ui.DeactivatableViewPager>
|
||||
</it.integry.integrywmsnative.ui.DeactivatableViewPager>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</layout>
|
||||
@@ -1,10 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.model.MtbColt" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityDate" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
@@ -12,49 +17,41 @@
|
||||
type="MtbColt" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@{mtbColt.numCollo.toString()}"
|
||||
tools:text="22222"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:textColor="@android:color/white"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingRight="6dp"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
</RelativeLayout>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:layout_gravity="center"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="@{mtbColt.numCollo.toString()}"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
tools:text="22222" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
@@ -63,25 +60,25 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_toStartOf="@id/posizione_collo"
|
||||
android:layout_alignParentStart="true"
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toStartOf="@id/posizione_collo"
|
||||
android:text="@{mtbColt.getDataColloHumanLong()}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
android:text="@{mtbColt.getDataColloHumanLong()}"
|
||||
tools:text="28 ottobre 2018" />
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/posizione_collo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@{mtbColt.posizione}"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbColt.posizione) ? View.INVISIBLE : View.VISIBLE}"
|
||||
tools:text="A01F01C01L01" />
|
||||
@@ -90,16 +87,17 @@
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:text="@{`Preparato da: ` + mtbColt.preparatoDa}"
|
||||
android:textSize="14sp"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbColt.preparatoDa) ? View.INVISIBLE : View.VISIBLE}"
|
||||
tools:text="Preparato da: Utente" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
@@ -45,7 +45,7 @@
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.85" />
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
@@ -69,7 +69,7 @@
|
||||
android:text="@string/no_lu_found_message"
|
||||
android:layout_marginTop="16dp"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"/>
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -106,15 +106,13 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_abort"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
style="@style/Widget.Material3.Button.TextButton.Dialog"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:text="@string/back"
|
||||
app:icon="@drawable/ic_black_back"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="24dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -123,15 +121,13 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_confirm"
|
||||
style="@style/Button.PrimaryFull"
|
||||
style="@style/Widget.Material3.Button.TonalButton.Icon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:text="@string/use"
|
||||
app:icon="@drawable/ic_black_tick"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="24dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -2,61 +2,44 @@
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/base_root"
|
||||
android:orientation="vertical"
|
||||
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">
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/title_container"
|
||||
<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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/light_blue_300"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/title_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
android:layout_margin="24dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/dialog_choose_art_from_lista_art" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/dialog_choose_art_from_lista_art__main_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:text="@string/dialog_choose_art_from_lista_art"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/dialog_choose_art_from_lista_art__main_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/dialog_choose_art_from_lista_art__item_model"
|
||||
tools:itemCount="5"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,74 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<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>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||
|
||||
<variable
|
||||
name="mtbAart"
|
||||
type="it.integry.integrywmsnative.core.model.MtbAart"/>
|
||||
type="it.integry.integrywmsnative.core.model.MtbAart" />
|
||||
</data>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/linearLayout"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{mtbAart.codMart}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="COD MART" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:text="@{mtbAart.diacod}"
|
||||
android:textColor="@color/red_600"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbAart.diacod) ? View.GONE : View.VISIBLE}"
|
||||
tools:text="DIACOD" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{mtbAart.codMart}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="COD MART" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{mtbAart.diacod}"
|
||||
android:textColor="@color/red_600"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbAart.diacod) ? View.GONE : View.VISIBLE}"
|
||||
android:layout_alignParentEnd="true"
|
||||
tools:text="DIACOD"/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:text="@{mtbAart.descrizioneEstesa}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
tools:text="Descrizione lunga articolo" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
android:ellipsize="end"
|
||||
android:text="@{mtbAart.descrizioneEstesa}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp"
|
||||
tools:text="Descrizione lunga articolo" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</layout>
|
||||
@@ -1,188 +1,157 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<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>
|
||||
|
||||
<import type="android.text.Html" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityNumber" />
|
||||
|
||||
<variable
|
||||
name="mContext"
|
||||
type="android.content.Context" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPeso.DialogInputPesoViewModel" />
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLuView" />
|
||||
</data>
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
<androidx.cardview.widget.CardView
|
||||
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
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
<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:background="@color/light_blue_300"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
android:layout_margin="24dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/action_insert_weight" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/dialog_input_peso_lu_description" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_cod_tcol"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:text="@string/action_insert_weight"
|
||||
android:gravity="center_horizontal"/>
|
||||
android:hint="@string/lu_type">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="@string/dialog_input_peso_lu_description"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="16dp" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_cod_tcol"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/filled_exposed_dropdown_cod_tcol"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/lu_type">
|
||||
android:ellipsize="end"
|
||||
android:imeOptions="actionNext"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:nextFocusForward="@id/filled_exposed_dropdown_vettore"
|
||||
android:singleLine="true"
|
||||
app:binding="@{view.codTcol}" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/filled_exposed_dropdown_cod_tcol"
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_center_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.49" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_center_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.51" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_center_1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:imeOptions="actionNext"
|
||||
android:nextFocusForward="@id/filled_exposed_dropdown_vettore"
|
||||
app:binding="@{viewModel.codTcol}"/>
|
||||
android:hint="@string/gross_weight"
|
||||
android:inputType="numberDecimal"
|
||||
app:binding="@{view.grossWeight}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_center_2"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_center_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.49"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_center_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.51"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="0dp"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/TextInputEditText.OutlinePrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/guide_center_1"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/TextInputLayout.OutlinePrimary">
|
||||
android:hint="@string/net_weight"
|
||||
android:inputType="numberDecimal"
|
||||
app:binding="@{view.netWeight}" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/gross_weight"
|
||||
android:inputType="numberDecimal"
|
||||
app:binding="@{viewModel.grossWeight}"
|
||||
style="@style/TextInputEditText.OutlinePrimary"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/guide_center_2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="16dp"
|
||||
style="@style/TextInputLayout.OutlinePrimary">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/net_weight"
|
||||
android:inputType="numberDecimal"
|
||||
app:binding="@{viewModel.netWeight}"
|
||||
style="@style/TextInputEditText.OutlinePrimary"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:gravity="bottom|center_horizontal">
|
||||
|
||||
|
||||
<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_save_24dp"
|
||||
android:text="@string/confirm"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
@@ -306,6 +306,7 @@
|
||||
android:backgroundTint="@color/light_blue_100"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:visibility="@{viewmodel.totalNumCnfInWarehouse != null || viewmodel.totalQtaInWarehouse != null ? View.VISIBLE : View.GONE}">
|
||||
|
||||
|
||||
@@ -405,6 +406,7 @@
|
||||
android:backgroundTint="@color/light_blue_100"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:visibility="@{viewmodel.totalNumCnfCommitted != null || viewmodel.totalQtaCommitted != null ? View.VISIBLE : View.GONE}">
|
||||
|
||||
|
||||
|
||||
@@ -3,91 +3,60 @@
|
||||
<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>
|
||||
<import type="android.view.View" />
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="subtitle"
|
||||
type="String" />
|
||||
</data>
|
||||
<androidx.cardview.widget.CardView
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="subtitle"
|
||||
type="String" />
|
||||
</data>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@{title}"
|
||||
tools:text="Loading" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text.CenterStacked"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@{subtitle}"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(subtitle) ? View.GONE : View.VISIBLE}"
|
||||
tools:text="@string/loading" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:text="@{title}"
|
||||
android:gravity="center_horizontal"/>
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:indeterminate="true" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:text="@{subtitle}"
|
||||
tools:text="@string/loading"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(subtitle) ? View.GONE : View.VISIBLE}"
|
||||
android:gravity="center_horizontal"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:indeterminate="true"/>
|
||||
|
||||
|
||||
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="32dp"-->
|
||||
<!-- android:layout_marginBottom="40dp"-->
|
||||
<!-- android:layout_marginStart="40dp"-->
|
||||
<!-- android:layout_marginEnd="40dp"-->
|
||||
<!-- android:paddingStart="4dp"-->
|
||||
<!-- android:paddingEnd="4dp"-->
|
||||
<!-- android:backgroundTint="@color/white_bg_alpha"-->
|
||||
<!-- android:background="@drawable/circular_background">-->
|
||||
|
||||
<!-- <ProgressBar-->
|
||||
<!-- android:id="@+id/progressBar"-->
|
||||
<!-- style="?android:attr/progressBarStyleHorizontal"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="20dp"-->
|
||||
<!-- android:indeterminate="true"-->
|
||||
<!-- android:layout_marginTop="-5dp"-->
|
||||
<!-- android:layout_marginBottom="-5dp"/>-->
|
||||
<!-- </RelativeLayout>-->
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</layout>
|
||||
@@ -1,200 +1,144 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<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="view"
|
||||
type="it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView" />
|
||||
</data>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/base_root"
|
||||
android:orientation="vertical"
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
<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:orientation="vertical">
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/title_open_lu" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/title_container"
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/light_blue_300"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/title_icon"
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
android:layout_margin="24dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="Scansiona il codice a barre di una UL" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/dialog_scan_or_create_lu__creation_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:visibility="@{view.creationEnabled}">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginVertical="12dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="OPPURE"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/create_new_lu_button"
|
||||
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/button_create_new_ul" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/dialog_scan_or_create_lu__basket_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:gravity="center_horizontal"
|
||||
app:visibility="@{view.basketEnabled}">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/MaterialAlertDialog.Material3.Body.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp">
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginVertical="12dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="OPPURE"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:text="@string/title_open_lu"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_horizontal"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="Scansiona il codice a barre di una UL"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/dialog_scan_or_create_lu__creation_layout"
|
||||
android:layout_width="match_parent"
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/view_basket"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:visibility="@{view.creationEnabled}">
|
||||
android:text="@string/button_view_basket_ul"
|
||||
app:icon="@drawable/ic_black_shopping_cart"
|
||||
app:iconSize="24dp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_gravity="center_horizontal"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="OPPURE" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/create_new_lu_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:text="@string/button_create_new_ul"/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/dialog_scan_or_create_lu__basket_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:visibility="@{view.basketEnabled}">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_gravity="center_horizontal"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="OPPURE" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/view_basket"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:text="@string/button_view_basket_ul"
|
||||
app:iconSize="24dp"
|
||||
app:icon="@drawable/ic_black_shopping_cart"/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</layout>
|
||||
@@ -5,104 +5,45 @@
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
<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:background="@color/green_300"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_error_white_24dp"
|
||||
android:layout_margin="24dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="Title here" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<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:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
||||
android:text="Title here"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="Description here"
|
||||
android:gravity="left"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
android:gravity="center_horizontal"
|
||||
android:text="Description here" />
|
||||
|
||||
|
||||
|
||||
<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_no"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:strokeColor="@color/colorPrimary"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
||||
android:text="@string/no"/>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_yes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:text="@string/yes"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
@@ -24,9 +24,10 @@
|
||||
android:background="@android:color/white"
|
||||
tools:context=".gest.vendita.MainVenditaFragment">
|
||||
|
||||
<RelativeLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/filter_chips"
|
||||
@@ -50,8 +51,7 @@
|
||||
android:id="@+id/vendita_main_list"
|
||||
android:scrollbars="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/filter_chips"/>
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ordini_vendita_empty_view"
|
||||
@@ -106,18 +106,17 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/vendita_main_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:tint="@android:color/white"
|
||||
style="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="Dispatch orders"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
android:onClick="@{() -> view.dispatchOrders()}"
|
||||
app:visibility="@{view.fabVisible}"
|
||||
android:onClick="@{() -> view.dispatchOrders()}" />
|
||||
style="?attr/floatingActionButtonPrimaryStyle" />
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@@ -17,6 +17,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingVertical="2dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
@@ -24,33 +25,29 @@
|
||||
<View
|
||||
android:id="@+id/empty_view"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp" />
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<RelativeLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ordine_lavorazione_main_list_group_item_container_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="@color/full_white">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
app:checked="@{selected}" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_toEndOf="@id/checkbox">
|
||||
android:layout_alignParentEnd="true">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/right_descrizione"
|
||||
@@ -96,7 +93,7 @@
|
||||
android:layout_toStartOf="@id/right_sub_descrizione"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
@@ -1,45 +1,32 @@
|
||||
<layout>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/mainOrange"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="12dp"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/mainOrange"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:enabled="false" />
|
||||
android:enabled="false"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/group_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
style="@style/TextAppearance.Material3.TitleMedium"
|
||||
tools:text="NOME GRUPPO"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</layout>
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/full_white"
|
||||
@@ -48,12 +48,12 @@
|
||||
android:padding="8dp"
|
||||
app:el_expanded_bind="@{view.thereIsAnOpenedUL}">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/badge_round_corner"
|
||||
android:backgroundTint="@color/colorPrimary">
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
@@ -63,8 +63,8 @@
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="num:" />
|
||||
android:text="num:"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
@@ -87,8 +87,8 @@
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="pos:"
|
||||
android:textColor="@android:color/white"
|
||||
android:visibility="@{!UtilityString.isNullOrEmpty(viewmodel.currentMtbColt.posizione) ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@@ -102,11 +102,11 @@
|
||||
tools:text="ME1FS032" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/rettifica_giacenze_forn_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -114,40 +114,29 @@
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:paddingBottom="6dp">
|
||||
android:padding="8dp">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rettifica_giacenze_forn_check_box"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:onClick="@{() -> view.setUIToForn()}" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_line_fornitore"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.40" />
|
||||
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="10">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/auto_complete_fornitori_layout"
|
||||
style="@style/TextInputLayout.NoLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:hintTextAppearance="@style/hint_text"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/guide_line_fornitore"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="3"
|
||||
app:hintTextAppearance="@style/hint_text">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||
android:id="@+id/auto_complete_fornitori"
|
||||
@@ -164,13 +153,11 @@
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/layout_cod_art_descr_forn"
|
||||
style="@style/TextInputLayout.NoLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
app:hintTextAppearance="@style/hint_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/guide_line_fornitore"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:layout_weight="7"
|
||||
app:hintTextAppearance="@style/hint_text">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/input_cod_art_descr_forn"
|
||||
@@ -184,9 +171,8 @@
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rettifica_giacenze_art_int_layout"
|
||||
@@ -240,7 +226,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -307,7 +293,8 @@
|
||||
android:clipToPadding="false"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="80dp"
|
||||
android:scrollbarStyle="outsideOverlay" />
|
||||
android:scrollbarStyle="outsideOverlay"
|
||||
tools:listitem="@layout/lista_rettifica_giacenze_model" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/rettifica_giacenze_main_fab"
|
||||
@@ -320,21 +307,21 @@
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:onClick="@{() -> viewmodel.closeLU(true)}"
|
||||
android:tint="@android:color/white"
|
||||
app:visibility="@{view.thereIsAnOpenedUL}"
|
||||
app:srcCompat="@drawable/ic_check_black_24dp" />
|
||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||
app:visibility="@{view.thereIsAnOpenedUL}" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<View
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit__background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#99000000"
|
||||
android:visibility="gone"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
||||
|
||||
@@ -1,26 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:fab="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:fab="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View"/>
|
||||
|
||||
<import type="android.view.View" />
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.gest.picking_libero.PickingLiberoFragment" />
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout android:layout_width="match_parent"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/picking_libero_main_list"
|
||||
android:layout_width="match_parent"
|
||||
@@ -28,10 +25,9 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="92dp"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
android:paddingEnd="2dp"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/lista_picking_libero_list_model" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -44,7 +40,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.35"/>
|
||||
app:layout_constraintGuide_percent="0.35" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/free_picking__suggestion_1__guideline_left"
|
||||
@@ -63,76 +59,84 @@
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:alpha="0.4"
|
||||
app:visibility="@{view.thereIsntAnOpenedUL}"
|
||||
app:layout_constraintTop_toBottomOf="@id/free_picking__suggestion_1__guideline_top"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintLeft_toRightOf="@id/free_picking__suggestion_1__guideline_left"
|
||||
app:layout_constraintRight_toLeftOf="@id/free_picking__suggestion_1__guideline_right">
|
||||
app:layout_constraintRight_toLeftOf="@id/free_picking__suggestion_1__guideline_right"
|
||||
app:layout_constraintTop_toBottomOf="@id/free_picking__suggestion_1__guideline_top"
|
||||
app:visibility="@{view.thereIsntAnOpenedUL}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/free_picking_suggestion_1"/>
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/free_picking_suggestion_1"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:alpha="0.4"
|
||||
app:visibility="@{view.thereIsAnOpenULWithoutRows}"
|
||||
app:layout_constraintTop_toBottomOf="@id/free_picking__suggestion_1__guideline_top"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintLeft_toRightOf="@id/free_picking__suggestion_1__guideline_left"
|
||||
app:layout_constraintRight_toLeftOf="@id/free_picking__suggestion_1__guideline_right">
|
||||
app:layout_constraintRight_toLeftOf="@id/free_picking__suggestion_1__guideline_right"
|
||||
app:layout_constraintTop_toBottomOf="@id/free_picking__suggestion_1__guideline_top"
|
||||
app:visibility="@{view.thereIsAnOpenULWithoutRows}">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/free_picking_suggestion_2"/>
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/free_picking_suggestion_2"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<com.github.clans.fab.FloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@drawable/fab_add"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription=""
|
||||
app:srcCompat="@drawable/fab_add"
|
||||
android:onClick="@{() -> view.createNewLU()}"
|
||||
app:visibility="@{view.thereIsntAnOpenedUL}"
|
||||
fab:fab_colorNormal="@color/colorPrimary"
|
||||
fab:fab_colorPressed="@color/white_pressed"
|
||||
fab:fab_colorRipple="#66FFFFFF"/>
|
||||
style="?attr/floatingActionButtonPrimaryStyle" />
|
||||
|
||||
|
||||
|
||||
<com.github.clans.fab.FloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@drawable/ic_check_white_24dp"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription=""
|
||||
app:srcCompat="@drawable/ic_check_white_24dp"
|
||||
android:onClick="@{() -> view.closeLU()}"
|
||||
app:visibility="@{view.thereIsAnOpenedUL}"
|
||||
fab:fab_colorNormal="@color/mainGreen"
|
||||
fab:fab_colorPressed="@color/white_pressed"
|
||||
fab:fab_colorRipple="#66FFFFFF"/>
|
||||
style="?attr/floatingActionButtonSecondaryStyle" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <com.github.clans.fab.FloatingActionButton-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_gravity="bottom|end"-->
|
||||
<!-- android:layout_marginEnd="8dp"-->
|
||||
<!-- android:layout_marginBottom="8dp"-->
|
||||
<!-- android:onClick="@{() -> view.closeLU()}"-->
|
||||
<!-- android:src="@drawable/ic_check_white_24dp"-->
|
||||
<!-- app:visibility="@{view.thereIsAnOpenedUL}"-->
|
||||
<!-- fab:fab_colorNormal="@color/mainGreen"-->
|
||||
<!-- fab:fab_colorPressed="@color/white_pressed"-->
|
||||
<!-- fab:fab_colorRipple="#66FFFFFF" />-->
|
||||
|
||||
|
||||
<View
|
||||
@@ -140,9 +144,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#99000000"
|
||||
android:visibility="gone"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
||||
|
||||
@@ -91,20 +91,20 @@
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_max="300dp"
|
||||
app:layout_constraintHeight_max="280dp"
|
||||
app:layout_constraintHeight_min="200dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:listitem="@layout/layout_filter_gruppo_merc__list_item" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/save_btn"
|
||||
style="@style/Button.PrimaryFull"
|
||||
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/confirm"
|
||||
app:singleClick="@{() -> view.onConfirm()}" />
|
||||
|
||||
@@ -16,21 +16,21 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
android:onClick="@{() -> item.selected.toggle()}"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_height="36dp"
|
||||
android:clickable="false"
|
||||
android:enabled="@{item.enabled}"
|
||||
app:checked="@{item.selected}"
|
||||
android:clickable="false"/>
|
||||
app:checked="@{item.selected}" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{item.enabled}"
|
||||
@@ -51,7 +51,7 @@
|
||||
android:clickable="false" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=" - "
|
||||
@@ -61,7 +61,7 @@
|
||||
android:clickable="false" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{item.enabled}"
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:orientation="horizontal">
|
||||
android:layout_marginEnd="16dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
@@ -91,20 +90,20 @@
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_max="300dp"
|
||||
app:layout_constraintHeight_max="280dp"
|
||||
app:layout_constraintHeight_min="200dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:listitem="@layout/layout_filter_numero_ordine__list_item" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/save_btn"
|
||||
style="@style/Button.PrimaryFull"
|
||||
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/confirm"
|
||||
app:singleClick="@{() -> view.onConfirm()}" />
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
@@ -16,42 +18,34 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="@{item.enabled}"
|
||||
android:onClick="@{() -> item.selected.toggle()}">
|
||||
android:onClick="@{() -> item.selected.toggle()}"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_height="36dp"
|
||||
android:clickable="false"
|
||||
android:enabled="@{item.enabled}"
|
||||
app:checked="@{item.selected}"
|
||||
android:clickable="false"/>
|
||||
app:checked="@{item.selected}" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/TextAppearance.Material3.BodyMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:clickable="false"
|
||||
android:enabled="@{item.enabled}"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="false">
|
||||
android:text="@{item.originalModel.toString()}"
|
||||
tools:text="01" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="@{item.enabled}"
|
||||
android:text="@{item.originalModel.toString()}"
|
||||
tools:text="01"
|
||||
android:clickable="false" />
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</layout>
|
||||
@@ -32,7 +32,7 @@
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingRight="6dp"
|
||||
android:textStyle="bold"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"/>
|
||||
style="@style/AppTheme.NewMaterial.Text.Small" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
@@ -57,7 +57,7 @@
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/green_700"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
tools:text="QTA"/>
|
||||
tools:text="QTA" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -65,7 +65,7 @@
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
style="@android:style/TextAppearance.Medium"
|
||||
android:text=" / "/>
|
||||
android:text=" / " />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/qta_tot"
|
||||
@@ -74,7 +74,7 @@
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||
tools:text="QTA"/>
|
||||
tools:text="QTA" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/unt_mis"
|
||||
@@ -86,7 +86,7 @@
|
||||
android:textAllCaps="true"
|
||||
android:layout_gravity="center_vertical"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="cnf"/>
|
||||
tools:text="cnf" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
@@ -98,7 +98,7 @@
|
||||
android:scaleType="fitCenter"
|
||||
android:background="@drawable/ic_info_78dp"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="gone" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/black"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="DESCRIZIONE"/>
|
||||
tools:text="DESCRIZIONE" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -131,8 +131,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="SUB DESCRIZIONE"/>
|
||||
|
||||
tools:text="SUB DESCRIZIONE" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@@ -141,7 +140,15 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="SUB DESCRIZIONE"/>
|
||||
tools:text="SUB DESCRIZIONE" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/free_qty"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
tools:text="QTA OMAGGIO 15 CNF" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -160,12 +167,11 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:textStyle="bold"
|
||||
android:layout_alignParentEnd="true"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"/>
|
||||
style="@style/AppTheme.NewMaterial.Text.Small" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<View
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user