in posizionamento merce in caso di necessità definizione livello posizione non si chiude la progress dialog
This commit is contained in:
parent
7206b3c37e
commit
7a3a207462
@ -91,14 +91,22 @@ public class VersamentoMerceViewModel {
|
||||
|
||||
if (!UtilityString.equalsIgnoreCase(mCurrentMtbColt.getValue().getCodMdep(), foundPosizione.getCodMdep())) {
|
||||
this.sendOnSpostamentoTraDepConfirmRequired(mCurrentMtbColt.getValue().getCodMdep(), foundPosizione.getCodMdep(), canContinue -> {
|
||||
if (canContinue) {
|
||||
updatePosizione(foundPosizione, UtilityPosizione.isPosizioneWithLivello(foundPosizione));
|
||||
} else {
|
||||
onComplete.run();
|
||||
if (canContinue) {
|
||||
if (UtilityPosizione.isPosizioneWithLivello(foundPosizione)) {
|
||||
askLivelloPosizione(foundPosizione);
|
||||
} else {
|
||||
updatePosizione(foundPosizione);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
updatePosizione(foundPosizione, UtilityPosizione.isPosizioneWithLivello(foundPosizione));
|
||||
onComplete.run();
|
||||
if (UtilityPosizione.isPosizioneWithLivello(foundPosizione)) {
|
||||
askLivelloPosizione(foundPosizione);
|
||||
} else {
|
||||
updatePosizione(foundPosizione);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -239,19 +247,18 @@ public class VersamentoMerceViewModel {
|
||||
}
|
||||
|
||||
|
||||
public void updatePosizione(MtbDepoPosizione mtbDepoPosizione, boolean shouldAskLivello) {
|
||||
|
||||
if (shouldAskLivello) {
|
||||
public void askLivelloPosizione(MtbDepoPosizione mtbDepoPosizione) {
|
||||
this.sendOnLivelloPosizioneRequired(mtbDepoPosizione, newPosizione -> {
|
||||
|
||||
if (newPosizione == null) {
|
||||
updatePosizione(mtbDepoPosizione, shouldAskLivello);
|
||||
askLivelloPosizione(mtbDepoPosizione);
|
||||
} else {
|
||||
updatePosizione(newPosizione, false);
|
||||
updatePosizione(newPosizione);
|
||||
}
|
||||
|
||||
});
|
||||
} else {
|
||||
}
|
||||
|
||||
public void updatePosizione(MtbDepoPosizione mtbDepoPosizione) {
|
||||
this.sendOnLoadingStarted();
|
||||
mColliMagazzinoRESTConsumer.changePosizione(mCurrentMtbColt.getValue(), mtbDepoPosizione, () -> {
|
||||
this.sendOnLoadingEnded();
|
||||
@ -259,8 +266,6 @@ public class VersamentoMerceViewModel {
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public MutableLiveData<MtbColt> getCurrentMtbColt() {
|
||||
return mCurrentMtbColt;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user