Fix pulsante in dialogScanArt.
Aggiunta where cond su ricerca pedane versate su linea. Aggiunta emptyView in recupera ul.
This commit is contained in:
parent
bcb4766df3
commit
00afb7db53
@ -2,6 +2,7 @@ package it.integry.integrywmsnative.gest.prod_recupero_materiale.core;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
@ -27,6 +28,7 @@ public class HistoryULsListAdapter extends SectionedRecyclerViewAdapter<HistoryU
|
||||
|
||||
private List<HistoryVersamentoProdUL> mOriginalDataset;
|
||||
private List<HistoryVersamentoProdUL> mDataset;
|
||||
private View mEmptyView;
|
||||
|
||||
|
||||
private RunnableArgs<HistoryVersamentoProdUL> mOnItemClicked;
|
||||
@ -54,9 +56,10 @@ public class HistoryULsListAdapter extends SectionedRecyclerViewAdapter<HistoryU
|
||||
|
||||
|
||||
|
||||
public HistoryULsListAdapter(Context context, List<HistoryVersamentoProdUL> myDataset) {
|
||||
public HistoryULsListAdapter(Context context, List<HistoryVersamentoProdUL> myDataset, View emptyView) {
|
||||
mContext = context;
|
||||
mOriginalDataset = myDataset;
|
||||
mEmptyView = emptyView;
|
||||
mDataset = orderItems(myDataset);
|
||||
}
|
||||
|
||||
@ -68,6 +71,8 @@ public class HistoryULsListAdapter extends SectionedRecyclerViewAdapter<HistoryU
|
||||
mDataset.clear();
|
||||
mDataset.addAll(orderItems(updatedDataset));
|
||||
notifyDataChanged();
|
||||
|
||||
mEmptyView.setVisibility(mDataset.size() > 0 ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -61,6 +61,7 @@ public class ProdRecuperoMaterialeHelper {
|
||||
"LEFT OUTER JOIN jtb_fasi ON mtb_colt.cod_jfas = jtb_fasi.cod_jfas " +
|
||||
"WHERE jtb_fasi.cod_jfas IS NOT NULL " +
|
||||
"AND segno = -1 " +
|
||||
"AND mtb_colr.data_collo > DATEADD(DAY, -1, GETDATE()) " +
|
||||
"GROUP BY jtb_fasi.cod_jfas, " +
|
||||
"jtb_fasi.descrizione, " +
|
||||
"mtb_colr.gestione, " +
|
||||
|
||||
@ -87,7 +87,7 @@ public class ProdRecuperoMaterialeViewModel {
|
||||
|
||||
|
||||
private void initRecyclerView() {
|
||||
mAdapter = new HistoryULsListAdapter(mContext, new ArrayList<>());
|
||||
mAdapter = new HistoryULsListAdapter(mContext, new ArrayList<>(), mBinding.emptyView);
|
||||
mAdapter.setOnItemClicked(data -> this.dispatchItem(data, null, null));
|
||||
|
||||
mBinding.prodRecuperoMaterialeMainList.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/base_root"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
@ -34,12 +34,23 @@
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
@ -49,17 +60,11 @@
|
||||
android:text="@string/title_open_lu"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="10">
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
|
||||
<ProgressBar
|
||||
@ -81,11 +86,28 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/dialog_scan_or_create_lu__creation_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -99,45 +121,28 @@
|
||||
style="@style/TextViewMaterial"
|
||||
android:text="OPPURE" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/ok_left_buttons_guideline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.15"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/ok_right_buttons_guideline"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.85"/>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/create_new_lu_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
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/ok_left_buttons_guideline"
|
||||
app:layout_constraintEnd_toEndOf="@id/ok_right_buttons_guideline"
|
||||
android:text="@string/button_create_new_ul"/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
</layout>
|
||||
@ -3,9 +3,11 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:fab="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -13,14 +15,63 @@
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:background="@color/gray_200"
|
||||
android:background="@android:color/white"
|
||||
android:id="@+id/prod_recupero_materiale_main_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/empty_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.3">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
<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_item_in_recupera_materiale"/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@ -165,6 +165,7 @@
|
||||
<string name="no_docs_to_show_text">Nessun documento da mostrare</string>
|
||||
<string name="no_orders_to_pick_text">Nessun ordine da evadere</string>
|
||||
<string name="no_item_text">Nessun articolo</string>
|
||||
<string name="no_item_in_recupera_materiale">Nessuna UL versata in produzione</string>
|
||||
|
||||
<string name="already_used_anonymous_barcode"><![CDATA[L\'etichetta scansionata è stata già utilizzata]]></string>
|
||||
<string name="no_result_from_barcode">Il barcode scansionato non ha fornito alcun risultato</string>
|
||||
|
||||
@ -166,6 +166,7 @@
|
||||
<string name="no_docs_to_show_text">No documents to show</string>
|
||||
<string name="no_orders_to_pick_text">No orders to dispatch</string>
|
||||
<string name="no_item_text">No items</string>
|
||||
<string name="no_item_in_recupera_materiale">No LU poured into production</string>
|
||||
|
||||
<string name="already_used_anonymous_barcode">The scanned label has already been used</string>
|
||||
<string name="no_result_from_barcode">The scanned barcode did not produce any results</string>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user