Messi a video gli articoli disponibili nel documento
This commit is contained in:
parent
8fe0a1fd07
commit
968eed44cb
@ -115,4 +115,6 @@ public class BaseDialogFragment extends DialogFragment implements DialogInterfac
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,7 +48,6 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
|||||||
private FragmentDocInterniBinding mBinding;
|
private FragmentDocInterniBinding mBinding;
|
||||||
private DocInterniSetupDTO mDocInterniSetupDTO;
|
private DocInterniSetupDTO mDocInterniSetupDTO;
|
||||||
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
private final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||||
private boolean dialogInitialized = false;
|
|
||||||
|
|
||||||
|
|
||||||
public DocInterniFragment() {
|
public DocInterniFragment() {
|
||||||
@ -80,8 +79,10 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
|||||||
|
|
||||||
mViewModel.setListeners(this);
|
mViewModel.setListeners(this);
|
||||||
mBinding.setLifecycleOwner(this);
|
mBinding.setLifecycleOwner(this);
|
||||||
|
|
||||||
mBinding.setView(this);
|
mBinding.setView(this);
|
||||||
mBinding.setViewModel(mViewModel);
|
mBinding.setViewModel(mViewModel);
|
||||||
|
|
||||||
mViewModel.mtbGrup.observe(getViewLifecycleOwner(), mtbGrup -> mViewModel.fetchProducts());
|
mViewModel.mtbGrup.observe(getViewLifecycleOwner(), mtbGrup -> mViewModel.fetchProducts());
|
||||||
mViewModel.dtbTipi.observe(getViewLifecycleOwner(), dtbTipi -> mViewModel.fetchDocuments());
|
mViewModel.dtbTipi.observe(getViewLifecycleOwner(), dtbTipi -> mViewModel.fetchDocuments());
|
||||||
this.initRecyclerView();
|
this.initRecyclerView();
|
||||||
@ -110,8 +111,7 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
|||||||
@Override
|
@Override
|
||||||
public void onDocInterniSetupFetched(DocInterniSetupDTO docInterniSetupDTO) {
|
public void onDocInterniSetupFetched(DocInterniSetupDTO docInterniSetupDTO) {
|
||||||
this.mDocInterniSetupDTO = docInterniSetupDTO;
|
this.mDocInterniSetupDTO = docInterniSetupDTO;
|
||||||
this.dialogInitialized = true;
|
this.openDocumentSelectionDialog();
|
||||||
this.selectDocInfo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -125,11 +125,11 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (selection.getGruppoArt() != null) {
|
// if (selection.getGruppoArt() != null) {
|
||||||
mBinding.mtbGrpContainer.setVisibility(View.VISIBLE);
|
// mBinding.mtbGrpContainer.setVisibility(View.VISIBLE);
|
||||||
} else {
|
// } else {
|
||||||
mBinding.mtbGrpContainer.setVisibility(View.GONE);
|
// mBinding.mtbGrpContainer.setVisibility(View.GONE);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (selection.isDocumentRequired()) {
|
if (selection.isDocumentRequired()) {
|
||||||
mBinding.docContainer.setVisibility(View.VISIBLE);
|
mBinding.docContainer.setVisibility(View.VISIBLE);
|
||||||
@ -150,15 +150,16 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
|||||||
this.mOnPreDestroyList.add(onPreDestroy);
|
this.mOnPreDestroyList.add(onPreDestroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void selectDocInfo() {
|
public void openDocumentSelectionDialog() {
|
||||||
if (this.dialogInitialized) {
|
DialogSelectDocInfoView.newInstance(
|
||||||
|
mDocInterniSetupDTO,
|
||||||
|
this::onDocDetailsChanged,
|
||||||
|
this::popMe)
|
||||||
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void showInfoArtDialog() {
|
||||||
|
|
||||||
DialogSelectDocInfoView.newInstance(
|
|
||||||
mDocInterniSetupDTO,
|
|
||||||
this::onDocDetailsChanged,
|
|
||||||
this::popMe)
|
|
||||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initRecyclerView() {
|
private void initRecyclerView() {
|
||||||
|
|||||||
@ -50,6 +50,7 @@ public class DialogSelectDocInfoView extends BaseDialogFragment {
|
|||||||
private final RunnableArgs<DialogSelectDocInfoResponseDTO> onConfirm;
|
private final RunnableArgs<DialogSelectDocInfoResponseDTO> onConfirm;
|
||||||
private final Runnable onAbort;
|
private final Runnable onAbort;
|
||||||
|
|
||||||
|
private boolean completed = false;
|
||||||
|
|
||||||
public ObservableField<TipoDocDTO> selectedTipoDoc = new ObservableField<>();
|
public ObservableField<TipoDocDTO> selectedTipoDoc = new ObservableField<>();
|
||||||
public ObservableField<GruppoArticoloDTO> selectedGroupArt = new ObservableField<>();
|
public ObservableField<GruppoArticoloDTO> selectedGroupArt = new ObservableField<>();
|
||||||
@ -95,7 +96,7 @@ public class DialogSelectDocInfoView extends BaseDialogFragment {
|
|||||||
|
|
||||||
mViewModel.setFornitori(mDocInputData.getFornitori());
|
mViewModel.setFornitori(mDocInputData.getFornitori());
|
||||||
|
|
||||||
var cancelable = true;
|
var cancelable = false;
|
||||||
|
|
||||||
var alertDialog = new MaterialAlertDialogBuilder(this.mContext)
|
var alertDialog = new MaterialAlertDialogBuilder(this.mContext)
|
||||||
.setView(mBindings.getRoot())
|
.setView(mBindings.getRoot())
|
||||||
@ -110,6 +111,8 @@ public class DialogSelectDocInfoView extends BaseDialogFragment {
|
|||||||
|
|
||||||
alertDialog.setOnShowListener(this);
|
alertDialog.setOnShowListener(this);
|
||||||
alertDialog.setCanceledOnTouchOutside(cancelable);
|
alertDialog.setCanceledOnTouchOutside(cancelable);
|
||||||
|
alertDialog.setOnDismissListener(this);
|
||||||
|
|
||||||
|
|
||||||
return alertDialog;
|
return alertDialog;
|
||||||
}
|
}
|
||||||
@ -135,6 +138,7 @@ public class DialogSelectDocInfoView extends BaseDialogFragment {
|
|||||||
mBindings.inputNoteLayout.setError(null);
|
mBindings.inputNoteLayout.setError(null);
|
||||||
|
|
||||||
mViewModel.validate();
|
mViewModel.validate();
|
||||||
|
completed = true;
|
||||||
alertDialog.dismiss();
|
alertDialog.dismiss();
|
||||||
|
|
||||||
if (this.onConfirm != null)
|
if (this.onConfirm != null)
|
||||||
@ -174,6 +178,7 @@ public class DialogSelectDocInfoView extends BaseDialogFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void initBindings() {
|
private void initBindings() {
|
||||||
this.isFornitoreRequired.set(mViewModel.isFornitoreRequired().getValue());
|
this.isFornitoreRequired.set(mViewModel.isFornitoreRequired().getValue());
|
||||||
mViewModel.isFornitoreRequired().observe(this, val -> this.isFornitoreRequired.set(val));
|
mViewModel.isFornitoreRequired().observe(this, val -> this.isFornitoreRequired.set(val));
|
||||||
@ -227,7 +232,7 @@ public class DialogSelectDocInfoView extends BaseDialogFragment {
|
|||||||
.getOriginalModel());
|
.getOriginalModel());
|
||||||
});
|
});
|
||||||
|
|
||||||
var arrayAdapterFornitori = new DialogSelectDocInfo_FornitoreAdapter(mContext, R.layout.array_adapter_single_item, mDocInputData.getFornitori());
|
var arrayAdapterFornitori = new DialogSelectDocInfo_FornitoreAdapter(mContext, R.layout.array_adapter_single_item, mViewModel.getAvailableFornitori());
|
||||||
mBindings.filledExposedDropdownCodAnagList.setAdapter(arrayAdapterFornitori);
|
mBindings.filledExposedDropdownCodAnagList.setAdapter(arrayAdapterFornitori);
|
||||||
mBindings.filledExposedDropdownCodAnagList.setOnItemClickListener((adapterView, view, i, l) -> {
|
mBindings.filledExposedDropdownCodAnagList.setOnItemClickListener((adapterView, view, i, l) -> {
|
||||||
this.selectedFornitore.set(
|
this.selectedFornitore.set(
|
||||||
@ -239,4 +244,11 @@ public class DialogSelectDocInfoView extends BaseDialogFragment {
|
|||||||
mBindings.filledExposedDropdownNote.setAdapter(arrayAdapterNote);
|
mBindings.filledExposedDropdownNote.setAdapter(arrayAdapterNote);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||||
|
super.onDismiss(dialog);
|
||||||
|
|
||||||
|
if(!completed)
|
||||||
|
this.onAbort.run();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -54,6 +54,10 @@ public class DialogSelectDocInfoViewModel extends ViewModel {
|
|||||||
val.getGestione().equals("L")));
|
val.getGestione().equals("L")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MutableLiveData<List<FornitoreDTO>> getAvailableFornitori() {
|
||||||
|
return availableFornitori;
|
||||||
|
}
|
||||||
|
|
||||||
public void setFornitori(List<FornitoreDTO> fornitori) {
|
public void setFornitori(List<FornitoreDTO> fornitori) {
|
||||||
tipoDoc.observeForever(val -> {
|
tipoDoc.observeForever(val -> {
|
||||||
availableFornitori.postValue(Stream.of(fornitori)
|
availableFornitori.postValue(Stream.of(fornitori)
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import android.content.Context;
|
|||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
@ -13,17 +14,20 @@ import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
|||||||
|
|
||||||
public class DialogSelectDocInfo_FornitoreAdapter extends ArrayAdapter<DialogSelectDocInfo_FornitoreAdapter.ListModel> {
|
public class DialogSelectDocInfo_FornitoreAdapter extends ArrayAdapter<DialogSelectDocInfo_FornitoreAdapter.ListModel> {
|
||||||
|
|
||||||
public DialogSelectDocInfo_FornitoreAdapter(@NonNull Context context, int resource, List<FornitoreDTO> inputData) {
|
public DialogSelectDocInfo_FornitoreAdapter(@NonNull Context context, int resource, MutableLiveData<List<FornitoreDTO>> inputData) {
|
||||||
super(context, resource);
|
super(context, resource);
|
||||||
|
|
||||||
if (inputData == null) return;
|
if (inputData == null) return;
|
||||||
|
|
||||||
List<ListModel> mDataset = Stream.of(inputData)
|
inputData.observeForever(data -> {
|
||||||
.map(x -> new ListModel()
|
List<ListModel> mDataset = Stream.of(data)
|
||||||
.setOriginalModel(x))
|
.map(x -> new ListModel()
|
||||||
.toList();
|
.setOriginalModel(x))
|
||||||
|
.toList();
|
||||||
|
|
||||||
addAll(mDataset);
|
clear();
|
||||||
|
addAll(mDataset);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ListModel {
|
public static class ListModel {
|
||||||
|
|||||||
@ -47,6 +47,7 @@ import it.integry.integrywmsnative.ui.FabMenuCustomAnimations;
|
|||||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalView;
|
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArtsView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||||
|
|
||||||
@ -94,10 +95,12 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
|||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_contab_doc_interni_edit);
|
binding = DataBindingUtil.setContentView(this, R.layout.activity_contab_doc_interni_edit);
|
||||||
|
|
||||||
MainApplication.appComponent
|
MainApplication.appComponent
|
||||||
.docInterniEditFormComponent()
|
.docInterniEditFormComponent()
|
||||||
.create()
|
.create()
|
||||||
.inject(this);
|
.inject(this);
|
||||||
|
|
||||||
SqlMtbColt document = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_DOCUMENT));
|
SqlMtbColt document = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_DOCUMENT));
|
||||||
List<DocumentoArtDTO> productList = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_PRODUCTS_LIST));
|
List<DocumentoArtDTO> productList = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_PRODUCTS_LIST));
|
||||||
TipoDocDTO docType = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_TIPO_DOC));
|
TipoDocDTO docType = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_TIPO_DOC));
|
||||||
@ -117,11 +120,11 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
|||||||
SqlMtbColt document = this.viewModel.getDocument();
|
SqlMtbColt document = this.viewModel.getDocument();
|
||||||
this.codDtip.set(document.getCodDtipProvv());
|
this.codDtip.set(document.getCodDtipProvv());
|
||||||
this.note.set(document.getAnnotazioni());
|
this.note.set(document.getAnnotazioni());
|
||||||
|
|
||||||
if (document.getCodMgrp() != null) {
|
if (document.getCodMgrp() != null) {
|
||||||
this.codMgrp.set(document.getCodMgrp());
|
this.codMgrp.set(document.getCodMgrp());
|
||||||
} else {
|
|
||||||
binding.mtbGrupContainer.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.getCodAnag() != null) {
|
if (document.getCodAnag() != null) {
|
||||||
this.codAnag.set(document.getCodAnag() + (document.getCodVdes() != null ? " - " + document.getCodVdes() : ""));
|
this.codAnag.set(document.getCodAnag() + (document.getCodVdes() != null ? " - " + document.getCodVdes() : ""));
|
||||||
} else {
|
} else {
|
||||||
@ -131,7 +134,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
|||||||
this.documentHeader.set(String.format(this.getString(R.string.doc_interni_doc_header), document.getId(), document.getCodDtipProvv()));
|
this.documentHeader.set(String.format(this.getString(R.string.doc_interni_doc_header), document.getId(), document.getCodDtipProvv()));
|
||||||
|
|
||||||
if (document.getNumDoc() != null && document.getDataDoc() != null) {
|
if (document.getNumDoc() != null && document.getDataDoc() != null) {
|
||||||
this.documentRifHeader.set(String.format(this.getString(R.string.doc_testata), document.getNumDoc().toString(), document.getDataDoc()));
|
this.documentRifHeader.set(String.format(this.getString(R.string.doc_testata), document.getNumDoc().toString(), UtilityDate.formatDate(document.getDataDoc(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)));
|
||||||
} else {
|
} else {
|
||||||
this.binding.docRifLayout.setVisibility(View.GONE);
|
this.binding.docRifLayout.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@ -349,4 +352,20 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
|||||||
.findFirstOrElse(null);
|
.findFirstOrElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void showInfoArtDialog() {
|
||||||
|
var listaMtbAart = Stream.of(this.viewModel.getProductsList())
|
||||||
|
.map(x -> new MtbAart()
|
||||||
|
.setCodMart(x.getCodMart())
|
||||||
|
.setUntMis(x.getUntMis())
|
||||||
|
.setDescrizione(x.getDescrizione())
|
||||||
|
.setDescrizioneEstesa(x.getDescrizione())
|
||||||
|
.setQtaCnf(x.getQtaCnf()))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
new DialogChooseArtFromListaArtsView(false, listaMtbAart, null)
|
||||||
|
.show(getSupportFragmentManager(), "tag");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -264,6 +264,10 @@ public class DocInterniEditFormViewModel {
|
|||||||
return document.getValue();
|
return document.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<DocumentoArtDTO> getProductsList() {
|
||||||
|
return productsList;
|
||||||
|
}
|
||||||
|
|
||||||
public void setProductsList(List<DocumentoArtDTO> productsList) {
|
public void setProductsList(List<DocumentoArtDTO> productsList) {
|
||||||
this.productsList = productsList;
|
this.productsList = productsList;
|
||||||
this.flattedBarcodesCodMarts = new HashMap<>();
|
this.flattedBarcodesCodMarts = new HashMap<>();
|
||||||
|
|||||||
@ -301,7 +301,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed) {
|
public void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed) {
|
||||||
new DialogChooseArtFromListaArtsView(artList, onArtChoosed)
|
new DialogChooseArtFromListaArtsView(true, artList, onArtChoosed)
|
||||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -941,7 +941,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onChooseArtRequest(List<MtbAart> artsList, RunnableArgs<MtbAart> onComplete) {
|
public void onChooseArtRequest(List<MtbAart> artsList, RunnableArgs<MtbAart> onComplete) {
|
||||||
new DialogChooseArtFromListaArtsView(artsList, onComplete)
|
new DialogChooseArtFromListaArtsView(true, artsList, onComplete)
|
||||||
.show(getSupportFragmentManager(), "tag");
|
.show(getSupportFragmentManager(), "tag");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts;
|
package it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import androidx.databinding.DataBindingUtil;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.databinding.DataBindingUtil;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
@ -18,7 +19,7 @@ public class DialogChooseArtFromListaArtsAdapter extends RecyclerView.Adapter<Di
|
|||||||
protected Context mContext;
|
protected Context mContext;
|
||||||
|
|
||||||
private List<MtbAart> mDataset;
|
private List<MtbAart> mDataset;
|
||||||
private IRecyclerItemClicked<MtbAart> mOnItemClickListener;
|
private final IRecyclerItemClicked<MtbAart> mOnItemClickListener;
|
||||||
|
|
||||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
protected DialogChooseArtFromListaArtItemModelBinding mViewDataBinding;
|
protected DialogChooseArtFromListaArtItemModelBinding mViewDataBinding;
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import java.util.List;
|
|||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.interfaces.IRecyclerItemClicked;
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.databinding.DialogChooseArtFromListaArtBinding;
|
import it.integry.integrywmsnative.databinding.DialogChooseArtFromListaArtBinding;
|
||||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||||
@ -23,12 +24,15 @@ import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
|||||||
public class DialogChooseArtFromListaArtsView extends BaseDialogFragment {
|
public class DialogChooseArtFromListaArtsView extends BaseDialogFragment {
|
||||||
|
|
||||||
|
|
||||||
|
private final boolean mEnableSelection;
|
||||||
private final List<MtbAart> mListaArts;
|
private final List<MtbAart> mListaArts;
|
||||||
private final RunnableArgs<MtbAart> mOnItemChoosed;
|
private final RunnableArgs<MtbAart> mOnItemChoosed;
|
||||||
|
|
||||||
|
|
||||||
public DialogChooseArtFromListaArtsView(List<MtbAart> listaArts, RunnableArgs<MtbAart> onItemChoosed) {
|
public DialogChooseArtFromListaArtsView(boolean enableSelection, List<MtbAart> listaArts, RunnableArgs<MtbAart> onItemChoosed) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
this.mEnableSelection = enableSelection;
|
||||||
this.mListaArts = listaArts;
|
this.mListaArts = listaArts;
|
||||||
this.mOnItemChoosed = onItemChoosed;
|
this.mOnItemChoosed = onItemChoosed;
|
||||||
}
|
}
|
||||||
@ -39,6 +43,9 @@ public class DialogChooseArtFromListaArtsView extends BaseDialogFragment {
|
|||||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||||
var binding = DialogChooseArtFromListaArtBinding.inflate(LayoutInflater.from(requireContext()));
|
var binding = DialogChooseArtFromListaArtBinding.inflate(LayoutInflater.from(requireContext()));
|
||||||
|
|
||||||
|
binding.titleText.setText(this.mEnableSelection ? R.string.dialog_choose_art_from_lista_art :
|
||||||
|
R.string.articoli_disponibili);
|
||||||
|
|
||||||
initRecyclerView(binding, mListaArts);
|
initRecyclerView(binding, mListaArts);
|
||||||
|
|
||||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||||
@ -60,14 +67,16 @@ public class DialogChooseArtFromListaArtsView extends BaseDialogFragment {
|
|||||||
itemDecorator.setDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.divider));
|
itemDecorator.setDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.divider));
|
||||||
binding.dialogChooseArtFromListaArtMainList.addItemDecoration(itemDecorator);
|
binding.dialogChooseArtFromListaArtMainList.addItemDecoration(itemDecorator);
|
||||||
|
|
||||||
DialogChooseArtFromListaArtsAdapter mCurrentAdapter = new DialogChooseArtFromListaArtsAdapter(requireContext(), dataset,
|
IRecyclerItemClicked<MtbAart> onItemClickListener = (item, position) -> {
|
||||||
((item, position) -> {
|
if (mOnItemChoosed != null) {
|
||||||
if (mOnItemChoosed != null) {
|
mOnItemChoosed.run(item);
|
||||||
mOnItemChoosed.run(item);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
dismiss();
|
dismiss();
|
||||||
}));
|
};
|
||||||
|
|
||||||
|
DialogChooseArtFromListaArtsAdapter mCurrentAdapter = new DialogChooseArtFromListaArtsAdapter(
|
||||||
|
requireContext(), dataset, this.mEnableSelection ? onItemClickListener : null);
|
||||||
binding.dialogChooseArtFromListaArtMainList.setAdapter(mCurrentAdapter);
|
binding.dialogChooseArtFromListaArtMainList.setAdapter(mCurrentAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:fab="http://schemas.android.com/apk/res-auto">
|
xmlns:fab="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
@ -24,15 +24,15 @@
|
|||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:id="@+id/linearLayout2"
|
android:id="@+id/linearLayout2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/full_white"
|
android:background="@color/full_white"
|
||||||
android:orientation="vertical"
|
android:descendantFocusability="blocksDescendants"
|
||||||
android:descendantFocusability="blocksDescendants">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/full_white"
|
android:background="@color/full_white"
|
||||||
@ -51,188 +51,155 @@
|
|||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/toolbar_title"
|
android:id="@+id/toolbar_title"
|
||||||
|
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:text="@string/edit_doc"
|
android:layout_gravity="start"
|
||||||
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
|
tools:text="@string/edit_doc" />
|
||||||
android:layout_gravity="start" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/add_extra_items_toolbar"
|
android:id="@+id/add_extra_items_toolbar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:src="@drawable/ic_search_black_24dp"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:onClick="@{()->view.manualSearch()}"
|
android:onClick="@{()->view.manualSearch()}"
|
||||||
|
android:src="@drawable/ic_search_black_24dp"
|
||||||
android:tint="@color/colorPrimaryGray" />
|
android:tint="@color/colorPrimaryGray" />
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
</it.integry.integrywmsnative.ui.ElevatedToolbar>
|
</it.integry.integrywmsnative.ui.ElevatedToolbar>
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:layout_marginRight="8dp"
|
android:layout_marginRight="8dp"
|
||||||
android:background="@drawable/gray_detail_background_round8"
|
android:background="@drawable/gray_detail_background_round16"
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="vertical"
|
||||||
|
android:layout_toStartOf="@id/info_arts_button"
|
||||||
|
android:layout_alignParentStart="true">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/document_label"
|
android:orientation="horizontal">
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/order_identifier"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/document_label"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/order_identifier"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:binding="@{view.documentHeader}"
|
||||||
|
tools:text="#documentId" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/doc_rif_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@android:color/black"
|
android:orientation="horizontal">
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:binding="@{view.documentHeader}"
|
|
||||||
tools:text="#documentId" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="match_parent"
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/document_rif_label"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/document_rif"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:binding="@{view.documentRifHeader}"
|
||||||
|
tools:text="#documentId" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/supplier_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/fornitore"
|
||||||
|
android:textColor="@android:color/black" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/cod_anag"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textStyle="italic"
|
||||||
|
app:binding="@{view.codAnag}"
|
||||||
|
tools:text="F000 - 01" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/prod_count"
|
||||||
|
android:textColor="@android:color/black" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/count_art_ord"
|
||||||
|
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:binding="@{view.prodsCount}"
|
||||||
|
tools:text="10" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
|
android:id="@+id/info_arts_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:layout_alignParentEnd="true"
|
||||||
|
android:src="@drawable/ic_information_outline_24dp"
|
||||||
|
app:singleClick="@{() -> view.showInfoArtDialog()}" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
</RelativeLayout>
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/doc_type"
|
|
||||||
android:textColor="@android:color/black" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/cod_dtip"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:textStyle="italic"
|
|
||||||
app:binding="@{view.codDtip}"
|
|
||||||
tools:text="CodDtip" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/mtb_grup_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/art_group"
|
|
||||||
android:textColor="@android:color/black" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/cod_mgrp"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textStyle="italic"
|
|
||||||
app:binding="@{view.codMgrp}"
|
|
||||||
tools:text="CodMgrp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/doc_rif_layout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/document_rif_label"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/document_rif"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:binding="@{view.documentRifHeader}"
|
|
||||||
tools:text="#documentId" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/supplier_layout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/fornitore"
|
|
||||||
android:textColor="@android:color/black" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/cod_anag"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:textStyle="italic"
|
|
||||||
app:binding="@{view.codAnag}"
|
|
||||||
tools:text="F000 - 01" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/prod_count"
|
|
||||||
android:textColor="@android:color/black" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/count_art_ord"
|
|
||||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
app:binding="@{view.prodsCount}"
|
|
||||||
tools:text="10" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
@ -244,14 +211,14 @@
|
|||||||
android:paddingStart="2dp"
|
android:paddingStart="2dp"
|
||||||
android:paddingEnd="2dp" />
|
android:paddingEnd="2dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:id="@+id/scan_art_spinner"
|
android:id="@+id/scan_art_spinner"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:visibility="visible"
|
android:orientation="horizontal"
|
||||||
android:orientation="horizontal">
|
android:visibility="visible">
|
||||||
|
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
@ -261,20 +228,20 @@
|
|||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="@style/AppTheme.NewMaterial.Text"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginEnd="12dp"
|
android:layout_marginEnd="12dp"
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
style="@style/AppTheme.NewMaterial.Text"
|
android:text="@string/scan_item"
|
||||||
android:text="@string/scan_item" />
|
android:textSize="16sp" />
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
<com.github.clans.fab.FloatingActionMenu
|
<com.github.clans.fab.FloatingActionMenu
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
app:cardElevation="0dp">
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
@ -25,7 +25,7 @@
|
|||||||
android:src="@drawable/ic_error_white_24dp"
|
android:src="@drawable/ic_error_white_24dp"
|
||||||
app:tint="?colorPrimary" />
|
app:tint="?colorPrimary" />
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/title_text"
|
android:id="@+id/title_text"
|
||||||
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -42,7 +42,7 @@
|
|||||||
tools:itemCount="5"/>
|
tools:itemCount="5"/>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|||||||
@ -38,176 +38,142 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="8dp">
|
android:paddingTop="8dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:layout_marginRight="8dp"
|
android:layout_marginRight="8dp"
|
||||||
android:background="@drawable/gray_detail_background_round8"
|
android:background="@drawable/gray_detail_background_round16"
|
||||||
android:orientation="vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="8dp"
|
android:orientation="horizontal">
|
||||||
android:text="@string/cod_dtip_name"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/cod_dtip"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:text="@string/cod_dtip_name"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/cod_dtip"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{viewModel.dtbTipi.codDtip}"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="114" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/desc_tipo_doc"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="@{viewModel.dtbTipi.descrizione}"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="PERDITA" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/cod_anag_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{viewModel.dtbTipi.codDtip}"
|
android:orientation="horizontal">
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
tools:text="114" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/desc_tipo_doc"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:text="@string/cod_anag_name"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/cod_anag"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="@{viewModel.fornitore.label}"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="F0000 - CARELLI" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/doc_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
android:orientation="horizontal">
|
||||||
android:text="@{viewModel.dtbTipi.descrizione}"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:ellipsize="end"
|
|
||||||
tools:text="PERDITA" />
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/mtb_grp_container"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginEnd="8dp"
|
||||||
android:orientation="horizontal">
|
android:text="@string/document_label"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/document"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="n. 123 del 12/11/2021" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="8dp"
|
android:orientation="horizontal">
|
||||||
android:text="@string/cod_mgrp_name"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/cod_mgrp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginEnd="8dp"
|
||||||
android:text="@{viewModel.mtbGrup.codMgrp}"
|
android:text="@string/articoli_disponibili"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textSize="16sp"
|
android:textSize="14sp" />
|
||||||
android:textStyle="bold"
|
|
||||||
tools:text="06" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/desc_group_art"
|
android:id="@+id/count_arts"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
android:textColor="@android:color/black"
|
||||||
android:text="@{viewModel.mtbGrup.descrizione}"
|
android:textSize="14sp"
|
||||||
android:textColor="@android:color/black"
|
android:textStyle="bold"
|
||||||
android:textSize="16sp"
|
app:binding="@{viewModel.artsSize}"
|
||||||
android:maxLines="1"
|
tools:text="0" />
|
||||||
android:ellipsize="end"
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
android:textStyle="bold"
|
|
||||||
tools:text="FOOD" />
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:id="@+id/cod_anag_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:text="@string/cod_anag_name"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/cod_anag"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{viewModel.fornitore.label}"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:ellipsize="end"
|
|
||||||
tools:text="F0000 - CARELLI" />
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:id="@+id/doc_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:text="@string/document_label"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/document"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:ellipsize="end"
|
|
||||||
tools:text="n. 123 del 12/11/2021" />
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
</RelativeLayout>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:text="@string/articoli_disponibili"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/count_arts"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="@android:color/black"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:binding="@{viewModel.artsSize}"
|
|
||||||
tools:text="0" />
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/doc_interni_main_list"
|
android:id="@+id/doc_interni_main_list"
|
||||||
@ -309,14 +275,14 @@
|
|||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/main_fab"
|
android:id="@+id/main_fab"
|
||||||
|
style="?attr/floatingActionButtonPrimaryStyle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
app:srcCompat="@drawable/ic_add_24dp"
|
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
app:singleClick="@{viewModel::newDocument}"
|
app:singleClick="@{viewModel::newDocument}"
|
||||||
style="?attr/floatingActionButtonPrimaryStyle" />
|
app:srcCompat="@drawable/ic_add_24dp" />
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
@ -393,7 +393,7 @@
|
|||||||
<string name="fornitore">Fornitore</string>
|
<string name="fornitore">Fornitore</string>
|
||||||
<string name="cod_anag_name">Fornitore</string>
|
<string name="cod_anag_name">Fornitore</string>
|
||||||
<string name="delete_document">Elimina documento</string>
|
<string name="delete_document">Elimina documento</string>
|
||||||
<string name="document_rif_label">Documento rif. :</string>
|
<string name="document_rif_label">Rif:</string>
|
||||||
<string name="gg_scadenza">Shelf life:</string>
|
<string name="gg_scadenza">Shelf life:</string>
|
||||||
<string name="selling_prediction">Previsione di vendita</string>
|
<string name="selling_prediction">Previsione di vendita</string>
|
||||||
<string name="giacenza">Giacenza</string>
|
<string name="giacenza">Giacenza</string>
|
||||||
|
|||||||
@ -399,7 +399,7 @@
|
|||||||
<string name="fornitore">Supplier</string>
|
<string name="fornitore">Supplier</string>
|
||||||
<string name="cod_anag_name">Supplier</string>
|
<string name="cod_anag_name">Supplier</string>
|
||||||
<string name="delete_document">Elimina documento</string>
|
<string name="delete_document">Elimina documento</string>
|
||||||
<string name="document_rif_label">Reference doc.:</string>
|
<string name="document_rif_label">Ref:</string>
|
||||||
<string name="gg_scadenza">Shelf life:</string>
|
<string name="gg_scadenza">Shelf life:</string>
|
||||||
<string name="selling_prediction">Sales prediction</string>
|
<string name="selling_prediction">Sales prediction</string>
|
||||||
<string name="giacenza">Stock</string>
|
<string name="giacenza">Stock</string>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user