Finish v1.46.05(493)

This commit is contained in:
Marco Elefante 2025-04-10 10:21:37 +02:00
commit 7adeee589e
5 changed files with 44 additions and 26 deletions

View File

@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
android { android {
def appVersionCode = 492 def appVersionCode = 493
def appVersionName = '1.46.04' def appVersionName = '1.46.05'
signingConfigs { signingConfigs {
release { release {

View File

@ -4,6 +4,8 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler;
import android.text.InputType;
import android.text.SpannableString; import android.text.SpannableString;
import androidx.databinding.DataBindingUtil; import androidx.databinding.DataBindingUtil;
@ -51,6 +53,7 @@ import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
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.base.DialogSimpleInputHelper;
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView; import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUView; import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUView;
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO; import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
@ -68,6 +71,9 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
@Inject @Inject
DialogInputQuantityV2View mDialogInputQuantityV2View; DialogInputQuantityV2View mDialogInputQuantityV2View;
@Inject
Handler handler;
private BottomSheetFragmentLUContentViewModel mBottomSheetFragmentLUContentViewModel; private BottomSheetFragmentLUContentViewModel mBottomSheetFragmentLUContentViewModel;
private ObservableArrayList<PickingResiListModel> mPickingResiMutableData = new ObservableArrayList<>(); private ObservableArrayList<PickingResiListModel> mPickingResiMutableData = new ObservableArrayList<>();
@ -250,10 +256,7 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
public void createNewLU() { public void createNewLU() {
this.mBindings.mainFab.close(true); this.mBindings.mainFab.close(true);
this.onLoadingStarted(); this.onLoadingStarted();
this.mViewmodel.createNewLU(null, null, this::onLoadingEnded);
this.mViewmodel.createNewLU(null, null, () -> {
this.onLoadingEnded();
});
} }
public void removeListFilter() { public void removeListFilter() {
@ -333,7 +336,7 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
mDialogInputQuantityV2View mDialogInputQuantityV2View
.setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO) .setDialogInputQuantityV2DTO(dialogInputQuantityV2DTO)
.setOnComplete(resultDTO -> { .setOnComplete(resultDTO -> {
if(resultDTO == null || resultDTO.isAborted()) { if (resultDTO == null || resultDTO.isAborted()) {
this.mViewmodel.resetMatchedRows(); this.mViewmodel.resetMatchedRows();
return; return;
} }
@ -369,7 +372,7 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
@Override @Override
public void onRowSaved() { public void onRowSaved() {
Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT) Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT)
.setBackgroundTint(getResources().getColor(R. color. green_500)) .setBackgroundTint(getResources().getColor(R.color.green_500))
.show(); .show();
} }
@ -385,21 +388,25 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
@Override @Override
public void onLUOpened(MtbColt mtbColt) { public void onLUOpened(MtbColt mtbColt) {
handler.post(() -> {
noLUPresent.set(false); noLUPresent.set(false);
Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT) Snackbar.make(mBindings.getRoot(), R.string.data_saved, Snackbar.LENGTH_SHORT)
.setBackgroundTint(getResources().getColor(R. color. green_500)) .setBackgroundTint(getResources().getColor(R.color.green_500))
.show(); .show();
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(mtbColt); this.mBottomSheetFragmentLUContentViewModel.setMtbColt(mtbColt);
});
} }
@Override @Override
public void onLUClosed() { public void onLUClosed() {
handler.post(() -> {
noLUPresent.set(true); noLUPresent.set(true);
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null); this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null);
if (this.mShouldCloseActivity) super.onBackPressed(); if (this.mShouldCloseActivity) super.onBackPressed();
});
} }
@Override @Override

View File

@ -1,5 +1,7 @@
package it.integry.integrywmsnative.view.dialogs.basket_lu; package it.integry.integrywmsnative.view.dialogs.basket_lu;
import android.os.Handler;
import dagger.Module; import dagger.Module;
import dagger.Provides; import dagger.Provides;
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer; import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
@ -10,8 +12,8 @@ import it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page2.DialogBask
public class DialogBasketLUModule { public class DialogBasketLUModule {
@Provides @Provides
DialogBasketLU_Page1_ViewModel providesDialogBasketLUPage1ViewModel(ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer) { DialogBasketLU_Page1_ViewModel providesDialogBasketLUPage1ViewModel(ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, Handler handler) {
return new DialogBasketLU_Page1_ViewModel(colliMagazzinoRESTConsumer); return new DialogBasketLU_Page1_ViewModel(colliMagazzinoRESTConsumer, handler);
} }
@Provides @Provides

View File

@ -2,6 +2,7 @@ package it.integry.integrywmsnative.view.dialogs.basket_lu;
import android.app.Dialog; import android.app.Dialog;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@ -36,7 +37,8 @@ public class DialogBasketLUView extends BaseDialogFragment {
private final RunnableArgs<MtbColt> mOnComplete; private final RunnableArgs<MtbColt> mOnComplete;
private DialogBasketLuBinding mBindings; private DialogBasketLuBinding mBindings;
@Inject
Handler handler;
public DialogBasketLUView(RunnableArgs<MtbColt> onComplete) { public DialogBasketLUView(RunnableArgs<MtbColt> onComplete) {
mOnComplete = onComplete; mOnComplete = onComplete;

View File

@ -1,6 +1,7 @@
package it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page1; package it.integry.integrywmsnative.view.dialogs.basket_lu.pages.page1;
import android.content.Context; import android.content.Context;
import android.os.Handler;
import android.view.View; import android.view.View;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
@ -30,9 +31,12 @@ public class DialogBasketLU_Page1_ViewModel extends DialogBasketLU_BaseViewModel
private final ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer; private final ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer;
private final Handler handler;
@Inject @Inject
public DialogBasketLU_Page1_ViewModel(ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer) { public DialogBasketLU_Page1_ViewModel(ColliMagazzinoRESTConsumer colliMagazzinoRESTConsumer, Handler handler) {
this.colliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer; this.colliMagazzinoRESTConsumer = colliMagazzinoRESTConsumer;
this.handler = handler;
} }
@Override @Override
@ -53,17 +57,20 @@ public class DialogBasketLU_Page1_ViewModel extends DialogBasketLU_BaseViewModel
@Override @Override
public void onShow() { public void onShow() {
this.mBinding.getRoot().requestLayout(); this.mBinding.getRoot().requestLayout();
mBinding.constraintLayout.setMaxHeight((int) (mContext.getResources().getDisplayMetrics().heightPixels * 0.75)); mBinding.constraintLayout.setMaxHeight((int) (mContext.getResources().getDisplayMetrics().heightPixels * 0.75));
colliMagazzinoRESTConsumer.retrieveBasketColli(mtbColts -> { colliMagazzinoRESTConsumer.retrieveBasketColli(mtbColts -> {
handler.post(() -> {
availableMtbColts = mtbColts; availableMtbColts = mtbColts;
if(mtbColts != null && !mtbColts.isEmpty()) initRecyclerView(availableMtbColts); if(mtbColts != null && !mtbColts.isEmpty()) initRecyclerView(availableMtbColts);
mBinding.emptyView.setVisibility(mtbColts != null && !mtbColts.isEmpty() ? View.GONE : View.VISIBLE); mBinding.emptyView.setVisibility(mtbColts != null && !mtbColts.isEmpty() ? View.GONE : View.VISIBLE);
});
}, ex -> { }, ex -> {
handler.post(() -> {
mBinding.emptyView.setVisibility(View.VISIBLE); mBinding.emptyView.setVisibility(View.VISIBLE);
}); });
});
} }
@Override @Override