Ottimizzazione funzione rettifica giacenza. Evitare di uscire dalla gestione dopo aver rettificato una pedana.
This commit is contained in:
parent
b9f5baae5f
commit
c11858aea2
@ -37,7 +37,6 @@ import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
|||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||||
import it.integry.integrywmsnative.core.interfaces.ILifecycleFragment;
|
import it.integry.integrywmsnative.core.interfaces.ILifecycleFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
|
|
||||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||||
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;
|
||||||
@ -319,18 +318,18 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
this.currentMtbColtObs.set(null);
|
this.currentMtbColtObs.set(null);
|
||||||
thereIsAnOpenedUL.set(false);
|
thereIsAnOpenedUL.set(false);
|
||||||
|
|
||||||
|
this.mViewModel.requestLU();
|
||||||
if (getActivity() != null) ((IPoppableActivity) getActivity()).pop();
|
/*if (getActivity() != null) ((IPoppableActivity) getActivity()).pop();*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
public void onMtbColrDeleteRequest(RunnableArgs<Boolean> onComplete) {
|
||||||
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
String text = getResources().getString(R.string.alert_delete_mtb_colr);
|
||||||
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
DialogSimpleMessageView.makeWarningDialog(new SpannableString(text),
|
||||||
null,
|
null,
|
||||||
() -> onComplete.run(true),
|
() -> onComplete.run(true),
|
||||||
() -> onComplete.run(false)
|
() -> onComplete.run(false)
|
||||||
)
|
)
|
||||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,11 +447,11 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
@Override
|
@Override
|
||||||
public void onLUPrintRequest(RunnableArgs<Boolean> onComplete) {
|
public void onLUPrintRequest(RunnableArgs<Boolean> onComplete) {
|
||||||
DialogSimpleMessageView.makeInfoDialog(
|
DialogSimpleMessageView.makeInfoDialog(
|
||||||
getActivity().getResources().getString(R.string.action_print_ul),
|
getActivity().getResources().getString(R.string.action_print_ul),
|
||||||
new SpannableString(getActivity().getResources().getString(R.string.ask_print_message)),
|
new SpannableString(getActivity().getResources().getString(R.string.ask_print_message)),
|
||||||
null,
|
null,
|
||||||
() -> onComplete.run(true),
|
() -> onComplete.run(true),
|
||||||
() -> onComplete.run(false))
|
() -> onComplete.run(false))
|
||||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -460,11 +459,11 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
@Override
|
@Override
|
||||||
public void onLUPrintError(Exception ex, Runnable onComplete) {
|
public void onLUPrintError(Exception ex, Runnable onComplete) {
|
||||||
DialogSimpleMessageView.makeErrorDialog(
|
DialogSimpleMessageView.makeErrorDialog(
|
||||||
new SpannableString(ex.getMessage()),
|
new SpannableString(ex.getMessage()),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
R.string.button_ignore_print,
|
R.string.button_ignore_print,
|
||||||
onComplete)
|
onComplete)
|
||||||
.show(getActivity().getSupportFragmentManager(), "tag");
|
.show(getActivity().getSupportFragmentManager(), "tag");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -85,15 +85,18 @@ public class RettificaGiacenzeViewModel {
|
|||||||
|
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
this.sendOnLUOpenRequest((mtbColt, created) -> {
|
this.requestLU();
|
||||||
this.mCurrentMtbColt = mtbColt;
|
|
||||||
this.mIsCreatedLU = created;
|
|
||||||
|
|
||||||
this.sendLUOpened(mtbColt);
|
|
||||||
});
|
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void requestLU() {
|
||||||
|
this.sendOnLUOpenRequest((mtbColt, created) -> {
|
||||||
|
this.mCurrentMtbColt = mtbColt;
|
||||||
|
this.mIsCreatedLU = created;
|
||||||
|
|
||||||
|
this.sendLUOpened(mtbColt);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public RettificaGiacenzeViewModel setListener(RettificaGiacenzeViewModel.Listener listener) {
|
public RettificaGiacenzeViewModel setListener(RettificaGiacenzeViewModel.Listener listener) {
|
||||||
this.mListener = listener;
|
this.mListener = listener;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user