Compare commits
50 Commits
v1.16.21(2
...
v1.16.33(2
| Author | SHA1 | Date | |
|---|---|---|---|
| e0c07ea06e | |||
| 3e79b52e23 | |||
| 7d7712e57a | |||
| 6d7a047e8e | |||
| 72e4f2a0b9 | |||
| ef6cdc6a86 | |||
| 23b86e68cc | |||
| 2e46f9f665 | |||
| 88b1c56360 | |||
| 1d71ac10bd | |||
| 8eb677ecdf | |||
| 74efbac452 | |||
| 9c6375083f | |||
| b24d5271a4 | |||
| b5626e5b08 | |||
| fd2e1fa4f4 | |||
| a3f5072646 | |||
| 1258e8c3e6 | |||
| ccef0fe528 | |||
| 9bb5d1adce | |||
| ac446d953c | |||
| 407ff0b264 | |||
| 10e748b9d4 | |||
| e30273fe42 | |||
| 44564245a7 | |||
| 920f306907 | |||
| 90aa52ab55 | |||
| 93f3eb65f0 | |||
| eb94944928 | |||
| 28698ba306 | |||
| c713bbebbc | |||
| 38e2a02766 | |||
| dd8bf264a4 | |||
| 9488c1994d | |||
| 16099cdaf6 | |||
| f061f2bfc9 | |||
| f7253fd44c | |||
| e12d371567 | |||
| 5596f71c03 | |||
| 8669b812f5 | |||
| 3243484dd0 | |||
| 37114dc4d1 | |||
| d5af79abba | |||
| b50aa7a9d2 | |||
| cc333c3147 | |||
| fc5044134c | |||
| 93a3e39332 | |||
| 3eaf187136 | |||
| 36f9fa1e36 | |||
| 4cda247ddc |
23
.idea/codeStyles/Project.xml
generated
23
.idea/codeStyles/Project.xml
generated
@@ -1,24 +1,12 @@
|
|||||||
<component name="ProjectCodeStyleConfiguration">
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
<code_scheme name="Project" version="173">
|
<code_scheme name="Project" version="173">
|
||||||
<JetCodeStyleSettings>
|
<JetCodeStyleSettings>
|
||||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||||
<value>
|
|
||||||
<package name="java.util" alias="false" withSubpackages="false" />
|
|
||||||
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
|
|
||||||
<package name="io.ktor" alias="false" withSubpackages="true" />
|
|
||||||
</value>
|
|
||||||
</option>
|
|
||||||
<option name="PACKAGES_IMPORT_LAYOUT">
|
|
||||||
<value>
|
|
||||||
<package name="" alias="false" withSubpackages="true" />
|
|
||||||
<package name="java" alias="false" withSubpackages="true" />
|
|
||||||
<package name="javax" alias="false" withSubpackages="true" />
|
|
||||||
<package name="kotlin" alias="false" withSubpackages="true" />
|
|
||||||
<package name="" alias="true" withSubpackages="true" />
|
|
||||||
</value>
|
|
||||||
</option>
|
|
||||||
</JetCodeStyleSettings>
|
</JetCodeStyleSettings>
|
||||||
<codeStyleSettings language="XML">
|
<codeStyleSettings language="XML">
|
||||||
|
<indentOptions>
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||||
|
</indentOptions>
|
||||||
<arrangement>
|
<arrangement>
|
||||||
<rules>
|
<rules>
|
||||||
<section>
|
<section>
|
||||||
@@ -127,5 +115,8 @@
|
|||||||
</rules>
|
</rules>
|
||||||
</arrangement>
|
</arrangement>
|
||||||
</codeStyleSettings>
|
</codeStyleSettings>
|
||||||
|
<codeStyleSettings language="kotlin">
|
||||||
|
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||||
|
</codeStyleSettings>
|
||||||
</code_scheme>
|
</code_scheme>
|
||||||
</component>
|
</component>
|
||||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||||
|
</state>
|
||||||
|
</component>
|
||||||
1
.idea/runConfigurations.xml
generated
1
.idea/runConfigurations.xml
generated
@@ -3,6 +3,7 @@
|
|||||||
<component name="RunConfigurationProducerService">
|
<component name="RunConfigurationProducerService">
|
||||||
<option name="ignoredProducers">
|
<option name="ignoredProducers">
|
||||||
<set>
|
<set>
|
||||||
|
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 203
|
def appVersionCode = 215
|
||||||
def appVersionName = '1.16.21'
|
def appVersionName = '1.16.33'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
|
|
||||||
import com.annimon.stream.Optional;
|
import com.annimon.stream.Optional;
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.google.android.gms.common.util.IOUtils;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
@@ -122,7 +121,7 @@ public class ColliDataRecover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean thereIsAnExistantSession() {
|
public static boolean thereIsAnExistantSession() {
|
||||||
return mtbColtsSessions.size() > 0;
|
return mtbColtsSessions != null && mtbColtsSessions.size() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Integer> getAllSessionIDs() {
|
public static List<Integer> getAllSessionIDs() {
|
||||||
@@ -193,13 +192,16 @@ public class ColliDataRecover {
|
|||||||
try {
|
try {
|
||||||
inputStream = mContext.openFileInput(CommonConst.Files.RECOVER_COLLO_FILE);
|
inputStream = mContext.openFileInput(CommonConst.Files.RECOVER_COLLO_FILE);
|
||||||
|
|
||||||
byte[] bytes = IOUtils.readInputStreamFully(inputStream);
|
byte[] bytes = new byte[inputStream.available()];
|
||||||
|
inputStream.read(bytes);
|
||||||
|
inputStream.close();
|
||||||
|
|
||||||
String jsonString = new String(bytes);
|
String jsonString = new String(bytes);
|
||||||
|
|
||||||
Type listType = new TypeToken<ArrayList<RecoverDTO>>(){}.getType();
|
Type listType = new TypeToken<ArrayList<RecoverDTO>>(){}.getType();
|
||||||
mtbColtsSessions = gson.fromJson(jsonString, listType);
|
mtbColtsSessions = gson.fromJson(jsonString, listType);
|
||||||
|
|
||||||
inputStream.close();
|
if(mtbColtsSessions == null) mtbColtsSessions = new ArrayList<>();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
UtilityExceptions.defaultException(mContext, e);
|
UtilityExceptions.defaultException(mContext, e);
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -485,40 +484,31 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void getByTestataStatic(MtbColt testata, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void getByTestataStatic(MtbColt testata, boolean onlyResiduo, boolean throwExcIfNull, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
String ssccString = null;
|
testata.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
if (testata.getSerCollo().equalsIgnoreCase(CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE)) {
|
|
||||||
ssccString = "U";
|
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yy");
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
ssccString += sdf.format(testata.getDataColloD());
|
colliMagazzinoRESTConsumerService.getColloInGiac(onlyResiduo, throwExcIfNull, testata).enqueue(new Callback<ServiceRESTResponse<MtbColt>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
|
||||||
|
analyzeAnswer(response, "getColloInGiac", mtbColt -> {
|
||||||
|
|
||||||
ssccString += String.format("%07d", testata.getNumCollo());
|
if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
|
||||||
} else {
|
List<MtbColt> mtbColtList = new ArrayList<>();
|
||||||
ssccString = "";
|
mtbColtList.add(mtbColt);
|
||||||
|
fillMtbAartsOfMtbColtsStatic(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed);
|
||||||
|
} else {
|
||||||
|
onComplete.run(mtbColt);
|
||||||
|
}
|
||||||
|
|
||||||
switch (testata.getGestioneEnum()) {
|
}, onFailed);
|
||||||
case ACQUISTO:
|
|
||||||
ssccString += "1";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LAVORAZIONE:
|
|
||||||
ssccString += "2";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case VENDITA:
|
|
||||||
ssccString += "3";
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yy");
|
@Override
|
||||||
ssccString += sdf.format(testata.getDataColloD());
|
public void onFailure(Call<ServiceRESTResponse<MtbColt>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
ssccString += String.format("%05d", testata.getNumCollo());
|
}
|
||||||
ssccString += "0";
|
});
|
||||||
}
|
|
||||||
|
|
||||||
getBySSCCStatic(ssccString, onlyResiduo, throwExcIfNull, onComplete, onFailed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -660,9 +650,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
).enqueue(new Callback<ServiceRESTResponse<MtbColr>>() {
|
).enqueue(new Callback<ServiceRESTResponse<MtbColr>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<MtbColr>> call, Response<ServiceRESTResponse<MtbColr>> response) {
|
public void onResponse(Call<ServiceRESTResponse<MtbColr>> call, Response<ServiceRESTResponse<MtbColr>> response) {
|
||||||
analyzeAnswer(response, "creaRettificaCollo", data -> {
|
analyzeAnswer(response, "creaRettificaCollo", onComplete, onFailed);
|
||||||
onComplete.run(data);
|
|
||||||
}, onFailed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -674,6 +662,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
public void spostaArtsTraUL(MtbColt sourceMtbColt, MtbColt destMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void spostaArtsTraUL(MtbColt sourceMtbColt, MtbColt destMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
MtbColt mtbColtToMoveClone = (MtbColt) sourceMtbColt.clone();
|
MtbColt mtbColtToMoveClone = (MtbColt) sourceMtbColt.clone();
|
||||||
|
MtbColt mtbColtDestClone = (MtbColt) destMtbColt.clone();
|
||||||
|
|
||||||
for (int i = 0; i < mtbColtToMoveClone.getMtbColr().size(); i++) {
|
for (int i = 0; i < mtbColtToMoveClone.getMtbColr().size(); i++) {
|
||||||
mtbColtToMoveClone.getMtbColr().get(i)
|
mtbColtToMoveClone.getMtbColr().get(i)
|
||||||
@@ -681,9 +670,11 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
.setMtbPartitaMag(null);
|
.setMtbPartitaMag(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mtbColtDestClone.setMtbColr(null);
|
||||||
|
|
||||||
SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO = new SpostaArtsTraULRequestDTO()
|
SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO = new SpostaArtsTraULRequestDTO()
|
||||||
.setSourceMtbColt(sourceMtbColt)
|
.setSourceMtbColt(mtbColtToMoveClone)
|
||||||
.setDestinationMtbColt(destMtbColt);
|
.setDestinationMtbColt(mtbColtDestClone);
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
colliMagazzinoRESTConsumerService.spostaArtsTraUL(
|
colliMagazzinoRESTConsumerService.spostaArtsTraUL(
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ public interface ColliMagazzinoRESTConsumerService {
|
|||||||
@POST("getColloByBarcode")
|
@POST("getColloByBarcode")
|
||||||
Call<ServiceRESTResponse<MtbColt>> getColloByBarcode(@Query("codBarreCollo") String sscc, @Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull);
|
Call<ServiceRESTResponse<MtbColt>> getColloByBarcode(@Query("codBarreCollo") String sscc, @Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull);
|
||||||
|
|
||||||
|
@POST("getColloInGiac")
|
||||||
|
Call<ServiceRESTResponse<MtbColt>> getColloInGiac(@Query("onlyResiduo") boolean onlyResiduo, @Query("throwExcIfNull") boolean throwExcIfNull, @Body MtbColt mtbColt);
|
||||||
|
|
||||||
@GET("getColliInBasket")
|
@GET("getColliInBasket")
|
||||||
Call<ServiceRESTResponse<List<MtbColt>>> getColliInBasket(@Query("codMdep") String codMdep);
|
Call<ServiceRESTResponse<List<MtbColt>>> getColliInBasket(@Query("codMdep") String codMdep);
|
||||||
|
|
||||||
|
|||||||
@@ -312,6 +312,8 @@ public class SettingsManager {
|
|||||||
return clazz.cast(value.getValue());
|
return clazz.cast(value.getValue());
|
||||||
} else if(clazz == Boolean.class) {
|
} else if(clazz == Boolean.class) {
|
||||||
return clazz.cast("S".equalsIgnoreCase(value.getValue()));
|
return clazz.cast("S".equalsIgnoreCase(value.getValue()));
|
||||||
|
} else if(clazz == Integer.class && value.getValue() != null) {
|
||||||
|
return clazz.cast(Integer.parseInt(value.getValue()));
|
||||||
} else return null;
|
} else return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,6 +125,9 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
|||||||
this.initRecyclerView();
|
this.initRecyclerView();
|
||||||
this.initBarcodeReader();
|
this.initBarcodeReader();
|
||||||
|
|
||||||
|
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||||
|
mViewModel.init(codMdep, mCurrentGestioneOrd, mCurrentGestioneCol, mCurrentSegnoCol);
|
||||||
|
|
||||||
return mBindings.getRoot();
|
return mBindings.getRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,8 +135,9 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
|||||||
public void onStart() {
|
public void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
|
|
||||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
if(mAppliedFilterViewModel != null) {
|
||||||
mViewModel.init(codMdep, mCurrentGestioneOrd, mCurrentGestioneCol, mCurrentSegnoCol);
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -216,6 +220,7 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
|||||||
|
|
||||||
ComparatorCompat<OrdiniUscitaElencoDTO> comparator = ComparatorCompat
|
ComparatorCompat<OrdiniUscitaElencoDTO> comparator = ComparatorCompat
|
||||||
.comparing(OrdiniUscitaElencoDTO::getRagSocOrd)
|
.comparing(OrdiniUscitaElencoDTO::getRagSocOrd)
|
||||||
|
.thenComparing(ComparatorCompat.comparing(x -> x.getDestinatario() != null ? x.getDestinatario() : "zzzzzzzzz"))
|
||||||
.thenComparing(ComparatorCompat.comparing(OrdiniUscitaElencoDTO::getNumOrd));
|
.thenComparing(ComparatorCompat.comparing(OrdiniUscitaElencoDTO::getNumOrd));
|
||||||
|
|
||||||
List<OrdiniUscitaElencoListModel> notHiddenElements = Stream.of(dataList)
|
List<OrdiniUscitaElencoListModel> notHiddenElements = Stream.of(dataList)
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
private ArrayAdapter<String> arrayAdapterVettore;
|
private ArrayAdapter<String> arrayAdapterVettore;
|
||||||
private ArrayAdapter<String> arrayAdapterAgente;
|
private ArrayAdapter<String> arrayAdapterAgente;
|
||||||
private ArrayAdapter<String> arrayAdapterAutomezzo;
|
private ArrayAdapter<String> arrayAdapterAutomezzo;
|
||||||
|
private ArrayAdapter<String> arrayAdapterPaese;
|
||||||
|
|
||||||
private Predicate<OrdiniUscitaElencoDTO> currentDepositoPredicate = null;
|
private Predicate<OrdiniUscitaElencoDTO> currentDepositoPredicate = null;
|
||||||
private Predicate<OrdiniUscitaElencoDTO> currentIdViaggioPredicate = null;
|
private Predicate<OrdiniUscitaElencoDTO> currentIdViaggioPredicate = null;
|
||||||
@@ -60,6 +61,7 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
private Predicate<OrdiniUscitaElencoDTO> currentVettorePredicate = null;
|
private Predicate<OrdiniUscitaElencoDTO> currentVettorePredicate = null;
|
||||||
private Predicate<OrdiniUscitaElencoDTO> currentAgentePredicate = null;
|
private Predicate<OrdiniUscitaElencoDTO> currentAgentePredicate = null;
|
||||||
private Predicate<OrdiniUscitaElencoDTO> currentAutomezzoPredicate = null;
|
private Predicate<OrdiniUscitaElencoDTO> currentAutomezzoPredicate = null;
|
||||||
|
private Predicate<OrdiniUscitaElencoDTO> currentPaesePredicate = null;
|
||||||
|
|
||||||
private boolean firstInit = true;
|
private boolean firstInit = true;
|
||||||
|
|
||||||
@@ -126,6 +128,7 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
viewModel.vettore.set(null);
|
viewModel.vettore.set(null);
|
||||||
viewModel.automezzo.set(null);
|
viewModel.automezzo.set(null);
|
||||||
viewModel.agente.set(null);
|
viewModel.agente.set(null);
|
||||||
|
viewModel.paese.set(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initView(DialogVenditaFiltroAvanzatoBinding bindings, DialogVenditaFiltroAvanzatoViewModel viewModel) {
|
private void initView(DialogVenditaFiltroAvanzatoBinding bindings, DialogVenditaFiltroAvanzatoViewModel viewModel) {
|
||||||
@@ -193,6 +196,10 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(false));
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(false));
|
||||||
bindings.filledExposedDropdownAutomezzo.setAdapter(arrayAdapterAutomezzo);
|
bindings.filledExposedDropdownAutomezzo.setAdapter(arrayAdapterAutomezzo);
|
||||||
|
|
||||||
|
arrayAdapterPaese = new ArrayAdapter(currentContext, R.layout.dialog_vendita_filtro_avanzato__single_item);
|
||||||
|
arrayAdapterPaese.addAll(getAvailablePaesi(false));
|
||||||
|
bindings.filledExposedDropdownPaese.setAdapter(arrayAdapterPaese);
|
||||||
|
|
||||||
|
|
||||||
viewModel.deposito.refresh();
|
viewModel.deposito.refresh();
|
||||||
viewModel.idViaggio.refresh();
|
viewModel.idViaggio.refresh();
|
||||||
@@ -203,6 +210,7 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
viewModel.automezzo.refresh();
|
viewModel.automezzo.refresh();
|
||||||
viewModel.dataConsegna.refresh();
|
viewModel.dataConsegna.refresh();
|
||||||
viewModel.agente.refresh();
|
viewModel.agente.refresh();
|
||||||
|
viewModel.paese.refresh();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -240,6 +248,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
arrayAdapterAgente.clear();
|
arrayAdapterAgente.clear();
|
||||||
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
||||||
|
arrayAdapterPaese.clear();
|
||||||
|
arrayAdapterPaese.addAll(getAvailablePaesi(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
BindableString.registerListener(viewModel.deposito, value -> {
|
BindableString.registerListener(viewModel.deposito, value -> {
|
||||||
@@ -264,6 +274,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
arrayAdapterAgente.clear();
|
arrayAdapterAgente.clear();
|
||||||
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
||||||
|
arrayAdapterPaese.clear();
|
||||||
|
arrayAdapterPaese.addAll(getAvailablePaesi(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
BindableString.registerListener(viewModel.numOrds, value -> {
|
BindableString.registerListener(viewModel.numOrds, value -> {
|
||||||
@@ -298,6 +310,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
arrayAdapterAgente.clear();
|
arrayAdapterAgente.clear();
|
||||||
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
||||||
|
arrayAdapterPaese.clear();
|
||||||
|
arrayAdapterPaese.addAll(getAvailablePaesi(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
BindableString.registerListener(viewModel.cliente, value -> {
|
BindableString.registerListener(viewModel.cliente, value -> {
|
||||||
@@ -322,6 +336,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
arrayAdapterAgente.clear();
|
arrayAdapterAgente.clear();
|
||||||
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
||||||
|
arrayAdapterPaese.clear();
|
||||||
|
arrayAdapterPaese.addAll(getAvailablePaesi(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
BindableString.registerListener(viewModel.terminiConsegna, value -> {
|
BindableString.registerListener(viewModel.terminiConsegna, value -> {
|
||||||
@@ -346,6 +362,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
arrayAdapterAgente.clear();
|
arrayAdapterAgente.clear();
|
||||||
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
||||||
|
arrayAdapterPaese.clear();
|
||||||
|
arrayAdapterPaese.addAll(getAvailablePaesi(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
BindableString.registerListener(viewModel.vettore, value -> {
|
BindableString.registerListener(viewModel.vettore, value -> {
|
||||||
@@ -370,6 +388,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
arrayAdapterAgente.clear();
|
arrayAdapterAgente.clear();
|
||||||
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
||||||
|
arrayAdapterPaese.clear();
|
||||||
|
arrayAdapterPaese.addAll(getAvailablePaesi(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
BindableString.registerListener(viewModel.automezzo, value -> {
|
BindableString.registerListener(viewModel.automezzo, value -> {
|
||||||
@@ -394,6 +414,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
arrayAdapterVettore.addAll(getAvailableVettori(true));
|
arrayAdapterVettore.addAll(getAvailableVettori(true));
|
||||||
arrayAdapterAgente.clear();
|
arrayAdapterAgente.clear();
|
||||||
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
||||||
|
arrayAdapterPaese.clear();
|
||||||
|
arrayAdapterPaese.addAll(getAvailablePaesi(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
BindableString.resetListeners(viewModel.dataConsegna);
|
BindableString.resetListeners(viewModel.dataConsegna);
|
||||||
@@ -421,6 +443,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
arrayAdapterAgente.clear();
|
arrayAdapterAgente.clear();
|
||||||
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
||||||
|
arrayAdapterPaese.clear();
|
||||||
|
arrayAdapterPaese.addAll(getAvailablePaesi(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
BindableString.resetListeners(viewModel.agente);
|
BindableString.resetListeners(viewModel.agente);
|
||||||
@@ -446,6 +470,35 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
arrayAdapterVettore.addAll(getAvailableVettori(true));
|
arrayAdapterVettore.addAll(getAvailableVettori(true));
|
||||||
arrayAdapterAutomezzo.clear();
|
arrayAdapterAutomezzo.clear();
|
||||||
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
|
arrayAdapterPaese.clear();
|
||||||
|
arrayAdapterPaese.addAll(getAvailablePaesi(true));
|
||||||
|
});
|
||||||
|
|
||||||
|
BindableString.resetListeners(viewModel.paese);
|
||||||
|
BindableString.registerListener(viewModel.paese, value -> {
|
||||||
|
if(UtilityString.isNullOrEmpty(value)) currentPaesePredicate = null;
|
||||||
|
else {
|
||||||
|
currentPaesePredicate = o -> !UtilityString.isNullOrEmpty(o.getCitta()) && (o.getCitta().toLowerCase().contains(value) || o.getCitta().equalsIgnoreCase(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
refreshList();
|
||||||
|
|
||||||
|
arrayAdapterCodMdep.clear();
|
||||||
|
arrayAdapterCodMdep.addAll(getAvailableCodMdeps(true));
|
||||||
|
arrayAdapterIdViaggio.clear();
|
||||||
|
arrayAdapterIdViaggio.addAll(getAvailableIdViaggio(true));
|
||||||
|
arrayAdapterNumOrds.clear();
|
||||||
|
arrayAdapterNumOrds.addAll(getAvailableNumOrds(true));
|
||||||
|
arrayAdapterCliente.clear();
|
||||||
|
arrayAdapterCliente.addAll(getAvailableCliente(true));
|
||||||
|
arrayAdapterTermCons.clear();
|
||||||
|
arrayAdapterTermCons.addAll(getAvailableTermCons(true));
|
||||||
|
arrayAdapterVettore.clear();
|
||||||
|
arrayAdapterVettore.addAll(getAvailableVettori(true));
|
||||||
|
arrayAdapterAutomezzo.clear();
|
||||||
|
arrayAdapterAutomezzo.addAll(getAvailableAutomezzi(true));
|
||||||
|
arrayAdapterAgente.clear();
|
||||||
|
arrayAdapterAgente.addAll(getAvailableAgente(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -453,7 +506,16 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
|
|
||||||
|
|
||||||
private List<String> getAvailableIdViaggio(boolean skipRecalc) {
|
private List<String> getAvailableIdViaggio(boolean skipRecalc) {
|
||||||
if(currentAgentePredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null && currentDepositoPredicate == null){
|
if(currentAgentePredicate == null &&
|
||||||
|
currentNumOrdsPredicate == null &&
|
||||||
|
currentClientePredicate == null &&
|
||||||
|
currentDataConsPredicate == null &&
|
||||||
|
currentAutomezzoPredicate == null &&
|
||||||
|
currentVettorePredicate == null &&
|
||||||
|
currentTermConsPredicate == null &&
|
||||||
|
currentDepositoPredicate == null &&
|
||||||
|
currentPaesePredicate == null
|
||||||
|
){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else if(!skipRecalc){
|
} else if(!skipRecalc){
|
||||||
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
@@ -465,7 +527,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
|
||||||
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
|
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
|
||||||
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
||||||
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
|
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
|
||||||
|
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
@@ -481,7 +544,16 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableAgente(boolean skipRecalc) {
|
private List<String> getAvailableAgente(boolean skipRecalc) {
|
||||||
if(currentDepositoPredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
|
if(currentDepositoPredicate == null &&
|
||||||
|
currentIdViaggioPredicate == null &&
|
||||||
|
currentNumOrdsPredicate == null &&
|
||||||
|
currentClientePredicate == null &&
|
||||||
|
currentDataConsPredicate == null &&
|
||||||
|
currentAutomezzoPredicate == null &&
|
||||||
|
currentVettorePredicate == null &&
|
||||||
|
currentTermConsPredicate == null &&
|
||||||
|
currentPaesePredicate == null
|
||||||
|
){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else if(!skipRecalc){
|
} else if(!skipRecalc){
|
||||||
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
@@ -494,7 +566,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
|
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
|
||||||
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
||||||
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
||||||
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
|
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
|
||||||
|
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
@@ -504,7 +577,16 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableCodMdeps(boolean skipRecalc) {
|
private List<String> getAvailableCodMdeps(boolean skipRecalc) {
|
||||||
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
|
if(currentAgentePredicate == null &&
|
||||||
|
currentIdViaggioPredicate == null &&
|
||||||
|
currentNumOrdsPredicate == null &&
|
||||||
|
currentClientePredicate == null &&
|
||||||
|
currentDataConsPredicate == null &&
|
||||||
|
currentAutomezzoPredicate == null &&
|
||||||
|
currentVettorePredicate == null &&
|
||||||
|
currentTermConsPredicate == null &&
|
||||||
|
currentPaesePredicate == null
|
||||||
|
){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else if(!skipRecalc){
|
} else if(!skipRecalc){
|
||||||
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
@@ -516,7 +598,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
|
||||||
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
|
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
|
||||||
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
||||||
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
|
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
|
||||||
|
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
@@ -526,7 +609,16 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableCliente(boolean skipRecalc) {
|
private List<String> getAvailableCliente(boolean skipRecalc) {
|
||||||
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentDepositoPredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
|
if(currentAgentePredicate == null &&
|
||||||
|
currentIdViaggioPredicate == null &&
|
||||||
|
currentNumOrdsPredicate == null &&
|
||||||
|
currentDepositoPredicate == null &&
|
||||||
|
currentDataConsPredicate == null &&
|
||||||
|
currentAutomezzoPredicate == null &&
|
||||||
|
currentVettorePredicate == null &&
|
||||||
|
currentTermConsPredicate == null &&
|
||||||
|
currentPaesePredicate == null
|
||||||
|
){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else if(!skipRecalc){
|
} else if(!skipRecalc){
|
||||||
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
@@ -538,7 +630,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
|
||||||
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
|
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
|
||||||
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
||||||
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
|
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
|
||||||
|
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
@@ -548,7 +641,16 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableNumOrds(boolean skipRecalc) {
|
private List<String> getAvailableNumOrds(boolean skipRecalc) {
|
||||||
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentDepositoPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentTermConsPredicate == null){
|
if(currentAgentePredicate == null &&
|
||||||
|
currentIdViaggioPredicate == null &&
|
||||||
|
currentDepositoPredicate == null &&
|
||||||
|
currentClientePredicate == null &&
|
||||||
|
currentDataConsPredicate == null &&
|
||||||
|
currentAutomezzoPredicate == null &&
|
||||||
|
currentVettorePredicate == null &&
|
||||||
|
currentTermConsPredicate == null &&
|
||||||
|
currentPaesePredicate == null
|
||||||
|
){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else if(!skipRecalc){
|
} else if(!skipRecalc){
|
||||||
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
@@ -560,7 +662,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
|
||||||
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
|
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
|
||||||
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
||||||
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
|
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
|
||||||
|
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
@@ -570,7 +673,16 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableTermCons(boolean skipRecalc) {
|
private List<String> getAvailableTermCons(boolean skipRecalc) {
|
||||||
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentAutomezzoPredicate == null && currentVettorePredicate == null && currentDepositoPredicate == null){
|
if(currentAgentePredicate == null &&
|
||||||
|
currentIdViaggioPredicate == null &&
|
||||||
|
currentNumOrdsPredicate == null &&
|
||||||
|
currentClientePredicate == null &&
|
||||||
|
currentDataConsPredicate == null &&
|
||||||
|
currentAutomezzoPredicate == null &&
|
||||||
|
currentVettorePredicate == null &&
|
||||||
|
currentDepositoPredicate == null &&
|
||||||
|
currentPaesePredicate == null
|
||||||
|
){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else if(!skipRecalc){
|
} else if(!skipRecalc){
|
||||||
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
@@ -582,7 +694,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
|
||||||
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
||||||
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
||||||
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
|
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
|
||||||
|
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
@@ -592,7 +705,16 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableVettori(boolean skipRecalc) {
|
private List<String> getAvailableVettori(boolean skipRecalc) {
|
||||||
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentAutomezzoPredicate == null && currentDepositoPredicate == null){
|
if(currentAgentePredicate == null &&
|
||||||
|
currentIdViaggioPredicate == null &&
|
||||||
|
currentNumOrdsPredicate == null &&
|
||||||
|
currentClientePredicate == null &&
|
||||||
|
currentDataConsPredicate == null &&
|
||||||
|
currentTermConsPredicate == null &&
|
||||||
|
currentAutomezzoPredicate == null &&
|
||||||
|
currentDepositoPredicate == null &&
|
||||||
|
currentPaesePredicate == null
|
||||||
|
){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else if(!skipRecalc){
|
} else if(!skipRecalc){
|
||||||
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
@@ -604,7 +726,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate .test(x))) &&
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate .test(x))) &&
|
||||||
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
||||||
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
||||||
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
|
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
|
||||||
|
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
@@ -614,7 +737,16 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableAutomezzi(boolean skipRecalc) {
|
private List<String> getAvailableAutomezzi(boolean skipRecalc) {
|
||||||
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentVettorePredicate == null && currentDepositoPredicate == null){
|
if(currentAgentePredicate == null &&
|
||||||
|
currentIdViaggioPredicate == null &&
|
||||||
|
currentNumOrdsPredicate == null &&
|
||||||
|
currentClientePredicate == null &&
|
||||||
|
currentDataConsPredicate == null &&
|
||||||
|
currentTermConsPredicate == null &&
|
||||||
|
currentVettorePredicate == null &&
|
||||||
|
currentDepositoPredicate == null &&
|
||||||
|
currentPaesePredicate == null
|
||||||
|
){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else if(!skipRecalc){
|
} else if(!skipRecalc){
|
||||||
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
@@ -626,7 +758,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
(currentVettorePredicate == null || (currentVettorePredicate.test(x))) &&
|
(currentVettorePredicate == null || (currentVettorePredicate.test(x))) &&
|
||||||
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
||||||
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
||||||
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
|
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
|
||||||
|
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
@@ -635,9 +768,51 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
return Stream.of(currentFilteredOrderList).map(OrdiniUscitaElencoDTO::getDescrizioneAuto).distinct().withoutNulls().sorted().toList();
|
return Stream.of(currentFilteredOrderList).map(OrdiniUscitaElencoDTO::getDescrizioneAuto).distinct().withoutNulls().sorted().toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<String> getAvailablePaesi(boolean skipRecalc) {
|
||||||
|
if(currentAgentePredicate == null &&
|
||||||
|
currentIdViaggioPredicate == null &&
|
||||||
|
currentNumOrdsPredicate == null &&
|
||||||
|
currentClientePredicate == null &&
|
||||||
|
currentDataConsPredicate == null &&
|
||||||
|
currentTermConsPredicate == null &&
|
||||||
|
currentVettorePredicate == null &&
|
||||||
|
currentDepositoPredicate == null &&
|
||||||
|
currentAutomezzoPredicate == null
|
||||||
|
){
|
||||||
|
currentFilteredOrderList = currentOrderList;
|
||||||
|
} else if(!skipRecalc){
|
||||||
|
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
|
.filter(x ->
|
||||||
|
(currentNumOrdsPredicate == null || (currentNumOrdsPredicate.test(x))) &&
|
||||||
|
(currentClientePredicate == null || (currentClientePredicate.test(x))) &&
|
||||||
|
(currentDataConsPredicate == null || (currentDataConsPredicate.test(x))) &&
|
||||||
|
(currentTermConsPredicate == null || (currentTermConsPredicate.test(x))) &&
|
||||||
|
(currentVettorePredicate == null || (currentVettorePredicate.test(x))) &&
|
||||||
|
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
||||||
|
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
||||||
|
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
|
||||||
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x)))
|
||||||
|
);
|
||||||
|
|
||||||
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Stream.of(currentFilteredOrderList).map(OrdiniUscitaElencoDTO::getCitta).withoutNulls().distinct().sorted().toList();
|
||||||
|
}
|
||||||
|
|
||||||
private void refreshList() {
|
private void refreshList() {
|
||||||
|
|
||||||
if(currentAgentePredicate == null && currentIdViaggioPredicate == null && currentNumOrdsPredicate == null && currentClientePredicate == null && currentDataConsPredicate == null && currentTermConsPredicate == null && currentVettorePredicate == null && currentAutomezzoPredicate == null && currentDepositoPredicate == null){
|
if(currentAgentePredicate == null &&
|
||||||
|
currentIdViaggioPredicate == null &&
|
||||||
|
currentNumOrdsPredicate == null &&
|
||||||
|
currentClientePredicate == null &&
|
||||||
|
currentDataConsPredicate == null &&
|
||||||
|
currentTermConsPredicate == null &&
|
||||||
|
currentVettorePredicate == null &&
|
||||||
|
currentAutomezzoPredicate == null &&
|
||||||
|
currentDepositoPredicate == null &&
|
||||||
|
currentPaesePredicate == null
|
||||||
|
){
|
||||||
currentFilteredOrderList = currentOrderList;
|
currentFilteredOrderList = currentOrderList;
|
||||||
} else {
|
} else {
|
||||||
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
Stream<OrdiniUscitaElencoDTO> tmpStream = Stream.of(currentOrderList)
|
||||||
@@ -650,7 +825,8 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
|
(currentAutomezzoPredicate == null || (currentAutomezzoPredicate.test(x))) &&
|
||||||
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
(currentDepositoPredicate == null || (currentDepositoPredicate.test(x))) &&
|
||||||
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
(currentIdViaggioPredicate == null || (currentIdViaggioPredicate.test(x))) &&
|
||||||
(currentAgentePredicate == null || (currentAgentePredicate.test(x)))
|
(currentAgentePredicate == null || (currentAgentePredicate.test(x))) &&
|
||||||
|
(currentPaesePredicate == null || (currentPaesePredicate.test(x)))
|
||||||
);
|
);
|
||||||
|
|
||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public class DialogVenditaFiltroAvanzatoViewModel {
|
|||||||
public BindableString agente = new BindableString();
|
public BindableString agente = new BindableString();
|
||||||
public BindableString vettore = new BindableString();
|
public BindableString vettore = new BindableString();
|
||||||
public BindableString automezzo = new BindableString();
|
public BindableString automezzo = new BindableString();
|
||||||
|
public BindableString paese = new BindableString();
|
||||||
|
|
||||||
public Date dataConsegnaDate;
|
public Date dataConsegnaDate;
|
||||||
|
|
||||||
|
|||||||
@@ -53,8 +53,7 @@ import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
|||||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
|
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskCliente;
|
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
@@ -290,13 +289,8 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLUClienteRequired(RunnableArgss<VtbDest, String> onComplete, Runnable onAbort) {
|
public void onLUClienteRequired(RunnableArgss<VtbDest, String> onComplete, Runnable onAbort) {
|
||||||
DialogAskCliente.makeBase(getActivity(), (status, result, codJcom) -> {
|
DialogAskClienteView.newInstance(onComplete, onAbort)
|
||||||
if (status == DialogConsts.Results.YES) {
|
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||||
onComplete.run(result, codJcom);
|
|
||||||
} else {
|
|
||||||
onAbort.run();
|
|
||||||
}
|
|
||||||
}).show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -305,7 +299,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
|||||||
onAbort.run();
|
onAbort.run();
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
})
|
})
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -368,7 +362,6 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMtbColrEdit(MtbColr mtbColr) {
|
public void onMtbColrEdit(MtbColr mtbColr) {
|
||||||
this.mViewModel.dispatchRowEdit(mtbColr);
|
this.mViewModel.dispatchRowEdit(mtbColr);
|
||||||
@@ -382,7 +375,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
|||||||
@Override
|
@Override
|
||||||
public void onPreDestroy(Runnable onComplete) {
|
public void onPreDestroy(Runnable onComplete) {
|
||||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
if(thereIsAnOpenedUL.get()) mViewModel.closeLU(onComplete);
|
if (thereIsAnOpenedUL.get()) mViewModel.closeLU(onComplete);
|
||||||
else onComplete.run();
|
else onComplete.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -179,7 +179,9 @@ public class PickingLiberoViewModel {
|
|||||||
|
|
||||||
public void createNewLU(Integer customNumCollo, String customSerCollo, Runnable onComplete) {
|
public void createNewLU(Integer customNumCollo, String customSerCollo, Runnable onComplete) {
|
||||||
if (this.mFlagAskCliente) {
|
if (this.mFlagAskCliente) {
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
this.sendLUClienteRequired((vtbDest, codJcom) -> {
|
this.sendLUClienteRequired((vtbDest, codJcom) -> {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
createNewLU_PostClienteAsk(customNumCollo, customSerCollo, vtbDest, codJcom, onComplete);
|
createNewLU_PostClienteAsk(customNumCollo, customSerCollo, vtbDest, codJcom, onComplete);
|
||||||
}, onComplete);
|
}, onComplete);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ public class ProdVersamentoMaterialViewModel {
|
|||||||
DialogSimpleMessageView
|
DialogSimpleMessageView
|
||||||
.makeWarningDialog(new SpannableString(Html.fromHtml("Il collo selezionato non presenta articoli versabili sulla linea.")),
|
.makeWarningDialog(new SpannableString(Html.fromHtml("Il collo selezionato non presenta articoli versabili sulla linea.")),
|
||||||
null, this::openLU)
|
null, this::openLU)
|
||||||
.show(((AppCompatActivity) mContext).getSupportFragmentManager(), "tag");
|
.show(mContext.getSupportFragmentManager(), "tag");
|
||||||
return;
|
return;
|
||||||
} else if (mtbColt.get().getMtbColr().size() > 1) {
|
} else if (mtbColt.get().getMtbColr().size() > 1) {
|
||||||
|
|
||||||
@@ -137,10 +137,11 @@ public class ProdVersamentoMaterialViewModel {
|
|||||||
null, () -> {
|
null, () -> {
|
||||||
cyclicGetOrdiniLavByCollo(mtbColt.get().getMtbColr().iterator(), mtbDepoPosizione);
|
cyclicGetOrdiniLavByCollo(mtbColt.get().getMtbColr().iterator(), mtbDepoPosizione);
|
||||||
})
|
})
|
||||||
.show(((AppCompatActivity) mContext).getSupportFragmentManager(), "tag");
|
.show(mContext.getSupportFragmentManager(), "tag");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MesRESTConsumer.getOrdiniLavorazioneMateriale(
|
MesRESTConsumer.getOrdiniLavorazioneMateriale(
|
||||||
mtbDepoPosizione.getPosizione(),
|
mtbDepoPosizione.getPosizione(),
|
||||||
getIdMaterialeFromCollo(mtbColt.get()),
|
getIdMaterialeFromCollo(mtbColt.get()),
|
||||||
@@ -148,7 +149,7 @@ public class ProdVersamentoMaterialViewModel {
|
|||||||
e -> DialogSimpleMessageView.makeWarningDialog(new SpannableString(Html.fromHtml(e.getMessage())),
|
e -> DialogSimpleMessageView.makeWarningDialog(new SpannableString(Html.fromHtml(e.getMessage())),
|
||||||
null,
|
null,
|
||||||
this::openLU)
|
this::openLU)
|
||||||
.show(((AppCompatActivity) mContext).getSupportFragmentManager(), "tag"));
|
.show(mContext.getSupportFragmentManager(), "tag"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DialogSimpleMessageView
|
DialogSimpleMessageView
|
||||||
|
|||||||
@@ -805,7 +805,7 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
MtbColr refMtbColr = null;
|
MtbColr refMtbColr = null;
|
||||||
|
|
||||||
if (scannedMtbColr != null && refMtbColt != null && refMtbColt.getMtbColr().size() > 0) {
|
if (refMtbColt != null && refMtbColt.getMtbColr().size() > 0) {
|
||||||
Optional<MtbColr> optionalMtbColr = Stream.of(refMtbColt.getMtbColr())
|
Optional<MtbColr> optionalMtbColr = Stream.of(refMtbColt.getMtbColr())
|
||||||
.filter(y -> UtilityString.equalsIgnoreCase(y.getCodMart(), scannedMtbColr.getCodMart()) &&
|
.filter(y -> UtilityString.equalsIgnoreCase(y.getCodMart(), scannedMtbColr.getCodMart()) &&
|
||||||
UtilityString.equalsIgnoreCase(y.getCodTagl(), scannedMtbColr.getCodTagl()) &&
|
UtilityString.equalsIgnoreCase(y.getCodTagl(), scannedMtbColr.getCodTagl()) &&
|
||||||
@@ -816,7 +816,7 @@ public class SpedizioneViewModel {
|
|||||||
if (optionalMtbColr.isPresent()) refMtbColr = optionalMtbColr.get();
|
if (optionalMtbColr.isPresent()) refMtbColr = optionalMtbColr.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
MtbColr mtbColrToUse = refMtbColr != null ? refMtbColr : scannedMtbColr;
|
MtbColr mtbColrToUse = scannedMtbColr != null ? scannedMtbColr : refMtbColr;
|
||||||
|
|
||||||
if (mtbColrToUse != null) {
|
if (mtbColrToUse != null) {
|
||||||
if (pickingObjectDTO.getMtbAart().isFlagQtaCnfFissaBoolean()) {
|
if (pickingObjectDTO.getMtbAart().isFlagQtaCnfFissaBoolean()) {
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ public class VersamentoMerceViewModel {
|
|||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
this.mColliMagazzinoRESTConsumer.spostaArtsTraUL(
|
this.mColliMagazzinoRESTConsumer.spostaArtsTraUL(
|
||||||
sourceMtbColt,
|
clonedSourceTestata,
|
||||||
destMtbColt,
|
destMtbColt,
|
||||||
this::sendOnDataSaved,
|
this::sendOnDataSaved,
|
||||||
this::sendError
|
this::sendError
|
||||||
|
|||||||
@@ -1,109 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente;
|
|
||||||
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.graphics.drawable.ColorDrawable;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
|
|
||||||
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.RunnableArgsss;
|
|
||||||
import it.integry.integrywmsnative.core.model.VtbDest;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
|
||||||
import it.integry.integrywmsnative.databinding.DialogAskClienteBinding;
|
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteDestinatarioDTO;
|
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page1ViewModel;
|
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page2ViewModel;
|
|
||||||
|
|
||||||
public class DialogAskCliente {
|
|
||||||
|
|
||||||
private Context mContext;
|
|
||||||
|
|
||||||
private Dialog mDialog;
|
|
||||||
|
|
||||||
private DialogAskClienteBinding mBinding;
|
|
||||||
|
|
||||||
|
|
||||||
public static Dialog makeBase(final Context context, RunnableArgsss<DialogConsts.Results, VtbDest, String> onComplete) {
|
|
||||||
return new DialogAskCliente(context, onComplete).mDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DialogAskCliente(Context context, RunnableArgsss<DialogConsts.Results, VtbDest, String> onComplete) {
|
|
||||||
mContext = context;
|
|
||||||
|
|
||||||
|
|
||||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
|
||||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.dialog_ask_cliente, null, false);
|
|
||||||
|
|
||||||
List<Map.Entry<Integer, Class>> views = new ArrayList<>();
|
|
||||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_ask_cliente__page1, DialogAskCliente_Page1ViewModel.class));
|
|
||||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_ask_cliente__page2, DialogAskCliente_Page2ViewModel.class));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DialogAskClienteAdapter adapter = new DialogAskClienteAdapter(mContext, views);
|
|
||||||
mBinding.viewpager.setAdapter(adapter);
|
|
||||||
mBinding.viewpager.beginFakeDrag();
|
|
||||||
mBinding.viewpager.addOnPageChangeListener(adapter);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mDialog = new Dialog(mContext);
|
|
||||||
mDialog.setContentView(mBinding.getRoot());
|
|
||||||
mDialog.setCanceledOnTouchOutside(false);
|
|
||||||
// mDialog.setCancelable(false);
|
|
||||||
UtilityDialog.setTo90PercentWidth(mContext, mDialog);
|
|
||||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
|
||||||
mDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
|
||||||
|
|
||||||
|
|
||||||
mDialog.setOnShowListener(dialog -> {
|
|
||||||
|
|
||||||
DialogAskCliente_Page1ViewModel viewModel1 = (DialogAskCliente_Page1ViewModel) adapter.getViewModel(R.layout.dialog_ask_cliente__page1);
|
|
||||||
DialogAskCliente_Page2ViewModel viewModel2 = (DialogAskCliente_Page2ViewModel) adapter.getViewModel(R.layout.dialog_ask_cliente__page2);
|
|
||||||
|
|
||||||
viewModel1
|
|
||||||
.setOnConfirmClickListener(() -> {
|
|
||||||
String codAnag = viewModel1.getCurrentCliente();
|
|
||||||
|
|
||||||
if(UtilityString.isNullOrEmpty(codAnag)) {
|
|
||||||
mDialog.dismiss();
|
|
||||||
onComplete.run(DialogConsts.Results.YES, null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
viewModel2.setCodAnag(codAnag);
|
|
||||||
|
|
||||||
mBinding.viewpager.setCurrentItem(mBinding.viewpager.getCurrentItem() + 1, true);
|
|
||||||
});
|
|
||||||
|
|
||||||
viewModel1.setOnAbortClickListener(() -> {
|
|
||||||
mDialog.dismiss();
|
|
||||||
onComplete.run(DialogConsts.Results.ABORT, null, null);
|
|
||||||
});
|
|
||||||
|
|
||||||
viewModel2.setOnConfirmClickListener(() -> {
|
|
||||||
DialogAskClienteDestinatarioDTO cliente = viewModel2.getCurrentDestinatario();
|
|
||||||
|
|
||||||
onComplete.run(DialogConsts.Results.YES, cliente != null ? cliente.toVtbDestModel() : null, viewModel1.getCurrentCommessa());
|
|
||||||
mDialog.dismiss();
|
|
||||||
});
|
|
||||||
|
|
||||||
viewModel2.setOnAbortClickListener(() -> {
|
|
||||||
mDialog.dismiss();
|
|
||||||
onComplete.run(DialogConsts.Results.ABORT, null, null);
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente;
|
package it.integry.integrywmsnative.view.dialogs.ask_cliente;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@@ -15,13 +14,10 @@ import androidx.viewpager.widget.ViewPager;
|
|||||||
|
|
||||||
import java.util.AbstractMap;
|
import java.util.AbstractMap;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.BR;
|
import it.integry.integrywmsnative.BR;
|
||||||
import it.integry.integrywmsnative.R;
|
|
||||||
import it.integry.integrywmsnative.ui.DeactivatableViewPager;
|
import it.integry.integrywmsnative.ui.DeactivatableViewPager;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.IDialogAskClienteViewModel;
|
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.IDialogAskClienteViewModel;
|
||||||
|
|
||||||
@@ -58,9 +54,7 @@ public class DialogAskClienteAdapter extends PagerAdapter implements ViewPager.O
|
|||||||
viewModel = (IDialogAskClienteViewModel) viewModelClass.newInstance();
|
viewModel = (IDialogAskClienteViewModel) viewModelClass.newInstance();
|
||||||
viewModel.setBinding(mBinding);
|
viewModel.setBinding(mBinding);
|
||||||
viewModel.setContext(mContext);
|
viewModel.setContext(mContext);
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException | InstantiationException e) {
|
||||||
e.printStackTrace();
|
|
||||||
} catch (InstantiationException e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,142 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.ask_cliente;
|
||||||
|
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
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.RunnableArgss;
|
||||||
|
import it.integry.integrywmsnative.core.model.VtbDest;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.databinding.DialogAskClienteBinding;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteDestinatarioDTO;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page1ViewModel;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page2ViewModel;
|
||||||
|
|
||||||
|
public class DialogAskClienteView extends BaseDialogFragment {
|
||||||
|
|
||||||
|
private final RunnableArgss<VtbDest, String> mOnComplete;
|
||||||
|
private final Runnable mOnAbort;
|
||||||
|
|
||||||
|
private DialogAskClienteAdapter mAdapter;
|
||||||
|
|
||||||
|
private FragmentActivity mContext;
|
||||||
|
private DialogAskClienteBinding mBindings;
|
||||||
|
|
||||||
|
private boolean mIsClienteSelected = false;
|
||||||
|
|
||||||
|
public static DialogAskClienteView newInstance(@NotNull RunnableArgss<VtbDest, String> onComplete, @NotNull Runnable onAbort) {
|
||||||
|
return new DialogAskClienteView( onComplete, onAbort);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DialogAskClienteView(@NotNull RunnableArgss<VtbDest, String> onComplete, @NotNull Runnable onAbort) {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.mOnComplete = onComplete;
|
||||||
|
this.mOnAbort = onAbort;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
this.mContext = getActivity();
|
||||||
|
|
||||||
|
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_ask_cliente, container, false);
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
|
|
||||||
|
getDialog().setCanceledOnTouchOutside(false);
|
||||||
|
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||||
|
|
||||||
|
|
||||||
|
List<Map.Entry<Integer, Class>> views = new ArrayList<>();
|
||||||
|
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_ask_cliente__page1, DialogAskCliente_Page1ViewModel.class));
|
||||||
|
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_ask_cliente__page2, DialogAskCliente_Page2ViewModel.class));
|
||||||
|
|
||||||
|
mAdapter = new DialogAskClienteAdapter(mContext, views);
|
||||||
|
mBindings.viewpager.setAdapter(mAdapter);
|
||||||
|
mBindings.viewpager.beginFakeDrag();
|
||||||
|
mBindings.viewpager.addOnPageChangeListener(mAdapter);
|
||||||
|
mBindings.viewpager.setCurrentItem(0, false);
|
||||||
|
|
||||||
|
getDialog().setOnShowListener(d -> {
|
||||||
|
this.initView();
|
||||||
|
});
|
||||||
|
|
||||||
|
return mBindings.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
UtilityDialog.setTo90PercentWidth(this.mContext, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||||
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
DialogAskCliente_Page1ViewModel viewModel1 = (DialogAskCliente_Page1ViewModel) mAdapter.getViewModel(R.layout.dialog_ask_cliente__page1);
|
||||||
|
DialogAskCliente_Page2ViewModel viewModel2 = (DialogAskCliente_Page2ViewModel) mAdapter.getViewModel(R.layout.dialog_ask_cliente__page2);
|
||||||
|
|
||||||
|
viewModel1
|
||||||
|
.setOnConfirmClickListener(() -> {
|
||||||
|
String codAnag = viewModel1.getCurrentCliente();
|
||||||
|
|
||||||
|
if(UtilityString.isNullOrEmpty(codAnag)) {
|
||||||
|
this.mIsClienteSelected = true;
|
||||||
|
dismiss();
|
||||||
|
mOnComplete.run(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
viewModel2.setCodAnag(codAnag);
|
||||||
|
|
||||||
|
mBindings.viewpager.setCurrentItem(mBindings.viewpager.getCurrentItem() + 1, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
viewModel2.setOnConfirmClickListener(() -> {
|
||||||
|
DialogAskClienteDestinatarioDTO cliente = viewModel2.getCurrentDestinatario();
|
||||||
|
|
||||||
|
this.mIsClienteSelected = true;
|
||||||
|
dismiss();
|
||||||
|
mOnComplete.run(cliente != null ? cliente.toVtbDestModel() : null, viewModel1.getCurrentCommessa());
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
viewModel1.setOnAbortClickListener(this::dismiss);
|
||||||
|
viewModel2.setOnAbortClickListener(this::dismiss);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||||
|
if(!mIsClienteSelected) {
|
||||||
|
this.mOnAbort.run();
|
||||||
|
}
|
||||||
|
super.onDismiss(dialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -185,6 +185,8 @@ public class DialogInputQuantityV2ViewModel {
|
|||||||
this.mListener.onError(ex);
|
this.mListener.onError(ex);
|
||||||
onComplete.run();
|
onComplete.run();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
onComplete.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
|||||||
|
|
||||||
private boolean mShouldCheckResiduo;
|
private boolean mShouldCheckResiduo;
|
||||||
private boolean mShouldCheckIfExistDoc;
|
private boolean mShouldCheckIfExistDoc;
|
||||||
|
private boolean mEnableCreation;
|
||||||
|
|
||||||
private final BindableBoolean basketEnabled = new BindableBoolean();
|
private final BindableBoolean basketEnabled = new BindableBoolean();
|
||||||
private final BindableBoolean creationEnabled = new BindableBoolean();
|
private final BindableBoolean creationEnabled = new BindableBoolean();
|
||||||
@@ -71,6 +72,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
|||||||
this.basketEnabled.set(enableBasket);
|
this.basketEnabled.set(enableBasket);
|
||||||
this.creationEnabled.set(enableCreation);
|
this.creationEnabled.set(enableCreation);
|
||||||
|
|
||||||
|
mEnableCreation = enableCreation;
|
||||||
mOnComplete = onComplete;
|
mOnComplete = onComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +97,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
|||||||
getDialog().setCanceledOnTouchOutside(false);
|
getDialog().setCanceledOnTouchOutside(false);
|
||||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
|
||||||
this.mViewModel.init(mShouldCheckResiduo, mShouldCheckIfExistDoc);
|
this.mViewModel.init(mShouldCheckResiduo, mShouldCheckIfExistDoc, mEnableCreation);
|
||||||
|
|
||||||
mBindings.createNewLuButton.setOnClickListener(v -> {
|
mBindings.createNewLuButton.setOnClickListener(v -> {
|
||||||
this.mViewModel.createNewLU();
|
this.mViewModel.createNewLU();
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public class DialogScanOrCreateLUViewModel {
|
|||||||
|
|
||||||
private boolean mShouldCheckResiduo = false;
|
private boolean mShouldCheckResiduo = false;
|
||||||
private boolean mShouldCheckIfExistDoc = true;
|
private boolean mShouldCheckIfExistDoc = true;
|
||||||
|
private boolean mEnableCreation = false;
|
||||||
|
|
||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
|
|
||||||
@@ -40,9 +41,10 @@ public class DialogScanOrCreateLUViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void init(boolean checkResiduo, boolean shouldCheckIfExistDoc) {
|
public void init(boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean enableCreation) {
|
||||||
this.mShouldCheckResiduo = checkResiduo;
|
this.mShouldCheckResiduo = checkResiduo;
|
||||||
this.mShouldCheckIfExistDoc = shouldCheckIfExistDoc;
|
this.mShouldCheckIfExistDoc = shouldCheckIfExistDoc;
|
||||||
|
this.mEnableCreation = enableCreation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createNewLU() {
|
public void createNewLU() {
|
||||||
@@ -94,11 +96,14 @@ public class DialogScanOrCreateLUViewModel {
|
|||||||
this.mColliMagazzinoRESTConsumer.getBySSCC(barcodeScanDTO.getStringValue(), mShouldCheckResiduo, false, mtbColt -> {
|
this.mColliMagazzinoRESTConsumer.getBySSCC(barcodeScanDTO.getStringValue(), mShouldCheckResiduo, false, mtbColt -> {
|
||||||
|
|
||||||
if (mtbColt == null) {
|
if (mtbColt == null) {
|
||||||
this.mColliMagazzinoRESTConsumer.createColloFromEtichettaAnonima(barcodeScanDTO, GestioneEnum.LAVORAZIONE, createdMtbColt -> {
|
if(mEnableCreation) {
|
||||||
onComplete.run();
|
this.mColliMagazzinoRESTConsumer.createColloFromEtichettaAnonima(barcodeScanDTO, GestioneEnum.LAVORAZIONE, createdMtbColt -> {
|
||||||
this.sendOnLUOpened(createdMtbColt, true);
|
onComplete.run();
|
||||||
}, this::sendError);
|
this.sendOnLUOpened(createdMtbColt, true);
|
||||||
|
}, this::sendError);
|
||||||
|
} else {
|
||||||
|
this.sendError(new NoLUFoundException());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (mtbColt.getCodDtip() != null && mShouldCheckIfExistDoc) {
|
if (mtbColt.getCodDtip() != null && mShouldCheckIfExistDoc) {
|
||||||
this.sendError(new AlreadyAttachedDocumentToLUException());
|
this.sendError(new AlreadyAttachedDocumentToLUException());
|
||||||
|
|||||||
@@ -223,8 +223,20 @@
|
|||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
@@ -234,7 +246,7 @@
|
|||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="0dp"
|
android:layout_marginStart="0dp"
|
||||||
@@ -243,7 +255,7 @@
|
|||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
@@ -253,7 +265,7 @@
|
|||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
@@ -262,7 +274,6 @@
|
|||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
@@ -312,9 +323,21 @@
|
|||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
@@ -324,7 +347,7 @@
|
|||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="0dp"
|
android:layout_marginStart="0dp"
|
||||||
@@ -333,7 +356,7 @@
|
|||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
@@ -343,7 +366,7 @@
|
|||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
style="@style/AppTheme.NewMaterial.Text.Medium"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
@@ -355,7 +378,6 @@
|
|||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -163,12 +163,34 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:imeOptions="actionNext"
|
android:imeOptions="actionNext"
|
||||||
android:nextFocusForward="@id/filled_exposed_dropdown_agente"
|
android:nextFocusForward="@id/filled_exposed_dropdown_paese"
|
||||||
app:binding="@{viewmodel.automezzo}"/>
|
app:binding="@{viewmodel.automezzo}"/>
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_paese"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/city"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_paese"
|
||||||
|
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_agente"
|
||||||
|
app:binding="@{viewmodel.paese}"/>
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_agente"
|
android:id="@+id/input_agente"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
|||||||
@@ -210,6 +210,7 @@
|
|||||||
<string name="document_date">Data documento</string>
|
<string name="document_date">Data documento</string>
|
||||||
<string name="terms_of_delivery">Termini di consegna</string>
|
<string name="terms_of_delivery">Termini di consegna</string>
|
||||||
<string name="vehicle">Automezzo</string>
|
<string name="vehicle">Automezzo</string>
|
||||||
|
<string name="city">Paese</string>
|
||||||
<string name="deposit">Deposito</string>
|
<string name="deposit">Deposito</string>
|
||||||
<string name="rag_soc">Ragione sociale</string>
|
<string name="rag_soc">Ragione sociale</string>
|
||||||
<string name="travel_id">ID Viaggio</string>
|
<string name="travel_id">ID Viaggio</string>
|
||||||
|
|||||||
@@ -213,6 +213,7 @@
|
|||||||
<string name="document_date">Document date</string>
|
<string name="document_date">Document date</string>
|
||||||
<string name="terms_of_delivery">Terms of delivery</string>
|
<string name="terms_of_delivery">Terms of delivery</string>
|
||||||
<string name="vehicle">Vehicle</string>
|
<string name="vehicle">Vehicle</string>
|
||||||
|
<string name="city">City</string>
|
||||||
<string name="deposit">Deposit</string>
|
<string name="deposit">Deposit</string>
|
||||||
<string name="rag_soc">Company name</string>
|
<string name="rag_soc">Company name</string>
|
||||||
<string name="travel_id">Travel ID</string>
|
<string name="travel_id">Travel ID</string>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ buildscript {
|
|||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.1.3'
|
classpath 'com.android.tools.build:gradle:4.2.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath 'com.google.gms:google-services:4.3.5'
|
classpath 'com.google.gms:google-services:4.3.5'
|
||||||
classpath 'com.google.firebase:perf-plugin:1.3.5'
|
classpath 'com.google.firebase:perf-plugin:1.3.5'
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
|
||||||
|
|||||||
Reference in New Issue
Block a user