Merge branch 'release/v1.29.13(317)'
This commit is contained in:
commit
a3598fab56
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 316
|
def appVersionCode = 317
|
||||||
def appVersionName = '1.29.12'
|
def appVersionName = '1.29.13'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -1,122 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
|
||||||
|
|
||||||
public class MtbCols extends EntityBase {
|
|
||||||
|
|
||||||
private String dataCollo;
|
|
||||||
private String gestione;
|
|
||||||
private Integer idRiga;
|
|
||||||
private Integer numCollo;
|
|
||||||
private String serCollo;
|
|
||||||
private String codMdep;
|
|
||||||
private String dataMove;
|
|
||||||
private String modificatoDa;
|
|
||||||
private String posizione;
|
|
||||||
private String causale;
|
|
||||||
|
|
||||||
public MtbCols() {
|
|
||||||
type = "mtb_cols";
|
|
||||||
setCodMdep(SettingsManager.i().getUserSession().getDepo().getCodMdep());
|
|
||||||
setModificatoDa(SettingsManager.i().getUser().getFullname());
|
|
||||||
//setDataMove(UtilityDate.getDateInstance());
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDataCollo() {
|
|
||||||
return dataCollo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setDataCollo(String dataCollo) {
|
|
||||||
this.dataCollo = dataCollo;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGestione() {
|
|
||||||
return gestione;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setGestione(String gestione) {
|
|
||||||
this.gestione = gestione;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIdRiga() {
|
|
||||||
return idRiga;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setIdRiga(Integer idRiga) {
|
|
||||||
this.idRiga = idRiga;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNumCollo() {
|
|
||||||
return numCollo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setNumCollo(Integer numCollo) {
|
|
||||||
this.numCollo = numCollo;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSerCollo() {
|
|
||||||
return serCollo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setSerCollo(String serCollo) {
|
|
||||||
this.serCollo = serCollo;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCodMdep() {
|
|
||||||
return codMdep;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setCodMdep(String codMdep) {
|
|
||||||
this.codMdep = codMdep;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDataMove() {
|
|
||||||
return dataMove;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setDataMove(String dataMove) {
|
|
||||||
this.dataMove = dataMove;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setDataMove(Date dataMove) {
|
|
||||||
this.dataMove = UtilityDate.formatDate(dataMove, UtilityDate.COMMONS_DATE_FORMATS.DMY_TIME_SLASH);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getModificatoDa() {
|
|
||||||
return modificatoDa;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setModificatoDa(String modificatoDa) {
|
|
||||||
this.modificatoDa = modificatoDa;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPosizione() {
|
|
||||||
return posizione;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setPosizione(String posizione) {
|
|
||||||
this.posizione = posizione;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCausale() {
|
|
||||||
return causale;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbCols setCausale(String causale) {
|
|
||||||
this.causale = causale;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -63,7 +63,6 @@ public class MtbColt extends EntityBase {
|
|||||||
private BigDecimal altezzaCm;
|
private BigDecimal altezzaCm;
|
||||||
private String codJcom;
|
private String codJcom;
|
||||||
|
|
||||||
private List<MtbCols> mtbCols;
|
|
||||||
private MtbTCol mtbTCol;
|
private MtbTCol mtbTCol;
|
||||||
|
|
||||||
private Boolean disablePrint;
|
private Boolean disablePrint;
|
||||||
@ -526,16 +525,6 @@ public class MtbColt extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<MtbCols> getMtbCols() {
|
|
||||||
return mtbCols;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MtbColt setMtbCols(List<MtbCols> mtbCols) {
|
|
||||||
this.mtbCols = mtbCols;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getDisablePrint() {
|
public Boolean getDisablePrint() {
|
||||||
return disablePrint == null ? false : disablePrint;
|
return disablePrint == null ? false : disablePrint;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,8 +89,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void saveColli(List<MtbColt> mtbColtsToSave, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void saveColli(List<MtbColt> mtbColtsToSave, RunnableArgs<List<MtbColt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
for (MtbColt mtbColt : mtbColtsToSave) {
|
for (MtbColt mtbColt : mtbColtsToSave) {
|
||||||
mtbColt.setMtbCols(null);
|
|
||||||
|
|
||||||
for (int i = 0; i < mtbColt.getMtbColr().size(); i++) {
|
for (int i = 0; i < mtbColt.getMtbColr().size(); i++) {
|
||||||
mtbColt.getMtbColr().get(i)
|
mtbColt.getMtbColr().get(i)
|
||||||
.setMtbAart(null)
|
.setMtbAart(null)
|
||||||
@ -700,6 +698,27 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void confirmGiacenzaUL(MtbColt sourceMtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
MtbColt sourceMtbColtClone = (MtbColt) sourceMtbColt.clone();
|
||||||
|
sourceMtbColtClone.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
colliMagazzinoRESTConsumerService.confirmGiacenzaUL(sourceMtbColtClone).enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||||
|
analyzeAnswer(response, "confirmGiacenzaUL", data -> {
|
||||||
|
onComplete.run();
|
||||||
|
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
|
||||||
|
if (onFailed != null) onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void loadShipmentUlFromProductionUL(MtbColt mtbColt, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public void loadShipmentUlFromProductionUL(MtbColt mtbColt, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
HashMap<String, Object> params = new HashMap<>();
|
HashMap<String, Object> params = new HashMap<>();
|
||||||
|
|||||||
@ -46,4 +46,7 @@ public interface ColliMagazzinoRESTConsumerService {
|
|||||||
@POST("wms/versamentoAutomaticoUL")
|
@POST("wms/versamentoAutomaticoUL")
|
||||||
Call<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> versamentoAutomaticoUL(@Body MtbColt mtbColt);
|
Call<ServiceRESTResponse<VersamentoAutomaticoULResponseDTO>> versamentoAutomaticoUL(@Body MtbColt mtbColt);
|
||||||
|
|
||||||
|
@POST("wms/confirmGiacenzaUL")
|
||||||
|
Call<ServiceRESTResponse<Object>> confirmGiacenzaUL(@Body MtbColt mtbColt);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.BuildConfig;
|
||||||
import it.integry.integrywmsnative.core.exception.NoPrintersFoundException;
|
import it.integry.integrywmsnative.core.exception.NoPrintersFoundException;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
@ -59,10 +60,10 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
public void printCollo(MtbColt testataColloToPrint, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void printCollo(MtbColt testataColloToPrint, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
// if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
// onComplete.run();
|
onComplete.run();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
|
PrinterRESTConsumerService printerService = RESTBuilder.getService(PrinterRESTConsumerService.class);
|
||||||
Call<ServiceRESTResponse<Object>> callable = null;
|
Call<ServiceRESTResponse<Object>> callable = null;
|
||||||
@ -87,10 +88,10 @@ public class PrinterRESTConsumer extends _BaseRESTConsumer {
|
|||||||
|
|
||||||
|
|
||||||
public void printReport(String printerName, String reportName, HashMap<String, Object> params, int quantity, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void printReport(String printerName, String reportName, HashMap<String, Object> params, int quantity, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
// if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
// onComplete.run();
|
onComplete.run();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
JasperDTO jasperDTO = new JasperDTO();
|
JasperDTO jasperDTO = new JasperDTO();
|
||||||
jasperDTO.setReportName(reportName);
|
jasperDTO.setReportName(reportName);
|
||||||
|
|||||||
@ -42,7 +42,7 @@ import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.Versamento
|
|||||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ui.ChooseOrdsLavFromListAdapter;
|
import it.integry.integrywmsnative.gest.prod_versamento_materiale.ui.ChooseOrdsLavFromListAdapter;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLU;
|
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLUView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView;
|
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView;
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ public class ProdVersamentoMaterialeFragment extends BaseFragment implements Pro
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void choosePosition() {
|
private void choosePosition() {
|
||||||
DialogAskPositionOfLU.makeBase(requireActivity(), true, (status, mtbDepoPosizione) -> {
|
DialogAskPositionOfLUView.makeBase(true, (status, mtbDepoPosizione) -> {
|
||||||
|
|
||||||
if (status == DialogConsts.Results.ABORT) {
|
if (status == DialogConsts.Results.ABORT) {
|
||||||
popMe();
|
popMe();
|
||||||
@ -205,7 +205,7 @@ public class ProdVersamentoMaterialeFragment extends BaseFragment implements Pro
|
|||||||
mViewModel.setPosizione(mtbDepoPosizione);
|
mViewModel.setPosizione(mtbDepoPosizione);
|
||||||
}
|
}
|
||||||
|
|
||||||
}, this::onError).show();
|
}, this::onError).show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
|||||||
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.DialogConsts;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLU;
|
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLUView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArtsView;
|
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArtsView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
@ -478,7 +478,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
new DialogYesNoView(null, "Vuoi cambiare la posizione della UL corrente?", result -> {
|
new DialogYesNoView(null, "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case YES:
|
case YES:
|
||||||
DialogAskPositionOfLU.makeBase(getActivity(), false, (status, mtbDepoPosizione) -> {
|
DialogAskPositionOfLUView.makeBase(false, (status, mtbDepoPosizione) -> {
|
||||||
if (status == DialogConsts.Results.ABORT) {
|
if (status == DialogConsts.Results.ABORT) {
|
||||||
onComplete.run(false, null);
|
onComplete.run(false, null);
|
||||||
} else {
|
} else {
|
||||||
@ -488,7 +488,8 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
onComplete.run(true, null);
|
onComplete.run(true, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, this::onError).show();
|
}, this::onError)
|
||||||
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NO:
|
case NO:
|
||||||
|
|||||||
@ -21,7 +21,6 @@ import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILUPrintL
|
|||||||
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbCols;
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||||
@ -127,7 +126,8 @@ public class RettificaGiacenzeViewModel {
|
|||||||
if (!UtilityString.isNullOrEmpty(ean128Model.Content))
|
if (!UtilityString.isNullOrEmpty(ean128Model.Content))
|
||||||
barcodeProd = ean128Model.Content;
|
barcodeProd = ean128Model.Content;
|
||||||
|
|
||||||
if(!UtilityString.isNullOrEmpty(ean128Model.Internal1)) codMart = ean128Model.Internal1;
|
if (!UtilityString.isNullOrEmpty(ean128Model.Internal1))
|
||||||
|
codMart = ean128Model.Internal1;
|
||||||
|
|
||||||
|
|
||||||
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||||
@ -455,18 +455,7 @@ public class RettificaGiacenzeViewModel {
|
|||||||
|
|
||||||
|
|
||||||
private void saveCausaleRettificaGiacenze(Runnable onComplete) {
|
private void saveCausaleRettificaGiacenze(Runnable onComplete) {
|
||||||
final MtbCols mtbCols = new MtbCols()
|
this.mColliMagazzinoRESTConsumer.confirmGiacenzaUL(mCurrentMtbColt, onComplete, this::sendError);
|
||||||
.setCausale(this.mDefaultCausale);
|
|
||||||
mtbCols.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
|
||||||
|
|
||||||
MtbColt cloneMtbColt = (MtbColt) mCurrentMtbColt.clone();
|
|
||||||
cloneMtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
|
||||||
cloneMtbColt.setMtbColr(null);
|
|
||||||
|
|
||||||
cloneMtbColt.setMtbCols(new ArrayList<>());
|
|
||||||
cloneMtbColt.getMtbCols().add(mtbCols);
|
|
||||||
|
|
||||||
this.mColliMagazzinoRESTConsumer.saveCollo(cloneMtbColt, mtbColt -> onComplete.run(), this::sendError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void savePosizione(MtbDepoPosizione mtbDepoPosizione, Runnable onComplete) {
|
private void savePosizione(MtbDepoPosizione mtbDepoPosizione, Runnable onComplete) {
|
||||||
|
|||||||
@ -68,7 +68,7 @@ import it.integry.integrywmsnative.gest.spedizione.ui.SpedizioneListModel;
|
|||||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLU;
|
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLUView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
@ -865,13 +865,13 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
new DialogYesNoView(null, "Vuoi cambiare la posizione della UL corrente?", result -> {
|
new DialogYesNoView(null, "Vuoi cambiare la posizione della UL corrente?", result -> {
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case YES:
|
case YES:
|
||||||
DialogAskPositionOfLU.makeBase(this, false, (status, mtbDepoPosizione) -> {
|
DialogAskPositionOfLUView.makeBase(false, (status, mtbDepoPosizione) -> {
|
||||||
if (status == DialogConsts.Results.ABORT) {
|
if (status == DialogConsts.Results.ABORT) {
|
||||||
onComplete.run(false, null);
|
onComplete.run(false, null);
|
||||||
} else {
|
} else {
|
||||||
onComplete.run(true, mtbDepoPosizione);
|
onComplete.run(true, mtbDepoPosizione);
|
||||||
}
|
}
|
||||||
}, this::onError).show();
|
}, this::onError).show(getSupportFragmentManager(), "tag");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NO:
|
case NO:
|
||||||
|
|||||||
@ -1,223 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.ask_position_of_lu;
|
|
||||||
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.graphics.drawable.ColorDrawable;
|
|
||||||
import android.text.Editable;
|
|
||||||
import android.text.TextWatcher;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.appcompat.widget.AppCompatTextView;
|
|
||||||
import androidx.databinding.DataBindingUtil;
|
|
||||||
|
|
||||||
import com.google.android.material.textfield.TextInputLayout;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
|
||||||
import it.integry.integrywmsnative.R;
|
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityPosizione;
|
|
||||||
import it.integry.integrywmsnative.databinding.DialogAskPositionOfLuBinding;
|
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
|
||||||
|
|
||||||
public class DialogAskPositionOfLU {
|
|
||||||
|
|
||||||
|
|
||||||
private Context mContext;
|
|
||||||
private DialogAskPositionOfLuBinding mBinding;
|
|
||||||
private boolean mCheckForLineaProd;
|
|
||||||
|
|
||||||
private MtbDepoPosizione currentMtbDepoPosizione;
|
|
||||||
|
|
||||||
private Dialog mDialog;
|
|
||||||
|
|
||||||
private RunnableArgss<DialogConsts.Results, MtbDepoPosizione> onComplete;
|
|
||||||
private RunnableArgs<Exception> onFailed;
|
|
||||||
|
|
||||||
private TextInputLayout livelloTextInputLayout;
|
|
||||||
|
|
||||||
private boolean completedFlow = false;
|
|
||||||
|
|
||||||
public static Dialog makeBase(final Context context, boolean checkForLineaProd, RunnableArgss<DialogConsts.Results, MtbDepoPosizione> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
return new DialogAskPositionOfLU(context, checkForLineaProd, onComplete, onFailed).mDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
private DialogAskPositionOfLU(Context context, boolean checkForLineaProd, RunnableArgss<DialogConsts.Results, MtbDepoPosizione> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
mContext = context;
|
|
||||||
mCheckForLineaProd = checkForLineaProd;
|
|
||||||
|
|
||||||
this.onComplete = onComplete;
|
|
||||||
this.onFailed = onFailed;
|
|
||||||
|
|
||||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
|
||||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.dialog_ask_position_of_lu, null, false);
|
|
||||||
mBinding.setMContext(mContext);
|
|
||||||
|
|
||||||
List<Integer> views = new ArrayList<>();
|
|
||||||
views.add(R.layout.dialog_ask_position_of_lu__page1);
|
|
||||||
views.add(R.layout.dialog_ask_position_of_lu__page2);
|
|
||||||
|
|
||||||
DialogAskPositionOfLUAdapter adapter = new DialogAskPositionOfLUAdapter(mContext, views);
|
|
||||||
mBinding.viewpager.setAdapter(adapter);
|
|
||||||
mBinding.viewpager.beginFakeDrag();
|
|
||||||
|
|
||||||
|
|
||||||
mDialog = new Dialog(mContext);
|
|
||||||
mDialog.setContentView(mBinding.getRoot());
|
|
||||||
mDialog.setCanceledOnTouchOutside(false);
|
|
||||||
// mDialog.setCancelable(false);
|
|
||||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
|
||||||
|
|
||||||
UtilityDialog.setTo90PercentWidth(mContext, mDialog);
|
|
||||||
|
|
||||||
mDialog.setOnShowListener(dialog -> {
|
|
||||||
((AppCompatTextView) adapter.getPage(0).findViewById(R.id.description_text)).setText(mCheckForLineaProd ? R.string.ask_production_line_of_lu_message : R.string.ask_position_of_lu_message);
|
|
||||||
|
|
||||||
adapter.getPage(1).findViewById(R.id.button_confirm).setOnClickListener(v -> {
|
|
||||||
String levelNumber = ((TextView)adapter.getPage(1).findViewById(R.id.level_number)).getText().toString();
|
|
||||||
onLevelConfirm(levelNumber);
|
|
||||||
});
|
|
||||||
|
|
||||||
adapter.getPage(1).findViewById(R.id.button_abort).setOnClickListener(v -> {
|
|
||||||
onLevelAbort();
|
|
||||||
});
|
|
||||||
|
|
||||||
livelloTextInputLayout = adapter.getPage(1).findViewById(R.id.level_number_layout);
|
|
||||||
|
|
||||||
livelloTextInputLayout.getEditText().addTextChangedListener(new TextWatcher() {
|
|
||||||
@Override
|
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
||||||
if(livelloTextInputLayout.getEditText().getText() != null) {
|
|
||||||
validateLevel(livelloTextInputLayout.getEditText().getText().toString());
|
|
||||||
} else resetLevelError();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterTextChanged(Editable s) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
setupBarcode();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void askLivello() {
|
|
||||||
mBinding.viewpager.setCurrentItem(1, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isOnLivelloPage() {
|
|
||||||
return mBinding.viewpager.getCurrentItem() == 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setupBarcode() {
|
|
||||||
|
|
||||||
int barcodeIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
|
||||||
.setOnScanSuccessful(onScanSuccessfull)
|
|
||||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(mContext, ex, false)));
|
|
||||||
|
|
||||||
mDialog.setOnDismissListener(dialog -> {
|
|
||||||
BarcodeManager.removeCallback(barcodeIstanceID);
|
|
||||||
if(!completedFlow) onComplete.run(DialogConsts.Results.ABORT, null);
|
|
||||||
});
|
|
||||||
|
|
||||||
BarcodeManager.enable();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessfull = data -> {
|
|
||||||
|
|
||||||
BarcodeManager.disable();
|
|
||||||
|
|
||||||
if(!isOnLivelloPage()) {
|
|
||||||
|
|
||||||
if (UtilityBarcode.isEtichettaPosizione(data)) {
|
|
||||||
|
|
||||||
MtbDepoPosizione foundPosizione = UtilityPosizione.getFromCache(data.getStringValue());
|
|
||||||
|
|
||||||
currentMtbDepoPosizione = foundPosizione;
|
|
||||||
|
|
||||||
if (!mCheckForLineaProd && !currentMtbDepoPosizione.isFlagLineaProduzione() && UtilityPosizione.isPosizioneWithLivello(foundPosizione)) {
|
|
||||||
askLivello();
|
|
||||||
BarcodeManager.enable();
|
|
||||||
} else {
|
|
||||||
completedFlow = true;
|
|
||||||
if(onComplete != null) onComplete.run(DialogConsts.Results.YES, foundPosizione);
|
|
||||||
|
|
||||||
mDialog.dismiss();
|
|
||||||
BarcodeManager.enable();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
BarcodeManager.enable();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
BarcodeManager.enable();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
private void onLevelConfirm(String levelString) {
|
|
||||||
|
|
||||||
String newPosizione = currentMtbDepoPosizione.getPosizione().substring(0, currentMtbDepoPosizione.getPosizione().length()-1);
|
|
||||||
newPosizione += levelString;
|
|
||||||
|
|
||||||
MtbDepoPosizione foundPosizione = UtilityPosizione.getFromCache(newPosizione);
|
|
||||||
|
|
||||||
if(foundPosizione != null) {
|
|
||||||
resetLevelError();
|
|
||||||
|
|
||||||
completedFlow = true;
|
|
||||||
if(onComplete != null) onComplete.run(DialogConsts.Results.YES, foundPosizione);
|
|
||||||
mDialog.dismiss();
|
|
||||||
|
|
||||||
} else {
|
|
||||||
setLevelError(mContext.getResources().getString(R.string.not_valid));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateLevel(String levelString) {
|
|
||||||
String newPosizione = currentMtbDepoPosizione.getPosizione().substring(0, currentMtbDepoPosizione.getPosizione().length()-1);
|
|
||||||
newPosizione += levelString;
|
|
||||||
|
|
||||||
if(UtilityPosizione.getFromCache(newPosizione) != null) {
|
|
||||||
resetLevelError();
|
|
||||||
} else setLevelError(mContext.getResources().getString(R.string.not_valid));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setLevelError(String message){
|
|
||||||
livelloTextInputLayout.setErrorEnabled(true);
|
|
||||||
livelloTextInputLayout.setError(message);
|
|
||||||
livelloTextInputLayout.setErrorIconDrawable(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void resetLevelError() {
|
|
||||||
livelloTextInputLayout.setError(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void onLevelAbort() {
|
|
||||||
completedFlow = true;
|
|
||||||
onComplete.run(DialogConsts.Results.ABORT, null);
|
|
||||||
mDialog.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,234 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.ask_position_of_lu;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.widget.AppCompatTextView;
|
||||||
|
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
import com.google.android.material.textfield.TextInputLayout;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityPosizione;
|
||||||
|
import it.integry.integrywmsnative.databinding.DialogAskPositionOfLuBinding;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||||
|
|
||||||
|
public class DialogAskPositionOfLUView extends BaseDialogFragment implements DialogInterface.OnShowListener {
|
||||||
|
|
||||||
|
private DialogAskPositionOfLuBinding mBindings;
|
||||||
|
private DialogAskPositionOfLUAdapter viewpagerAdapter;
|
||||||
|
private int mBarcodeScannerIstanceID;
|
||||||
|
|
||||||
|
private boolean mCheckForLineaProd;
|
||||||
|
|
||||||
|
private MtbDepoPosizione currentMtbDepoPosizione;
|
||||||
|
|
||||||
|
private RunnableArgss<DialogConsts.Results, MtbDepoPosizione> onComplete;
|
||||||
|
private RunnableArgs<Exception> onFailed;
|
||||||
|
|
||||||
|
private TextInputLayout livelloTextInputLayout;
|
||||||
|
|
||||||
|
private boolean completedFlow = false;
|
||||||
|
|
||||||
|
public static DialogAskPositionOfLUView makeBase(boolean checkForLineaProd, RunnableArgss<DialogConsts.Results, MtbDepoPosizione> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
return new DialogAskPositionOfLUView(checkForLineaProd, onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DialogAskPositionOfLUView(boolean checkForLineaProd, RunnableArgss<DialogConsts.Results, MtbDepoPosizione> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.mCheckForLineaProd = checkForLineaProd;
|
||||||
|
this.onComplete = onComplete;
|
||||||
|
this.onFailed = onFailed;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||||
|
this.initBarcode();
|
||||||
|
|
||||||
|
mBindings = DialogAskPositionOfLuBinding.inflate(LayoutInflater.from(requireActivity()), null, false);
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
|
|
||||||
|
List<Integer> views = new ArrayList<>();
|
||||||
|
views.add(R.layout.dialog_ask_position_of_lu__page1);
|
||||||
|
views.add(R.layout.dialog_ask_position_of_lu__page2);
|
||||||
|
|
||||||
|
viewpagerAdapter = new DialogAskPositionOfLUAdapter(requireContext(), views);
|
||||||
|
mBindings.viewpager.setAdapter(viewpagerAdapter);
|
||||||
|
mBindings.viewpager.beginFakeDrag();
|
||||||
|
|
||||||
|
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||||
|
.setView(mBindings.getRoot())
|
||||||
|
.setCancelable(false)
|
||||||
|
.create();
|
||||||
|
alertDialog.setCanceledOnTouchOutside(false);
|
||||||
|
alertDialog.setOnShowListener(this);
|
||||||
|
return alertDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
|
||||||
|
if(getDialog() != null) {
|
||||||
|
getDialog().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
|
||||||
|
getDialog().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onShow(DialogInterface dialog) {
|
||||||
|
((AppCompatTextView) viewpagerAdapter.getPage(0)
|
||||||
|
.findViewById(R.id.description_text))
|
||||||
|
.setText(mCheckForLineaProd ? R.string.ask_production_line_of_lu_message : R.string.ask_position_of_lu_message);
|
||||||
|
|
||||||
|
viewpagerAdapter.getPage(1).findViewById(R.id.button_confirm).setOnClickListener(v -> {
|
||||||
|
String levelNumber = ((TextView) viewpagerAdapter.getPage(1).findViewById(R.id.level_number)).getText().toString();
|
||||||
|
onLevelConfirm(levelNumber);
|
||||||
|
});
|
||||||
|
|
||||||
|
viewpagerAdapter.getPage(1).findViewById(R.id.button_abort).setOnClickListener(v -> {
|
||||||
|
onLevelAbort();
|
||||||
|
});
|
||||||
|
|
||||||
|
livelloTextInputLayout = viewpagerAdapter.getPage(1).findViewById(R.id.level_number_layout);
|
||||||
|
livelloTextInputLayout.getEditText().addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
if (livelloTextInputLayout.getEditText().getText() != null) {
|
||||||
|
validateLevel(livelloTextInputLayout.getEditText().getText().toString());
|
||||||
|
} else resetLevelError();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void askLivello() {
|
||||||
|
mBindings.viewpager.setCurrentItem(1, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isOnLivelloPage() {
|
||||||
|
return mBindings.viewpager.getCurrentItem() == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initBarcode() {
|
||||||
|
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
|
.setOnScanSuccessful(onScanSuccessfull)
|
||||||
|
.setOnScanFailed(this::onError));
|
||||||
|
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||||
|
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||||
|
if (!completedFlow) onComplete.run(DialogConsts.Results.ABORT, null);
|
||||||
|
super.onDismiss(dialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private final RunnableArgs<BarcodeScanDTO> onScanSuccessfull = data -> {
|
||||||
|
BarcodeManager.disable();
|
||||||
|
|
||||||
|
if (!isOnLivelloPage()) {
|
||||||
|
|
||||||
|
if (UtilityBarcode.isEtichettaPosizione(data)) {
|
||||||
|
|
||||||
|
MtbDepoPosizione foundPosizione = UtilityPosizione.getFromCache(data.getStringValue());
|
||||||
|
currentMtbDepoPosizione = foundPosizione;
|
||||||
|
|
||||||
|
if (!mCheckForLineaProd && !currentMtbDepoPosizione.isFlagLineaProduzione() && UtilityPosizione.isPosizioneWithLivello(foundPosizione)) {
|
||||||
|
askLivello();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
} else {
|
||||||
|
completedFlow = true;
|
||||||
|
if (onComplete != null)
|
||||||
|
onComplete.run(DialogConsts.Results.YES, foundPosizione);
|
||||||
|
|
||||||
|
dismiss();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
private void onLevelConfirm(String levelString) {
|
||||||
|
|
||||||
|
String newPosizione = currentMtbDepoPosizione.getPosizione().substring(0, currentMtbDepoPosizione.getPosizione().length() - 1);
|
||||||
|
newPosizione += levelString;
|
||||||
|
|
||||||
|
MtbDepoPosizione foundPosizione = UtilityPosizione.getFromCache(newPosizione);
|
||||||
|
|
||||||
|
if (foundPosizione != null) {
|
||||||
|
resetLevelError();
|
||||||
|
|
||||||
|
completedFlow = true;
|
||||||
|
if (onComplete != null) onComplete.run(DialogConsts.Results.YES, foundPosizione);
|
||||||
|
dismiss();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setLevelError(requireContext().getResources().getString(R.string.not_valid));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateLevel(String levelString) {
|
||||||
|
String newPosizione = currentMtbDepoPosizione.getPosizione().substring(0, currentMtbDepoPosizione.getPosizione().length() - 1);
|
||||||
|
newPosizione += levelString;
|
||||||
|
|
||||||
|
if (UtilityPosizione.getFromCache(newPosizione) != null) {
|
||||||
|
resetLevelError();
|
||||||
|
} else setLevelError(requireContext().getResources().getString(R.string.not_valid));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setLevelError(String message) {
|
||||||
|
livelloTextInputLayout.setErrorEnabled(true);
|
||||||
|
livelloTextInputLayout.setError(message);
|
||||||
|
livelloTextInputLayout.setErrorIconDrawable(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void resetLevelError() {
|
||||||
|
livelloTextInputLayout.setError(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void onLevelAbort() {
|
||||||
|
completedFlow = true;
|
||||||
|
onComplete.run(DialogConsts.Results.ABORT, null);
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_mtb_colr;
|
package it.integry.integrywmsnative.view.dialogs.choose_batch_lot.choose_art_from_lista_mtb_colr;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_mtb_colr;
|
package it.integry.integrywmsnative.view.dialogs.choose_batch_lot.choose_art_from_lista_mtb_colr;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -31,7 +31,7 @@ import it.integry.integrywmsnative.core.model.MtbColr;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
import it.integry.integrywmsnative.core.rest.model.Ean128Model;
|
||||||
import it.integry.integrywmsnative.databinding.DialogScanArtBinding;
|
import it.integry.integrywmsnative.databinding.DialogScanArtBinding;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_mtb_colr.DialogChooseArtFromListaMtbColrView;
|
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.choose_art_from_lista_mtb_colr.DialogChooseArtFromListaMtbColrView;
|
||||||
|
|
||||||
public class DialogScanArtView extends BaseDialogFragment implements DialogScanArtViewModel.Listener {
|
public class DialogScanArtView extends BaseDialogFragment implements DialogScanArtViewModel.Listener {
|
||||||
|
|
||||||
|
|||||||
@ -4,9 +4,6 @@
|
|||||||
<data>
|
<data>
|
||||||
<import type="android.text.Html" />
|
<import type="android.text.Html" />
|
||||||
<import type="it.integry.integrywmsnative.R" />
|
<import type="it.integry.integrywmsnative.R" />
|
||||||
<variable
|
|
||||||
name="mContext"
|
|
||||||
type="android.content.Context" />
|
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
|
|
||||||
@ -14,45 +11,33 @@
|
|||||||
android:orientation="vertical" android:layout_width="match_parent"
|
android:orientation="vertical" android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
app:cardCornerRadius="12dp"
|
app:cardCornerRadius="16dp"
|
||||||
app:cardElevation="0dp">
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/light_blue_300"
|
|
||||||
android:gravity="center_horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:src="@drawable/ic_error_white_24dp"
|
|
||||||
android:layout_margin="24dp"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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:paddingHorizontal="16dp"
|
||||||
android:paddingLeft="24dp"
|
android:paddingVertical="16dp">
|
||||||
android:paddingRight="24dp">
|
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
style="@style/MaterialAlertDialog.Material3.Title.Icon.CenterStacked"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:src="@drawable/ic_error_white_24dp"
|
||||||
|
app:tint="?colorPrimary" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
|
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
android:gravity="center_horizontal"
|
||||||
android:text="@string/placement"
|
android:layout_marginBottom="16dp"
|
||||||
android:gravity="center_horizontal"/>
|
android:text="@string/placement" />
|
||||||
|
|
||||||
|
|
||||||
<it.integry.integrywmsnative.ui.DeactivatableViewPager
|
<it.integry.integrywmsnative.ui.DeactivatableViewPager
|
||||||
@ -62,9 +47,8 @@
|
|||||||
|
|
||||||
</it.integry.integrywmsnative.ui.DeactivatableViewPager>
|
</it.integry.integrywmsnative.ui.DeactivatableViewPager>
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
@ -1,19 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:orientation="vertical"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:layout_margin="16dp">
|
android:layout_margin="16dp"
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:weightSum="10">
|
android:weightSum="10">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
style="?android:attr/progressBarStyle"
|
style="?android:attr/progressBarStyle"
|
||||||
@ -31,6 +27,5 @@
|
|||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
style="@style/TextViewMaterial"
|
style="@style/TextViewMaterial"
|
||||||
tools:text="Scansiona il codice a barre di uno Scaffale"/>
|
tools:text="Scansiona il codice a barre di uno Scaffale"/>
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@ -40,7 +40,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/Button.PrimaryOutline"
|
style="@style/Button.PrimaryOutline"
|
||||||
app:icon="@drawable/ic_clear_24dp"
|
|
||||||
app:strokeColor="@color/colorPrimary"
|
app:strokeColor="@color/colorPrimary"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:text="@string/abort"/>
|
android:text="@string/abort"/>
|
||||||
@ -51,7 +50,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/Button.PrimaryFull"
|
style="@style/Button.PrimaryFull"
|
||||||
app:icon="@drawable/ic_save_24dp"
|
|
||||||
android:text="@string/confirm"/>
|
android:text="@string/confirm"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user