Sistemato salvataggio causale in Rettifica Giacenze nel caso in cui si preme il tasto Back nella videata del collo
This commit is contained in:
parent
ade37f07d6
commit
d9844315a3
@ -61,6 +61,8 @@ public class RettificaGiacenzeViewModel {
|
||||
private String mCurrentCodMdep;
|
||||
private boolean mIsCreatedLU;
|
||||
|
||||
private boolean mAnyEditDone = false;
|
||||
|
||||
@Inject
|
||||
public RettificaGiacenzeViewModel(ArticoloRESTConsumer articoloRESTConsumer,
|
||||
ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer,
|
||||
@ -350,6 +352,8 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
|
||||
this.mAnyEditDone = true;
|
||||
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
@ -380,6 +384,8 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
|
||||
this.mAnyEditDone = true;
|
||||
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
@ -417,9 +423,11 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
if(shouldChangePosition) {
|
||||
this.savePosizione(mtbDepoPosizione, () -> {
|
||||
this.mAnyEditDone = false;
|
||||
postSaveBehaviour(onComplete);
|
||||
});
|
||||
} else {
|
||||
this.mAnyEditDone = false;
|
||||
postSaveBehaviour(onComplete);
|
||||
}
|
||||
|
||||
@ -427,7 +435,7 @@ public class RettificaGiacenzeViewModel {
|
||||
}, this::sendError);
|
||||
};
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(mDefaultCausale)) {
|
||||
if (!UtilityString.isNullOrEmpty(mDefaultCausale) && (saveCausale || mAnyEditDone)) {
|
||||
this.saveCausaleRettificaGiacenze(saveAction);
|
||||
} else {
|
||||
saveAction.run();
|
||||
@ -564,6 +572,8 @@ public class RettificaGiacenzeViewModel {
|
||||
this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
||||
this.mCurrentMtbColt.getMtbColr().add(mtbColrToUpdate);
|
||||
|
||||
this.mAnyEditDone = true;
|
||||
|
||||
this.sendOnRowSaved();
|
||||
},
|
||||
this::sendError
|
||||
@ -602,6 +612,8 @@ public class RettificaGiacenzeViewModel {
|
||||
this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
||||
this.mCurrentMtbColt.getMtbColr().add(mtbColr);
|
||||
|
||||
this.mAnyEditDone = true;
|
||||
|
||||
this.sendOnRowSaved();
|
||||
this.sendOnLoadingEnded();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user