Finish v1.32.00(340)
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 339
|
def appVersionCode = 340
|
||||||
def appVersionName = '1.31.05'
|
def appVersionName = '1.32.00'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -1,14 +1,24 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
||||||
|
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||||
|
android:maxSdkVersion="32" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
|
android:maxSdkVersion="32"
|
||||||
|
tools:ignore="ScopedStorage" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".MainApplication"
|
android:name=".MainApplication"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
@ -23,28 +33,28 @@
|
|||||||
android:requestLegacyExternalStorage="true">
|
android:requestLegacyExternalStorage="true">
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.spedizione.SpedizioneActivity"
|
android:name=".gest.spedizione.SpedizioneActivity"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity"
|
android:name=".gest.pv_ordine_acquisto_edit.PVOrdineAcquistoEditActivity"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.prod_dettaglio_linea.ProdDettaglioLineaActivity"
|
android:name=".gest.prod_dettaglio_linea.ProdDettaglioLineaActivity"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.contab_doc_interni.edit_form.DocInterniEditFormActivity"
|
android:name=".gest.contab_doc_interni.edit_form.DocInterniEditFormActivity"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.picking_resi.PickingResiActivity"
|
android:name=".gest.picking_resi.PickingResiActivity"
|
||||||
android:screenOrientation="portrait"
|
android:theme="@style/Light"
|
||||||
android:theme="@style/Light" />
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.main.MainActivity"
|
android:name=".gest.main.MainActivity"
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
@ -56,30 +66,31 @@
|
|||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
|
||||||
android:name=".gest.accettazione_picking.AccettazionePickingActivity"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:theme="@style/Light"
|
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.login.LoginActivity"
|
android:name=".gest.login.LoginActivity"
|
||||||
android:theme="@style/Light" />
|
android:theme="@style/Light"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
|
<activity
|
||||||
|
android:name=".gest.accettazione_picking.AccettazionePickingActivity"
|
||||||
|
android:theme="@style/Light"
|
||||||
|
android:windowSoftInputMode="adjustNothing"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.lista_bancali.ListaBancaliActivity"
|
android:name=".gest.lista_bancali.ListaBancaliActivity"
|
||||||
android:label="@string/activity_lista_bancali_title"
|
android:label="@string/activity_lista_bancali_title"
|
||||||
android:screenOrientation="portrait"
|
android:theme="@style/Light"
|
||||||
android:theme="@style/Light" />
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.contenuto_bancale.ContenutoBancaleActivity"
|
android:name=".gest.contenuto_bancale.ContenutoBancaleActivity"
|
||||||
android:label="@string/activity_contenuto_bancale_title"
|
android:label="@string/activity_contenuto_bancale_title"
|
||||||
android:screenOrientation="portrait"
|
android:theme="@style/Light"
|
||||||
android:theme="@style/Light" />
|
android:configChanges="orientation|screenSize|keyboardHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.inventario.picking.PickingInventarioActivity"
|
android:name=".gest.inventario.picking.PickingInventarioActivity"
|
||||||
android:label="@string/activity_picking_inventario_title"
|
android:label="@string/activity_picking_inventario_title"
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:windowSoftInputMode="adjustNothing"
|
android:windowSoftInputMode="adjustNothing"
|
||||||
android:theme="@style/Light"/>
|
android:theme="@style/Light"
|
||||||
|
android:configChanges="orientation|screenSize|keyboardHidden"/>
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="firebase_crashlytics_collection_enabled"
|
android:name="firebase_crashlytics_collection_enabled"
|
||||||
|
|||||||
@ -254,7 +254,7 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
DocInterniComponent.Factory docInterniComponent();
|
DocInterniComponent.Factory docInterniComponent();
|
||||||
|
|
||||||
DialogSelectDocInfoComponent.Factory dialogSelectMgrpDtipPairComponent();
|
DialogSelectDocInfoComponent.Factory dialogSelectDocInfoNewViewComponent();
|
||||||
|
|
||||||
DialogSelectDocRowsComponent.Factory dialogSelectDocRowsComponent();
|
DialogSelectDocRowsComponent.Factory dialogSelectDocRowsComponent();
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import java.util.List;
|
|||||||
import it.integry.barcode_base_android_library.interfaces.BarcodeReaderInterface;
|
import it.integry.barcode_base_android_library.interfaces.BarcodeReaderInterface;
|
||||||
import it.integry.barcode_base_android_library.model.BarcodeSetting;
|
import it.integry.barcode_base_android_library.model.BarcodeSetting;
|
||||||
import it.integry.honeywellscannerlibrary.HoneyWellBarcodeReader;
|
import it.integry.honeywellscannerlibrary.HoneyWellBarcodeReader;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
|
||||||
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
import it.integry.integrywmsnative.gest.settings.MainSettingsFragment;
|
||||||
import it.integry.keyobardemulatorscannerlibrary.KeyboardEmulatorBarcodeReader;
|
import it.integry.keyobardemulatorscannerlibrary.KeyboardEmulatorBarcodeReader;
|
||||||
import it.integry.pointmobilescannerlibrary.PointMobileBarcodeReader;
|
import it.integry.pointmobilescannerlibrary.PointMobileBarcodeReader;
|
||||||
@ -136,12 +135,12 @@ public class BarcodeManager {
|
|||||||
|
|
||||||
public static void disable() {
|
public static void disable() {
|
||||||
mEnabled = false;
|
mEnabled = false;
|
||||||
UtilityLogger.trace("Barcode reader disabled");
|
// UtilityLogger.info("Barcode reader disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void enable() {
|
public static void enable() {
|
||||||
mEnabled = true;
|
mEnabled = true;
|
||||||
UtilityLogger.trace("Barcode reader enabled");
|
// UtilityLogger.info("Barcode reader enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isEnabled() {
|
public static boolean isEnabled() {
|
||||||
|
|||||||
@ -57,9 +57,17 @@ public class MenuConfiguration extends BaseMenuConfiguration {
|
|||||||
.setCodMenu("MG046")
|
.setCodMenu("MG046")
|
||||||
.setTitleText(R.string.vendita_title_fragment)
|
.setTitleText(R.string.vendita_title_fragment)
|
||||||
.setTitleIcon(R.drawable.ic_dashboard_spedizione)
|
.setTitleIcon(R.drawable.ic_dashboard_spedizione)
|
||||||
.setDrawerIcon(R.drawable.ic_black_upload)
|
.setDrawerIcon(R.drawable.ic_upload)
|
||||||
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1, null)))
|
.setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1, null)))
|
||||||
|
|
||||||
|
.addItem(new MenuItem()
|
||||||
|
.setID(R.id.nav_rettifica_spedizione)
|
||||||
|
.setCodMenu("MG064")
|
||||||
|
.setTitleText(R.string.rettifica_spedizione_fragment_title)
|
||||||
|
.setTitleIcon(R.drawable.ic_dashboard_rettifica_spedizione)
|
||||||
|
.setDrawerIcon(R.drawable.ic_rettifica_spedizione_drawer)
|
||||||
|
.setFragmentFactory(() -> RettificaGiacenzeFragment.newInstance(GestioneEnum.VENDITA)))
|
||||||
|
|
||||||
.addItem(new MenuItem()
|
.addItem(new MenuItem()
|
||||||
.setID(R.id.nav_free_picking)
|
.setID(R.id.nav_free_picking)
|
||||||
.setCodMenu("MG047")
|
.setCodMenu("MG047")
|
||||||
|
|||||||
@ -24,6 +24,7 @@ import androidx.databinding.BindingAdapter;
|
|||||||
import androidx.databinding.BindingConversion;
|
import androidx.databinding.BindingConversion;
|
||||||
import androidx.databinding.Observable;
|
import androidx.databinding.Observable;
|
||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
import com.google.android.material.datepicker.MaterialDatePicker;
|
import com.google.android.material.datepicker.MaterialDatePicker;
|
||||||
import com.google.android.material.textfield.TextInputEditText;
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
|
|||||||
@ -101,6 +101,7 @@ public abstract class _BaseRESTConsumer {
|
|||||||
if (response.getEsito() == EsitoType.OK) {
|
if (response.getEsito() == EsitoType.OK) {
|
||||||
if (!UtilityString.isNullOrEmpty(response.getErrorMessage())) {
|
if (!UtilityString.isNullOrEmpty(response.getErrorMessage())) {
|
||||||
onFailed.run(new Exception(response.getErrorMessage()));
|
onFailed.run(new Exception(response.getErrorMessage()));
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
T dataObj = response.getDto() != null ?
|
T dataObj = response.getDto() != null ?
|
||||||
response.getDto() :
|
response.getDto() :
|
||||||
|
|||||||
@ -1,22 +1,29 @@
|
|||||||
package it.integry.integrywmsnative.gest.contab_doc_interni.dto;
|
package it.integry.integrywmsnative.core.rest.model;
|
||||||
|
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class DocFromPickingDTO {
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
String codAnag, codVdes, tipoLista, noteDoc;
|
|
||||||
Date dataDoc;
|
public class SaveDocFromPickingRequestDTO {
|
||||||
Integer numDoc;
|
private String codAnag;
|
||||||
List<DatiCollo> colli;
|
private String codVdes;
|
||||||
List<Pedane> pedane;
|
private String tipoLista;
|
||||||
|
private String noteDoc;
|
||||||
|
private Date dataDoc;
|
||||||
|
private Integer numDoc;
|
||||||
|
private List<DatiCollo> colli;
|
||||||
|
private List<Pedane> pedane;
|
||||||
|
|
||||||
public String getCodAnag() {
|
public String getCodAnag() {
|
||||||
return codAnag;
|
return codAnag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DocFromPickingDTO setCodAnag(String codAnag) {
|
public SaveDocFromPickingRequestDTO setCodAnag(String codAnag) {
|
||||||
this.codAnag = codAnag;
|
this.codAnag = codAnag;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -25,7 +32,7 @@ public class DocFromPickingDTO {
|
|||||||
return codVdes;
|
return codVdes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DocFromPickingDTO setCodVdes(String codVdes) {
|
public SaveDocFromPickingRequestDTO setCodVdes(String codVdes) {
|
||||||
this.codVdes = codVdes;
|
this.codVdes = codVdes;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -34,7 +41,7 @@ public class DocFromPickingDTO {
|
|||||||
return tipoLista;
|
return tipoLista;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DocFromPickingDTO setTipoLista(String tipoLista) {
|
public SaveDocFromPickingRequestDTO setTipoLista(String tipoLista) {
|
||||||
this.tipoLista = tipoLista;
|
this.tipoLista = tipoLista;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -43,7 +50,7 @@ public class DocFromPickingDTO {
|
|||||||
return noteDoc;
|
return noteDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DocFromPickingDTO setNoteDoc(String noteDoc) {
|
public SaveDocFromPickingRequestDTO setNoteDoc(String noteDoc) {
|
||||||
this.noteDoc = noteDoc;
|
this.noteDoc = noteDoc;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -52,7 +59,7 @@ public class DocFromPickingDTO {
|
|||||||
return dataDoc;
|
return dataDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DocFromPickingDTO setDataDoc(Date dataDoc) {
|
public SaveDocFromPickingRequestDTO setDataDoc(Date dataDoc) {
|
||||||
this.dataDoc = dataDoc;
|
this.dataDoc = dataDoc;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -61,7 +68,7 @@ public class DocFromPickingDTO {
|
|||||||
return numDoc;
|
return numDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DocFromPickingDTO setNumDoc(Integer numDoc) {
|
public SaveDocFromPickingRequestDTO setNumDoc(Integer numDoc) {
|
||||||
this.numDoc = numDoc;
|
this.numDoc = numDoc;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -70,11 +77,24 @@ public class DocFromPickingDTO {
|
|||||||
return colli;
|
return colli;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DocFromPickingDTO setColli(List<DatiCollo> colli) {
|
public SaveDocFromPickingRequestDTO setColli(List<DatiCollo> colli) {
|
||||||
this.colli = colli;
|
this.colli = colli;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SaveDocFromPickingRequestDTO setColliFromMtbColts(List<MtbColt> colli) {
|
||||||
|
if(colli == null) return this;
|
||||||
|
|
||||||
|
this.colli = Stream.of(colli)
|
||||||
|
.map(x -> new DatiCollo()
|
||||||
|
.setDataCollo(x.getDataColloD())
|
||||||
|
.setSerCollo(x.getSerCollo())
|
||||||
|
.setNumCollo(x.getNumCollo())
|
||||||
|
.setGestione(x.getGestione()))
|
||||||
|
.toList();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public List<Pedane> getPedane() {
|
public List<Pedane> getPedane() {
|
||||||
return pedane;
|
return pedane;
|
||||||
}
|
}
|
||||||
@ -20,11 +20,7 @@ public class PermissionsHelper {
|
|||||||
public static void askPermissions(SplashActivity activity, Runnable onPermissionsConfirmed, RunnableArgs<Boolean> onPermissionsDenied) {
|
public static void askPermissions(SplashActivity activity, Runnable onPermissionsConfirmed, RunnableArgs<Boolean> onPermissionsDenied) {
|
||||||
|
|
||||||
List<String> permissionsToAsk = new ArrayList<>();
|
List<String> permissionsToAsk = new ArrayList<>();
|
||||||
permissionsToAsk.add(Manifest.permission.READ_EXTERNAL_STORAGE);
|
|
||||||
permissionsToAsk.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
|
||||||
permissionsToAsk.add(Manifest.permission.CAMERA);
|
permissionsToAsk.add(Manifest.permission.CAMERA);
|
||||||
//permissionsToAsk.add(Manifest.permission.INTERNET);
|
|
||||||
//permissionsToAsk.add(Manifest.permission.ACCESS_WIFI_STATE);
|
|
||||||
|
|
||||||
|
|
||||||
if(Build.VERSION.SDK_INT >= 23) {
|
if(Build.VERSION.SDK_INT >= 23) {
|
||||||
@ -34,6 +30,15 @@ public class PermissionsHelper {
|
|||||||
permissionsToAsk.add(Manifest.permission.BLUETOOTH_CONNECT);
|
permissionsToAsk.add(Manifest.permission.BLUETOOTH_CONNECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Build.VERSION.SDK_INT < 33) {
|
||||||
|
permissionsToAsk.add(Manifest.permission.READ_EXTERNAL_STORAGE);
|
||||||
|
permissionsToAsk.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
||||||
|
} else {
|
||||||
|
permissionsToAsk.add(Manifest.permission.READ_MEDIA_IMAGES);
|
||||||
|
permissionsToAsk.add(Manifest.permission.READ_MEDIA_AUDIO);
|
||||||
|
permissionsToAsk.add(Manifest.permission.READ_MEDIA_VIDEO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String[] permissionArray = new String[permissionsToAsk.size()];
|
String[] permissionArray = new String[permissionsToAsk.size()];
|
||||||
|
|||||||
@ -7,10 +7,6 @@ import it.integry.integrywmsnative.BuildConfig;
|
|||||||
|
|
||||||
public class UtilityLogger {
|
public class UtilityLogger {
|
||||||
|
|
||||||
public static void trace(String message) {
|
|
||||||
Logger.d(message, getPreviousStackTraceElement());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void info(String message) {
|
public static void info(String message) {
|
||||||
Logger.i(message);
|
Logger.i(message);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,6 +89,7 @@ public class MainAccettazioneFragment extends BaseFragment implements ISearchabl
|
|||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
|
setRetainInstance(true);
|
||||||
|
|
||||||
if (savedInstanceState != null && savedInstanceState.containsKey("mToolbar"))
|
if (savedInstanceState != null && savedInstanceState.containsKey("mToolbar"))
|
||||||
mToolbar = DataCache.retrieveItem(savedInstanceState.getString("mToolbar"));
|
mToolbar = DataCache.retrieveItem(savedInstanceState.getString("mToolbar"));
|
||||||
|
|||||||
@ -29,8 +29,8 @@ import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
|||||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.databinding.FragmentDocInterniBinding;
|
import it.integry.integrywmsnative.databinding.FragmentDocInterniBinding;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoResponseDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoView;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoView;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoViewModel;
|
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaArticoliDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaArticoliDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniEditFormActivity;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniEditFormActivity;
|
||||||
@ -70,6 +70,7 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
|||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
|
setRetainInstance(true);
|
||||||
|
|
||||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_doc_interni, container, false);
|
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_doc_interni, container, false);
|
||||||
MainApplication.appComponent
|
MainApplication.appComponent
|
||||||
@ -114,28 +115,23 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDocDetailsChanged(DialogSelectDocInfoViewModel selection) {
|
public void onDocDetailsChanged(DialogSelectDocInfoResponseDTO selection) {
|
||||||
if (selection.isInputValid()) {
|
mViewModel.setSelectedDocDetails(selection);
|
||||||
mViewModel.setSelectedDocDetails(selection);
|
|
||||||
mBinding.mainFab.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
mBinding.mainFab.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selection.requiresFornitore()) {
|
if (selection.isFornitoreRequired()) {
|
||||||
mBinding.codAnagContainer.setVisibility(View.VISIBLE);
|
mBinding.codAnagContainer.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
mBinding.codAnagContainer.setVisibility(View.GONE);
|
mBinding.codAnagContainer.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (selection.getSelectedGruppoArt() != 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.requiresDocData()) {
|
if (selection.isDocumentRequired()) {
|
||||||
mBinding.docContainer.setVisibility(View.VISIBLE);
|
mBinding.docContainer.setVisibility(View.VISIBLE);
|
||||||
mBinding.document.setText(Html.fromHtml(getString(R.string.doc_testata, String.valueOf(selection.getNumDoc()), UtilityDate.formatDate(selection.getDataDoc(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN))));
|
mBinding.document.setText(Html.fromHtml(getString(R.string.doc_testata, String.valueOf(selection.getNumDoc()), UtilityDate.formatDate(selection.getDataDoc(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN))));
|
||||||
} else {
|
} else {
|
||||||
@ -156,16 +152,12 @@ public class DocInterniFragment extends BaseFragment implements ITitledFragment,
|
|||||||
|
|
||||||
public void selectDocInfo() {
|
public void selectDocInfo() {
|
||||||
if (this.dialogInitialized) {
|
if (this.dialogInitialized) {
|
||||||
|
|
||||||
DialogSelectDocInfoView.newInstance(
|
DialogSelectDocInfoView.newInstance(
|
||||||
mDocInterniSetupDTO,
|
mDocInterniSetupDTO,
|
||||||
this.mViewModel.dtbTipi.getValue(),
|
this::onDocDetailsChanged,
|
||||||
this.mViewModel.mtbGrup.getValue(),
|
this::popMe)
|
||||||
this.mViewModel.fornitore.getValue(),
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
this.mViewModel.dataDoc.getValue(),
|
|
||||||
this.mViewModel.numDoc.getValue(),
|
|
||||||
this.mViewModel.note.getValue(),
|
|
||||||
this::onDocDetailsChanged
|
|
||||||
).show(requireActivity().getSupportFragmentManager(), "tag");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,12 +15,12 @@ import it.integry.integrywmsnative.core.di.BindableInteger;
|
|||||||
import it.integry.integrywmsnative.core.exception.NoDocTypeSelectedException;
|
import it.integry.integrywmsnative.core.exception.NoDocTypeSelectedException;
|
||||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoViewModel;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoResponseDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaArticoliDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaArticoliDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GruppiArticoloDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GruppoArticoloDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipiDocDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipoDocDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.rest.DocInterniRESTConsumer;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.rest.DocInterniRESTConsumer;
|
||||||
|
|
||||||
public class DocInterniViewModel {
|
public class DocInterniViewModel {
|
||||||
@ -35,8 +35,8 @@ public class DocInterniViewModel {
|
|||||||
private GrigliaArticoliDTO productsList;
|
private GrigliaArticoliDTO productsList;
|
||||||
private final MutableLiveData<List<DocInternoWrapper>> mDocsList = new MutableLiveData<>();
|
private final MutableLiveData<List<DocInternoWrapper>> mDocsList = new MutableLiveData<>();
|
||||||
|
|
||||||
public final MutableLiveData<TipiDocDTO> dtbTipi = new MutableLiveData<>();
|
public final MutableLiveData<TipoDocDTO> dtbTipi = new MutableLiveData<>();
|
||||||
public final MutableLiveData<GruppiArticoloDTO> mtbGrup = new MutableLiveData<>();
|
public final MutableLiveData<GruppoArticoloDTO> mtbGrup = new MutableLiveData<>();
|
||||||
public final MutableLiveData<FornitoreDTO> fornitore = new MutableLiveData<>();
|
public final MutableLiveData<FornitoreDTO> fornitore = new MutableLiveData<>();
|
||||||
public final MutableLiveData<Date> dataDoc = new MutableLiveData<>();
|
public final MutableLiveData<Date> dataDoc = new MutableLiveData<>();
|
||||||
public final MutableLiveData<String> numDoc = new MutableLiveData<>();
|
public final MutableLiveData<String> numDoc = new MutableLiveData<>();
|
||||||
@ -82,16 +82,16 @@ public class DocInterniViewModel {
|
|||||||
return mDocsList;
|
return mDocsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSelectedDocDetails(DialogSelectDocInfoViewModel selection) {
|
public void setSelectedDocDetails(DialogSelectDocInfoResponseDTO selection) {
|
||||||
|
|
||||||
this.fornitore.postValue(selection.getSelectedFornitore());
|
this.fornitore.postValue(selection.getFornitore());
|
||||||
this.mtbGrup.postValue(selection.getSelectedGruppoArt());
|
this.mtbGrup.postValue(selection.getGruppoArt());
|
||||||
this.dataDoc.postValue(selection.getDataDoc());
|
this.dataDoc.postValue(selection.getDataDoc());
|
||||||
this.numDoc.postValue(selection.getNumDoc());
|
this.numDoc.postValue(selection.getNumDoc() != null ? selection.getNumDoc().toString() : null);
|
||||||
this.note.postValue(selection.getNote());
|
this.note.postValue(selection.getNote());
|
||||||
|
|
||||||
if (selection.getSelectedTipoDoc() != null) {
|
if (selection.getTipoDoc() != null) {
|
||||||
this.dtbTipi.postValue(selection.getSelectedTipoDoc());
|
this.dtbTipi.postValue(selection.getTipoDoc());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ public class DocInterniViewModel {
|
|||||||
return this.dtbTipi.getValue().getCodDtip();
|
return this.dtbTipi.getValue().getCodDtip();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TipiDocDTO getTipoDoc() {
|
public TipoDocDTO getTipoDoc() {
|
||||||
if (this.dtbTipi.getValue() == null) {
|
if (this.dtbTipi.getValue() == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -197,7 +197,7 @@ public class DocInterniViewModel {
|
|||||||
|
|
||||||
void onDocInterniSetupFetched(DocInterniSetupDTO docInterniSetupDTO);
|
void onDocInterniSetupFetched(DocInterniSetupDTO docInterniSetupDTO);
|
||||||
|
|
||||||
void onDocDetailsChanged(DialogSelectDocInfoViewModel selection);
|
void onDocDetailsChanged(DialogSelectDocInfoResponseDTO selection);
|
||||||
|
|
||||||
void onDocumentEditRequest(SqlMtbColt document, GrigliaArticoliDTO arts);
|
void onDocumentEditRequest(SqlMtbColt document, GrigliaArticoliDTO arts);
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,5 @@ public interface DialogSelectDocInfoComponent {
|
|||||||
DialogSelectDocInfoComponent create();
|
DialogSelectDocInfoComponent create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void inject(DialogSelectDocInfoView dialogSelectDocInfoView);
|
void inject(DialogSelectDocInfoView dialogSelectDocInfoView);
|
||||||
|
}
|
||||||
}
|
|
||||||
@ -1,17 +1,14 @@
|
|||||||
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog;
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
|
||||||
|
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
import dagger.Provides;
|
import dagger.Provides;
|
||||||
|
|
||||||
@Module(subcomponents = DialogSelectDocInfoComponent.class)
|
@Module(subcomponents = DialogSelectDocInfoComponent.class)
|
||||||
public class DialogSelectDocInfoModule {
|
public class DialogSelectDocInfoModule {
|
||||||
|
|
||||||
@Singleton
|
|
||||||
@Provides
|
@Provides
|
||||||
DialogSelectDocInfoViewModel dialogSelectMgrpDtipPairViewModel() {
|
DialogSelectDocInfoViewModel providesDialogDialogSelectDocInfoNewViewViewModel() {
|
||||||
return new DialogSelectDocInfoViewModel();
|
return new DialogSelectDocInfoViewModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -0,0 +1,102 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GruppoArticoloDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipoDocDTO;
|
||||||
|
|
||||||
|
public class DialogSelectDocInfoResponseDTO {
|
||||||
|
|
||||||
|
private TipoDocDTO tipoDoc;
|
||||||
|
private GruppoArticoloDTO gruppoArt;
|
||||||
|
private FornitoreDTO fornitore;
|
||||||
|
private Date dataDoc;
|
||||||
|
private Integer numDoc;
|
||||||
|
private String note;
|
||||||
|
private boolean fornitoreRequired;
|
||||||
|
private boolean documentRequired;
|
||||||
|
private boolean noteRequired;
|
||||||
|
|
||||||
|
|
||||||
|
public TipoDocDTO getTipoDoc() {
|
||||||
|
return tipoDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogSelectDocInfoResponseDTO setTipoDoc(TipoDocDTO tipoDoc) {
|
||||||
|
this.tipoDoc = tipoDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GruppoArticoloDTO getGruppoArt() {
|
||||||
|
return gruppoArt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogSelectDocInfoResponseDTO setGruppoArt(GruppoArticoloDTO gruppoArt) {
|
||||||
|
this.gruppoArt = gruppoArt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FornitoreDTO getFornitore() {
|
||||||
|
return fornitore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogSelectDocInfoResponseDTO setFornitore(FornitoreDTO fornitore) {
|
||||||
|
this.fornitore = fornitore;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDataDoc() {
|
||||||
|
return dataDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogSelectDocInfoResponseDTO setDataDoc(Date dataDoc) {
|
||||||
|
this.dataDoc = dataDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumDoc() {
|
||||||
|
return numDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogSelectDocInfoResponseDTO setNumDoc(Integer numDoc) {
|
||||||
|
this.numDoc = numDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNote() {
|
||||||
|
return note;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogSelectDocInfoResponseDTO setNote(String note) {
|
||||||
|
this.note = note;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFornitoreRequired() {
|
||||||
|
return fornitoreRequired;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogSelectDocInfoResponseDTO setFornitoreRequired(boolean fornitoreRequired) {
|
||||||
|
this.fornitoreRequired = fornitoreRequired;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDocumentRequired() {
|
||||||
|
return documentRequired;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogSelectDocInfoResponseDTO setDocumentRequired(boolean documentRequired) {
|
||||||
|
this.documentRequired = documentRequired;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNoteRequired() {
|
||||||
|
return noteRequired;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogSelectDocInfoResponseDTO setNoteRequired(boolean noteRequired) {
|
||||||
|
this.noteRequired = noteRequired;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,240 +1,242 @@
|
|||||||
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog;
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.graphics.Color;
|
|
||||||
import android.graphics.drawable.ColorDrawable;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.databinding.DataBindingUtil;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
|
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.MainApplication;
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.di.BindableString;
|
|
||||||
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.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityObservable;
|
import it.integry.integrywmsnative.core.utility.UtilityObservable;
|
||||||
import it.integry.integrywmsnative.databinding.DialogSelectDocInfoBinding;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
import it.integry.integrywmsnative.databinding.DialogSelectDocInfoViewBinding;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GruppiArticoloDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.adapter.DialogSelectDocInfo_FornitoreAdapter;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.adapter.DialogSelectDocInfo_GroupArtAdapter;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.adapter.DialogSelectDocInfo_NoteAdapter;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.adapter.DialogSelectDocInfo_TipoDocAdapter;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.DocumentRequiredException;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.FornitoreRequiredException;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.NoteRequiredException;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.TipoDocRequiredException;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipiDocDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GruppoArticoloDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipoDocDTO;
|
||||||
|
|
||||||
public class DialogSelectDocInfoView extends BaseDialogFragment implements DialogSelectDocInfoViewModel.Listener {
|
public class DialogSelectDocInfoView extends BaseDialogFragment {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
DialogSelectDocInfoViewModel mViewModel;
|
DialogSelectDocInfoViewModel mViewModel;
|
||||||
private Context mCurrentContext;
|
|
||||||
|
private DialogSelectDocInfoViewBinding mBindings;
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
private final DocInterniSetupDTO mDocInputData;
|
||||||
|
private final RunnableArgs<DialogSelectDocInfoResponseDTO> onConfirm;
|
||||||
|
private final Runnable onAbort;
|
||||||
|
|
||||||
|
|
||||||
public BindableString codDtip = new BindableString();
|
public ObservableField<TipoDocDTO> selectedTipoDoc = new ObservableField<>();
|
||||||
public BindableString codMgrp = new BindableString();
|
public ObservableField<GruppoArticoloDTO> selectedGroupArt = new ObservableField<>();
|
||||||
public BindableString codAnag = new BindableString();
|
public ObservableField<FornitoreDTO> selectedFornitore = new ObservableField<>();
|
||||||
public BindableString numDoc = new BindableString();
|
public ObservableField<String> selectedNumDoc = new ObservableField<>();
|
||||||
public BindableString note = new BindableString();
|
public ObservableField<Date> selectedDataDoc = new ObservableField<>();
|
||||||
public ObservableField<Date> dataDoc = new ObservableField<>();
|
public ObservableField<String> selectedNote = new ObservableField<>();
|
||||||
|
|
||||||
private ArrayAdapter<String> arrayAdapterCodDtips;
|
public ObservableField<Boolean> isFornitoreRequired = new ObservableField<>();
|
||||||
private ArrayAdapter<String> arrayAdapterCodMgrps;
|
public ObservableField<Boolean> isDocumentRequired = new ObservableField<>();
|
||||||
private ArrayAdapter<String> arrayAdapterCodAnags;
|
public ObservableField<Boolean> isNoteRequired = new ObservableField<>();
|
||||||
private ArrayAdapter<String> arrayAdapterNote;
|
|
||||||
private DialogSelectDocInfoBinding mBindings;
|
|
||||||
|
|
||||||
private final RunnableArgs<DialogSelectDocInfoViewModel> currentOnFilterDone;
|
public static DialogSelectDocInfoView newInstance(DocInterniSetupDTO docInputData,
|
||||||
private final DocInterniSetupDTO docInterniSetupDTO;
|
RunnableArgs<DialogSelectDocInfoResponseDTO> onConfirm,
|
||||||
private final TipiDocDTO selectedDtip;
|
Runnable onAbort) {
|
||||||
private final GruppiArticoloDTO selectedGrp;
|
return new DialogSelectDocInfoView(docInputData, onConfirm, onAbort);
|
||||||
private final FornitoreDTO selectedAnag;
|
|
||||||
private final Date selectedDataDoc;
|
|
||||||
private final String selectedNumDoc;
|
|
||||||
private final String selectedNote;
|
|
||||||
|
|
||||||
public static DialogSelectDocInfoView newInstance(
|
|
||||||
DocInterniSetupDTO docInterniSetupDTO,
|
|
||||||
TipiDocDTO tipiDocDTO,
|
|
||||||
GruppiArticoloDTO gruppiArticoloDTO,
|
|
||||||
FornitoreDTO fornitoreDTO,
|
|
||||||
Date dataDoc,
|
|
||||||
String numDoc,
|
|
||||||
String note,
|
|
||||||
RunnableArgs<DialogSelectDocInfoViewModel> onDismiss
|
|
||||||
) {
|
|
||||||
return new DialogSelectDocInfoView(docInterniSetupDTO, tipiDocDTO, gruppiArticoloDTO, fornitoreDTO, dataDoc, numDoc,note, onDismiss);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private DialogSelectDocInfoView(DocInterniSetupDTO docInputData,
|
||||||
private DialogSelectDocInfoView(DocInterniSetupDTO docInterniSetupDTO,
|
RunnableArgs<DialogSelectDocInfoResponseDTO> onConfirm,
|
||||||
TipiDocDTO tipiDocDTO,
|
Runnable onAbort) {
|
||||||
GruppiArticoloDTO gruppiArticoloDTO,
|
|
||||||
FornitoreDTO fornitoreDTO,
|
|
||||||
Date dataDoc,
|
|
||||||
String numDoc,
|
|
||||||
String note,
|
|
||||||
RunnableArgs<DialogSelectDocInfoViewModel> onDismiss) {
|
|
||||||
super();
|
super();
|
||||||
currentOnFilterDone = onDismiss;
|
|
||||||
this.docInterniSetupDTO = docInterniSetupDTO;
|
this.mDocInputData = docInputData;
|
||||||
selectedDtip = tipiDocDTO;
|
this.onConfirm = onConfirm;
|
||||||
selectedGrp = gruppiArticoloDTO;
|
this.onAbort = onAbort;
|
||||||
selectedDataDoc = dataDoc;
|
|
||||||
selectedNumDoc = numDoc;
|
|
||||||
selectedNote = note;
|
|
||||||
selectedAnag = fornitoreDTO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||||
super.onDismiss(dialog);
|
this.mContext = requireContext();
|
||||||
if (currentOnFilterDone != null) currentOnFilterDone.run(mViewModel);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
MainApplication.appComponent
|
||||||
@Override
|
.dialogSelectDocInfoNewViewComponent()
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
||||||
this.mCurrentContext = this.requireActivity();
|
|
||||||
|
|
||||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.dialog_select_doc_info, container, false);
|
|
||||||
mBindings.setLifecycleOwner(this);
|
|
||||||
|
|
||||||
MainApplication
|
|
||||||
.appComponent
|
|
||||||
.dialogSelectMgrpDtipPairComponent()
|
|
||||||
.create()
|
.create()
|
||||||
.inject(this);
|
.inject(this);
|
||||||
mViewModel.init(docInterniSetupDTO);
|
|
||||||
mViewModel.setListeners(this);
|
mBindings = DialogSelectDocInfoViewBinding.inflate(LayoutInflater.from(this.mContext), null, false);
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
mBindings.setView(this);
|
mBindings.setView(this);
|
||||||
mBindings.setViewmodel(mViewModel);
|
|
||||||
|
|
||||||
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
mViewModel.setFornitori(mDocInputData.getFornitori());
|
||||||
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
|
||||||
initView();
|
|
||||||
|
|
||||||
|
var cancelable = true;
|
||||||
|
|
||||||
mBindings.positiveBtn.setOnClickListener(view -> {
|
var alertDialog = new MaterialAlertDialogBuilder(this.mContext)
|
||||||
if (this.isInputValid()) {
|
.setView(mBindings.getRoot())
|
||||||
getDialog().dismiss();
|
.setCancelable(cancelable)
|
||||||
|
.setPositiveButton(R.string.confirm, (dialog, which) -> {
|
||||||
|
//Volutamente vuoto
|
||||||
|
})
|
||||||
|
.setNegativeButton(R.string.abort, (dialog, which) -> {
|
||||||
|
//Volutamente vuoto
|
||||||
|
})
|
||||||
|
.create();
|
||||||
|
|
||||||
|
alertDialog.setOnShowListener(this);
|
||||||
|
alertDialog.setCanceledOnTouchOutside(cancelable);
|
||||||
|
|
||||||
|
return alertDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onShow(DialogInterface dialogInterface) {
|
||||||
|
super.onShow(dialogInterface);
|
||||||
|
|
||||||
|
var alertDialog = ((AlertDialog) dialogInterface);
|
||||||
|
|
||||||
|
var positiveButton = alertDialog.getButton(DialogInterface.BUTTON_POSITIVE);
|
||||||
|
positiveButton.setOnClickListener(view -> {
|
||||||
|
try {
|
||||||
|
mBindings.inputCodDtip.setErrorEnabled(false);
|
||||||
|
mBindings.inputCodDtip.setError(null);
|
||||||
|
mBindings.inputCodAnagForn.setErrorEnabled(false);
|
||||||
|
mBindings.inputCodAnagForn.setError(null);
|
||||||
|
mBindings.inputNumDocLayout.setErrorEnabled(false);
|
||||||
|
mBindings.inputNumDoc.setError(null);
|
||||||
|
mBindings.inputDataDocLayout.setErrorEnabled(false);
|
||||||
|
mBindings.inputDataDoc.setError(null);
|
||||||
|
mBindings.inputNoteLayout.setErrorEnabled(false);
|
||||||
|
mBindings.inputNoteLayout.setError(null);
|
||||||
|
|
||||||
|
mViewModel.validate();
|
||||||
|
alertDialog.dismiss();
|
||||||
|
|
||||||
|
if (this.onConfirm != null)
|
||||||
|
this.onConfirm.run(new DialogSelectDocInfoResponseDTO()
|
||||||
|
.setTipoDoc(selectedTipoDoc.get())
|
||||||
|
.setFornitore(selectedFornitore.get())
|
||||||
|
.setGruppoArt(selectedGroupArt.get())
|
||||||
|
.setDataDoc(selectedDataDoc.get())
|
||||||
|
.setNumDoc(!UtilityString.isNullOrEmpty(selectedNumDoc.get()) ? Integer.parseInt(selectedNumDoc.get()) : null)
|
||||||
|
.setNote(selectedNote.get()));
|
||||||
|
} catch (TipoDocRequiredException tipoDocRequiredException) {
|
||||||
|
mBindings.inputCodDtip.setErrorEnabled(true);
|
||||||
|
mBindings.inputCodDtip.setError("Campo richiesto");
|
||||||
|
} catch (FornitoreRequiredException fornitoreRequiredException) {
|
||||||
|
mBindings.inputCodAnagForn.setErrorEnabled(true);
|
||||||
|
mBindings.inputCodAnagForn.setError("Campo richiesto");
|
||||||
|
} catch (DocumentRequiredException documentRequiredException) {
|
||||||
|
mBindings.inputNumDocLayout.setErrorEnabled(true);
|
||||||
|
mBindings.inputNumDocLayout.setError("Campo richiesto");
|
||||||
|
mBindings.inputDataDocLayout.setErrorEnabled(true);
|
||||||
|
mBindings.inputDataDocLayout.setError("Campo richiesto");
|
||||||
|
} catch (NoteRequiredException noteRequiredException) {
|
||||||
|
mBindings.inputNoteLayout.setErrorEnabled(true);
|
||||||
|
mBindings.inputNoteLayout.setError("Campo richiesto");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
return mBindings.getRoot();
|
var negativeButton = alertDialog.getButton(DialogInterface.BUTTON_NEGATIVE);
|
||||||
|
negativeButton.setOnClickListener(view -> {
|
||||||
|
alertDialog.dismiss();
|
||||||
|
if (this.onAbort != null) this.onAbort.run();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.initBindings();
|
||||||
|
this.initAdapters();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initView() {
|
|
||||||
initArrayAdapters();
|
|
||||||
initBindables();
|
|
||||||
|
|
||||||
if (selectedDtip != null) {
|
private void initBindings() {
|
||||||
codDtip.set(selectedDtip.getLabel());
|
this.isFornitoreRequired.set(mViewModel.isFornitoreRequired().getValue());
|
||||||
}
|
mViewModel.isFornitoreRequired().observe(this, val -> this.isFornitoreRequired.set(val));
|
||||||
if (selectedGrp != null) {
|
|
||||||
codMgrp.set(selectedGrp.getLabel());
|
this.isDocumentRequired.set(mViewModel.isDocumentRequired().getValue());
|
||||||
}
|
mViewModel.isDocumentRequired().observe(this, val -> this.isDocumentRequired.set(val));
|
||||||
if (selectedAnag != null) {
|
|
||||||
codAnag.set(selectedAnag.getLabel());
|
this.isNoteRequired.set(mViewModel.isNoteRequired().getValue());
|
||||||
}
|
mViewModel.isNoteRequired().observe(this, val -> this.isNoteRequired.set(val));
|
||||||
if (selectedDataDoc != null) {
|
|
||||||
dataDoc.set(selectedDataDoc);
|
|
||||||
}
|
UtilityObservable.addPropertyChanged(this.selectedTipoDoc, mViewModel::setTipoDoc);
|
||||||
if (selectedNumDoc != null) {
|
UtilityObservable.addPropertyChanged(this.selectedGroupArt, mViewModel::setGruppoArt);
|
||||||
numDoc.set(selectedNumDoc);
|
UtilityObservable.addPropertyChanged(this.selectedFornitore, mViewModel::setFornitore);
|
||||||
}
|
UtilityObservable.addPropertyChanged(this.selectedDataDoc, mViewModel::setDataDoc);
|
||||||
if (selectedNote != null) {
|
UtilityObservable.addPropertyChanged(this.selectedNumDoc,
|
||||||
note.set(selectedNote);
|
value -> this.mViewModel.setNumDoc(UtilityString.isNullOrEmpty(value) ? null : Integer.parseInt(value)));
|
||||||
}
|
UtilityObservable.addPropertyChanged(this.selectedNote, mViewModel::setNote);
|
||||||
|
|
||||||
|
mViewModel.isFornitoreRequired()
|
||||||
|
.observe(this, val -> {
|
||||||
|
if (!val) {
|
||||||
|
this.selectedFornitore.set(null);
|
||||||
|
mBindings.filledExposedDropdownCodAnagList.setText("");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mViewModel.isNoteRequired()
|
||||||
|
.observe(this, val -> {
|
||||||
|
if (!val) {
|
||||||
|
this.selectedNote.set(null);
|
||||||
|
mBindings.filledExposedDropdownNote.setText("");
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isInputValid() {
|
private void initAdapters() {
|
||||||
if (this.mViewModel.getSelectedTipoDoc() == null) {
|
var arrayAdapterCodDtips = new DialogSelectDocInfo_TipoDocAdapter(mContext, R.layout.array_adapter_single_item, mDocInputData.getTipiDoc());
|
||||||
mBindings.inputCodDtip.setErrorEnabled(true);
|
|
||||||
mBindings.inputCodDtip.setError("Seleziona un tipo documento");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.mViewModel.requiresFornitore() && this.mViewModel.getSelectedFornitore() == null) {
|
|
||||||
mBindings.inputCodAnagForn.setErrorEnabled(true);
|
|
||||||
mBindings.inputCodAnagForn.setError("Seleziona un fornitore/destinatario");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.mViewModel.requiresDocData() && this.mViewModel.getDataDoc() == null){
|
|
||||||
mBindings.inputDataDoc.setError("Seleziona la data del documento");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.mViewModel.requiresDocData() && (this.mViewModel.getNumDoc() == null || this.mViewModel.getNumDoc().isEmpty() )){
|
|
||||||
mBindings.inputNumDoc.setError("Seleziona il numero del documento");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.mViewModel.requiresNote() && (this.mViewModel.getNote() == null || this.mViewModel.getNote().isEmpty() )){
|
|
||||||
mBindings.inputNoteLayout.setErrorEnabled(true);
|
|
||||||
mBindings.inputNoteLayout.setError("Specifica delle note per il documento");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initArrayAdapters() {
|
|
||||||
|
|
||||||
arrayAdapterCodDtips = new ArrayAdapter<>(mCurrentContext, R.layout.dialog_select_doc_info__single_item);
|
|
||||||
arrayAdapterCodDtips.addAll(mViewModel.getAvailableCodDtips());
|
|
||||||
mBindings.filledExposedDropdownCodDtips.setAdapter(arrayAdapterCodDtips);
|
mBindings.filledExposedDropdownCodDtips.setAdapter(arrayAdapterCodDtips);
|
||||||
|
mBindings.filledExposedDropdownCodDtips.setOnItemClickListener((adapterView, view, i, l) -> {
|
||||||
|
this.selectedTipoDoc.set(
|
||||||
|
((DialogSelectDocInfo_TipoDocAdapter.ListModel) adapterView.getItemAtPosition(i))
|
||||||
|
.getOriginalModel());
|
||||||
|
});
|
||||||
|
|
||||||
arrayAdapterCodMgrps = new ArrayAdapter<>(mCurrentContext, R.layout.dialog_select_doc_info__single_item);
|
var arrayAdapterCodMgrps = new DialogSelectDocInfo_GroupArtAdapter(mContext, R.layout.array_adapter_single_item, mDocInputData.getGruppiArt());
|
||||||
arrayAdapterCodMgrps.addAll(mViewModel.getAvailableCodMgrps());
|
|
||||||
mBindings.filledExposedDropdownCodMgrps.setAdapter(arrayAdapterCodMgrps);
|
mBindings.filledExposedDropdownCodMgrps.setAdapter(arrayAdapterCodMgrps);
|
||||||
|
mBindings.filledExposedDropdownCodMgrps.setOnItemClickListener((adapterView, view, i, l) -> {
|
||||||
|
this.selectedGroupArt.set(
|
||||||
|
((DialogSelectDocInfo_GroupArtAdapter.ListModel) adapterView.getItemAtPosition(i))
|
||||||
|
.getOriginalModel());
|
||||||
|
});
|
||||||
|
|
||||||
arrayAdapterCodAnags = new ArrayAdapter<>(mCurrentContext, R.layout.dialog_select_doc_info__single_item);
|
var arrayAdapterFornitori = new DialogSelectDocInfo_FornitoreAdapter(mContext, R.layout.array_adapter_single_item, mDocInputData.getFornitori());
|
||||||
arrayAdapterCodAnags.addAll(mViewModel.getAvailableFornitori());
|
mBindings.filledExposedDropdownCodAnagList.setAdapter(arrayAdapterFornitori);
|
||||||
mBindings.filledExposedDropdownCodAnagList.setAdapter(arrayAdapterCodAnags);
|
mBindings.filledExposedDropdownCodAnagList.setOnItemClickListener((adapterView, view, i, l) -> {
|
||||||
|
this.selectedFornitore.set(
|
||||||
|
((DialogSelectDocInfo_FornitoreAdapter.ListModel) adapterView.getItemAtPosition(i))
|
||||||
|
.getOriginalModel());
|
||||||
|
});
|
||||||
|
|
||||||
arrayAdapterNote = new ArrayAdapter<>(mCurrentContext, R.layout.dialog_select_doc_info__single_item);
|
var arrayAdapterNote = new DialogSelectDocInfo_NoteAdapter(mContext, R.layout.array_adapter_single_item, SettingsManager.iDB().getNotePerditaDocInterni());
|
||||||
arrayAdapterNote.addAll(mViewModel.getAdditionalNotes());
|
|
||||||
mBindings.filledExposedDropdownNote.setAdapter(arrayAdapterNote);
|
mBindings.filledExposedDropdownNote.setAdapter(arrayAdapterNote);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initBindables() {
|
}
|
||||||
BindableString.registerListener(codDtip, codDtip -> {
|
|
||||||
mViewModel.setCodDtip(codDtip);
|
|
||||||
mBindings.inputCodAnagForn.setVisibility(mViewModel.requiresFornitore() ? View.VISIBLE : View.GONE);
|
|
||||||
mBindings.inputDataDocLayout.setVisibility(mViewModel.requiresDocData() ? View.VISIBLE : View.GONE);
|
|
||||||
mBindings.inputNumDocLayout.setVisibility(mViewModel.requiresDocData() ? View.VISIBLE : View.GONE);
|
|
||||||
mBindings.inputNoteLayout.setVisibility(mViewModel.requiresNote() ? View.VISIBLE : View.GONE);
|
|
||||||
});
|
|
||||||
BindableString.registerListener(codMgrp, mViewModel::setCodMgrp);
|
|
||||||
BindableString.registerListener(codAnag, mViewModel::setCodAnag);
|
|
||||||
BindableString.registerListener(numDoc, mViewModel::setNumDoc);
|
|
||||||
BindableString.registerListener(note, mViewModel::setNote);
|
|
||||||
UtilityObservable.addPropertyChanged(this.dataDoc, (value) -> {
|
|
||||||
this.mViewModel.setDataDoc(value);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDocTypeSelected() {
|
|
||||||
arrayAdapterCodAnags.clear();
|
|
||||||
if (mViewModel.getSelectedFornitore() != null && !mViewModel.getAvailableFornitori().contains(mViewModel.getSelectedFornitore().getLabel())) {
|
|
||||||
codAnag.set("");
|
|
||||||
}
|
|
||||||
if (mViewModel.getNote() != null && ! mViewModel.requiresNote()){
|
|
||||||
mViewModel.setNote(null);
|
|
||||||
}
|
|
||||||
arrayAdapterCodAnags.addAll(mViewModel.getAvailableFornitori());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,198 +1,163 @@
|
|||||||
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog;
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog;
|
||||||
|
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
import androidx.lifecycle.ViewModel;
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.DocumentRequiredException;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.DocInterniSetupDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.FornitoreRequiredException;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.NoteRequiredException;
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception.TipoDocRequiredException;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GruppiArticoloDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GruppoArticoloDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipiDocDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipoDocDTO;
|
||||||
|
|
||||||
|
public class DialogSelectDocInfoViewModel extends ViewModel {
|
||||||
|
|
||||||
|
private final MutableLiveData<TipoDocDTO> tipoDoc = new MutableLiveData<>();
|
||||||
|
private final MutableLiveData<GruppoArticoloDTO> gruppoArt = new MutableLiveData<>();
|
||||||
|
private final MutableLiveData<FornitoreDTO> fornitore = new MutableLiveData<>();
|
||||||
|
private final MutableLiveData<Date> dataDoc = new MutableLiveData<>();
|
||||||
|
private final MutableLiveData<Integer> numDoc = new MutableLiveData<>();
|
||||||
|
private final MutableLiveData<String> note = new MutableLiveData<>();
|
||||||
|
|
||||||
|
private final MutableLiveData<List<FornitoreDTO>> availableFornitori = new MutableLiveData<>();
|
||||||
|
|
||||||
|
|
||||||
public class DialogSelectDocInfoViewModel {
|
private final MutableLiveData<Boolean> fornitoreRequired = new MutableLiveData<>(false);
|
||||||
|
private final MutableLiveData<Boolean> documentRequired = new MutableLiveData<>(false);
|
||||||
|
private final MutableLiveData<Boolean> noteRequired = new MutableLiveData<>(false);
|
||||||
|
|
||||||
|
public DialogSelectDocInfoViewModel() {
|
||||||
|
tipoDoc.observeForever(val ->
|
||||||
|
fornitoreRequired.postValue(
|
||||||
|
val != null &&
|
||||||
|
(val.getGestioneDoc().equals("T") ||
|
||||||
|
val.getGestioneDoc().equals("A") ||
|
||||||
|
(val.getGestioneDoc().equals("P") &&
|
||||||
|
!val.getGestione().equals("L")))));
|
||||||
|
|
||||||
private DocInterniSetupDTO mDocInterniSetupDTO;
|
tipoDoc.observeForever(val ->
|
||||||
|
documentRequired.postValue(
|
||||||
|
val != null &&
|
||||||
|
val.getGestioneDoc().equalsIgnoreCase("P") && !val.getGestione().equalsIgnoreCase("L")));
|
||||||
|
|
||||||
private String mTipoDoc;
|
tipoDoc.observeForever(val ->
|
||||||
|
noteRequired.postValue(
|
||||||
private String mGruppoArt;
|
val != null &&
|
||||||
|
val.getGestioneDoc().equals("P") &&
|
||||||
private String mFornitore;
|
val.getGestione().equals("L")));
|
||||||
|
|
||||||
private Date mDataDoc;
|
|
||||||
|
|
||||||
private String mNumDoc;
|
|
||||||
|
|
||||||
private String mNote;
|
|
||||||
|
|
||||||
private Listener mListener;
|
|
||||||
|
|
||||||
public void init(DocInterniSetupDTO initialList) {
|
|
||||||
this.mDocInterniSetupDTO = initialList;
|
|
||||||
this.mTipoDoc = null;
|
|
||||||
this.mGruppoArt = null;
|
|
||||||
this.mFornitore = null;
|
|
||||||
this.mDataDoc = null;
|
|
||||||
this.mNumDoc = null;
|
|
||||||
this.mNote = null;
|
|
||||||
this.mListener = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCodDtip() {
|
public void setFornitori(List<FornitoreDTO> fornitori) {
|
||||||
return mTipoDoc;
|
tipoDoc.observeForever(val -> {
|
||||||
|
availableFornitori.postValue(Stream.of(fornitori)
|
||||||
|
.filter(forn -> {
|
||||||
|
if (val.getGestioneDoc().equalsIgnoreCase("T")) {
|
||||||
|
return forn.getTipoAnag().equalsIgnoreCase("D") &&
|
||||||
|
forn.getGestioneAnag().equalsIgnoreCase(
|
||||||
|
val.getGestione().equalsIgnoreCase("V") ? "V" : "A"
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return forn.getTipoAnag().equalsIgnoreCase("F");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.toList());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCodDtip(String codDtip) {
|
|
||||||
this.mTipoDoc = codDtip;
|
public MutableLiveData<Boolean> isFornitoreRequired() {
|
||||||
if (this.getSelectedTipoDoc() != null) {
|
return fornitoreRequired;
|
||||||
this.mListener.onDocTypeSelected();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCodMgrp() {
|
public MutableLiveData<Boolean> isDocumentRequired() {
|
||||||
return mGruppoArt;
|
return documentRequired;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCodMgrp(String codMgrp) {
|
public MutableLiveData<Boolean> isNoteRequired() {
|
||||||
this.mGruppoArt = codMgrp;
|
return noteRequired;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCodAnag(String codAnag) {
|
|
||||||
this.mFornitore = codAnag;
|
public MutableLiveData<TipoDocDTO> getTipoDoc() {
|
||||||
|
return tipoDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogSelectDocInfoViewModel setTipoDoc(TipoDocDTO tipoDoc) {
|
||||||
|
this.tipoDoc.postValue(tipoDoc);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GruppoArticoloDTO getGruppoArt() {
|
||||||
|
return gruppoArt.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogSelectDocInfoViewModel setGruppoArt(GruppoArticoloDTO gruppoArt) {
|
||||||
|
this.gruppoArt.postValue(gruppoArt);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FornitoreDTO getFornitore() {
|
||||||
|
return fornitore.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogSelectDocInfoViewModel setFornitore(FornitoreDTO fornitore) {
|
||||||
|
this.fornitore.postValue(fornitore);
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDataDoc() {
|
public Date getDataDoc() {
|
||||||
return mDataDoc;
|
return dataDoc.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDataDoc(Date mDataDoc) {
|
public DialogSelectDocInfoViewModel setDataDoc(Date dataDoc) {
|
||||||
this.mDataDoc = mDataDoc;
|
this.dataDoc.postValue(dataDoc);
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNumDoc() {
|
public Integer getNumDoc() {
|
||||||
return mNumDoc;
|
return numDoc.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNumDoc(String numDoc) {
|
public DialogSelectDocInfoViewModel setNumDoc(Integer numDoc) {
|
||||||
this.mNumDoc = numDoc;
|
this.numDoc.postValue(numDoc);
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNote() {
|
public String getNote() {
|
||||||
return mNote;
|
return note.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DialogSelectDocInfoViewModel setNote(String note) {
|
public DialogSelectDocInfoViewModel setNote(String note) {
|
||||||
this.mNote = note;
|
this.note.postValue(note);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DialogSelectDocInfoViewModel setListeners(Listener listener) {
|
|
||||||
this.mListener = listener;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> getAvailableCodDtips() {
|
public boolean validate() throws TipoDocRequiredException, FornitoreRequiredException, DocumentRequiredException, NoteRequiredException {
|
||||||
return mDocInterniSetupDTO.getTipiDoc() != null ? Stream.of(mDocInterniSetupDTO.getTipiDoc()).map(TipiDocDTO::getLabel).toList() : new ArrayList<>();
|
if (this.getTipoDoc().getValue() == null) {
|
||||||
}
|
throw new TipoDocRequiredException();
|
||||||
|
|
||||||
public List<String> getAvailableCodMgrps() {
|
|
||||||
return mDocInterniSetupDTO.getGruppiArt() != null ? Stream.of(mDocInterniSetupDTO.getGruppiArt()).map(GruppiArticoloDTO::getLabel).toList() : new ArrayList<>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> getAvailableFornitori() {
|
|
||||||
if (!this.requiresFornitore()) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
TipiDocDTO selectedDocType = getSelectedTipoDoc();
|
|
||||||
|
|
||||||
return Stream.of(mDocInterniSetupDTO.getFornitori())
|
|
||||||
.filter(forn -> {
|
|
||||||
if (selectedDocType.getGestioneDoc().equalsIgnoreCase("T")) {
|
|
||||||
return forn.getTipoAnag().equalsIgnoreCase("D") &&
|
|
||||||
forn.getGestioneAnag().equalsIgnoreCase(
|
|
||||||
selectedDocType.getGestione().equalsIgnoreCase("V") ? "V" : "A"
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return forn.getTipoAnag().equalsIgnoreCase("F");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.map(FornitoreDTO::getLabel).toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
public TipiDocDTO getSelectedTipoDoc() {
|
|
||||||
return Stream.of(mDocInterniSetupDTO.getTipiDoc()).filter(x -> x.getLabel().equals(mTipoDoc)).findFirstOrElse(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public FornitoreDTO getSelectedFornitore() {
|
|
||||||
return Stream.of(mDocInterniSetupDTO.getFornitori()).filter(x -> x.getLabel().equals(mFornitore)).findFirstOrElse(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GruppiArticoloDTO getSelectedGruppoArt() {
|
|
||||||
if (mGruppoArt == null) {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Stream.of(mDocInterniSetupDTO.getGruppiArt()).filter(x -> x.getLabel().equals(mGruppoArt)).findFirstOrElse(null);
|
if (Boolean.TRUE.equals(this.isFornitoreRequired().getValue()) && this.getFornitore() == null) {
|
||||||
}
|
throw new FornitoreRequiredException();
|
||||||
|
|
||||||
public boolean requiresFornitore() {
|
|
||||||
return this.getSelectedTipoDoc() != null && (
|
|
||||||
this.getSelectedTipoDoc().getGestioneDoc().equals("T") ||
|
|
||||||
this.getSelectedTipoDoc().getGestioneDoc().equals("A") ||
|
|
||||||
(
|
|
||||||
this.getSelectedTipoDoc().getGestioneDoc().equals("P") &&
|
|
||||||
!this.getSelectedTipoDoc().getGestione().equals("L")
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean requiresNote() {
|
|
||||||
return this.getSelectedTipoDoc() != null &&
|
|
||||||
this.getSelectedTipoDoc().getGestioneDoc().equals("P") &&
|
|
||||||
this.getSelectedTipoDoc().getGestione().equals("L");
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isInputValid() {
|
|
||||||
if (this.getSelectedTipoDoc() == null) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.requiresFornitore() && this.getSelectedFornitore() == null) {
|
if (Boolean.TRUE.equals(this.isDocumentRequired().getValue()) && (this.getDataDoc() == null || this.getNumDoc() == null)) {
|
||||||
return false;
|
throw new DocumentRequiredException();
|
||||||
}
|
|
||||||
|
|
||||||
if (this.requiresDocData() && (this.getDataDoc() == null || this.getNumDoc() == null)) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (this.requiresNote() && (this.getNote() == null || this.getNote().length() <= 0)) {
|
if (Boolean.TRUE.equals(this.isNoteRequired().getValue()) && UtilityString.isNullOrEmpty(this.getNote())) {
|
||||||
return false;
|
throw new NoteRequiredException();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public boolean requiresDocData() {
|
|
||||||
TipiDocDTO doc = this.getSelectedTipoDoc();
|
|
||||||
return doc != null && doc.getGestioneDoc().equalsIgnoreCase("P") && !doc.getGestione().equalsIgnoreCase("L");
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> getAdditionalNotes() {
|
|
||||||
return SettingsManager.iDB().getNotePerditaDocInterni();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface Listener extends ILoadingListener {
|
|
||||||
|
|
||||||
void onError(Exception ex);
|
|
||||||
|
|
||||||
void onDocTypeSelected();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.FornitoreDTO;
|
||||||
|
|
||||||
|
public class DialogSelectDocInfo_FornitoreAdapter extends ArrayAdapter<DialogSelectDocInfo_FornitoreAdapter.ListModel> {
|
||||||
|
|
||||||
|
public DialogSelectDocInfo_FornitoreAdapter(@NonNull Context context, int resource, List<FornitoreDTO> inputData) {
|
||||||
|
super(context, resource);
|
||||||
|
|
||||||
|
if (inputData == null) return;
|
||||||
|
|
||||||
|
List<ListModel> mDataset = Stream.of(inputData)
|
||||||
|
.map(x -> new ListModel()
|
||||||
|
.setOriginalModel(x))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
addAll(mDataset);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ListModel {
|
||||||
|
|
||||||
|
private FornitoreDTO originalModel;
|
||||||
|
|
||||||
|
public FornitoreDTO getOriginalModel() {
|
||||||
|
return originalModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListModel setOriginalModel(FornitoreDTO originalModel) {
|
||||||
|
this.originalModel = originalModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return this.getOriginalModel().getCodAnag() +
|
||||||
|
(this.getOriginalModel().getCodVdes() != null ? " - " + this.getOriginalModel().getCodVdes() : "") +
|
||||||
|
" ( " + this.getOriginalModel().getDescrizione() + " )";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GruppoArticoloDTO;
|
||||||
|
|
||||||
|
public class DialogSelectDocInfo_GroupArtAdapter extends ArrayAdapter<DialogSelectDocInfo_GroupArtAdapter.ListModel> {
|
||||||
|
|
||||||
|
public DialogSelectDocInfo_GroupArtAdapter(@NonNull Context context, int resource, List<GruppoArticoloDTO> inputData) {
|
||||||
|
super(context, resource);
|
||||||
|
|
||||||
|
if(inputData == null) return;
|
||||||
|
|
||||||
|
List<ListModel> mDataset = Stream.of(inputData)
|
||||||
|
.map(x -> new ListModel()
|
||||||
|
.setOriginalModel(x))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
addAll(mDataset);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ListModel {
|
||||||
|
|
||||||
|
private GruppoArticoloDTO originalModel;
|
||||||
|
|
||||||
|
public GruppoArticoloDTO getOriginalModel() {
|
||||||
|
return originalModel;
|
||||||
|
}
|
||||||
|
public ListModel setOriginalModel(GruppoArticoloDTO originalModel) {
|
||||||
|
this.originalModel = originalModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return this.getOriginalModel().getCodMgrp() + " - " + this.getOriginalModel().getDescrizione();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DialogSelectDocInfo_NoteAdapter extends ArrayAdapter<String> {
|
||||||
|
|
||||||
|
public DialogSelectDocInfo_NoteAdapter(@NonNull Context context, int resource, List<String> inputData) {
|
||||||
|
super(context, resource);
|
||||||
|
|
||||||
|
if (inputData == null) return;
|
||||||
|
|
||||||
|
addAll(inputData);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipoDocDTO;
|
||||||
|
|
||||||
|
public class DialogSelectDocInfo_TipoDocAdapter extends ArrayAdapter<DialogSelectDocInfo_TipoDocAdapter.ListModel> {
|
||||||
|
|
||||||
|
public DialogSelectDocInfo_TipoDocAdapter(@NonNull Context context, int resource, List<TipoDocDTO> inputData) {
|
||||||
|
super(context, resource);
|
||||||
|
|
||||||
|
if(inputData == null) return;
|
||||||
|
|
||||||
|
List<ListModel> mDataset = Stream.of(inputData)
|
||||||
|
.map(x -> new ListModel()
|
||||||
|
.setOriginalModel(x))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
addAll(mDataset);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ListModel {
|
||||||
|
|
||||||
|
private TipoDocDTO originalModel;
|
||||||
|
|
||||||
|
public TipoDocDTO getOriginalModel() {
|
||||||
|
return originalModel;
|
||||||
|
}
|
||||||
|
public ListModel setOriginalModel(TipoDocDTO originalModel) {
|
||||||
|
this.originalModel = originalModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return this.getOriginalModel().getCodDtip() + " - " + this.getOriginalModel().getDescrizione();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception;
|
||||||
|
|
||||||
|
public class DocumentRequiredException extends Exception {
|
||||||
|
}
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception;
|
||||||
|
|
||||||
|
public class FornitoreRequiredException extends Exception {
|
||||||
|
}
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception;
|
||||||
|
|
||||||
|
public class NoteRequiredException extends Exception {
|
||||||
|
}
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dialog.exception;
|
||||||
|
|
||||||
|
public class TipoDocRequiredException extends Exception {
|
||||||
|
}
|
||||||
@ -5,26 +5,26 @@ import java.util.List;
|
|||||||
public class DocInterniSetupDTO {
|
public class DocInterniSetupDTO {
|
||||||
|
|
||||||
|
|
||||||
private List<TipiDocDTO> tipiDoc;
|
private List<TipoDocDTO> tipiDoc;
|
||||||
|
|
||||||
private List<GruppiArticoloDTO> gruppiArt;
|
private List<GruppoArticoloDTO> gruppiArt;
|
||||||
|
|
||||||
private List<FornitoreDTO> fornitori;
|
private List<FornitoreDTO> fornitori;
|
||||||
|
|
||||||
|
|
||||||
public List<TipiDocDTO> getTipiDoc() {
|
public List<TipoDocDTO> getTipiDoc() {
|
||||||
return tipiDoc;
|
return tipiDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTipiDoc(List<TipiDocDTO> tipiDoc) {
|
public void setTipiDoc(List<TipoDocDTO> tipiDoc) {
|
||||||
this.tipiDoc = tipiDoc;
|
this.tipiDoc = tipiDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<GruppiArticoloDTO> getGruppiArt() {
|
public List<GruppoArticoloDTO> getGruppiArt() {
|
||||||
return gruppiArt;
|
return gruppiArt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGruppiArt(List<GruppiArticoloDTO> gruppiArt) {
|
public void setGruppiArt(List<GruppoArticoloDTO> gruppiArt) {
|
||||||
this.gruppiArt = gruppiArt;
|
this.gruppiArt = gruppiArt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.gest.contab_doc_interni.dto;
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dto;
|
||||||
|
|
||||||
public class GruppiArticoloDTO {
|
public class GruppoArticoloDTO {
|
||||||
|
|
||||||
private String codMgrp;
|
private String codMgrp;
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.gest.contab_doc_interni.dto;
|
package it.integry.integrywmsnative.gest.contab_doc_interni.dto;
|
||||||
|
|
||||||
public class TipiDocDTO {
|
public class TipoDocDTO {
|
||||||
|
|
||||||
private String codDtip;
|
private String codDtip;
|
||||||
private String descrizione;
|
private String descrizione;
|
||||||
@ -48,7 +48,7 @@ public class TipiDocDTO {
|
|||||||
return requireNote;
|
return requireNote;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TipiDocDTO setRequireNote(boolean requireNote) {
|
public TipoDocDTO setRequireNote(boolean requireNote) {
|
||||||
this.requireNote = requireNote;
|
this.requireNote = requireNote;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ import it.integry.integrywmsnative.core.utility.UtilityDate;
|
|||||||
import it.integry.integrywmsnative.databinding.ActivityContabDocInterniEditBinding;
|
import it.integry.integrywmsnative.databinding.ActivityContabDocInterniEditBinding;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiChildDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiChildDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaArticoliDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaArticoliDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipiDocDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipoDocDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsView;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.dialog.selectDocRows.DialogSelectDocRowsView;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.ui.DocumentRowsListAdapter;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.ui.DocumentRowsListAdapter;
|
||||||
import it.integry.integrywmsnative.ui.FabMenuCustomAnimations;
|
import it.integry.integrywmsnative.ui.FabMenuCustomAnimations;
|
||||||
@ -77,7 +77,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
|||||||
public BindableBoolean isDocumentExportable = new BindableBoolean(false);
|
public BindableBoolean isDocumentExportable = new BindableBoolean(false);
|
||||||
private final ObservableArrayList<SqlMtbColr> documentRowsObservableList = new ObservableArrayList<>();
|
private final ObservableArrayList<SqlMtbColr> documentRowsObservableList = new ObservableArrayList<>();
|
||||||
|
|
||||||
public static Intent newInstance(Context context, SqlMtbColt document, GrigliaArticoliDTO productList, TipiDocDTO tipoDoc) {
|
public static Intent newInstance(Context context, SqlMtbColt document, GrigliaArticoliDTO productList, TipoDocDTO tipoDoc) {
|
||||||
Intent myIntent = new Intent(context, DocInterniEditFormActivity.class);
|
Intent myIntent = new Intent(context, DocInterniEditFormActivity.class);
|
||||||
|
|
||||||
String doc = DataCache.addItem(document);
|
String doc = DataCache.addItem(document);
|
||||||
@ -100,7 +100,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
|||||||
SqlMtbColt document = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_DOCUMENT));
|
SqlMtbColt document = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_DOCUMENT));
|
||||||
GrigliaArticoliDTO griglia = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_PRODUCTS_LIST));
|
GrigliaArticoliDTO griglia = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_PRODUCTS_LIST));
|
||||||
List<GrigliaAcquistiChildDTO> productList = griglia.getGrigliaAcquistiChild();
|
List<GrigliaAcquistiChildDTO> productList = griglia.getGrigliaAcquistiChild();
|
||||||
TipiDocDTO docType = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_TIPO_DOC));
|
TipoDocDTO docType = DataCache.retrieveItem(getIntent().getStringExtra(DATA_KEY_TIPO_DOC));
|
||||||
|
|
||||||
this.initViewModel();
|
this.initViewModel();
|
||||||
this.viewModel.setDocument(document);
|
this.viewModel.setDocument(document);
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ArtDTO;
|
|||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ColloDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ColloDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiChildDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.GrigliaAcquistiChildDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.SaveDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.SaveDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipiDocDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipoDocDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.rest.DocInterniRESTConsumer;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.rest.DocInterniRESTConsumer;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2ResultDTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2ResultDTO;
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ public class DocInterniEditFormViewModel {
|
|||||||
private final DocInterniRESTConsumer docInterniRESTConsumer;
|
private final DocInterniRESTConsumer docInterniRESTConsumer;
|
||||||
private DocInterniEditFormViewModel.Listener listener;
|
private DocInterniEditFormViewModel.Listener listener;
|
||||||
private List<GrigliaAcquistiChildDTO> productsList;
|
private List<GrigliaAcquistiChildDTO> productsList;
|
||||||
private TipiDocDTO tipoDoc;
|
private TipoDocDTO tipoDoc;
|
||||||
private boolean isCheckPartitaMag = false;
|
private boolean isCheckPartitaMag = false;
|
||||||
private JSONObject checkFornitoreRules = null;
|
private JSONObject checkFornitoreRules = null;
|
||||||
public MutableLiveData<SqlMtbColt> document = new MutableLiveData<>();
|
public MutableLiveData<SqlMtbColt> document = new MutableLiveData<>();
|
||||||
@ -302,7 +302,7 @@ public class DocInterniEditFormViewModel {
|
|||||||
return Stream.of(productsList).filter(prod -> prod.getCodMart().equalsIgnoreCase(codMart)).findFirstOrElse(null);
|
return Stream.of(productsList).filter(prod -> prod.getCodMart().equalsIgnoreCase(codMart)).findFirstOrElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DocInterniEditFormViewModel setTipoDoc(TipiDocDTO docType) {
|
public DocInterniEditFormViewModel setTipoDoc(TipoDocDTO docType) {
|
||||||
this.tipoDoc = docType;
|
this.tipoDoc = docType;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,6 +65,7 @@ public class ElencoInventariFragment extends BaseFragment implements ITitledFrag
|
|||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
|
setRetainInstance(true);
|
||||||
mBinding = FragmentElencoInventarioBinding.inflate(inflater, container, false);
|
mBinding = FragmentElencoInventarioBinding.inflate(inflater, container, false);
|
||||||
|
|
||||||
mBinding.setLifecycleOwner(this);
|
mBinding.setLifecycleOwner(this);
|
||||||
|
|||||||
@ -134,6 +134,8 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
setRetainInstance(true);
|
||||||
|
|
||||||
mCurrentGestioneOrd = GestioneEnum.fromString(getArguments().getString("gestioneOrd"));
|
mCurrentGestioneOrd = GestioneEnum.fromString(getArguments().getString("gestioneOrd"));
|
||||||
String gestioneCol = getArguments().getString("gestioneCol");
|
String gestioneCol = getArguments().getString("gestioneCol");
|
||||||
mCurrentGestioneCol = gestioneCol != null ? GestioneEnum.fromString(gestioneCol) : null;
|
mCurrentGestioneCol = gestioneCol != null ? GestioneEnum.fromString(gestioneCol) : null;
|
||||||
@ -795,8 +797,10 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
|||||||
|
|
||||||
listModel.setSubDescription(x.getRifOrd());
|
listModel.setSubDescription(x.getRifOrd());
|
||||||
|
|
||||||
String testataDataConsString = String.format(getString(R.string.ord_ven_testata_data_cons), UtilityDate.formatDate(x.getDataConsD(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
if(x.getDataConsD() != null) {
|
||||||
listModel.setRightDescription(testataDataConsString);
|
String testataDataConsString = String.format(getString(R.string.ord_ven_testata_data_cons), UtilityDate.formatDate(x.getDataConsD(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
|
listModel.setRightDescription(testataDataConsString);
|
||||||
|
}
|
||||||
|
|
||||||
listModel.setOriginalModel(x);
|
listModel.setOriginalModel(x);
|
||||||
|
|
||||||
|
|||||||
@ -110,6 +110,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
setRetainInstance(true);
|
||||||
|
|
||||||
mCurrentGestione = GestioneEnum.fromString(getArguments().getString("gestione"));
|
mCurrentGestione = GestioneEnum.fromString(getArguments().getString("gestione"));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,6 +89,7 @@ public class ProdOrdineProduzioneElencoFragment extends BaseFragment implements
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
setRetainInstance(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -58,6 +58,7 @@ public class ProdFabbisognoLineeProdFragment extends BaseFragment implements ITi
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
setRetainInstance(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -50,6 +50,7 @@ public class ProdLineeProduzioneFragment extends BaseFragment implements ITitled
|
|||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
|
setRetainInstance(true);
|
||||||
mBinding = FragmentLineeProdBinding.inflate(inflater, container, false);
|
mBinding = FragmentLineeProdBinding.inflate(inflater, container, false);
|
||||||
MainApplication.appComponent
|
MainApplication.appComponent
|
||||||
.prodLineeProduzioneComponent()
|
.prodLineeProduzioneComponent()
|
||||||
|
|||||||
@ -86,6 +86,7 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
|||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
|
setRetainInstance(true);
|
||||||
mBinding = FragmentProdRecuperoMaterialeBinding.inflate(inflater, container, false);
|
mBinding = FragmentProdRecuperoMaterialeBinding.inflate(inflater, container, false);
|
||||||
|
|
||||||
MainApplication.appComponent
|
MainApplication.appComponent
|
||||||
@ -263,7 +264,7 @@ public class ProdRecuperoMaterialeFragment extends BaseFragment implements ITitl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLURequest(boolean canLUBeCreated, boolean shouldCheckIfDocExist, RunnableArgss<MtbColt, Boolean> onComplete) {
|
public void onLURequest(boolean canLUBeCreated, boolean shouldCheckIfDocExist, RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||||
DialogScanOrCreateLUView.newInstance(canLUBeCreated, shouldCheckIfDocExist, onComplete)
|
DialogScanOrCreateLUView.newInstance(canLUBeCreated, shouldCheckIfDocExist, true, onComplete)
|
||||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -75,6 +75,7 @@ public class ProdVersamentoMaterialeFragment extends BaseFragment implements Pro
|
|||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
|
setRetainInstance(true);
|
||||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_prod_versamento_materiale, container, false);
|
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_prod_versamento_materiale, container, false);
|
||||||
|
|
||||||
MainApplication.appComponent
|
MainApplication.appComponent
|
||||||
@ -174,7 +175,7 @@ public class ProdVersamentoMaterialeFragment extends BaseFragment implements Pro
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void openLU() {
|
private void openLU() {
|
||||||
DialogScanOrCreateLUView.newInstance(false, false, true, false, (mtbColt, created) -> {
|
DialogScanOrCreateLUView.newInstance(false, false, true, false, true, (mtbColt, created) -> {
|
||||||
if (mtbColt == null) {
|
if (mtbColt == null) {
|
||||||
popMe();
|
popMe();
|
||||||
} else if ((mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE || mtbColt.getGestioneEnum() == GestioneEnum.VENDITA) && mtbColt.getSegno().equals(+1)) {
|
} else if ((mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE || mtbColt.getGestioneEnum() == GestioneEnum.VENDITA) && mtbColt.getSegno().equals(+1)) {
|
||||||
|
|||||||
@ -88,6 +88,7 @@ public class PVOrdiniAcquistoGrigliaFragment extends BaseFragment implements ITi
|
|||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
|
setRetainInstance(true);
|
||||||
|
|
||||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_pv_ordini_acquisto, container, false);
|
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_pv_ordini_acquisto, container, false);
|
||||||
mBinding.setViewmodel(this);
|
mBinding.setViewmodel(this);
|
||||||
|
|||||||
@ -43,6 +43,7 @@ import it.integry.integrywmsnative.core.model.MtbAart;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
@ -83,6 +84,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
private RettificaGiacenzeMainListAdapter mAdapter;
|
private RettificaGiacenzeMainListAdapter mAdapter;
|
||||||
|
|
||||||
private int barcodeScannerIstanceID = -1;
|
private int barcodeScannerIstanceID = -1;
|
||||||
|
private GestioneEnum mCurrentGestione;
|
||||||
|
|
||||||
public RettificaGiacenzeFragment() {
|
public RettificaGiacenzeFragment() {
|
||||||
// Required empty public constructor
|
// Required empty public constructor
|
||||||
@ -90,13 +92,28 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
|
|
||||||
|
|
||||||
public static RettificaGiacenzeFragment newInstance() {
|
public static RettificaGiacenzeFragment newInstance() {
|
||||||
|
return newInstance(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static RettificaGiacenzeFragment newInstance(GestioneEnum gestione) {
|
||||||
RettificaGiacenzeFragment fragment = new RettificaGiacenzeFragment();
|
RettificaGiacenzeFragment fragment = new RettificaGiacenzeFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
|
||||||
|
if (gestione != null)
|
||||||
|
args.putString("gestione", gestione.getText());
|
||||||
|
|
||||||
|
fragment.setArguments(args);
|
||||||
return fragment;
|
return fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
// requireActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||||
|
|
||||||
|
if (getArguments() != null && getArguments().containsKey("gestione"))
|
||||||
|
mCurrentGestione = GestioneEnum.fromString(getArguments().getString("gestione"));
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,6 +139,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
|
|
||||||
|
setRetainInstance(true);
|
||||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_main_rettifica_giacenze, container, false);
|
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_main_rettifica_giacenze, container, false);
|
||||||
|
|
||||||
|
|
||||||
@ -198,7 +216,8 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
|
|
||||||
mViewModel.init(
|
mViewModel.init(
|
||||||
SettingsManager.i().getUser().getFullname(),
|
SettingsManager.i().getUser().getFullname(),
|
||||||
SettingsManager.i().getUserSession().getDepo().getCodMdep());
|
SettingsManager.i().getUserSession().getDepo().getCodMdep(),
|
||||||
|
mCurrentGestione);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -287,8 +306,8 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLUOpenRequest(RunnableArgss<MtbColt, Boolean> onComplete) {
|
public void onLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||||
DialogScanOrCreateLUView.newInstance(true, false, (mtbColt, created) -> {
|
DialogScanOrCreateLUView.newInstance(enableCreation, checkIfDocumentExists, warnOnOpeningVendita, (mtbColt, created) -> {
|
||||||
if (mtbColt == null) {
|
if (mtbColt == null) {
|
||||||
popMe();
|
popMe();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -24,6 +24,7 @@ import it.integry.integrywmsnative.core.model.MtbColr;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
import it.integry.integrywmsnative.core.model.dto.PickDataDTO;
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.BarcodeRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
@ -51,6 +52,8 @@ public class RettificaGiacenzeViewModel {
|
|||||||
|
|
||||||
private RettificaGiacenzeViewModel.Listener mListener;
|
private RettificaGiacenzeViewModel.Listener mListener;
|
||||||
|
|
||||||
|
private GestioneEnum mDefaultGestione;
|
||||||
|
|
||||||
private String mCurrentUser;
|
private String mCurrentUser;
|
||||||
private String mCurrentCodMdep;
|
private String mCurrentCodMdep;
|
||||||
private boolean mIsCreatedLU;
|
private boolean mIsCreatedLU;
|
||||||
@ -71,9 +74,10 @@ public class RettificaGiacenzeViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void init(String currentUser, String currentCodMdep) {
|
public void init(String currentUser, String currentCodMdep, GestioneEnum defaultGestione) {
|
||||||
this.mCurrentUser = currentUser;
|
this.mCurrentUser = currentUser;
|
||||||
this.mCurrentCodMdep = currentCodMdep;
|
this.mCurrentCodMdep = currentCodMdep;
|
||||||
|
this.mDefaultGestione = defaultGestione;
|
||||||
|
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
@ -87,12 +91,15 @@ public class RettificaGiacenzeViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void requestLU() {
|
public void requestLU() {
|
||||||
this.sendOnLUOpenRequest((mtbColt, created) -> {
|
this.sendOnLUOpenRequest(mDefaultGestione == null || mDefaultGestione != GestioneEnum.VENDITA,
|
||||||
this.mCurrentMtbColt = mtbColt;
|
mDefaultGestione != null && mDefaultGestione == GestioneEnum.VENDITA,
|
||||||
this.mIsCreatedLU = created;
|
mDefaultGestione == null || mDefaultGestione != GestioneEnum.VENDITA,
|
||||||
|
(mtbColt, created) -> {
|
||||||
|
this.mCurrentMtbColt = mtbColt;
|
||||||
|
this.mIsCreatedLU = created;
|
||||||
|
|
||||||
this.sendLUOpened(mtbColt);
|
this.sendLUOpened(mtbColt);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public RettificaGiacenzeViewModel setListener(RettificaGiacenzeViewModel.Listener listener) {
|
public RettificaGiacenzeViewModel setListener(RettificaGiacenzeViewModel.Listener listener) {
|
||||||
@ -435,19 +442,14 @@ public class RettificaGiacenzeViewModel {
|
|||||||
Runnable saveAction = () -> {
|
Runnable saveAction = () -> {
|
||||||
this.mColliMagazzinoRESTConsumer.updateDataFine(
|
this.mColliMagazzinoRESTConsumer.updateDataFine(
|
||||||
mCurrentMtbColt, () -> {
|
mCurrentMtbColt, () -> {
|
||||||
this.sendLUPositionChangeRequest((shouldChangePosition, mtbDepoPosizione) -> {
|
|
||||||
|
|
||||||
if (shouldChangePosition) {
|
this.askPostionChange(mCurrentMtbColt, () -> {
|
||||||
this.savePosizione(mtbDepoPosizione, () -> {
|
this.createDoc(mCurrentMtbColt, () -> {
|
||||||
this.mAnyEditDone = false;
|
|
||||||
postSaveBehaviour(onComplete);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.mAnyEditDone = false;
|
this.mAnyEditDone = false;
|
||||||
postSaveBehaviour(onComplete);
|
postSaveBehaviour(onComplete);
|
||||||
}
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -463,6 +465,33 @@ public class RettificaGiacenzeViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void askPostionChange(MtbColt mtbColt, Runnable onComplete) {
|
||||||
|
if (mtbColt.getGestioneEnum() == GestioneEnum.VENDITA || mtbColt.getSegno() == -1) {
|
||||||
|
onComplete.run();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.sendLUPositionChangeRequest((shouldChangePosition, mtbDepoPosizione) -> {
|
||||||
|
if (shouldChangePosition) {
|
||||||
|
this.savePosizione(mtbDepoPosizione, () -> {
|
||||||
|
onComplete.run();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
onComplete.run();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createDoc(MtbColt mtbColt, Runnable onComplete) {
|
||||||
|
if (mtbColt.getGestioneEnum() != GestioneEnum.VENDITA && mtbColt.getSegno() != -1) {
|
||||||
|
onComplete.run();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mRettificaGiacenzeRESTConsumer.saveDoc(this.mCurrentMtbColt, onComplete, this::sendError);
|
||||||
|
}
|
||||||
|
|
||||||
private void saveCausaleRettificaGiacenze(Runnable onComplete) {
|
private void saveCausaleRettificaGiacenze(Runnable onComplete) {
|
||||||
this.mColliMagazzinoRESTConsumer.confirmGiacenzaUL(mCurrentMtbColt, onComplete, this::sendError);
|
this.mColliMagazzinoRESTConsumer.confirmGiacenzaUL(mCurrentMtbColt, onComplete, this::sendError);
|
||||||
}
|
}
|
||||||
@ -691,8 +720,9 @@ public class RettificaGiacenzeViewModel {
|
|||||||
if (this.mListener != null) mListener.onArtListLoaded(artList, onArtChoosed);
|
if (this.mListener != null) mListener.onArtListLoaded(artList, onArtChoosed);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendOnLUOpenRequest(RunnableArgss<MtbColt, Boolean> onComplete) {
|
private void sendOnLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||||
if (this.mListener != null) mListener.onLUOpenRequest(onComplete);
|
if (this.mListener != null)
|
||||||
|
mListener.onLUOpenRequest(enableCreation, checkIfDocumentExists, warnOnOpeningVendita, onComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendError(Exception ex) {
|
private void sendError(Exception ex) {
|
||||||
@ -778,7 +808,7 @@ public class RettificaGiacenzeViewModel {
|
|||||||
|
|
||||||
void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed);
|
void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed);
|
||||||
|
|
||||||
void onLUOpenRequest(RunnableArgss<MtbColt, Boolean> onComplete);
|
void onLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgss<MtbColt, Boolean> onComplete);
|
||||||
|
|
||||||
void onLUOpened(MtbColt mtbColt);
|
void onLUOpened(MtbColt mtbColt);
|
||||||
|
|
||||||
|
|||||||
@ -4,17 +4,25 @@ import com.google.gson.reflect.TypeToken;
|
|||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
import it.integry.integrywmsnative.core.model.MtbAartWithFornitore;
|
import it.integry.integrywmsnative.core.model.MtbAartWithFornitore;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers._BaseRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.SaveDocFromPickingRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
import it.integry.integrywmsnative.core.utility.UtilityDB;
|
||||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.FornitoreDTO;
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.FornitoreDTO;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class RettificaGiacenzeRESTConsumer extends _BaseRESTConsumer {
|
public class RettificaGiacenzeRESTConsumer extends _BaseRESTConsumer {
|
||||||
@ -82,4 +90,25 @@ public class RettificaGiacenzeRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void saveDoc(MtbColt mtbColt, Runnable onComplete, RunnableArgs<Exception> onError) {
|
||||||
|
|
||||||
|
var request = new SaveDocFromPickingRequestDTO()
|
||||||
|
.setColliFromMtbColts(Collections.singletonList(mtbColt));
|
||||||
|
|
||||||
|
final RettificaGiacenzeRESTConsumerService service = RESTBuilder.getService(RettificaGiacenzeRESTConsumerService.class);
|
||||||
|
service.saveDocFromPickingPvm(request)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswerList(response, "saveDocFromPickingPvm", data -> onComplete.run(), onError);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
onError.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.rettifica_giacenze.rest;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.SaveDocFromPickingRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.Body;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface RettificaGiacenzeRESTConsumerService {
|
||||||
|
|
||||||
|
|
||||||
|
@POST("saveDocFromPickingPvm")
|
||||||
|
Call<ServiceRESTResponse<Void>> saveDocFromPickingPvm(@Body SaveDocFromPickingRequestDTO saveDocFromPickingRequestDTO);
|
||||||
|
|
||||||
|
}
|
||||||
@ -6,7 +6,6 @@ import android.os.Bundle;
|
|||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
import android.util.Base64OutputStream;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@ -20,11 +19,13 @@ import androidx.preference.PreferenceFragmentCompat;
|
|||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileReader;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
@ -50,6 +51,10 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
public SystemRESTConsumer systemRESTConsumer;
|
public SystemRESTConsumer systemRESTConsumer;
|
||||||
@Inject
|
@Inject
|
||||||
public DialogProgressView mCurrentProgress;
|
public DialogProgressView mCurrentProgress;
|
||||||
|
@Inject
|
||||||
|
public ExecutorService executorService;
|
||||||
|
|
||||||
|
|
||||||
private boolean progressOpened;
|
private boolean progressOpened;
|
||||||
|
|
||||||
private final ArrayList<Runnable> onPreDestroyList = new ArrayList<>();
|
private final ArrayList<Runnable> onPreDestroyList = new ArrayList<>();
|
||||||
@ -64,6 +69,7 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
setRetainInstance(true);
|
||||||
|
|
||||||
MainApplication
|
MainApplication
|
||||||
.appComponent
|
.appComponent
|
||||||
@ -214,49 +220,49 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
DialogYesNoView.newInstance("Esportazione log", "Vuoi inviare il log degli eventi al supporto?", result -> {
|
DialogYesNoView.newInstance("Esportazione log", "Vuoi inviare il log degli eventi al supporto?", result -> {
|
||||||
this.openProgress();
|
this.openProgress();
|
||||||
|
|
||||||
File yourFile = appContext.getLogFilePath();
|
executorService.execute(() -> {
|
||||||
var files = yourFile.listFiles();
|
|
||||||
|
|
||||||
var fileToShare = Stream.of(files)
|
|
||||||
.sortBy(x -> -1 * x.lastModified())
|
|
||||||
.findFirstOrElse(null);
|
|
||||||
try {
|
|
||||||
FileInputStream fis = new FileInputStream(fileToShare);
|
|
||||||
|
|
||||||
byte[] buffer = new byte[fis.available()];//specify the size to allow
|
File yourFile = appContext.getLogFilePath();
|
||||||
int bytesRead;
|
var files = yourFile.listFiles();
|
||||||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
|
||||||
Base64OutputStream output64 = new Base64OutputStream(output, Base64.DEFAULT);
|
|
||||||
|
|
||||||
while ((bytesRead = fis.read(buffer)) != -1) {
|
var fileToShare = Stream.of(files)
|
||||||
output64.write(buffer, 0, bytesRead);
|
.sortBy(x -> -1 * x.lastModified())
|
||||||
|
.findFirstOrElse(null);
|
||||||
|
try {
|
||||||
|
var htmlContent = createAppLogAttachment(fileToShare);
|
||||||
|
|
||||||
|
byte[] buffer = htmlContent.getBytes();//specify the size to allow.
|
||||||
|
String base64 = Base64.encodeToString(buffer, Base64.NO_WRAP);
|
||||||
|
|
||||||
|
var attachment = new MailAttachmentDTO()
|
||||||
|
.setFileName("wms_log.html")
|
||||||
|
.setFileb64Content(base64);
|
||||||
|
|
||||||
|
var mailRequest = new MailRequestDTO()
|
||||||
|
.setTo("developer@integry.it")
|
||||||
|
.setMsgText("Questo è una mail che contiene il log del WMS")
|
||||||
|
.setSubject("U vuemmeess")
|
||||||
|
.setAttachments(new ArrayList<>());
|
||||||
|
|
||||||
|
mailRequest.getAttachments().add(attachment);
|
||||||
|
|
||||||
|
systemRESTConsumer.sendMail(mailRequest, this::closeProgress, ex -> {
|
||||||
|
this.closeProgress();
|
||||||
|
requireActivity().runOnUiThread(() -> {
|
||||||
|
DialogSimpleMessageView
|
||||||
|
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
||||||
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} catch (Exception ex) {
|
||||||
|
requireActivity().runOnUiThread(() -> {
|
||||||
|
DialogSimpleMessageView
|
||||||
|
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
||||||
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
output64.close();
|
|
||||||
|
|
||||||
var attachment = new MailAttachmentDTO()
|
|
||||||
.setFileName("wms_log.log")
|
|
||||||
.setFileb64Content(output.toString());
|
|
||||||
|
|
||||||
var mailRequest = new MailRequestDTO()
|
|
||||||
.setTo("developer@integry.it")
|
|
||||||
.setMsgText("Questo è una mail che contiene il log del WMS")
|
|
||||||
.setSubject("U vuemmeess")
|
|
||||||
.setAttachments(new ArrayList<>());
|
|
||||||
|
|
||||||
mailRequest.getAttachments().add(attachment);
|
|
||||||
|
|
||||||
systemRESTConsumer.sendMail(mailRequest, this::closeProgress, ex -> {
|
|
||||||
this.closeProgress();
|
|
||||||
DialogSimpleMessageView
|
|
||||||
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
|
||||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
|
||||||
});
|
|
||||||
} catch (Exception ex) {
|
|
||||||
DialogSimpleMessageView
|
|
||||||
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
|
||||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.show(getParentFragmentManager(), "tag");
|
.show(getParentFragmentManager(), "tag");
|
||||||
}
|
}
|
||||||
@ -279,4 +285,90 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private String createAppLogAttachment(File logFile) {
|
||||||
|
//Read text from file
|
||||||
|
StringBuilder text = new StringBuilder();
|
||||||
|
|
||||||
|
try {
|
||||||
|
BufferedReader br = new BufferedReader(new FileReader(logFile));
|
||||||
|
String line;
|
||||||
|
|
||||||
|
while ((line = br.readLine()) != null) {
|
||||||
|
text.append(line);
|
||||||
|
text.append('\n');
|
||||||
|
}
|
||||||
|
br.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
//You'll need to add proper error handling here
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder htmlContent = new StringBuilder("<html lang=\"en\" style=\"font-family: Helvetica;\">\n" +
|
||||||
|
"<head>\n" +
|
||||||
|
" <title>WMS Log</title>\n" +
|
||||||
|
"\n" +
|
||||||
|
" <style>\n" +
|
||||||
|
" .level-badge {\n" +
|
||||||
|
" border-radius: 2px;\n" +
|
||||||
|
" padding: 0.25em 0.5rem;\n" +
|
||||||
|
" text-transform: uppercase;\n" +
|
||||||
|
" font-weight: 770;\n" +
|
||||||
|
" font-size: 12px;\n" +
|
||||||
|
" letter-spacing: .3px;\n" +
|
||||||
|
" }\n" +
|
||||||
|
"\n" +
|
||||||
|
" .level-badge.trace {\n" +
|
||||||
|
" background-color: #a6a6a6;\n" +
|
||||||
|
" color: #ffffff;\n" +
|
||||||
|
" }\n" +
|
||||||
|
"\n" +
|
||||||
|
" .level-badge.debug {\n" +
|
||||||
|
" background-color: #b3e5fc;\n" +
|
||||||
|
" color: #23547b;\n" +
|
||||||
|
" }\n" +
|
||||||
|
"\n" +
|
||||||
|
" .level-badge.info {\n" +
|
||||||
|
" background-color: #c8e6c9;\n" +
|
||||||
|
" color: #256029;\n" +
|
||||||
|
" }\n" +
|
||||||
|
"\n" +
|
||||||
|
" .level-badge.warn {\n" +
|
||||||
|
" background: #feedaf;\n" +
|
||||||
|
" color: #8a5340;\n" +
|
||||||
|
" }\n" +
|
||||||
|
"\n" +
|
||||||
|
" .level-badge.error, .level-badge.fatal {\n" +
|
||||||
|
" background-color: #ffcdd2;\n" +
|
||||||
|
" color: #c63737;\n" +
|
||||||
|
" }\n" +
|
||||||
|
"\n" +
|
||||||
|
" .message {\n" +
|
||||||
|
" white-space: pre-wrap;\n" +
|
||||||
|
" }\n" +
|
||||||
|
" </style>\n" +
|
||||||
|
"</head>\n" +
|
||||||
|
"\n" +
|
||||||
|
"<body>");
|
||||||
|
|
||||||
|
String[] lines = text.toString().split("\n");
|
||||||
|
|
||||||
|
for (String line : lines) {
|
||||||
|
String datetime = line.substring(14, 37);
|
||||||
|
String tmp = line.substring(38);
|
||||||
|
String logLevel = tmp.substring(0, tmp.indexOf(","));
|
||||||
|
tmp = tmp.substring(logLevel.length() + 1);
|
||||||
|
String title = tmp.substring(0, tmp.indexOf(","));
|
||||||
|
String message = tmp.substring(title.length() + 1);
|
||||||
|
|
||||||
|
htmlContent.append("<span style=\"font-size: 0.7em;\">").append(datetime).append("</span><br />");
|
||||||
|
htmlContent.append("<div><span class=\"level-badge ").append(logLevel.toLowerCase()).append("\">").append(logLevel).append("</span> <span>").append(title).append("</span></div>");
|
||||||
|
htmlContent.append("<code class=\"message\">").append(message).append("</code>");
|
||||||
|
htmlContent.append("<hr/>");
|
||||||
|
}
|
||||||
|
|
||||||
|
htmlContent.append("\n" + "<script type=\"text/javascript\">\n" + " document.querySelectorAll(\".message\").forEach(el => el.innerHTML = el.innerHTML.replaceAll(/at it\\.integry.*?(?:<br>)/g, '<b>$&</b>'));\n" + "</script>\n" + "</body>\n" + "</html>");
|
||||||
|
|
||||||
|
return htmlContent.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -104,7 +104,7 @@ public class VersamentoMerceFragment extends BaseFragment implements ITitledFrag
|
|||||||
|
|
||||||
|
|
||||||
public void openLU() {
|
public void openLU() {
|
||||||
DialogScanOrCreateLUView.newInstance(true, false, true, false, (mtbColt, created) -> {
|
DialogScanOrCreateLUView.newInstance(true, false, true, false, true, (mtbColt, created) -> {
|
||||||
if (mtbColt == null) {
|
if (mtbColt == null) {
|
||||||
((IPoppableActivity) getActivity()).pop();
|
((IPoppableActivity) getActivity()).pop();
|
||||||
} else if ((mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE) && mtbColt.getSegno().equals(+1)) {
|
} else if ((mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE) && mtbColt.getSegno().equals(+1)) {
|
||||||
|
|||||||
@ -43,27 +43,29 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
|||||||
private final boolean mShouldCheckResiduo;
|
private final boolean mShouldCheckResiduo;
|
||||||
private final boolean mShouldCheckIfExistDoc;
|
private final boolean mShouldCheckIfExistDoc;
|
||||||
private final boolean mEnableCreation;
|
private final boolean mEnableCreation;
|
||||||
|
private final boolean mWarnOnOpeningVendita;
|
||||||
|
|
||||||
private final BindableBoolean basketEnabled = new BindableBoolean();
|
private final BindableBoolean basketEnabled = new BindableBoolean();
|
||||||
private final BindableBoolean creationEnabled = new BindableBoolean();
|
private final BindableBoolean creationEnabled = new BindableBoolean();
|
||||||
|
|
||||||
|
|
||||||
public static DialogScanOrCreateLUView newInstance(@NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
public static DialogScanOrCreateLUView newInstance(@NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||||
return new DialogScanOrCreateLUView(false, true, true, true, onComplete);
|
return new DialogScanOrCreateLUView(false, true, true, true, true, onComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DialogScanOrCreateLUView newInstance(boolean enableCreation, boolean shouldCheckIfExistDoc, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
public static DialogScanOrCreateLUView newInstance(boolean enableCreation, boolean shouldCheckIfExistDoc, boolean warnOnOpeningVendita, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||||
return new DialogScanOrCreateLUView(false, enableCreation, true, shouldCheckIfExistDoc, onComplete);
|
return new DialogScanOrCreateLUView(false, enableCreation, true, shouldCheckIfExistDoc, warnOnOpeningVendita, onComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DialogScanOrCreateLUView newInstance(boolean enableBasket, boolean enableCreation, boolean checkResiduo, boolean shouldCheckIfExistDoc, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
public static DialogScanOrCreateLUView newInstance(boolean enableBasket, boolean enableCreation, boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean warnOnOpeningVendita, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||||
return new DialogScanOrCreateLUView(enableBasket, enableCreation, checkResiduo, shouldCheckIfExistDoc, onComplete);
|
return new DialogScanOrCreateLUView(enableBasket, enableCreation, checkResiduo, shouldCheckIfExistDoc, warnOnOpeningVendita, onComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DialogScanOrCreateLUView(boolean enableBasket, boolean enableCreation, boolean checkResiduo, boolean shouldCheckIfExistDoc, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
private DialogScanOrCreateLUView(boolean enableBasket, boolean enableCreation, boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean warnOnOpeningVendita, @NotNull RunnableArgss<MtbColt, Boolean> onComplete) {
|
||||||
super();
|
super();
|
||||||
mShouldCheckResiduo = checkResiduo;
|
mShouldCheckResiduo = checkResiduo;
|
||||||
mShouldCheckIfExistDoc = shouldCheckIfExistDoc;
|
mShouldCheckIfExistDoc = shouldCheckIfExistDoc;
|
||||||
|
mWarnOnOpeningVendita = warnOnOpeningVendita;
|
||||||
|
|
||||||
this.basketEnabled.set(enableBasket);
|
this.basketEnabled.set(enableBasket);
|
||||||
this.creationEnabled.set(enableCreation);
|
this.creationEnabled.set(enableCreation);
|
||||||
@ -90,7 +92,7 @@ public class DialogScanOrCreateLUView extends BaseDialogFragment implements Dial
|
|||||||
.setListener(this);
|
.setListener(this);
|
||||||
|
|
||||||
|
|
||||||
this.mViewModel.init(mShouldCheckResiduo, mShouldCheckIfExistDoc, mEnableCreation);
|
this.mViewModel.init(mShouldCheckResiduo, mShouldCheckIfExistDoc, mEnableCreation, mWarnOnOpeningVendita);
|
||||||
|
|
||||||
mBindings.createNewLuButton.setOnClickListener(v -> {
|
mBindings.createNewLuButton.setOnClickListener(v -> {
|
||||||
this.mViewModel.createNewLU();
|
this.mViewModel.createNewLU();
|
||||||
|
|||||||
@ -32,6 +32,7 @@ public class DialogScanOrCreateLUViewModel {
|
|||||||
private boolean mShouldCheckResiduo = false;
|
private boolean mShouldCheckResiduo = false;
|
||||||
private boolean mShouldCheckIfExistDoc = true;
|
private boolean mShouldCheckIfExistDoc = true;
|
||||||
private boolean mEnableCreation = false;
|
private boolean mEnableCreation = false;
|
||||||
|
private boolean mWarnOnOpeningVendita;
|
||||||
|
|
||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
|
|
||||||
@ -43,10 +44,11 @@ public class DialogScanOrCreateLUViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void init(boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean enableCreation) {
|
public void init(boolean checkResiduo, boolean shouldCheckIfExistDoc, boolean enableCreation, boolean warnOnOpeningVendita) {
|
||||||
this.mShouldCheckResiduo = checkResiduo;
|
this.mShouldCheckResiduo = checkResiduo;
|
||||||
this.mShouldCheckIfExistDoc = shouldCheckIfExistDoc;
|
this.mShouldCheckIfExistDoc = shouldCheckIfExistDoc;
|
||||||
this.mEnableCreation = enableCreation;
|
this.mEnableCreation = enableCreation;
|
||||||
|
this.mWarnOnOpeningVendita = warnOnOpeningVendita;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createNewLU() {
|
public void createNewLU() {
|
||||||
@ -137,7 +139,7 @@ public class DialogScanOrCreateLUViewModel {
|
|||||||
if (mtbColt.getCodDtip() != null && mShouldCheckIfExistDoc) {
|
if (mtbColt.getCodDtip() != null && mShouldCheckIfExistDoc) {
|
||||||
this.sendError(new AlreadyAttachedDocumentToLUException());
|
this.sendError(new AlreadyAttachedDocumentToLUException());
|
||||||
} else {
|
} else {
|
||||||
if (mtbColt.getGestioneEnum() == GestioneEnum.VENDITA && mtbColt.getSegno() == -1) {
|
if (mtbColt.getGestioneEnum() == GestioneEnum.VENDITA && mtbColt.getSegno() == -1 && mWarnOnOpeningVendita) {
|
||||||
this.sendOnLUVenditaConfirmRequired(confirmed -> {
|
this.sendOnLUVenditaConfirmRequired(confirmed -> {
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
onComplete.run();
|
onComplete.run();
|
||||||
|
|||||||
9
app/src/main/res/drawable/ic_back.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M10,5.342C9.744,5.342 9.488,5.441 9.293,5.637L3.637,11.293C3.246,11.684 3.246,12.317 3.637,12.707L9.293,18.363C9.684,18.754 10.317,18.754 10.707,18.363L10.793,18.277C11.184,17.886 11.184,17.253 10.793,16.863L6.93,13L20,13C20.552,13 21,12.552 21,12C21,11.448 20.552,11 20,11L6.93,11L10.793,7.137C11.184,6.746 11.184,6.113 10.793,5.723L10.707,5.637C10.512,5.441 10.256,5.342 10,5.342z"/>
|
||||||
|
</vector>
|
||||||
|
Before Width: | Height: | Size: 490 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 484 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 10 KiB |
@ -0,0 +1,33 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:viewportWidth="48"
|
||||||
|
android:viewportHeight="48">
|
||||||
|
<path
|
||||||
|
android:pathData="M37.4,41H10.6c-1,0 -1.8,-0.7 -2,-1.6L5,21h38l-3.7,18.4C39.1,40.3 38.3,41 37.4,41z"
|
||||||
|
android:fillColor="#388e3c"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M25.4,5.6c-0.8,-0.8 -2,-0.8 -2.8,0l-12,12c-0.8,0.8 -0.8,2 0,2.8C11,20.8 11.5,21 12,21s1,-0.2 1.4,-0.6l12,-12C26.2,7.6 26.2,6.4 25.4,5.6z"
|
||||||
|
android:fillColor="#2e7d32"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M37.4,17.6l-12,-12c-0.8,-0.8 -2,-0.8 -2.8,0s-0.8,2 0,2.8l12,12C35,20.8 35.5,21 36,21s1,-0.2 1.4,-0.6C38.2,19.6 38.2,18.4 37.4,17.6z"
|
||||||
|
android:fillColor="#1b5e20"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M43,23H5c-1.1,0 -2,-0.9 -2,-2v-2c0,-1.1 0.9,-2 2,-2h38c1.1,0 2,0.9 2,2v2C45,22.1 44.1,23 43,23z"
|
||||||
|
android:fillColor="#4caf50"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M25,25h-2c0,0 0,10.8 0,11 0,0.6 0.4,1 1,1s1,-0.4 1,-1C25,35.8 25,25 25,25zM29,25h-2c0,0 0,10.8 0,11 0,0.6 0.4,1 1,1s1,-0.4 1,-1C29,35.8 29,25 29,25zM17,25h-2c0,0 0,10.8 0,11 0,0.6 0.4,1 1,1s1,-0.4 1,-1C17,35.8 17,25 17,25zM21,25h-2c0,0 0,10.8 0,11 0,0.6 0.4,1 1,1s1,-0.4 1,-1C21,35.8 21,25 21,25z"
|
||||||
|
android:fillColor="#1b5e20"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M34.414,26.588c-0.383,-0.383 -0.894,-0.586 -1.415,-0.586c-0.258,0 -0.517,0.05 -0.765,0.152C31.487,26.464 31,27.193 31,28.002V41h6.4c0.9,0 1.7,-0.7 1.9,-1.6l1.327,-6.599L34.414,26.588z"
|
||||||
|
android:fillColor="#2e7d32"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M33.998,34.352L36.773,33.166L42.604,46.814L39.828,48z"
|
||||||
|
android:fillColor="#bdbdbd"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M33,28.002L33,45.002 38,40.002 45,40.002z"
|
||||||
|
android:fillColor="#bdbdbd"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M33,25h-2c0,0 0,10.8 0,11c0,0.6 0.4,1 1,1c0.6,0 1,-0.4 1,-1C33,35.8 33,25 33,25z"
|
||||||
|
android:fillColor="#1b5e20"/>
|
||||||
|
</vector>
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:viewportWidth="48"
|
||||||
|
android:viewportHeight="48">
|
||||||
|
<path
|
||||||
|
android:pathData="M2,33l0,10l8,0l0,-6l28,0l0,6l8,0l0,-10z">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:startX="24"
|
||||||
|
android:startY="46.447"
|
||||||
|
android:endX="24"
|
||||||
|
android:endY="32.536"
|
||||||
|
android:type="linear">
|
||||||
|
<item android:offset="0" android:color="#FFF0B421"/>
|
||||||
|
<item android:offset="1" android:color="#FFC28200"/>
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:pathData="M7,15h34l5,18H2L7,15z">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:startX="0.866"
|
||||||
|
android:startY="13.904"
|
||||||
|
android:endX="40.388"
|
||||||
|
android:endY="33.242"
|
||||||
|
android:type="linear">
|
||||||
|
<item android:offset="0" android:color="#FFFFCF54"/>
|
||||||
|
<item android:offset="0.261" android:color="#FFFDCB4D"/>
|
||||||
|
<item android:offset="0.639" android:color="#FFF7C13A"/>
|
||||||
|
<item android:offset="1" android:color="#FFF0B421"/>
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:pathData="M23,15h2v18h-2z"
|
||||||
|
android:fillColor="#C28200"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M33,15l-2,0l3,18l2,0z"
|
||||||
|
android:fillColor="#C28200"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M15,15l2,0l-3,18l-2,0z"
|
||||||
|
android:fillColor="#C28200"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M36.9,19.9L35,21.9l4.3,4.3c0.1,0.1 0.3,0.1 0.4,0l1.5,-1.5c0.1,-0.1 0.1,-0.3 0,-0.4L36.9,19.9z"
|
||||||
|
android:fillColor="#199BE2"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M34.5,17.6l-1.9,1.9l2.4,2.4l1.9,-2z">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:centerX="28.257"
|
||||||
|
android:centerY="13.251"
|
||||||
|
android:gradientRadius="10.631"
|
||||||
|
android:type="radial">
|
||||||
|
<item android:offset="0.693" android:color="#FF006185"/>
|
||||||
|
<item android:offset="0.921" android:color="#FF35C1F1"/>
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:pathData="M28.2,13.2m-8.7,0a8.7,8.7 0,1 1,17.4 0a8.7,8.7 0,1 1,-17.4 0">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:startX="22.23"
|
||||||
|
android:startY="7.185"
|
||||||
|
android:endX="34.393"
|
||||||
|
android:endY="19.348"
|
||||||
|
android:type="linear">
|
||||||
|
<item android:offset="0" android:color="#FFA3FFFF"/>
|
||||||
|
<item android:offset="0.223" android:color="#FF9DFBFF"/>
|
||||||
|
<item android:offset="0.53" android:color="#FF8BF1FF"/>
|
||||||
|
<item android:offset="0.885" android:color="#FF6EE0FF"/>
|
||||||
|
<item android:offset="1" android:color="#FF63DAFF"/>
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
</vector>
|
||||||
|
Before Width: | Height: | Size: 9.3 KiB |
@ -0,0 +1,30 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:viewportWidth="48"
|
||||||
|
android:viewportHeight="48">
|
||||||
|
<path
|
||||||
|
android:pathData="M36,4H26c0,1.105 -0.895,2 -2,2s-2,-0.895 -2,-2H12C9.789,4 8,5.789 8,8v32c0,2.211 1.789,4 4,4h24c2.211,0 4,-1.789 4,-4V8C40,5.789 38.211,4 36,4"
|
||||||
|
android:fillColor="#455a64"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M36,41H12c-0.551,0 -1,-0.449 -1,-1V8c0,-0.551 0.449,-1 1,-1h24c0.551,0 1,0.449 1,1v32C37,40.551 36.551,41 36,41"
|
||||||
|
android:fillColor="#fff"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M26,4c0,1.105 -0.895,2 -2,2s-2,-0.895 -2,-2h-7v4c0,1.105 0.895,2 2,2h14c1.105,0 2,-0.895 2,-2V4H26z"
|
||||||
|
android:fillColor="#90a4ae"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M24,0c-2.207,0 -4,1.793 -4,4s1.793,4 4,4s4,-1.793 4,-4S26.207,0 24,0M24,6c-1.105,0 -2,-0.895 -2,-2s0.895,-2 2,-2s2,0.895 2,2S25.105,6 24,6"
|
||||||
|
android:fillColor="#90a4ae"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M14,18h9v2h-9V18zM14,30h9v2h-9V30z"
|
||||||
|
android:fillColor="#03a9f4"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M30.91,20.59L29.5,22 26,18.5 27.41,17.09 29.5,19.18z"
|
||||||
|
android:fillColor="#43a047"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M33.972,17.528L29.5,22 28.09,20.59 29.5,19.18 32.562,16.118zM30.91,32.59L29.5,34 26,30.5 27.41,29.09 29.5,31.18z"
|
||||||
|
android:fillColor="#43a047"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M33.972,29.528L29.5,34 28.09,32.59 29.5,31.18 32.562,28.118z"
|
||||||
|
android:fillColor="#43a047"/>
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/ic_erase.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M14.65,2.006C14.146,2.006 13.641,2.195 13.262,2.574L2.576,13.264C1.817,14.023 1.817,15.282 2.576,16.041L7.961,21.426C8.351,21.816 8.872,22.001 9.391,21.99A1,1 0,0 0,9.539 22L21,22A1,1 0,1 0,21 20L12.164,20L21.424,10.736C22.183,9.977 22.183,8.718 21.424,7.959L16.039,2.574C15.66,2.195 15.155,2.006 14.65,2.006zM9.32,9.346L14.654,14.68L9.35,19.986L4.016,14.65L9.32,9.346z"/>
|
||||||
|
</vector>
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M19,3h-4.184C14.403,1.837 13.304,1 12,1S9.597,1.837 9.184,3H5C3.895,3 3,3.895 3,5v14c0,1.105 0.895,2 2,2h14c1.105,0 2,-0.895 2,-2V5C21,3.895 20.105,3 19,3zM9,16H7v-2h2V16zM8,11.5c-0.828,0 -1.5,-0.672 -1.5,-1.5S7.172,8.5 8,8.5S9.5,9.172 9.5,10S8.828,11.5 8,11.5zM12,3c0.552,0 1,0.448 1,1c0,0.552 -0.448,1 -1,1s-1,-0.448 -1,-1C11,3.448 11.448,3 12,3zM17,16h-6v-2h6V16zM17,11h-6V9h6V11zM19,19H5V5h14V19z"/>
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/ic_pallet.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M7.153,14L11,14 11,2 8.868,2zM18.868,14H22L19.47,3.53C19.253,2.632 18.449,2 17.526,2h-0.372L18.868,14zM13,14L16.847,14 15.132,2 13,2zM6.847,2H6.474C5.551,2 4.747,2.632 4.53,3.53L2,14h3.132L6.847,2zM2,16v4c0,1.105 0.895,2 2,2h2c1.105,0 2,-0.895 2,-2h8c0,1.105 0.895,2 2,2h2c1.105,0 2,-0.895 2,-2v-4H2z"/>
|
||||||
|
</vector>
|
||||||
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 827 B |
21
app/src/main/res/drawable/ic_production_line.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:viewportWidth="48"
|
||||||
|
android:viewportHeight="48">
|
||||||
|
<path
|
||||||
|
android:pathData="M37,42H5V32h32c2.8,0 5,2.2 5,5l0,0C42,39.8 39.8,42 37,42z"
|
||||||
|
android:fillColor="#B0BEC5"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M10,34c-1.7,0 -3,1.3 -3,3s1.3,3 3,3 3,-1.3 3,-3S11.7,34 10,34zM10,38c-0.6,0 -1,-0.4 -1,-1s0.4,-1 1,-1 1,0.4 1,1S10.6,38 10,38zM19,34c-1.7,0 -3,1.3 -3,3s1.3,3 3,3 3,-1.3 3,-3S20.7,34 19,34zM19,38c-0.6,0 -1,-0.4 -1,-1s0.4,-1 1,-1 1,0.4 1,1S19.6,38 19,38zM37,34c-1.7,0 -3,1.3 -3,3s1.3,3 3,3 3,-1.3 3,-3S38.7,34 37,34zM37,38c-0.6,0 -1,-0.4 -1,-1s0.4,-1 1,-1 1,0.4 1,1S37.6,38 37,38zM28,34c-1.7,0 -3,1.3 -3,3s1.3,3 3,3 3,-1.3 3,-3S29.7,34 28,34zM28,38c-0.6,0 -1,-0.4 -1,-1s0.4,-1 1,-1 1,0.4 1,1S28.6,38 28,38z"
|
||||||
|
android:fillColor="#37474F"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M35,31H11c-1.1,0 -2,-0.9 -2,-2V7c0,-1.1 0.9,-2 2,-2h24c1.1,0 2,0.9 2,2v22C37,30.1 36.1,31 35,31z"
|
||||||
|
android:fillColor="#FF9800"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M26.5,13h-7c-0.8,0 -1.5,-0.7 -1.5,-1.5l0,0c0,-0.8 0.7,-1.5 1.5,-1.5h7c0.8,0 1.5,0.7 1.5,1.5l0,0C28,12.3 27.3,13 26.5,13z"
|
||||||
|
android:fillColor="#8A5100"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M37,31H5v2h32c2.2,0 4,1.8 4,4s-1.8,4 -4,4H5v2h32c3.3,0 6,-2.7 6,-6S40.3,31 37,31z"
|
||||||
|
android:fillColor="#607D8B"/>
|
||||||
|
</vector>
|
||||||
12
app/src/main/res/drawable/ic_rettifica_spedizione_drawer.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M7.2,14H11V2H8.9L7.2,14zM18.9,14H22l-0.4,-1.7l-3.5,-3.6L18.9,14zM13,14h3.8l-0.7,-5c0,0 -0.7,0 -1.7,-0.2C13.7,8.7 13,8 13,8V14zM6.8,2H6.5C5.6,2 4.7,2.6 4.5,3.5L2,14h3.1L6.8,2zM2,16v4c0,1.1 0.9,2 2,2h2c1.1,0 2,-0.9 2,-2h8c0,1.1 0.9,2 2,2h2c1.1,0 2,-0.9 2,-2v-4H2z"/>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M15.9,1.2c-2,0 -3.7,1.6 -3.7,3.6s1.6,3.7 3.6,3.7c0.9,0 1.7,-0.3 2.4,-0.9l0.2,0.2l0,0.7l2.9,2.9c0.3,0.3 0.8,0.3 1,0c0.3,-0.3 0.3,-0.8 0,-1l-2.9,-2.9l-0.7,0l-0.2,-0.2c0.6,-0.6 0.9,-1.5 0.9,-2.4C19.5,2.9 17.9,1.2 15.9,1.2zM15.9,2.3c1.4,0 2.6,1.2 2.6,2.6c0,1.4 -1.2,2.6 -2.6,2.6s-2.6,-1.2 -2.6,-2.6S14.4,2.2 15.9,2.3z"/>
|
||||||
|
</vector>
|
||||||
|
Before Width: | Height: | Size: 889 B |
9
app/src/main/res/drawable/ic_scale.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M12,4A2,2 0,0 0,10.27 5L5,5L3,5C2.448,5 2,5.448 2,6C2,6.552 2.448,7 3,7L4,7L0,15C0,17.761 2.239,20 5,20C7.761,20 10,17.761 10,15L6,7L10.271,7A2,2 0,0 0,12 8A2,2 0,0 0,13.73 7L18,7L14,15C14,17.761 16.239,20 19,20C21.761,20 24,17.761 24,15L20,7L21,7C21.552,7 22,6.552 22,6C22,5.448 21.552,5 21,5L13.729,5A2,2 0,0 0,12 4zM5,9.021L7.988,15L2.012,15L5,9.021zM19,9.021L21.988,15L16.012,15L19,9.021z"/>
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/ic_shopping_basket.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M7.658,2C6.862,2 6.135,2.479 5.82,3.211L3.34,9L2.002,9C1.689,9 1.395,9.146 1.205,9.395C1.017,9.643 0.953,9.965 1.035,10.266L3.596,19.531C3.835,20.395 4.627,21 5.523,21L18.477,21C19.373,21 20.164,20.396 20.402,19.533L22.963,10.268C23.046,9.967 22.983,9.643 22.795,9.395C22.605,9.146 22.31,9 21.998,9L20.66,9L18.178,3.213L18.18,3.213C17.866,2.478 17.137,2 16.34,2L7.658,2zM7.658,4L16.34,4L18.482,9L5.518,9L7.658,4zM8,12C8.552,12 9,12.448 9,13L9,17C9,17.552 8.552,18 8,18C7.448,18 7,17.552 7,17L7,13C7,12.448 7.448,12 8,12zM12,12C12.552,12 13,12.448 13,13L13,17C13,17.552 12.552,18 12,18C11.448,18 11,17.552 11,17L11,13C11,12.448 11.448,12 12,12zM16,12C16.552,12 17,12.448 17,13L17,17C17,17.552 16.552,18 16,18C15.448,18 15,17.552 15,17L15,13C15,12.448 15.448,12 16,12z"/>
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/ic_tick.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M19.98,5.99A1,1 0,0 0,19.293 6.293L9,16.586L5.707,13.293A1,1 0,1 0,4.293 14.707L8.293,18.707A1,1 0,0 0,9.707 18.707L20.707,7.707A1,1 0,0 0,19.98 5.99z"/>
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/ic_truck.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M2,3C1.45,3 1,3.45 1,4L1,17C1,17.55 1.45,18 2,18L3.051,18C3.296,19.692 4.741,21 6.5,21C8.259,21 9.704,19.692 9.949,18L14.051,18C14.296,19.692 15.741,21 17.5,21C19.259,21 20.704,19.692 20.949,18L22,18C22.55,18 23,17.55 23,17L23,12.311C23,11.751 22.851,11.21 22.551,10.73L20.52,7.43C19.97,6.55 19.001,6 17.961,6L14,6L14,4C14,3.45 13.55,3 13,3L2,3zM14,8L17.961,8C18.311,8 18.631,8.18 18.811,8.48L20.85,11.779C20.95,11.939 21,12.121 21,12.311L21,16L20.648,16C20.084,14.822 18.891,14 17.5,14C16.109,14 14.916,14.822 14.352,16L14,16L14,8zM6.5,16C7.327,16 8,16.673 8,17.5C8,18.327 7.327,19 6.5,19C5.673,19 5,18.327 5,17.5C5,16.673 5.673,16 6.5,16zM17.5,16C18.327,16 19,16.673 19,17.5C19,18.327 18.327,19 17.5,19C16.673,19 16,18.327 16,17.5C16,16.673 16.673,16 17.5,16z"/>
|
||||||
|
</vector>
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
9
app/src/main/res/drawable/ic_truck_with_clock.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M6,1C2.691,1 0,3.691 0,7C0,8.771 0.776,10.361 2,11.461L2,18C2,18.552 2.448,19 3,19L3.051,19C3.296,20.692 4.742,22 6.5,22C8.258,22 9.704,20.692 9.949,19L14.051,19C14.296,20.692 15.74,22 17.498,22C19.256,22 20.702,20.692 20.947,19L22,19C22.552,19 23,18.552 23,18L23,15.307C23,14.75 22.847,14.206 22.555,13.732L20.518,10.428C19.968,9.534 19.012,9 17.963,9L16,9L16,7C16,6.448 15.552,6 15,6L11.91,6C11.431,3.167 8.967,1 6,1zM6,3C8.206,3 10,4.794 10,7C10,9.206 8.206,11 6,11C3.794,11 2,9.206 2,7C2,4.794 3.794,3 6,3zM6,5C5.448,5 5,5.448 5,6L5,8.207C5,8.34 5.053,8.468 5.146,8.561L5.998,9.412C6.389,9.803 7.022,9.803 7.412,9.412C7.802,9.021 7.803,8.389 7.412,7.998L7,7.586L7,6C7,5.448 6.552,5 6,5zM16,11L17.963,11C18.313,11 18.631,11.179 18.814,11.477L20.852,14.781C20.95,14.939 21,15.121 21,15.307L21,17L20.648,17C20.084,15.822 18.891,15 17.5,15C16.961,15 16.456,15.134 16,15.352L16,11zM6.5,17C7.327,17 8,17.673 8,18.5C8,19.327 7.327,20 6.5,20C5.673,20 5,19.327 5,18.5C5,17.673 5.673,17 6.5,17zM17.5,17C18.327,17 19,17.673 19,18.5C19,19.327 18.327,20 17.5,20C16.673,20 16,19.327 16,18.5C16,17.673 16.673,17 17.5,17z"/>
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/ic_weight_kg.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M12,1C9.794,1 8,2.794 8,5L5,5C4.001,5 3.17,5.696 3.014,6.729L2.021,19.777C1.933,20.351 2.113,20.927 2.51,21.355C2.888,21.765 3.432,22 4,22L20,22C20.568,22 21.111,21.765 21.488,21.357C21.887,20.927 22.065,20.353 21.986,19.854L20.988,6.729L20.979,6.652C20.831,5.695 19.999,5 19,5L16,5C16,2.794 14.206,1 12,1zM12,3C13.103,3 14,3.897 14,5L10,5C10,3.897 10.897,3 12,3zM6.676,9.205L8.313,9.205L8.313,13.168L8.477,12.949L9.711,11.414L11.672,11.414L9.832,13.576L11.793,16.67L9.92,16.67L8.773,14.713L8.311,15.174L8.311,16.67L6.676,16.67L6.676,9.205zM14.406,11.318C14.953,11.318 15.382,11.502 15.688,11.871L15.746,11.414L17.232,11.414L17.232,16.471C17.232,16.934 17.125,17.336 16.908,17.678C16.693,18.019 16.384,18.281 15.975,18.463C15.567,18.647 15.094,18.736 14.557,18.736C14.172,18.736 13.799,18.665 13.438,18.518C13.076,18.372 12.8,18.183 12.609,17.951L13.295,16.988C13.599,17.347 14,17.527 14.498,17.527C15.223,17.527 15.586,17.156 15.586,16.412L15.586,16.246C15.272,16.593 14.874,16.766 14.396,16.766C13.755,16.766 13.238,16.522 12.842,16.031C12.447,15.541 12.25,14.885 12.25,14.063L12.25,14.004C12.25,13.474 12.338,13.004 12.512,12.596C12.688,12.189 12.939,11.871 13.266,11.65C13.593,11.429 13.972,11.318 14.406,11.318zM14.824,12.58C14.532,12.579 14.305,12.711 14.139,12.971C13.974,13.233 13.891,13.609 13.891,14.105C13.891,14.535 13.973,14.877 14.135,15.127C14.296,15.378 14.522,15.504 14.814,15.504C15.166,15.504 15.424,15.384 15.586,15.148L15.586,12.939C15.428,12.7 15.174,12.58 14.824,12.58z"/>
|
||||||
|
</vector>
|
||||||
|
Before Width: | Height: | Size: 2.1 KiB |
9
app/src/main/res/drawable/ic_workers.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M15.5,3C15.224,3 15,3.224 15,3.5L15,4.088C12.401,4.526 10.368,6.638 10.049,9.275C10.741,9.458 11.395,9.731 12,10.082L12,10.08C12.507,10.376 12.972,10.733 13.4,11.131C13.582,11.299 13.75,11.479 13.916,11.662C14.017,11.775 14.126,11.88 14.221,11.998L14.223,11.998C14.477,12.314 14.713,12.645 14.918,12.998L22.5,12.998C22.776,12.998 23,12.774 23,12.498L23,11.498C23,11.222 22.776,10.998 22.5,10.998L22,10.998L22,10C22,7.785 20.79,5.852 19,4.813L19,8C19,8.552 18.552,9 18,9C17.448,9 17,8.552 17,8L17,4.09L17,3.5C17,3.224 16.776,3 16.5,3L15.5,3zM7.5,10C7.224,10 7,10.224 7,10.5L7,11.092C4.167,11.57 2,14.033 2,17L2,18L1.5,18C1.224,18 1,18.224 1,18.5L1,19.5C1,19.776 1.224,20 1.5,20L14.5,20C14.776,20 15,19.776 15,19.5L15,18.5C15,18.224 14.776,18 14.5,18L14,18L14,17C14,14.785 12.79,12.851 11,11.813L11,15C11,15.552 10.552,16 10,16C9.448,16 9,15.552 9,15L9,11.09L9,10.5C9,10.224 8.776,10 8.5,10L7.5,10z"/>
|
||||||
|
</vector>
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB |
@ -62,7 +62,7 @@
|
|||||||
android:backgroundTint="@android:color/transparent"
|
android:backgroundTint="@android:color/transparent"
|
||||||
android:onClick="@{() -> view.resetValues()}"
|
android:onClick="@{() -> view.resetValues()}"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@drawable/ic_erase_96"
|
android:src="@drawable/ic_erase"
|
||||||
android:tint="@android:color/white" />
|
android:tint="@android:color/white" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
|
|||||||
@ -132,7 +132,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_login"
|
android:id="@+id/btn_login"
|
||||||
style="@style/Button.PrimaryFull"
|
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
|
|||||||
@ -289,7 +289,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_truck_black_96"
|
android:src="@drawable/ic_truck_with_clock"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@ -332,7 +332,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_pallet_96px"
|
android:src="@drawable/ic_pallet"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
@ -446,7 +446,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_weight_kg_96px"
|
android:src="@drawable/ic_weight_kg"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
@ -565,7 +565,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_pallet_96px"
|
android:src="@drawable/ic_pallet"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
|
|
||||||
@ -706,7 +706,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_weight_kg_96px"
|
android:src="@drawable/ic_weight_kg"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@ -857,7 +857,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_pallet_96px"
|
android:src="@drawable/ic_pallet"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@ -969,7 +969,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_weight_kg_96px"
|
android:src="@drawable/ic_weight_kg"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@ -1125,7 +1125,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_weight_kg_96px"
|
android:src="@drawable/ic_weight_kg"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|||||||
@ -319,7 +319,7 @@
|
|||||||
android:id="@+id/export_document"
|
android:id="@+id/export_document"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_black_upload"
|
android:src="@drawable/ic_upload"
|
||||||
android:visibility="@{view.isDocumentExportable.get() ? View.VISIBLE : View.GONE}"
|
android:visibility="@{view.isDocumentExportable.get() ? View.VISIBLE : View.GONE}"
|
||||||
app:fab_colorNormal="@color/white"
|
app:fab_colorNormal="@color/white"
|
||||||
app:fab_colorPressed="@color/white_pressed"
|
app:fab_colorPressed="@color/white_pressed"
|
||||||
|
|||||||
@ -116,7 +116,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_login"
|
android:id="@+id/btn_login"
|
||||||
style="@style/Button.PrimaryFull"
|
style="@style/Widget.Material3.Button.UnelevatedButton"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
|
|||||||
@ -240,7 +240,7 @@
|
|||||||
android:id="@+id/pv_ordine_export"
|
android:id="@+id/pv_ordine_export"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_black_upload"
|
android:src="@drawable/ic_upload"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:fab_colorNormal="@color/white"
|
app:fab_colorNormal="@color/white"
|
||||||
app:fab_colorPressed="@color/white_pressed"
|
app:fab_colorPressed="@color/white_pressed"
|
||||||
|
|||||||
@ -111,7 +111,7 @@
|
|||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_marginHorizontal="8dp"
|
android:layout_marginHorizontal="8dp"
|
||||||
android:text="@string/back"
|
android:text="@string/back"
|
||||||
app:icon="@drawable/ic_black_back"
|
app:icon="@drawable/ic_back"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@ -126,7 +126,7 @@
|
|||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_marginHorizontal="8dp"
|
android:layout_marginHorizontal="8dp"
|
||||||
android:text="@string/use"
|
android:text="@string/use"
|
||||||
app:icon="@drawable/ic_black_tick"
|
app:icon="@drawable/ic_tick"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@drawable/ic_erase_96"
|
android:src="@drawable/ic_erase"
|
||||||
android:backgroundTint="@android:color/transparent"
|
android:backgroundTint="@android:color/transparent"
|
||||||
android:onClick="@{() -> view.resetValues()}"
|
android:onClick="@{() -> view.resetValues()}"
|
||||||
android:tint="@android:color/white" />
|
android:tint="@android:color/white" />
|
||||||
|
|||||||
@ -133,7 +133,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/button_view_basket_ul"
|
android:text="@string/button_view_basket_ul"
|
||||||
app:icon="@drawable/ic_black_shopping_cart"
|
app:icon="@drawable/ic_shopping_basket"
|
||||||
app:iconSize="24dp" />
|
app:iconSize="24dp" />
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|||||||
@ -1,176 +0,0 @@
|
|||||||
<?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"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<variable
|
|
||||||
name="viewmodel"
|
|
||||||
type="it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoViewModel" />
|
|
||||||
|
|
||||||
<variable
|
|
||||||
name="view"
|
|
||||||
type="it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoView" />
|
|
||||||
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:cardCornerRadius="12dp"
|
|
||||||
app:cardElevation="0dp">
|
|
||||||
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/title_text"
|
|
||||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="12dp"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/dialog_doc_interni_choose_dtip_mgrp_pair_title" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/input_cod_dtip"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/doc_type">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
|
||||||
android:id="@+id/filled_exposed_dropdown_cod_dtips"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:inputType="text"
|
|
||||||
android:singleLine="true"
|
|
||||||
app:binding="@{view.codDtip}" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/input_cod_mgrps"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/art_group">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
|
||||||
android:id="@+id/filled_exposed_dropdown_cod_mgrps"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:inputType="text"
|
|
||||||
android:singleLine="true"
|
|
||||||
app:binding="@{view.codMgrp}" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/input_cod_anag_forn"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/fornitore"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
|
||||||
android:id="@+id/filled_exposed_dropdown_cod_anag_list"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:inputType="text"
|
|
||||||
android:singleLine="true"
|
|
||||||
app:binding="@{view.codAnag}" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/input_num_doc_layout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:visibility="gone"
|
|
||||||
style="@style/TextInputLayout.OutlineDefault"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/input_num_doc"
|
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="@string/document_number"
|
|
||||||
android:imeOptions="actionDone"
|
|
||||||
android:inputType="number"
|
|
||||||
app:binding="@{view.numDoc}"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/input_data_doc_layout"
|
|
||||||
style="@style/TextInputLayout.OutlineDefault"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/input_data_doc"
|
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:focusableInTouchMode="false"
|
|
||||||
android:hint="@string/document_date"
|
|
||||||
android:inputType="text"
|
|
||||||
app:binding="@{view.dataDoc}"
|
|
||||||
app:parentView="@{view}"/>
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/input_note_layout"
|
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:hint="@string/hint_additional_notes">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
|
||||||
android:id="@+id/filled_exposed_dropdown_note"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:inputType="text"
|
|
||||||
android:singleLine="true"
|
|
||||||
app:binding="@{view.note}" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/positive_btn"
|
|
||||||
style="@style/Button.PrimaryFull"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:text="@string/confirm" />
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
|
|
||||||
</layout>
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
<androidx.appcompat.widget.AppCompatTextView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
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"/>
|
|
||||||
173
app/src/main/res/layout/dialog_select_doc_info_view.xml
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="view"
|
||||||
|
type="it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoView" />
|
||||||
|
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingVertical="16dp">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/title_text"
|
||||||
|
style="@style/MaterialAlertDialog.Material3.Title.Text.CenterStacked"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:singleLine="false"
|
||||||
|
android:text="@string/dialog_doc_interni_choose_dtip_mgrp_pair_title" />
|
||||||
|
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_cod_dtip"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/doc_type">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_cod_dtips"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:inputType="none"
|
||||||
|
android:singleLine="true" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_cod_mgrps"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/art_group">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_cod_mgrps"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:inputType="none"
|
||||||
|
android:singleLine="true" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_cod_anag_forn"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/fornitore"
|
||||||
|
app:visibility="@{view.isFornitoreRequired}"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_cod_anag_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:inputType="text"
|
||||||
|
android:singleLine="true" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_num_doc_layout"
|
||||||
|
style="@style/TextInputLayout.OutlineDefault"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:visibility="@{view.isDocumentRequired}"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_num_doc"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/document_number"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="number"
|
||||||
|
app:binding="@{view.selectedNumDoc}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_data_doc_layout"
|
||||||
|
style="@style/TextInputLayout.OutlineDefault"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:visibility="@{view.isDocumentRequired}"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_data_doc"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:hint="@string/document_date"
|
||||||
|
android:inputType="none"
|
||||||
|
app:binding="@{view.selectedDataDoc}"
|
||||||
|
app:parentView="@{view}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_note_layout"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/hint_additional_notes"
|
||||||
|
app:visibility="@{view.isNoteRequired}"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_exposed_dropdown_note"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:inputType="text"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:binding="@{view.selectedNote}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
</layout>
|
||||||
@ -45,7 +45,6 @@
|
|||||||
android:layout_marginRight="8dp"
|
android:layout_marginRight="8dp"
|
||||||
android:background="@drawable/gray_detail_background_round8"
|
android:background="@drawable/gray_detail_background_round8"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:singleClick="@{() -> view.selectDocInfo()}"
|
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
@ -315,7 +314,7 @@
|
|||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
app:srcCompat="@drawable/ic_add_24dp"
|
app:srcCompat="@drawable/ic_add_24dp"
|
||||||
android:visibility="invisible"
|
android:visibility="visible"
|
||||||
app:singleClick="@{viewModel::newDocument}"
|
app:singleClick="@{viewModel::newDocument}"
|
||||||
style="?attr/floatingActionButtonPrimaryStyle" />
|
style="?attr/floatingActionButtonPrimaryStyle" />
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|||||||
@ -279,7 +279,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_truck_black_96"
|
android:src="@drawable/ic_truck_with_clock"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@ -322,7 +322,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_pallet_96px"
|
android:src="@drawable/ic_pallet"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
@ -436,7 +436,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_weight_kg_96px"
|
android:src="@drawable/ic_weight_kg"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
@ -555,7 +555,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_pallet_96px"
|
android:src="@drawable/ic_pallet"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
|
|
||||||
@ -696,7 +696,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_weight_kg_96px"
|
android:src="@drawable/ic_weight_kg"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@ -847,7 +847,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_pallet_96px"
|
android:src="@drawable/ic_pallet"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@ -959,7 +959,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_weight_kg_96px"
|
android:src="@drawable/ic_weight_kg"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@ -1115,7 +1115,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:src="@drawable/ic_weight_kg_96px"
|
android:src="@drawable/ic_weight_kg"
|
||||||
android:tint="@color/gray_500" />
|
android:tint="@color/gray_500" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<item
|
<item
|
||||||
android:id="@+id/export"
|
android:id="@+id/export"
|
||||||
android:title="@string/action_export"
|
android:title="@string/action_export"
|
||||||
android:icon="@drawable/ic_black_upload"
|
android:icon="@drawable/ic_upload"
|
||||||
android:contentDescription="@string/action_export"
|
android:contentDescription="@string/action_export"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
<string name="accettazione_ordine_inevaso_title_multiple_order">Ordini di accettazione</string>
|
<string name="accettazione_ordine_inevaso_title_multiple_order">Ordini di accettazione</string>
|
||||||
<string name="vendita_title_fragment">Spedizione</string>
|
<string name="vendita_title_fragment">Spedizione</string>
|
||||||
<string name="rettifica_giacenze_fragment_title">Rettifica giacenze</string>
|
<string name="rettifica_giacenze_fragment_title">Rettifica giacenze</string>
|
||||||
|
<string name="rettifica_spedizione_fragment_title">Rettifica spedizione</string>
|
||||||
<string name="inventario_fragment_title">Inventario</string>
|
<string name="inventario_fragment_title">Inventario</string>
|
||||||
<string name="prod_fabbisogno_linee_prod_title">Approvvig. linee prod.</string>
|
<string name="prod_fabbisogno_linee_prod_title">Approvvig. linee prod.</string>
|
||||||
<string name="versamento_merce_fragment_title">Posizionamento merce</string>
|
<string name="versamento_merce_fragment_title">Posizionamento merce</string>
|
||||||
@ -333,7 +334,7 @@
|
|||||||
<string name="batch_lot_not_enabled">Il lotto <b>%s</b> non è attivo. Continuare?</string>
|
<string name="batch_lot_not_enabled">Il lotto <b>%s</b> non è attivo. Continuare?</string>
|
||||||
<string name="punto_vendita">Punto Vendita</string>
|
<string name="punto_vendita">Punto Vendita</string>
|
||||||
<string name="title_dynamic_saporiveri_pv">SaporiVeri PV</string>
|
<string name="title_dynamic_saporiveri_pv">SaporiVeri PV</string>
|
||||||
<string name="generate_orders">Genera ordini di acqusito</string>
|
<string name="generate_orders">Genera ordini di acquisto</string>
|
||||||
<string name="transmitted_orders">Ordini di acquisto trasmessi</string>
|
<string name="transmitted_orders">Ordini di acquisto trasmessi</string>
|
||||||
<string name="pv_elenco_ordiniA_title_fragment">Ordini di Acquisto</string>
|
<string name="pv_elenco_ordiniA_title_fragment">Ordini di Acquisto</string>
|
||||||
<string name="pv_elenco_ordiniA_transmitted_title_fragment">Ordini trasmessi</string>
|
<string name="pv_elenco_ordiniA_transmitted_title_fragment">Ordini trasmessi</string>
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
<item name="nav_accettazione" type="id" />
|
<item name="nav_accettazione" type="id" />
|
||||||
<item name="nav_spedizione" type="id" />
|
<item name="nav_spedizione" type="id" />
|
||||||
<item name="nav_rettifica_giacenze" type="id" />
|
<item name="nav_rettifica_giacenze" type="id" />
|
||||||
|
<item name="nav_rettifica_spedizione" type="id" />
|
||||||
<item name="nav_inventario" type="id" />
|
<item name="nav_inventario" type="id" />
|
||||||
<item name="nav_versamento_merce" type="id" />
|
<item name="nav_versamento_merce" type="id" />
|
||||||
<item name="nav_free_picking" type="id" />
|
<item name="nav_free_picking" type="id" />
|
||||||
|
|||||||
@ -59,6 +59,7 @@
|
|||||||
<string name="accettazione_ordine_inevaso_title_multiple_order">Multiple acceptance orders</string>
|
<string name="accettazione_ordine_inevaso_title_multiple_order">Multiple acceptance orders</string>
|
||||||
<string name="vendita_title_fragment">Check out</string>
|
<string name="vendita_title_fragment">Check out</string>
|
||||||
<string name="rettifica_giacenze_fragment_title">Inventory</string>
|
<string name="rettifica_giacenze_fragment_title">Inventory</string>
|
||||||
|
<string name="rettifica_spedizione_fragment_title">Inventory</string>
|
||||||
<string name="inventario_fragment_title">Inventory</string>
|
<string name="inventario_fragment_title">Inventory</string>
|
||||||
<string name="prod_fabbisogno_linee_prod_title">Production line requirements</string>
|
<string name="prod_fabbisogno_linee_prod_title">Production line requirements</string>
|
||||||
<string name="versamento_merce_fragment_title">Items placement</string>
|
<string name="versamento_merce_fragment_title">Items placement</string>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
kotlin_version = '1.8.0'
|
kotlin_version = '1.8.0'
|
||||||
agp_version = '8.1.0-alpha05'
|
agp_version = '8.1.0-alpha06'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||