Finish v1.46.05(493)
This commit is contained in:
commit
7adeee589e
@ -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 {
|
||||||
|
|||||||
@ -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) {
|
||||||
noLUPresent.set(false);
|
handler.post(() -> {
|
||||||
|
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() {
|
||||||
noLUPresent.set(true);
|
handler.post(() -> {
|
||||||
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null);
|
noLUPresent.set(true);
|
||||||
|
this.mBottomSheetFragmentLUContentViewModel.setMtbColt(null);
|
||||||
|
|
||||||
if (this.mShouldCloseActivity) super.onBackPressed();
|
if (this.mShouldCloseActivity) super.onBackPressed();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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;
|
||||||
@ -52,7 +54,7 @@ public class DialogBasketLUView extends BaseDialogFragment {
|
|||||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||||
mBindings = DialogBasketLuBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
mBindings = DialogBasketLuBinding.inflate(LayoutInflater.from(requireContext()), null, false);
|
||||||
|
|
||||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||||
.setView(mBindings.getRoot())
|
.setView(mBindings.getRoot())
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.create();
|
.create();
|
||||||
|
|||||||
@ -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,16 +57,19 @@ 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 -> {
|
||||||
availableMtbColts = mtbColts;
|
handler.post(() -> {
|
||||||
if(mtbColts != null && !mtbColts.isEmpty()) initRecyclerView(availableMtbColts);
|
availableMtbColts = mtbColts;
|
||||||
|
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 -> {
|
||||||
mBinding.emptyView.setVisibility(View.VISIBLE);
|
handler.post(() -> {
|
||||||
|
mBinding.emptyView.setVisibility(View.VISIBLE);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user