Implementata richiesta del cliente in PickingLibero
This commit is contained in:
parent
0b8ae302e6
commit
6f19a8b757
@ -0,0 +1,141 @@
|
||||
package it.integry.integrywmsnative.core.model;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class VtbDest extends EntityBase implements Parcelable {
|
||||
|
||||
|
||||
public VtbDest() {
|
||||
type = "vtb_dest";
|
||||
}
|
||||
|
||||
private String codAnag;
|
||||
|
||||
private String codVdes;
|
||||
|
||||
private String destinatario;
|
||||
|
||||
private String indirizzo;
|
||||
|
||||
private String cap;
|
||||
|
||||
private String citta;
|
||||
|
||||
private String prov;
|
||||
|
||||
private String nazione;
|
||||
|
||||
|
||||
protected VtbDest(Parcel in) {
|
||||
codAnag = in.readString();
|
||||
codVdes = in.readString();
|
||||
destinatario = in.readString();
|
||||
indirizzo = in.readString();
|
||||
cap = in.readString();
|
||||
citta = in.readString();
|
||||
prov = in.readString();
|
||||
nazione = in.readString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(codAnag);
|
||||
dest.writeString(codVdes);
|
||||
dest.writeString(destinatario);
|
||||
dest.writeString(indirizzo);
|
||||
dest.writeString(cap);
|
||||
dest.writeString(citta);
|
||||
dest.writeString(prov);
|
||||
dest.writeString(nazione);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static final Creator<VtbDest> CREATOR = new Creator<VtbDest>() {
|
||||
@Override
|
||||
public VtbDest createFromParcel(Parcel in) {
|
||||
return new VtbDest(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VtbDest[] newArray(int size) {
|
||||
return new VtbDest[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getCodAnag() {
|
||||
return codAnag;
|
||||
}
|
||||
|
||||
public VtbDest setCodAnag(String codAnag) {
|
||||
this.codAnag = codAnag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodVdes() {
|
||||
return codVdes;
|
||||
}
|
||||
|
||||
public VtbDest setCodVdes(String codVdes) {
|
||||
this.codVdes = codVdes;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDestinatario() {
|
||||
return destinatario;
|
||||
}
|
||||
|
||||
public VtbDest setDestinatario(String destinatario) {
|
||||
this.destinatario = destinatario;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIndirizzo() {
|
||||
return indirizzo;
|
||||
}
|
||||
|
||||
public VtbDest setIndirizzo(String indirizzo) {
|
||||
this.indirizzo = indirizzo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCap() {
|
||||
return cap;
|
||||
}
|
||||
|
||||
public VtbDest setCap(String cap) {
|
||||
this.cap = cap;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCitta() {
|
||||
return citta;
|
||||
}
|
||||
|
||||
public VtbDest setCitta(String citta) {
|
||||
this.citta = citta;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProv() {
|
||||
return prov;
|
||||
}
|
||||
|
||||
public VtbDest setProv(String prov) {
|
||||
this.prov = prov;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNazione() {
|
||||
return nazione;
|
||||
}
|
||||
|
||||
public VtbDest setNazione(String nazione) {
|
||||
this.nazione = nazione;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -21,6 +21,7 @@ public class DBSettingsModel {
|
||||
private String defaultCodAnag;
|
||||
private String defaultCausaleRettificaGiacenze;
|
||||
private DistribuzioneColloDTO.CriterioDistribuzione defaultCriterioDistribuzione;
|
||||
private boolean flagAskClienteInPickingLibero;
|
||||
|
||||
public List<String> getAvailableProfiles() {
|
||||
return availableProfiles;
|
||||
@ -99,4 +100,13 @@ public class DBSettingsModel {
|
||||
this.defaultCriterioDistribuzione = DistribuzioneColloDTO.CriterioDistribuzione.fromString(defaultCriterioDistribuzione);
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isFlagAskClienteInPickingLibero() {
|
||||
return flagAskClienteInPickingLibero;
|
||||
}
|
||||
|
||||
public DBSettingsModel setFlagAskClienteInPickingLibero(boolean flagAskClienteInPickingLibero) {
|
||||
this.flagAskClienteInPickingLibero = flagAskClienteInPickingLibero;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,6 +189,9 @@ public class SettingsManager {
|
||||
GestSetupRESTConsumer.getValue("PICKING", "SETUP", "DEFAULT_CRITERIO_DISTRIBUZIONE", valueDefaultCriterioDistribuzione -> {
|
||||
dbSettingsModelIstance.setDefaultCriterioDistribuzione(valueDefaultCriterioDistribuzione.value);
|
||||
|
||||
GestSetupRESTConsumer.getBooleanValue("PICKING", "PICKING_LIBERO", "FLAG_ASK_CLIENTE", valueAskClientePickingLibero -> {
|
||||
dbSettingsModelIstance.setFlagAskClienteInPickingLibero(valueAskClientePickingLibero);
|
||||
|
||||
if(onComplete != null) onComplete.run();
|
||||
|
||||
}, ex -> {
|
||||
@ -210,6 +213,10 @@ public class SettingsManager {
|
||||
}, ex -> {
|
||||
if(onFailed != null) onFailed.run(ex);
|
||||
});
|
||||
|
||||
}, ex -> {
|
||||
if(onFailed != null) onFailed.run(ex);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
package it.integry.integrywmsnative.core.utility;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
public class UtilityDialog {
|
||||
|
||||
public static void setTo90PercentSize(Context context, Dialog dialog) {
|
||||
int width = (int)(context.getResources().getDisplayMetrics().widthPixels*0.90);
|
||||
//int height = (int)(context.getResources().getDisplayMetrics().heightPixels*0.90);
|
||||
|
||||
dialog.getWindow().setLayout(width, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,5 +1,8 @@
|
||||
package it.integry.integrywmsnative.core.utility;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Created by GiuseppeS on 07/03/2018.
|
||||
*/
|
||||
@ -14,4 +17,13 @@ public class UtilityString {
|
||||
return (stringToCheck != null && stringToCheck.trim().length() == 0 || stringToCheck == null) ? null : stringToCheck.trim();
|
||||
}
|
||||
|
||||
public static String capitalizeWords(String capString){
|
||||
StringBuffer capBuffer = new StringBuffer();
|
||||
Matcher capMatcher = Pattern.compile("([a-z])([a-z]*)", Pattern.CASE_INSENSITIVE).matcher(capString);
|
||||
while (capMatcher.find()){
|
||||
capMatcher.appendReplacement(capBuffer, capMatcher.group(1).toUpperCase() + capMatcher.group(2).toLowerCase());
|
||||
}
|
||||
|
||||
return capMatcher.appendTail(capBuffer).toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,8 +130,13 @@ public class MainAccettazioneFragment extends Fragment implements ISearcableFrag
|
||||
helper.loadOrdini(new ILoadOrdiniCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(List<OrdineAccettazioneInevasoDTO> ordini) {
|
||||
if(ordini != null) {
|
||||
Toast.makeText(getActivity(), "Caricati " + ordini.size() + " ordini", Toast.LENGTH_LONG).show();
|
||||
groupOrdiniAndMakeRecycler(ordini);
|
||||
}
|
||||
|
||||
mBinding.ordiniAccettazioneEmptyView.setVisibility(ordini != null && ordini.size() > 0 ? View.VISIBLE : View.GONE);
|
||||
|
||||
progress.dismiss();
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.databinding.FragmentPickingLiberoBinding;
|
||||
@ -68,7 +69,9 @@ public class PickingLiberoFragment extends Fragment implements ITitledFragment {
|
||||
mHelper = new PickingLiberoHelper(getActivity());
|
||||
|
||||
mViewModel = new PickingLiberoViewModel();
|
||||
mViewModel.init(getActivity(), mBindings, mHelper, mAppCompatActionBar);
|
||||
mViewModel.init(getActivity(), mBindings, mHelper, mAppCompatActionBar, () -> {
|
||||
((IPoppableActivity) getActivity()).pop();
|
||||
});
|
||||
|
||||
mBindings.setViewmodel(mViewModel);
|
||||
|
||||
|
||||
@ -35,7 +35,9 @@ import it.integry.integrywmsnative.core.interfaces.IRecyclerItemClicked;
|
||||
import it.integry.integrywmsnative.core.model.CommonModelConsts;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.VtbDest;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityNumber;
|
||||
@ -44,6 +46,8 @@ import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.databinding.FragmentPickingLiberoBinding;
|
||||
import it.integry.integrywmsnative.gest.picking_libero.core.PickingLiberoHelper;
|
||||
import it.integry.integrywmsnative.gest.picking_libero.core.PickingLiberoListAdapter;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskCliente;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
||||
@ -68,7 +72,7 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
|
||||
private PickingLiberoListAdapter mAdapter;
|
||||
|
||||
public void init(Activity context, FragmentPickingLiberoBinding binding, PickingLiberoHelper helper, AppCompatTextView titleText) {
|
||||
public void init(Activity context, FragmentPickingLiberoBinding binding, PickingLiberoHelper helper, AppCompatTextView titleText, Runnable onComplete) {
|
||||
mContext = context;
|
||||
mBinding = binding;
|
||||
mHelper = helper;
|
||||
@ -460,6 +464,22 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
|
||||
private void createNewLU(Integer customNumCollo, String customSerCollo, ProgressDialog progressDialog, Runnable onComplete, Runnable onFailed) {
|
||||
|
||||
if(SettingsManager.iDB().isFlagAskClienteInPickingLibero()){
|
||||
|
||||
DialogAskCliente.makeBase(mContext, (status, result) -> {
|
||||
if(status == DialogConsts.Results.YES) {
|
||||
createNewLUInternal(customNumCollo, customSerCollo, result, progressDialog, onComplete, onFailed);
|
||||
}
|
||||
}).show();
|
||||
} else {
|
||||
createNewLUInternal(customNumCollo, customSerCollo, null, progressDialog, onComplete, onFailed);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void createNewLUInternal(Integer customNumCollo, String customSerCollo, VtbDest vtbDest, ProgressDialog progressDialog, Runnable onComplete, Runnable onFailed) {
|
||||
|
||||
boolean shouldCloseProgress = progressDialog == null;
|
||||
final ProgressDialog progressDialogFinal = progressDialog == null ? UtilityProgress.createDefaultProgressDialog(mContext) : progressDialog;
|
||||
|
||||
@ -476,6 +496,11 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
mtbColt.setSerCollo(customSerCollo);
|
||||
}
|
||||
|
||||
if(vtbDest != null) {
|
||||
mtbColt.setCodAnag(vtbDest.getCodAnag());
|
||||
mtbColt.setCodVdes(vtbDest.getCodVdes());
|
||||
}
|
||||
|
||||
ColliMagazzinoRESTConsumer.saveCollo(mtbColt, savedMtbColt -> {
|
||||
savedMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||
setULToCurrentContext(savedMtbColt);
|
||||
@ -484,15 +509,6 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
|
||||
FBToast.successToast(mContext, mContext.getResources().getString(R.string.data_saved) ,FBToast.LENGTH_SHORT);
|
||||
|
||||
|
||||
// new StatusBarAlert.Builder(mContext)
|
||||
// .autoHide(true)
|
||||
// .withDuration(2500)
|
||||
// .showProgress(false)
|
||||
// .withText(R.string.data_saved)
|
||||
// .withAlertColor(R.color.mainGreen)
|
||||
// .build();
|
||||
|
||||
if(onComplete != null) onComplete.run();
|
||||
|
||||
}, ex -> {
|
||||
|
||||
@ -156,9 +156,14 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IS
|
||||
mHelper.loadOrdini(new VenditaHelper.ILoadOrdiniCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(List<OrdineVenditaInevasoDTO> ordini) {
|
||||
if(ordini != null) {
|
||||
UtilityToast.showToast("Caricati " + ordini.size() + " ordini");
|
||||
mOriginalOrderList = ordini;
|
||||
mViewModel.setListOrder(ordini);
|
||||
}
|
||||
|
||||
|
||||
mBinding.ordiniVenditaEmptyView.setVisibility(ordini != null && ordini.size() > 0 ? View.VISIBLE : View.GONE);
|
||||
|
||||
groupOrdini(ordini);
|
||||
initRecyclerView();
|
||||
|
||||
@ -0,0 +1,107 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import java.util.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
import it.integry.integrywmsnative.core.model.VtbDest;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDialog;
|
||||
import it.integry.integrywmsnative.databinding.DialogAskClienteBinding;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page1ViewModel;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page2ViewModel;
|
||||
|
||||
public class DialogAskCliente {
|
||||
|
||||
private Context mContext;
|
||||
|
||||
private Dialog mDialog;
|
||||
|
||||
private DialogAskClienteBinding mBinding;
|
||||
|
||||
|
||||
public static Dialog makeBase(final Context context, RunnableArgss<DialogConsts.Results, VtbDest> onComplete) {
|
||||
return new DialogAskCliente(context, onComplete).mDialog;
|
||||
}
|
||||
|
||||
public DialogAskCliente(Context context, RunnableArgss<DialogConsts.Results, VtbDest> onComplete) {
|
||||
mContext = context;
|
||||
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.dialog_ask_cliente, null, false);
|
||||
|
||||
List<Map.Entry<Integer, Class>> views = new ArrayList<>();
|
||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_ask_cliente__page1, DialogAskCliente_Page1ViewModel.class));
|
||||
views.add(new AbstractMap.SimpleEntry<>(R.layout.dialog_ask_cliente__page2, DialogAskCliente_Page2ViewModel.class));
|
||||
|
||||
|
||||
|
||||
DialogAskClienteAdapter adapter = new DialogAskClienteAdapter(mContext, views);
|
||||
mBinding.viewpager.setAdapter(adapter);
|
||||
mBinding.viewpager.beginFakeDrag();
|
||||
mBinding.viewpager.addOnPageChangeListener(adapter);
|
||||
|
||||
|
||||
|
||||
mDialog = new Dialog(mContext);
|
||||
mDialog.setContentView(mBinding.getRoot());
|
||||
mDialog.setCanceledOnTouchOutside(false);
|
||||
// mDialog.setCancelable(false);
|
||||
UtilityDialog.setTo90PercentSize(mContext, mDialog);
|
||||
mDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
mDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
|
||||
|
||||
mDialog.setOnShowListener(dialog -> {
|
||||
|
||||
DialogAskCliente_Page1ViewModel viewModel1 = (DialogAskCliente_Page1ViewModel) adapter.getViewModel(R.layout.dialog_ask_cliente__page1);
|
||||
DialogAskCliente_Page2ViewModel viewModel2 = (DialogAskCliente_Page2ViewModel) adapter.getViewModel(R.layout.dialog_ask_cliente__page2);
|
||||
|
||||
viewModel1
|
||||
.setOnConfirmClickListener(() -> {
|
||||
|
||||
viewModel2.setCodAnag(viewModel1.getCurrentCliente().getCodAnag());
|
||||
|
||||
mBinding.viewpager.setCurrentItem(mBinding.viewpager.getCurrentItem() + 1, true);
|
||||
});
|
||||
|
||||
viewModel1.setOnAbortClickListener(() -> {
|
||||
mDialog.dismiss();
|
||||
onComplete.run(DialogConsts.Results.ABORT, null);
|
||||
});
|
||||
|
||||
viewModel2.setOnConfirmClickListener(() -> {
|
||||
onComplete.run(DialogConsts.Results.YES, viewModel2.getCurrentDestinatario().toVtbDestModel());
|
||||
mDialog.dismiss();
|
||||
});
|
||||
|
||||
viewModel2.setOnAbortClickListener(() -> {
|
||||
mDialog.dismiss();
|
||||
onComplete.run(DialogConsts.Results.ABORT, null);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,120 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ViewDataBinding;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import java.util.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import it.integry.integrywmsnative.BR;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.ui.DeactivatableViewPager;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.IDialogAskClienteViewModel;
|
||||
|
||||
public class DialogAskClienteAdapter extends PagerAdapter implements ViewPager.OnPageChangeListener {
|
||||
|
||||
private Context mContext;
|
||||
|
||||
private List<Map.Entry<Integer, Class>> mDatasetLayout;
|
||||
private List<Map.Entry<ViewDataBinding, IDialogAskClienteViewModel>> mDatasetViews;
|
||||
|
||||
private DeactivatableViewPager viewPager;
|
||||
|
||||
public DialogAskClienteAdapter(Context context, List<Map.Entry<Integer, Class>> datasetLayouts) {
|
||||
this.mContext = context;
|
||||
this.mDatasetLayout = datasetLayouts;
|
||||
this.mDatasetViews = new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View instantiateItem(ViewGroup container, int position) {
|
||||
viewPager = (DeactivatableViewPager) container;
|
||||
|
||||
Integer viewId = mDatasetLayout.get(position).getKey();
|
||||
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
ViewDataBinding mBinding = DataBindingUtil.inflate(inflater, viewId, null, false);
|
||||
|
||||
Class viewModelClass = mDatasetLayout.get(position).getValue();
|
||||
IDialogAskClienteViewModel viewModel = null;
|
||||
|
||||
try {
|
||||
viewModel = (IDialogAskClienteViewModel) viewModelClass.newInstance();
|
||||
viewModel.setBinding(mBinding);
|
||||
viewModel.setContext(mContext);
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InstantiationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
mBinding.setVariable(BR.viewmodel, viewModel);
|
||||
|
||||
container.addView(mBinding.getRoot());
|
||||
this.mDatasetViews.add(new AbstractMap.SimpleEntry<>(mBinding, viewModel));
|
||||
|
||||
return mBinding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroyItem(ViewGroup container, int position, Object object) {
|
||||
container.removeView((LinearLayout)object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isViewFromObject(@NonNull View view, @NonNull Object o) {
|
||||
return view == o;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mDatasetLayout.size();
|
||||
}
|
||||
|
||||
public IDialogAskClienteViewModel getViewModel(@NonNull int layoutID) {
|
||||
for(int i = 0; i < mDatasetLayout.size(); i++) {
|
||||
if(mDatasetLayout.get(i).getKey() == layoutID) {
|
||||
return this.mDatasetViews.get(i).getValue();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private int lastPage = -1;
|
||||
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
if(position != lastPage) {
|
||||
viewPager.measureCurrentView(mDatasetViews.get(position).getKey().getRoot());
|
||||
mDatasetViews.get(position).getValue().onShow();
|
||||
lastPage = position;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
// mDatasetViews.get(position).getValue().onShow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente.dto;
|
||||
|
||||
public class DialogAskClienteClienteDTO {
|
||||
|
||||
private String codAnag;
|
||||
|
||||
private String ragSoc;
|
||||
|
||||
public String getCodAnag() {
|
||||
return codAnag;
|
||||
}
|
||||
|
||||
public DialogAskClienteClienteDTO setCodAnag(String codAnag) {
|
||||
this.codAnag = codAnag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getRagSoc() {
|
||||
return ragSoc;
|
||||
}
|
||||
|
||||
public DialogAskClienteClienteDTO setRagSoc(String ragSoc) {
|
||||
this.ragSoc = ragSoc;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getRagSoc();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,111 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente.dto;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.VtbDest;
|
||||
|
||||
public class DialogAskClienteDestinatarioDTO {
|
||||
|
||||
private String codAnag;
|
||||
|
||||
private String codVdes;
|
||||
|
||||
private String destinatario;
|
||||
|
||||
private String indirizzo;
|
||||
|
||||
private String cap;
|
||||
|
||||
private String citta;
|
||||
|
||||
private String prov;
|
||||
|
||||
private String nazione;
|
||||
|
||||
public String getCodAnag() {
|
||||
return codAnag;
|
||||
}
|
||||
|
||||
public DialogAskClienteDestinatarioDTO setCodAnag(String codAnag) {
|
||||
this.codAnag = codAnag;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCodVdes() {
|
||||
return codVdes;
|
||||
}
|
||||
|
||||
public DialogAskClienteDestinatarioDTO setCodVdes(String codVdes) {
|
||||
this.codVdes = codVdes;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDestinatario() {
|
||||
return destinatario;
|
||||
}
|
||||
|
||||
public DialogAskClienteDestinatarioDTO setDestinatario(String destinatario) {
|
||||
this.destinatario = destinatario;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIndirizzo() {
|
||||
return indirizzo;
|
||||
}
|
||||
|
||||
public DialogAskClienteDestinatarioDTO setIndirizzo(String indirizzo) {
|
||||
this.indirizzo = indirizzo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCap() {
|
||||
return cap;
|
||||
}
|
||||
|
||||
public DialogAskClienteDestinatarioDTO setCap(String cap) {
|
||||
this.cap = cap;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCitta() {
|
||||
return citta;
|
||||
}
|
||||
|
||||
public DialogAskClienteDestinatarioDTO setCitta(String citta) {
|
||||
this.citta = citta;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProv() {
|
||||
return prov;
|
||||
}
|
||||
|
||||
public DialogAskClienteDestinatarioDTO setProv(String prov) {
|
||||
this.prov = prov;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNazione() {
|
||||
return nazione;
|
||||
}
|
||||
|
||||
public DialogAskClienteDestinatarioDTO setNazione(String nazione) {
|
||||
this.nazione = nazione;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("%s (%s)", getDestinatario(), getCodVdes());
|
||||
}
|
||||
|
||||
public VtbDest toVtbDestModel() {
|
||||
return new VtbDest()
|
||||
.setCap(getCap())
|
||||
.setCitta(getCitta())
|
||||
.setCodAnag(getCodAnag())
|
||||
.setCodVdes(getCodVdes())
|
||||
.setDestinatario(getDestinatario())
|
||||
.setProv(getProv())
|
||||
.setIndirizzo(getIndirizzo())
|
||||
.setNazione(getNazione());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,120 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
|
||||
import androidx.databinding.ViewDataBinding;
|
||||
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
||||
import it.integry.integrywmsnative.core.REST.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.databinding.DialogAskClientePage1Binding;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteClienteDTO;
|
||||
|
||||
public class DialogAskCliente_Page1ViewModel implements IDialogAskClienteViewModel {
|
||||
|
||||
private Context mContext;
|
||||
private DialogAskClientePage1Binding mBinding;
|
||||
|
||||
private List<DialogAskClienteClienteDTO> availableClienti;
|
||||
|
||||
public DialogAskCliente_Page1ViewModel() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContext(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBinding(ViewDataBinding binding) {
|
||||
this.mBinding = (DialogAskClientePage1Binding) binding;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShow() {
|
||||
|
||||
String sql = "SELECT gtb_anag.cod_anag, rag_soc " +
|
||||
"FROM gtb_anag " +
|
||||
"INNER JOIN vtb_clie ON gtb_anag.cod_anag = vtb_clie.cod_anag " +
|
||||
"WHERE vtb_clie.flag_stato = 'A' " +
|
||||
"ORDER BY rag_soc";
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<DialogAskClienteClienteDTO>>() {}.getType();
|
||||
SystemRESTConsumer.processSql(sql, typeOfObjectsList, new ISimpleOperationCallback<ArrayList<DialogAskClienteClienteDTO>>() {
|
||||
@Override
|
||||
public void onSuccess(ArrayList<DialogAskClienteClienteDTO> value) {
|
||||
availableClienti = value;
|
||||
initializeAdapter(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Exception ex) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnConfirmClickListener(Runnable onConfirm) {
|
||||
this.mBinding.buttonYes.setOnClickListener(v -> {
|
||||
if(validateCliente()) {
|
||||
this.resetClienteError();
|
||||
if(onConfirm != null) onConfirm.run();
|
||||
} else {
|
||||
this.setClienteError(mContext.getResources().getText(R.string.not_valid_customer_error).toString());
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnAbortClickListener(Runnable onAbort) {
|
||||
this.mBinding.buttonNo.setOnClickListener(v -> {
|
||||
if(onAbort != null) onAbort.run();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void initializeAdapter(ArrayList<DialogAskClienteClienteDTO> items) {
|
||||
|
||||
DialogAskCliente_Page1_ArrayAdapter adapter = new DialogAskCliente_Page1_ArrayAdapter(mContext, items);
|
||||
|
||||
|
||||
AutoCompleteTextView editTextFilledExposedDropdown = mBinding.filledExposedDropdown;
|
||||
editTextFilledExposedDropdown.setThreshold(0);
|
||||
editTextFilledExposedDropdown.setAdapter(adapter);
|
||||
}
|
||||
|
||||
|
||||
private boolean validateCliente() {
|
||||
return getCurrentCliente() != null;
|
||||
}
|
||||
|
||||
public DialogAskClienteClienteDTO getCurrentCliente() {
|
||||
for (DialogAskClienteClienteDTO cliente : availableClienti) {
|
||||
if(cliente.getRagSoc().equalsIgnoreCase(mBinding.inputCliente.getEditText().getText().toString())) {
|
||||
return cliente;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private void setClienteError(String message){
|
||||
mBinding.inputCliente.setErrorEnabled(true);
|
||||
mBinding.inputCliente.setError(message);
|
||||
}
|
||||
private void resetClienteError() {
|
||||
mBinding.inputCliente.setError(null);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,115 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Movie;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Filter;
|
||||
import android.widget.Filterable;
|
||||
|
||||
import androidx.annotation.LayoutRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteClienteDTO;
|
||||
|
||||
public class DialogAskCliente_Page1_ArrayAdapter extends ArrayAdapter<DialogAskClienteClienteDTO> implements Filterable {
|
||||
|
||||
private Context mContext;
|
||||
private List<DialogAskClienteClienteDTO> mDataset;
|
||||
private List<DialogAskClienteClienteDTO> mDatasetAllItems;
|
||||
|
||||
private ListFilter listFilter = new ListFilter();
|
||||
|
||||
public DialogAskCliente_Page1_ArrayAdapter(@NonNull Context context, @NonNull ArrayList<DialogAskClienteClienteDTO> list) {
|
||||
super(context, 0 , list);
|
||||
mContext = context;
|
||||
mDataset = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
|
||||
View listItem = convertView;
|
||||
if(listItem == null) {
|
||||
listItem = LayoutInflater.from(mContext).inflate(R.layout.dialog_ask_cliente__dropdown_item, parent, false);
|
||||
}
|
||||
|
||||
if(position < mDataset.size()) {
|
||||
|
||||
AppCompatTextView textView = listItem.findViewById(R.id.text);
|
||||
|
||||
textView.setText(mDataset.get(position).getRagSoc());
|
||||
|
||||
return listItem;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Filter getFilter() {
|
||||
return listFilter;
|
||||
}
|
||||
|
||||
public class ListFilter extends Filter {
|
||||
private Object lock = new Object();
|
||||
|
||||
@Override
|
||||
protected FilterResults performFiltering(CharSequence prefix) {
|
||||
FilterResults results = new FilterResults();
|
||||
if (mDatasetAllItems == null) {
|
||||
synchronized (lock) {
|
||||
mDatasetAllItems = new ArrayList<>(mDataset);
|
||||
}
|
||||
}
|
||||
|
||||
if (prefix == null || prefix.length() == 0) {
|
||||
synchronized (lock) {
|
||||
results.values = mDatasetAllItems;
|
||||
results.count = mDatasetAllItems.size();
|
||||
}
|
||||
} else {
|
||||
final String searchStrLowerCase = prefix.toString().toLowerCase();
|
||||
|
||||
ArrayList<DialogAskClienteClienteDTO> matchValues = new ArrayList<>();
|
||||
|
||||
for (DialogAskClienteClienteDTO dataItem : mDatasetAllItems) {
|
||||
if (dataItem.getRagSoc().toLowerCase().startsWith(searchStrLowerCase)) {
|
||||
matchValues.add(dataItem);
|
||||
}
|
||||
}
|
||||
|
||||
results.values = matchValues;
|
||||
results.count = matchValues.size();
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void publishResults(CharSequence constraint, FilterResults results) {
|
||||
if (results.values != null) {
|
||||
mDataset.clear();
|
||||
mDataset.addAll((ArrayList<DialogAskClienteClienteDTO>) results.values);
|
||||
} else {
|
||||
mDataset.clear();
|
||||
}
|
||||
if (results.count > 0) {
|
||||
notifyDataSetChanged();
|
||||
} else {
|
||||
notifyDataSetInvalidated();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,125 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
|
||||
import androidx.databinding.ViewDataBinding;
|
||||
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
||||
import it.integry.integrywmsnative.core.REST.consumers.SystemRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||
import it.integry.integrywmsnative.databinding.DialogAskClientePage2Binding;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteClienteDTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteDestinatarioDTO;
|
||||
|
||||
public class DialogAskCliente_Page2ViewModel implements IDialogAskClienteViewModel {
|
||||
|
||||
|
||||
private DialogAskClientePage2Binding mBinding;
|
||||
private Context mContext;
|
||||
|
||||
private List<DialogAskClienteDestinatarioDTO> availableDestinatari;
|
||||
|
||||
private String mCodAnag;
|
||||
|
||||
public DialogAskCliente_Page2ViewModel() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBinding(ViewDataBinding binding) {
|
||||
this.mBinding = (DialogAskClientePage2Binding) binding;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContext(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShow() {
|
||||
|
||||
String sql = "SELECT cod_anag, cod_vdes, destinatario, indirizzo, cap, citta, prov, nazione " +
|
||||
"FROM vtb_dest " +
|
||||
"WHERE cod_anag = " + UtilityDB.valueToString(mCodAnag);
|
||||
|
||||
Type typeOfObjectsList = new TypeToken<ArrayList<DialogAskClienteDestinatarioDTO>>() {}.getType();
|
||||
SystemRESTConsumer.processSql(sql, typeOfObjectsList, new ISimpleOperationCallback<ArrayList<DialogAskClienteDestinatarioDTO>>() {
|
||||
@Override
|
||||
public void onSuccess(ArrayList<DialogAskClienteDestinatarioDTO> value) {
|
||||
availableDestinatari = value;
|
||||
initializeAdapter(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Exception ex) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnConfirmClickListener(Runnable onConfirm) {
|
||||
this.mBinding.buttonYes.setOnClickListener(v -> {
|
||||
if(validateDestinatario()) {
|
||||
this.resetClienteError();
|
||||
if(onConfirm != null) onConfirm.run();
|
||||
} else {
|
||||
this.setClienteError(mContext.getResources().getText(R.string.not_valid_recipient_error).toString());
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnAbortClickListener(Runnable onAbort) {
|
||||
this.mBinding.buttonNo.setOnClickListener(v -> {
|
||||
if(onAbort != null) onAbort.run();
|
||||
});
|
||||
}
|
||||
|
||||
public void setCodAnag(String codAnag) {
|
||||
this.mCodAnag = codAnag;
|
||||
}
|
||||
|
||||
private void initializeAdapter(ArrayList<DialogAskClienteDestinatarioDTO> items) {
|
||||
|
||||
DialogAskCliente_Page2_ArrayAdapter adapter = new DialogAskCliente_Page2_ArrayAdapter(mContext, items);
|
||||
|
||||
|
||||
AutoCompleteTextView editTextFilledExposedDropdown = mBinding.filledExposedDropdown;
|
||||
editTextFilledExposedDropdown.setThreshold(0);
|
||||
editTextFilledExposedDropdown.setAdapter(adapter);
|
||||
}
|
||||
|
||||
|
||||
private boolean validateDestinatario() {
|
||||
return getCurrentDestinatario() != null;
|
||||
}
|
||||
|
||||
public DialogAskClienteDestinatarioDTO getCurrentDestinatario() {
|
||||
for (DialogAskClienteDestinatarioDTO destinatarioDTO : availableDestinatari) {
|
||||
if(destinatarioDTO.toString().equalsIgnoreCase(mBinding.inputDestinatario.getEditText().getText().toString())) {
|
||||
return destinatarioDTO;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private void setClienteError(String message){
|
||||
mBinding.inputDestinatario.setErrorEnabled(true);
|
||||
mBinding.inputDestinatario.setError(message);
|
||||
}
|
||||
private void resetClienteError() {
|
||||
mBinding.inputDestinatario.setError(null);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,127 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Filter;
|
||||
import android.widget.Filterable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.dto.DialogAskClienteDestinatarioDTO;
|
||||
|
||||
public class DialogAskCliente_Page2_ArrayAdapter extends ArrayAdapter<DialogAskClienteDestinatarioDTO> implements Filterable {
|
||||
|
||||
private Context mContext;
|
||||
private List<DialogAskClienteDestinatarioDTO> mDataset;
|
||||
private List<DialogAskClienteDestinatarioDTO> mDatasetAllItems;
|
||||
|
||||
private ListFilter listFilter = new ListFilter();
|
||||
|
||||
public DialogAskCliente_Page2_ArrayAdapter(@NonNull Context context, @NonNull ArrayList<DialogAskClienteDestinatarioDTO> list) {
|
||||
super(context, 0 , list);
|
||||
mContext = context;
|
||||
mDataset = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
|
||||
View listItem = convertView;
|
||||
if(listItem == null) {
|
||||
listItem = LayoutInflater.from(mContext).inflate(R.layout.dialog_ask_cliente__dropdown_item_destinatario, parent, false);
|
||||
}
|
||||
|
||||
if(position < mDataset.size()) {
|
||||
|
||||
AppCompatTextView destinatario = listItem.findViewById(R.id.destinatario);
|
||||
destinatario.setText(UtilityString.capitalizeWords(mDataset.get(position).toString()));
|
||||
|
||||
AppCompatTextView subtitle = listItem.findViewById(R.id.subtitle);
|
||||
|
||||
StringBuilder subtitleStr = new StringBuilder();
|
||||
if(!UtilityString.isNullOrEmpty(mDataset.get(position).getCitta())) {
|
||||
subtitleStr.append(UtilityString.capitalizeWords(mDataset.get(position).getCitta()) + " - ");
|
||||
}
|
||||
|
||||
if(!UtilityString.isNullOrEmpty(mDataset.get(position).getIndirizzo())) {
|
||||
subtitleStr.append(UtilityString.capitalizeWords(mDataset.get(position).getIndirizzo()));
|
||||
}
|
||||
|
||||
subtitle.setText(subtitleStr);
|
||||
|
||||
|
||||
return listItem;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Filter getFilter() {
|
||||
return listFilter;
|
||||
}
|
||||
|
||||
public class ListFilter extends Filter {
|
||||
private Object lock = new Object();
|
||||
|
||||
@Override
|
||||
protected FilterResults performFiltering(CharSequence prefix) {
|
||||
FilterResults results = new FilterResults();
|
||||
if (mDatasetAllItems == null) {
|
||||
synchronized (lock) {
|
||||
mDatasetAllItems = new ArrayList<>(mDataset);
|
||||
}
|
||||
}
|
||||
|
||||
if (prefix == null || prefix.length() == 0) {
|
||||
synchronized (lock) {
|
||||
results.values = mDatasetAllItems;
|
||||
results.count = mDatasetAllItems.size();
|
||||
}
|
||||
} else {
|
||||
final String searchStrLowerCase = prefix.toString().toLowerCase();
|
||||
|
||||
ArrayList<DialogAskClienteDestinatarioDTO> matchValues = new ArrayList<>();
|
||||
|
||||
for (DialogAskClienteDestinatarioDTO dataItem : mDatasetAllItems) {
|
||||
if (dataItem.toString().toLowerCase().startsWith(searchStrLowerCase)) {
|
||||
matchValues.add(dataItem);
|
||||
}
|
||||
}
|
||||
|
||||
results.values = matchValues;
|
||||
results.count = matchValues.size();
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void publishResults(CharSequence constraint, FilterResults results) {
|
||||
if (results.values != null) {
|
||||
mDataset.clear();
|
||||
mDataset.addAll((ArrayList<DialogAskClienteDestinatarioDTO>) results.values);
|
||||
} else {
|
||||
mDataset.clear();
|
||||
}
|
||||
if (results.count > 0) {
|
||||
notifyDataSetChanged();
|
||||
} else {
|
||||
notifyDataSetInvalidated();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.databinding.ViewDataBinding;
|
||||
|
||||
public interface IDialogAskClienteViewModel {
|
||||
|
||||
void setContext(Context context);
|
||||
|
||||
void setBinding(ViewDataBinding binding);
|
||||
|
||||
void onShow();
|
||||
|
||||
void setOnConfirmClickListener(Runnable onConfirm);
|
||||
|
||||
void setOnAbortClickListener(Runnable onAbort);
|
||||
}
|
||||
@ -55,7 +55,7 @@ public class DialogAskPositionOfLU {
|
||||
return new DialogAskPositionOfLU(context, mtbColtToUpdate, onComplete, onFailed).mDialog;
|
||||
}
|
||||
|
||||
public DialogAskPositionOfLU(Context context, MtbColt mtbColtToUpdate, RunnableArgss<DialogConsts.Results, MtbDepoPosizione> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
private DialogAskPositionOfLU(Context context, MtbColt mtbColtToUpdate, RunnableArgss<DialogConsts.Results, MtbDepoPosizione> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
mContext = context;
|
||||
mtbColt = mtbColtToUpdate;
|
||||
|
||||
|
||||
@ -102,34 +102,6 @@
|
||||
app:binding="@{loginViewModel.codAzienda}"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Host Label -->
|
||||
<!--<android.support.design.widget.TextInputLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:layout_marginTop="8dp"-->
|
||||
<!--app:hintTextAppearance="@style/hint_text">-->
|
||||
<!--<android.support.design.widget.TextInputEditText-->
|
||||
<!--android:id="@+id/iput_server_host"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:inputType="text"-->
|
||||
<!--android:hint="Host" />-->
|
||||
<!--</android.support.design.widget.TextInputLayout>-->
|
||||
|
||||
<!--<!– Port Label –>-->
|
||||
<!--<android.support.design.widget.TextInputLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:layout_marginTop="8dp"-->
|
||||
<!--app:hintTextAppearance="@style/hint_text">-->
|
||||
<!--<android.support.design.widget.TextInputEditText-->
|
||||
<!--android:id="@+id/iput_server_port"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:inputType="number|none"-->
|
||||
<!--android:hint="Port" />-->
|
||||
<!--</android.support.design.widget.TextInputLayout>-->
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||
|
||||
63
app/src/main/res/layout/dialog_ask_cliente.xml
Normal file
63
app/src/main/res/layout/dialog_ask_cliente.xml
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<data>
|
||||
<import type="android.text.Html" />
|
||||
<import type="it.integry.integrywmsnative.R" />
|
||||
<variable
|
||||
name="mContext"
|
||||
type="android.content.Context" />
|
||||
</data>
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--<RelativeLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:background="@color/light_blue_300"-->
|
||||
<!--android:gravity="center_horizontal">-->
|
||||
|
||||
<!--<ImageView-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:src="@drawable/ic_error_white_24dp"-->
|
||||
<!--android:layout_margin="24dp"/>-->
|
||||
|
||||
<!--</RelativeLayout>-->
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
|
||||
|
||||
<it.integry.integrywmsnative.ui.DeactivatableViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</it.integry.integrywmsnative.ui.DeactivatableViewPager>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</layout>
|
||||
@ -0,0 +1,9 @@
|
||||
<androidx.appcompat.widget.AppCompatTextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1"
|
||||
style="@style/AppTheme.NewMaterial.Text"/>
|
||||
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/destinatario"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1"
|
||||
tools:text="Destinatario"
|
||||
style="@style/AppTheme.NewMaterial.Text"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1"
|
||||
tools:text="Città"
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
106
app/src/main/res/layout/dialog_ask_cliente__page1.xml
Normal file
106
app/src/main/res/layout/dialog_ask_cliente__page1.xml
Normal file
@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="viewmodel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page1ViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_margin="16dp">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.DialogTitle"
|
||||
android:text="@string/customer"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="@string/select_a_customer_message"
|
||||
android:gravity="left"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_cliente"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/customer">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/filled_exposed_dropdown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_buttons_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5"/>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_no"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:strokeColor="@color/colorPrimary"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
||||
android:text="@string/abort"/>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_yes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:text="@string/confirm"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
106
app/src/main/res/layout/dialog_ask_cliente__page2.xml
Normal file
106
app/src/main/res/layout/dialog_ask_cliente__page2.xml
Normal file
@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="viewmodel"
|
||||
type="it.integry.integrywmsnative.view.dialogs.ask_cliente.viewmodel.DialogAskCliente_Page2ViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_margin="16dp">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial.DialogTitle"
|
||||
android:text="@string/recipient"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="@string/select_a_recipient_message"
|
||||
android:gravity="left"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_destinatario"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/recipient">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/filled_exposed_dropdown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/center_buttons_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5"/>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_no"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryOutline"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:strokeColor="@color/colorPrimary"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
||||
android:text="@string/abort"/>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_yes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Button.PrimaryFull"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:text="@string/confirm"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
@ -55,7 +55,6 @@
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
|
||||
|
||||
<it.integry.integrywmsnative.ui.DeactivatableViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@ -243,7 +243,7 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/accettazione_title_fragment"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textColor="@color/gray_700"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -286,7 +286,7 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/vendita_title_fragment"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textColor="@color/gray_700"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -330,7 +330,7 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/rettifica_giacenze_fragment_title"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textColor="@color/gray_700"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -375,7 +375,7 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/versamento_merce_fragment_title"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textColor="@color/gray_700"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -421,7 +421,7 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/free_picking"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textColor="@color/gray_700"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -467,7 +467,7 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/fragment_ultime_consegne_cliente_title"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textColor="@color/gray_700"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -538,7 +538,7 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/prod_versamento_materiale_title_fragment"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textColor="@color/gray_700"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -583,7 +583,7 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/prod_recupero_materiale_title_fragment"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textColor="@color/gray_700"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -25,6 +25,60 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ordini_accettazione_empty_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.3">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_empty_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.2" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_empty_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.15" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_empty_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.85" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_empty_left"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_empty_right"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_empty_top">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_playlist_add_check_24dp"
|
||||
android:adjustViewBounds="true"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp"
|
||||
android:text="@string/no_orders_found_message"/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
|
||||
@ -25,6 +25,59 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ordini_vendita_empty_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.3">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_empty_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.2" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_empty_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.15" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_empty_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.85" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_empty_left"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_empty_right"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_empty_top">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_playlist_add_check_24dp"
|
||||
android:adjustViewBounds="true"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp"
|
||||
android:text="@string/no_orders_found_message"/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
|
||||
@ -137,6 +137,7 @@
|
||||
|
||||
<string name="no_lu_already_registered_text">Nessuna UL registrata a magazzino</string>
|
||||
<string name="no_item_to_pick_text">Nessun articolo da prelevare</string>
|
||||
<string name="no_orders_to_pick_text">Nessun ordine da evadere</string>
|
||||
<string name="no_item_text">Nessun articolo</string>
|
||||
|
||||
<string name="already_used_anonymous_barcode"><![CDATA[L\'etichetta scansionata è stata già utilizzata]]></string>
|
||||
@ -157,6 +158,7 @@
|
||||
|
||||
<string name="num_ords">Numero ordine</string>
|
||||
<string name="customer">Cliente</string>
|
||||
<string name="recipient">Destinatario</string>
|
||||
<string name="ship_date">Data consegna</string>
|
||||
<string name="terms_of_delivery">Termini di consegna</string>
|
||||
<string name="vehicle">Automezzo</string>
|
||||
@ -209,4 +211,9 @@
|
||||
<string name="production">Produzione</string>
|
||||
<string name="prod_versamento_materiale_title_fragment">Versamento materiale</string>
|
||||
<string name="prod_recupero_materiale_title_fragment">Recupero materiale</string>
|
||||
|
||||
<string name="select_a_customer_message">Prima di procedere seleziona un <b>cliente</b></string>
|
||||
<string name="select_a_recipient_message">Prima di procedere seleziona un <b>destinatario</b></string>
|
||||
<string name="not_valid_customer_error">Cliente non valido</string>
|
||||
<string name="not_valid_recipient_error">Destinatario non valido</string>
|
||||
</resources>
|
||||
@ -42,8 +42,11 @@
|
||||
<color name="green_700">#388E3C</color>
|
||||
|
||||
|
||||
<color name="grey_700">#616161</color>
|
||||
<color name="grey_800">#424242</color>
|
||||
<color name="gray_400">#BDBDBD</color>
|
||||
<color name="gray_500">#9E9E9E</color>
|
||||
<color name="gray_600">#757575</color>
|
||||
<color name="gray_700">#616161</color>
|
||||
<color name="gray_800">#424242</color>
|
||||
|
||||
<color name="alpha_indigo_500">#813f51b5</color>
|
||||
|
||||
|
||||
@ -142,6 +142,7 @@
|
||||
|
||||
<string name="no_lu_already_registered_text">No LU already registered</string>
|
||||
<string name="no_item_to_pick_text">No items to pick</string>
|
||||
<string name="no_orders_to_pick_text">No orders to dispatch</string>
|
||||
<string name="no_item_text">No items</string>
|
||||
|
||||
<string name="already_used_anonymous_barcode">The scanned label has already been used</string>
|
||||
@ -163,6 +164,7 @@
|
||||
|
||||
<string name="num_ords">Orders number</string>
|
||||
<string name="customer">Customer</string>
|
||||
<string name="recipient">Recipient</string>
|
||||
<string name="ship_date">Ship date</string>
|
||||
<string name="terms_of_delivery">Terms of delivery</string>
|
||||
<string name="vehicle">Vehicle</string>
|
||||
@ -215,4 +217,10 @@
|
||||
<string name="prod_recupero_materiale_title_fragment">Recover raw material</string>
|
||||
|
||||
|
||||
<string name="select_a_customer_message">Please, select a <b>customer</b> before proceeding</string>
|
||||
<string name="select_a_recipient_message">Please, select a <b>recipient</b> before proceeding</string>
|
||||
<string name="not_valid_customer_error">Invalid customer</string>
|
||||
<string name="not_valid_recipient_error">Invalid recipient</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
@ -24,6 +24,10 @@
|
||||
<item name="android:fontFamily">@font/product_sans_regular</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
</style>
|
||||
<style name="AppTheme.NewMaterial.Text.Small" parent = "AppTheme.NewMaterial.Text">
|
||||
<item name="android:textColor">@color/gray_600</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
<style name="AppTheme.NewMaterial.Text.Badge" parent = "AppTheme.NewMaterial">
|
||||
<item name="android:fontFamily">@font/product_sans_regular</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
@ -64,6 +68,13 @@
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style name="AppTheme.NewMaterial.Dialog" parent="android:Theme.Holo.Dialog">
|
||||
<item name="android:windowMinWidthMajor">90%</item>
|
||||
<item name="android:windowMinWidthMinor">80%</item>
|
||||
</style>
|
||||
|
||||
<style name="SplashTheme" parent="AppTheme.NoActionBar">
|
||||
<item name="android:windowBackground">@drawable/splash_background</item>
|
||||
</style>
|
||||
@ -127,5 +138,4 @@
|
||||
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user