Fix su gestione fabbisogni

This commit is contained in:
Giuseppe Scorrano 2021-02-16 09:43:48 +01:00
parent 14035b4c92
commit 6dbc0c5894
2 changed files with 14 additions and 7 deletions

View File

@ -73,6 +73,16 @@ public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITi
.create()
.inject(this);
return mBindings.getRoot();
}
@Override
public void onStart() {
super.onStart();
this.mViewModel.setListener(this);
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
DialogAskMagazzinoProssimitaView
@ -81,14 +91,10 @@ public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITi
((IPoppableActivity) getActivity()).pop();
} else {
//Load fabbisogno
this.mViewModel.loadFabbisogno(startDate, endDate, jtbFase.getCodJfas(), codMdep, fabbisognoList -> {
startPickingActivity(fabbisognoList);
});
this.mViewModel.loadFabbisogno(startDate, endDate, jtbFase.getCodJfas(), codMdep, this::startPickingActivity);
}
})
.show(getActivity().getSupportFragmentManager(), "tag");
return mBindings.getRoot();
}
@Override
@ -150,5 +156,7 @@ public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITi
+1,
MtbColr.Causale.VERSAMENTO);
((IPoppableActivity) getActivity()).pop();
}
}

View File

@ -88,9 +88,8 @@ public class ProdFabbisognoLineeProdViewModel {
Type typeOfObjectsList = new TypeToken<ArrayList<ProdFabbisognoLineeProdDTO>>() {}.getType();
this.mSystemRESTConsumer.<List<ProdFabbisognoLineeProdDTO>>processSql(sql, typeOfObjectsList, jtbFasi -> {
onComplete.run(jtbFasi);
this.sendOnLoadingEnded();
onComplete.run(jtbFasi);
}, this::sendError);
}