Fix vari
This commit is contained in:
parent
584a4d93e2
commit
7d62adc51e
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
116
.idea/codeStyles/Project.xml
generated
Normal file
116
.idea/codeStyles/Project.xml
generated
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<code_scheme name="Project" version="173">
|
||||||
|
<codeStyleSettings language="XML">
|
||||||
|
<indentOptions>
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||||
|
</indentOptions>
|
||||||
|
<arrangement>
|
||||||
|
<rules>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>xmlns:android</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>xmlns:.*</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>BY_NAME</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*:id</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*:name</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>style</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>BY_NAME</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>ANDROID_ATTRIBUTE_ORDER</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>.*</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>BY_NAME</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
</rules>
|
||||||
|
</arrangement>
|
||||||
|
</codeStyleSettings>
|
||||||
|
</code_scheme>
|
||||||
|
</component>
|
||||||
2
.idea/runConfigurations/app.xml
generated
2
.idea/runConfigurations/app.xml
generated
@ -6,7 +6,7 @@
|
|||||||
<option name="DEPLOY_AS_INSTANT" value="false" />
|
<option name="DEPLOY_AS_INSTANT" value="false" />
|
||||||
<option name="ARTIFACT_NAME" value="" />
|
<option name="ARTIFACT_NAME" value="" />
|
||||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||||
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="dynamic_ime,dynamic_vgalimenti" />
|
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="dynamic__base,dynamic_vgalimenti" />
|
||||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||||
<option name="MODE" value="default_activity" />
|
<option name="MODE" value="default_activity" />
|
||||||
<option name="CLEAR_LOGCAT" value="true" />
|
<option name="CLEAR_LOGCAT" value="true" />
|
||||||
|
|||||||
@ -335,7 +335,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
|
|
||||||
}, ex -> {
|
}, ex -> {
|
||||||
//mNoConnectionLayout.expand(true);
|
//mNoConnectionLayout.expand(true);
|
||||||
if(!mIsOnline) mIsOnline = false;
|
if(mIsOnline) mIsOnline = false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -72,7 +72,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
public void onFailed(Exception ex) {
|
public void onFailed(Exception ex) {
|
||||||
if(onFailed != null) onFailed.run(ex);
|
if(onFailed != null) onFailed.run(ex);
|
||||||
}
|
}
|
||||||
}, true);
|
}, true, MtbColt.class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@ public class EntityRESTConsumer {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T extends EntityBase> void processEntityList(List<T> entitiesToSave, final ISimpleOperationCallback<List<T>> callback, boolean singleTransaction){
|
public static <T extends EntityBase> void processEntityList(List<T> entitiesToSave, final ISimpleOperationCallback<List<T>> callback, boolean singleTransaction, Class<T> type){
|
||||||
|
|
||||||
EntityRESTConsumerService service = RESTBuilder.getService(EntityRESTConsumerService.class);
|
EntityRESTConsumerService service = RESTBuilder.getService(EntityRESTConsumerService.class);
|
||||||
Call<List<ServiceRESTResponse<JsonObject>>> request = service.processEntityList(singleTransaction, entitiesToSave);
|
Call<List<ServiceRESTResponse<JsonObject>>> request = service.processEntityList(singleTransaction, entitiesToSave);
|
||||||
@ -71,12 +71,13 @@ public class EntityRESTConsumer {
|
|||||||
|
|
||||||
ArrayList<T> responseList = new ArrayList<>();
|
ArrayList<T> responseList = new ArrayList<>();
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
Type typeOfObjectsList = new TypeToken<T>() {}.getType();
|
// Type typeOfObjectsList = new TypeToken<T>() {}.getType();
|
||||||
|
|
||||||
for(ServiceRESTResponse<JsonObject> jsonSingleObject : response.body()) {
|
for(ServiceRESTResponse<JsonObject> jsonSingleObject : response.body()) {
|
||||||
|
|
||||||
if (jsonSingleObject.getEsito() == EsitoType.OK) {
|
if (jsonSingleObject.getEsito() == EsitoType.OK) {
|
||||||
responseList.add(gson.fromJson(jsonSingleObject.getEntity(), typeOfObjectsList));
|
String jsonText = gson.toJson(jsonSingleObject.getEntity());
|
||||||
|
responseList.add(gson.fromJson(jsonText, type));
|
||||||
} else {
|
} else {
|
||||||
Log.e("EntityRESTConsumer", jsonSingleObject.getErrorMessage());
|
Log.e("EntityRESTConsumer", jsonSingleObject.getErrorMessage());
|
||||||
callback.onFailed(new Exception(jsonSingleObject.getErrorMessage()));
|
callback.onFailed(new Exception(jsonSingleObject.getErrorMessage()));
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import android.util.Log;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.BuildConfig;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.exception.printer.PrinterNotFoundException;
|
import it.integry.integrywmsnative.core.exception.printer.PrinterNotFoundException;
|
||||||
@ -92,6 +93,11 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
public static void printCollo(String printerName, MtbColt testataColloToPrint, int quantity, String reportName, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public static void printCollo(String printerName, MtbColt testataColloToPrint, int quantity, String reportName, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
if(BuildConfig.DEBUG) {
|
||||||
|
onComplete.run();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(UtilityString.isNullOrEmpty(printerName)) {
|
if(UtilityString.isNullOrEmpty(printerName)) {
|
||||||
onFailed.run(new Exception("Nessuna stampante configurata: valore null"));
|
onFailed.run(new Exception("Nessuna stampante configurata: valore null"));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -39,8 +39,6 @@ public class SettingsManager {
|
|||||||
//settingsModelIstance.user = new SettingsModel.User();
|
//settingsModelIstance.user = new SettingsModel.User();
|
||||||
//settingsModelIstance.userSession = new SettingsModel.UserSession();
|
//settingsModelIstance.userSession = new SettingsModel.UserSession();
|
||||||
|
|
||||||
dbSettingsModelIstance = new DBSettingsModel();
|
|
||||||
|
|
||||||
firstStart = true;
|
firstStart = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,6 +33,7 @@ public class SettingsModel {
|
|||||||
public static class UserSession {
|
public static class UserSession {
|
||||||
public String profileDB;
|
public String profileDB;
|
||||||
public AvailableCodMdepsDTO depo;
|
public AvailableCodMdepsDTO depo;
|
||||||
|
public Integer defaultOrdinamentoPickingAccettazione = 0;
|
||||||
// public String codMdep;
|
// public String codMdep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,8 +20,8 @@ public class UtilityDate {
|
|||||||
public static final String DMY_SLASH = "dd/MM/yyyy";
|
public static final String DMY_SLASH = "dd/MM/yyyy";
|
||||||
public static final String YMD_SLASH = "yyyy/MM/dd";
|
public static final String YMD_SLASH = "yyyy/MM/dd";
|
||||||
public static final String YMD_DASH = "yyyy-MM-dd";
|
public static final String YMD_DASH = "yyyy-MM-dd";
|
||||||
public static final String DMY_TIME_SLASH = DMY_SLASH + " hh:mm:ss";
|
public static final String DMY_TIME_SLASH = DMY_SLASH + " HH:mm:ss";
|
||||||
public static final String YMD_TIME_SLASH = YMD_SLASH + " hh:mm:ss";
|
public static final String YMD_TIME_SLASH = YMD_SLASH + " HH:mm:ss";
|
||||||
|
|
||||||
|
|
||||||
public static final String DM_HUMAN = "dd MMM";
|
public static final String DM_HUMAN = "dd MMM";
|
||||||
@ -78,7 +78,7 @@ public class UtilityDate {
|
|||||||
format = new SimpleDateFormat(dateFormatString);
|
format = new SimpleDateFormat(dateFormatString);
|
||||||
}
|
}
|
||||||
|
|
||||||
format.setTimeZone(TimeZone.getTimeZone("Europe/Rome"));
|
//format.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||||
|
|
||||||
return format.parse(dateString);
|
return format.parse(dateString);
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ public class UtilityDate {
|
|||||||
public static String formatDate(Date dateToFormat, String format) {
|
public static String formatDate(Date dateToFormat, String format) {
|
||||||
if(dateToFormat != null) {
|
if(dateToFormat != null) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||||
sdf.setTimeZone(TimeZone.getTimeZone("Europe/Rome"));
|
//sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||||
return sdf.format(dateToFormat);
|
return sdf.format(dateToFormat);
|
||||||
}
|
}
|
||||||
else return null;
|
else return null;
|
||||||
@ -99,6 +99,6 @@ public class UtilityDate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Calendar getCalendarInstance() {
|
public static Calendar getCalendarInstance() {
|
||||||
return Calendar.getInstance(TimeZone.getTimeZone("Europe/Rome"));
|
return Calendar.getInstance();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,6 +90,9 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void init(){
|
private void init(){
|
||||||
|
|
||||||
|
currentOrderBy = AccettazioneOrdineInevasoOrderBy.Enum.fromInt(SettingsManager.i().userSession.defaultOrdinamentoPickingAccettazione);
|
||||||
|
|
||||||
mArticoliInColloBottomSheetViewModel.setOnCloseColloCallbackListener(this);
|
mArticoliInColloBottomSheetViewModel.setOnCloseColloCallbackListener(this);
|
||||||
mArticoliInColloBottomSheetViewModel.setOnItemDeletedCallback(this::onRowDeleted);
|
mArticoliInColloBottomSheetViewModel.setOnItemDeletedCallback(this::onRowDeleted);
|
||||||
mArticoliInColloBottomSheetViewModel.setOnItemEditedCallback(this::onRowEdited);
|
mArticoliInColloBottomSheetViewModel.setOnItemEditedCallback(this::onRowEdited);
|
||||||
@ -413,7 +416,10 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
|
|||||||
|
|
||||||
AlertDialog dialog = new AlertDialog.Builder(mActivity)
|
AlertDialog dialog = new AlertDialog.Builder(mActivity)
|
||||||
.setTitle(mActivity.getText(R.string.action_orderBy))
|
.setTitle(mActivity.getText(R.string.action_orderBy))
|
||||||
.setSingleChoiceItems(AccettazioneOrdineInevasoOrderBy.descriptions, currentOrderBy.getVal(), (dialog12, which) -> currentOrderBy = AccettazioneOrdineInevasoOrderBy.Enum.fromInt(which))
|
.setSingleChoiceItems(AccettazioneOrdineInevasoOrderBy.descriptions, currentOrderBy.getVal(), (dialog12, which) -> {
|
||||||
|
currentOrderBy = AccettazioneOrdineInevasoOrderBy.Enum.fromInt(which);
|
||||||
|
SettingsManager.i().userSession.defaultOrdinamentoPickingAccettazione = which;
|
||||||
|
})
|
||||||
.setPositiveButton("Ok", (dialog1, which) -> refreshOrderBy(false))
|
.setPositiveButton("Ok", (dialog1, which) -> refreshOrderBy(false))
|
||||||
.create();
|
.create();
|
||||||
dialog.show();
|
dialog.show();
|
||||||
@ -766,7 +772,7 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
|
|||||||
|
|
||||||
private void postCloseOperations(Runnable onComplete) {
|
private void postCloseOperations(Runnable onComplete) {
|
||||||
|
|
||||||
MtbColt mtbColt = (MtbColt) mtbColtOfAccettazione.clone();
|
MtbColt mtbColt = (MtbColt) getColloRef().clone();
|
||||||
|
|
||||||
resetUL();
|
resetUL();
|
||||||
|
|
||||||
@ -779,16 +785,35 @@ public class AccettazioneOrdineAccettazioneInevasoViewModel implements IOnColloC
|
|||||||
|
|
||||||
if(currentRow.getRigaOrd() != null) {
|
if(currentRow.getRigaOrd() != null) {
|
||||||
|
|
||||||
Stream.of(this.groupedOrdini)
|
for(int k = 0; k < this.groupedOrdini.size(); k++) {
|
||||||
.filter(x ->
|
|
||||||
x.getQtaDaEvadere().floatValue() > 0 &&
|
OrdineAccettazioneDTO.Riga x = this.groupedOrdini.get(k);
|
||||||
|
|
||||||
|
if(x.getQtaDaEvadere().floatValue() > 0 &&
|
||||||
x.getMtbAart().getCodMart().equalsIgnoreCase(currentRow.getCodMart()) &&
|
x.getMtbAart().getCodMart().equalsIgnoreCase(currentRow.getCodMart()) &&
|
||||||
x.getCodJcom().equalsIgnoreCase(currentRow.getCodJcom()) &&
|
x.getCodJcom().equalsIgnoreCase(currentRow.getCodJcom()) &&
|
||||||
x.getRigaOrd() == currentRow.getRigaOrd() &&
|
x.getRigaOrd() == currentRow.getRigaOrd() &&
|
||||||
x.getDataOrdD().equals(currentRow.getDataOrdD()) &&
|
x.getDataOrdD().equals(currentRow.getDataOrdD()) &&
|
||||||
x.getNumOrd() == currentRow.getNumOrd()
|
x.getNumOrd() == currentRow.getNumOrd()) {
|
||||||
)
|
|
||||||
.forEach(x -> x.setQtaRiservate(x.getQtaRiservate().add(currentRow.getQtaCol())));
|
x.setQtaRiservate(x.getQtaRiservate().add(currentRow.getQtaCol()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stream.of(this.groupedOrdini)
|
||||||
|
// .filter(x ->
|
||||||
|
// x.getQtaDaEvadere().floatValue() > 0 &&
|
||||||
|
// x.getMtbAart().getCodMart().equalsIgnoreCase(currentRow.getCodMart()) &&
|
||||||
|
// x.getCodJcom().equalsIgnoreCase(currentRow.getCodJcom()) &&
|
||||||
|
// x.getRigaOrd() == currentRow.getRigaOrd() &&
|
||||||
|
// x.getDataOrdD().equals(currentRow.getDataOrdD()) &&
|
||||||
|
// x.getNumOrd() == currentRow.getNumOrd()
|
||||||
|
// )
|
||||||
|
// .forEach(x -> {
|
||||||
|
// x.setQtaRiservate(x.getQtaRiservate().add(currentRow.getQtaCol()));
|
||||||
|
// });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -67,7 +67,6 @@ public class HistoryULsListAdapter extends SectionedRecyclerViewAdapter<HistoryU
|
|||||||
public void updateItems(List<HistoryVersamentoProdUL> updatedDataset) {
|
public void updateItems(List<HistoryVersamentoProdUL> updatedDataset) {
|
||||||
mDataset.clear();
|
mDataset.clear();
|
||||||
mDataset.addAll(orderItems(updatedDataset));
|
mDataset.addAll(orderItems(updatedDataset));
|
||||||
notifyDataSetChanged();
|
|
||||||
notifyDataChanged();
|
notifyDataChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,5 +142,4 @@ public class HistoryULsListAdapter extends SectionedRecyclerViewAdapter<HistoryU
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,7 @@ public class ProdRecuperoMaterialeHelper {
|
|||||||
"mtb_colr.gestione, " +
|
"mtb_colr.gestione, " +
|
||||||
"mtb_colr.data_collo, " +
|
"mtb_colr.data_collo, " +
|
||||||
"mtb_colr.num_collo, " +
|
"mtb_colr.num_collo, " +
|
||||||
|
"mtb_colr.ser_collo, " +
|
||||||
"mtb_colr.cod_mart, " +
|
"mtb_colr.cod_mart, " +
|
||||||
"mtb_colr.cod_col, " +
|
"mtb_colr.cod_col, " +
|
||||||
"mtb_colr.cod_tagl, " +
|
"mtb_colr.cod_tagl, " +
|
||||||
@ -61,6 +62,7 @@ public class ProdRecuperoMaterialeHelper {
|
|||||||
"mtb_colr.gestione, " +
|
"mtb_colr.gestione, " +
|
||||||
"mtb_colr.data_collo, " +
|
"mtb_colr.data_collo, " +
|
||||||
"mtb_colr.num_collo, " +
|
"mtb_colr.num_collo, " +
|
||||||
|
"mtb_colr.ser_collo, " +
|
||||||
"mtb_colr.cod_mart, " +
|
"mtb_colr.cod_mart, " +
|
||||||
"mtb_colr.cod_col, " +
|
"mtb_colr.cod_col, " +
|
||||||
"mtb_colr.cod_tagl, " +
|
"mtb_colr.cod_tagl, " +
|
||||||
|
|||||||
@ -9,6 +9,7 @@ public class HistoryVersamentoProdUL {
|
|||||||
|
|
||||||
private String gestione;
|
private String gestione;
|
||||||
private String dataCollo;
|
private String dataCollo;
|
||||||
|
private String serCollo;
|
||||||
private Integer numCollo;
|
private Integer numCollo;
|
||||||
private String segno;
|
private String segno;
|
||||||
private String codMart;
|
private String codMart;
|
||||||
@ -44,6 +45,15 @@ public class HistoryVersamentoProdUL {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getSerCollo() {
|
||||||
|
return serCollo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistoryVersamentoProdUL setSerCollo(String serCollo) {
|
||||||
|
this.serCollo = serCollo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getNumCollo() {
|
public Integer getNumCollo() {
|
||||||
return numCollo;
|
return numCollo;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|||||||
import com.tfb.fbtoast.FBToast;
|
import com.tfb.fbtoast.FBToast;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
@ -56,6 +57,7 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
|
|
||||||
|
|
||||||
private HistoryULsListAdapter mAdapter;
|
private HistoryULsListAdapter mAdapter;
|
||||||
|
private List<HistoryVersamentoProdUL> mDataset;
|
||||||
|
|
||||||
public ObservableField<MtbColt> mtbColt = new ObservableField<>();
|
public ObservableField<MtbColt> mtbColt = new ObservableField<>();
|
||||||
|
|
||||||
@ -66,15 +68,8 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
mHelper = helper;
|
mHelper = helper;
|
||||||
mOnRecuperoCompleted = onRecuperoCompleted;
|
mOnRecuperoCompleted = onRecuperoCompleted;
|
||||||
|
|
||||||
ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
initRecyclerView();
|
||||||
|
refreshAdapter();
|
||||||
mHelper.loadLastULVersate(historyULs -> {
|
|
||||||
progressDialog.dismiss();
|
|
||||||
initRecyclerView(historyULs);
|
|
||||||
}, ex -> {
|
|
||||||
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
|
||||||
BarcodeManager.enable();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openLU() {
|
public void openLU() {
|
||||||
@ -92,7 +87,7 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
setMtbColt(mtbColt);
|
setMtbColt(mtbColt);
|
||||||
chooseQuantityToReturn();
|
// chooseQuantityToReturn();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -110,10 +105,8 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void chooseQuantityToReturn() {
|
private void chooseQuantityToReturn(MtbAart mtbAart, BigDecimal min, BigDecimal max) {
|
||||||
InputQuantityToReturnDialog.make(mContext, mtbColt.get().getMtbColr().get(0).getMtbAart(), BigDecimal.ZERO, BigDecimal.ONE, data -> {
|
|
||||||
|
|
||||||
}).show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -122,26 +115,11 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
this.mtbColt.set(mtbColt);
|
this.mtbColt.set(mtbColt);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetMtbColt() {
|
|
||||||
this.mtbColt.set(null);
|
|
||||||
openLU();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void showDataSavedDialog(Runnable onPositiveClick) {
|
|
||||||
|
|
||||||
DialogSimpleMessageHelper.makeSuccessDialog(
|
|
||||||
mContext,
|
|
||||||
mContext.getResources().getString(R.string.completed),
|
|
||||||
new SpannableString(mContext.getResources().getString(R.string.data_saved)),
|
|
||||||
null, onPositiveClick).show();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void initRecyclerView(List<HistoryVersamentoProdUL> historyULs) {
|
private void initRecyclerView() {
|
||||||
mAdapter = new HistoryULsListAdapter(mContext, historyULs);
|
mAdapter = new HistoryULsListAdapter(mContext, new ArrayList<>());
|
||||||
mAdapter.setOnItemClicked(this::onListItemClicked);
|
mAdapter.setOnItemClicked(this::onListItemClicked);
|
||||||
|
|
||||||
mBinding.prodRecuperoMaterialeMainList.setLayoutManager(new LinearLayoutManager(mContext));
|
mBinding.prodRecuperoMaterialeMainList.setLayoutManager(new LinearLayoutManager(mContext));
|
||||||
@ -153,53 +131,69 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
|
|
||||||
qtaDaEvadere = qtaDaEvadere.add(item.getQtaCol());
|
qtaDaEvadere = qtaDaEvadere.add(item.getQtaCol());
|
||||||
|
|
||||||
DialogInputQuantity.DTO dto = new DialogInputQuantity.DTO()
|
|
||||||
.setBatchLot(item.getPartitaMag())
|
|
||||||
.setMtbAart(item.getMtbAart())
|
|
||||||
.setQtaDisponibile(qtaDaEvadere)
|
|
||||||
.setQtaTot(qtaDaEvadere)
|
|
||||||
.setCanPartitaMagBeChanged(false)
|
|
||||||
.setMaxQta(qtaDaEvadere);
|
|
||||||
|
|
||||||
|
InputQuantityToReturnDialog.make(mContext, item.getMtbAart(), BigDecimal.ONE, qtaDaEvadere, quantity -> {
|
||||||
DialogInputQuantity.makeBase(mContext, dto, false, (quantityDTO) -> {
|
onItemDispatched(item, quantity);
|
||||||
onItemDispatched(item, quantityDTO);
|
|
||||||
}, () -> {
|
|
||||||
BarcodeManager.enable();
|
|
||||||
}).show();
|
}).show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onItemDispatched(HistoryVersamentoProdUL item, QuantityDTO quantityDTO) {
|
private void onItemDispatched(HistoryVersamentoProdUL item, BigDecimal quantity) {
|
||||||
|
|
||||||
final ProgressDialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
final ProgressDialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
|
|
||||||
final MtbColt mtbColt = new MtbColt()
|
final MtbColt mtbColtCarico = new MtbColt()
|
||||||
.initDefaultFields()
|
.initDefaultFields()
|
||||||
.setGestione(GestioneEnum.LAVORAZIONE)
|
.setGestione(GestioneEnum.LAVORAZIONE)
|
||||||
.setSegno(+1)
|
.setSegno(+1)
|
||||||
.setMtbColr(new ObservableArrayList<>());
|
.setMtbColr(new ObservableArrayList<>());
|
||||||
mtbColt
|
mtbColtCarico
|
||||||
.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
|
|
||||||
final MtbColr mtbColr = new MtbColr()
|
final MtbColr mtbColrCarico = new MtbColr()
|
||||||
.setCodMart(item.getCodMart())
|
.setCodMart(item.getCodMart())
|
||||||
.setPartitaMag(UtilityString.empty2null(quantityDTO.batchLot.get()))
|
.setPartitaMag(UtilityString.empty2null(item.getPartitaMag()))
|
||||||
.setQtaCol(quantityDTO.qtaTot.getBigDecimal())
|
.setQtaCol(quantity)
|
||||||
.setQtaCnf(quantityDTO.qtaCnf.getBigDecimal())
|
.setDescrizione(UtilityString.isNullOrEmpty(item.getMtbAart().getDescrizioneEstesa()) ? item.getMtbAart().getDescrizione() : item.getMtbAart().getDescrizioneEstesa())
|
||||||
.setNumCnf(quantityDTO.numCnf.getBigDecimal())
|
.setDatetimeRow(UtilityDate.getDateInstance());
|
||||||
|
|
||||||
|
|
||||||
|
mtbColtCarico.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
|
mtbColtCarico.getMtbColr().add(mtbColrCarico);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
final MtbColt mtbColtScarico = new MtbColt()
|
||||||
|
.setDataCollo(item.getDataCollo())
|
||||||
|
.setSerCollo(item.getSerCollo())
|
||||||
|
.setNumCollo(item.getNumCollo())
|
||||||
|
.setGestione(item.getGestione())
|
||||||
|
.setMtbColr(new ObservableArrayList<>());
|
||||||
|
mtbColtScarico
|
||||||
|
.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||||
|
|
||||||
|
final MtbColr mtbColrScarico = new MtbColr()
|
||||||
|
.setCodMart(item.getCodMart())
|
||||||
|
.setPartitaMag(UtilityString.empty2null(item.getPartitaMag()))
|
||||||
|
.setQtaCol(quantity.multiply(new BigDecimal(-1)))
|
||||||
.setDescrizione(UtilityString.isNullOrEmpty(item.getMtbAart().getDescrizioneEstesa()) ? item.getMtbAart().getDescrizione() : item.getMtbAart().getDescrizioneEstesa())
|
.setDescrizione(UtilityString.isNullOrEmpty(item.getMtbAart().getDescrizioneEstesa()) ? item.getMtbAart().getDescrizione() : item.getMtbAart().getDescrizioneEstesa())
|
||||||
.setDatetimeRow(UtilityDate.getDateInstance());
|
.setDatetimeRow(UtilityDate.getDateInstance());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mtbColr.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
mtbColtScarico.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
mtbColt.getMtbColr().add(mtbColr);
|
mtbColtScarico.getMtbColr().add(mtbColrScarico);
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumer.saveCollo(mtbColt, value -> {
|
List<MtbColt> colliToSave = new ArrayList<>();
|
||||||
|
colliToSave.add(mtbColtCarico);
|
||||||
|
colliToSave.add(mtbColtScarico);
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumer.saveColli(colliToSave, value -> {
|
||||||
|
|
||||||
FBToast.successToast(mContext, mContext.getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
FBToast.successToast(mContext, mContext.getResources().getString(R.string.data_saved), FBToast.LENGTH_SHORT);
|
||||||
|
|
||||||
printCollo(progress, value, () -> {
|
printCollo(progress, value.get(0), () -> {
|
||||||
|
this.refreshAdapter();
|
||||||
mOnRecuperoCompleted.run();
|
mOnRecuperoCompleted.run();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -265,4 +259,21 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
|
|
||||||
}, onAbort);
|
}, onAbort);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void refreshAdapter() {
|
||||||
|
ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
|
|
||||||
|
mHelper.loadLastULVersate(historyULs -> {
|
||||||
|
this.mDataset = historyULs;
|
||||||
|
progressDialog.dismiss();
|
||||||
|
|
||||||
|
this.mAdapter.updateItems(this.mDataset);
|
||||||
|
}, ex -> {
|
||||||
|
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||||
|
BarcodeManager.enable();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package it.integry.integrywmsnative.gest.vendita.core;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import androidx.core.content.res.ResourcesCompat;
|
import androidx.core.content.res.ResourcesCompat;
|
||||||
@ -20,6 +21,7 @@ import it.integry.integrywmsnative.R;
|
|||||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.databinding.VenditaMainListGroupModelBinding;
|
import it.integry.integrywmsnative.databinding.VenditaMainListGroupModelBinding;
|
||||||
import it.integry.integrywmsnative.databinding.VenditaMainListModelBinding;
|
import it.integry.integrywmsnative.databinding.VenditaMainListModelBinding;
|
||||||
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
||||||
@ -71,7 +73,7 @@ public class MainListVenditaAdapter extends SectionedRecyclerViewAdapter<MainLis
|
|||||||
|
|
||||||
private List<OrdineVenditaInevasoDTO> orderItems(List<OrdineVenditaInevasoDTO> dataset) {
|
private List<OrdineVenditaInevasoDTO> orderItems(List<OrdineVenditaInevasoDTO> dataset) {
|
||||||
return Stream.of(dataset)
|
return Stream.of(dataset)
|
||||||
.sortBy(OrdineVenditaInevasoDTO::getRagSocOrd)
|
.sortBy(x -> x.getRagSocOrd() + " - " + x.getDestinatario())
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -95,6 +97,14 @@ public class MainListVenditaAdapter extends SectionedRecyclerViewAdapter<MainLis
|
|||||||
public void onBindSubheaderViewHolder(SubheaderHolder subheaderHolder, int nextItemPosition) {
|
public void onBindSubheaderViewHolder(SubheaderHolder subheaderHolder, int nextItemPosition) {
|
||||||
subheaderHolder.binding.venditaMainListGroupHeader.setText(mDataset.get(nextItemPosition).getRagSocOrd());
|
subheaderHolder.binding.venditaMainListGroupHeader.setText(mDataset.get(nextItemPosition).getRagSocOrd());
|
||||||
|
|
||||||
|
if(!UtilityString.isNullOrEmpty(mDataset.get(nextItemPosition).getDestinatario())) {
|
||||||
|
subheaderHolder.binding.venditaMainListGroupSubheader.setVisibility(View.VISIBLE);
|
||||||
|
subheaderHolder.binding.venditaMainListGroupSubheader.setText(mDataset.get(nextItemPosition).getDestinatario());
|
||||||
|
} else {
|
||||||
|
subheaderHolder.binding.venditaMainListGroupSubheader.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
subheaderHolder.binding.getRoot().setOnClickListener(v -> {
|
subheaderHolder.binding.getRoot().setOnClickListener(v -> {
|
||||||
|
|
||||||
boolean anySelected = Stream.of(mDataset)
|
boolean anySelected = Stream.of(mDataset)
|
||||||
@ -159,7 +169,8 @@ public class MainListVenditaAdapter extends SectionedRecyclerViewAdapter<MainLis
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPlaceSubheaderBetweenItems(int position) {
|
public boolean onPlaceSubheaderBetweenItems(int position) {
|
||||||
return !this.mDataset.get(position).getRagSocOrd().equalsIgnoreCase(this.mDataset.get(position + 1).getRagSocOrd());
|
return !this.mDataset.get(position).getRagSocOrd().equalsIgnoreCase(this.mDataset.get(position + 1).getRagSocOrd()) &&
|
||||||
|
!this.mDataset.get(position).getDestinatario().equalsIgnoreCase(this.mDataset.get(position + 1).getDestinatario());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
@ -43,21 +44,29 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="24dp"
|
android:paddingTop="24dp"
|
||||||
android:paddingLeft="24dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingRight="24dp">
|
android:paddingEnd="8dp">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingEnd="16dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.DialogTitle"
|
style="@style/TextViewMaterial.DialogTitle"
|
||||||
android:text="Title here"
|
tools:text="Title here"
|
||||||
android:gravity="center_horizontal"/>
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -65,7 +74,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial"
|
style="@style/TextViewMaterial"
|
||||||
android:text="Description here"
|
tools:text="Description here"
|
||||||
android:gravity="left"
|
android:gravity="left"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="16dp" />
|
android:layout_marginBottom="16dp" />
|
||||||
@ -88,68 +97,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:visibility="@{viewmodel.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
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="@style/Button.DangerFull"
|
|
||||||
android:layout_marginLeft="8dp"
|
|
||||||
android:layout_marginRight="8dp"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/left_buttons_guideline"
|
|
||||||
android:onClick="@{() -> viewmodel.onNegativeClick()}"
|
|
||||||
android:text="@string/no"/>
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="@style/Button.PrimaryOutline"
|
|
||||||
android:layout_marginLeft="8dp"
|
|
||||||
android:layout_marginRight="8dp"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/left_buttons_guideline"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/right_buttons_guideline"
|
|
||||||
app:strokeColor="@color/colorPrimary"
|
|
||||||
android:onClick="@{() -> viewmodel.onNeutralClick()}"
|
|
||||||
android:text="@string/abort"/>
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
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/right_buttons_guideline"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
android:onClick="@{() -> viewmodel.onPositiveClick()}"
|
|
||||||
android:text="@string/yes"/>
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -232,6 +179,72 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:visibility="@{viewmodel.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
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/Button.DangerFull"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/left_buttons_guideline"
|
||||||
|
android:onClick="@{() -> viewmodel.onNegativeClick()}"
|
||||||
|
android:text="@string/no"/>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/Button.PrimaryOutline"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/left_buttons_guideline"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/right_buttons_guideline"
|
||||||
|
app:strokeColor="@color/colorPrimary"
|
||||||
|
android:onClick="@{() -> viewmodel.onNeutralClick()}"
|
||||||
|
android:text="@string/abort"/>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
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/right_buttons_guideline"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:onClick="@{() -> viewmodel.onPositiveClick()}"
|
||||||
|
android:text="@string/yes"/>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@ -33,18 +33,33 @@
|
|||||||
<CheckBox
|
<CheckBox
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
android:checked="true"
|
android:checked="true"
|
||||||
android:enabled="false" />
|
android:enabled="false" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/vendita_main_list_group_header"
|
android:id="@+id/vendita_main_list_group_header"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
style="@android:style/TextAppearance.Medium"
|
style="@style/AppTheme.NewMaterial.Text.Medium"
|
||||||
tools:text="NOME GRUPPO"/>
|
tools:text="NOME GRUPPO"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/vendita_main_list_group_subheader"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
tools:text="SOTTO GRUPPO"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ buildscript {
|
|||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.4.2'
|
classpath 'com.android.tools.build:gradle:3.5.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.2.0'
|
classpath 'com.google.gms:google-services:4.2.0'
|
||||||
classpath 'com.google.firebase:perf-plugin:1.2.1'
|
classpath 'com.google.firebase:perf-plugin:1.2.1'
|
||||||
|
|||||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Thu Apr 18 18:31:44 CEST 2019
|
#Mon Aug 26 11:42:29 CEST 2019
|
||||||
distributionBase=GRADLE_USER_HOME
|
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-5.1.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user