Compare commits
20 Commits
v1.30.02__
...
v1.30.06__
| Author | SHA1 | Date | |
|---|---|---|---|
| 82cc4f989c | |||
| 6ca7943d78 | |||
| 013646eae3 | |||
| 341359d871 | |||
| 545081444c | |||
| b35819c9c9 | |||
| ec44275e41 | |||
| f5d78edfd1 | |||
| 9390cd0320 | |||
| ca448542c3 | |||
| 9d3f6f73d9 | |||
| ee35a14518 | |||
| b7bb6ad6ac | |||
| 011deafb90 | |||
| 214d98f181 | |||
| dfa2a1106e | |||
| 08841537f5 | |||
| 21cf03a50b | |||
| 356b146e3d | |||
| a4c9b0cd3a |
17
.idea/deploymentTargetDropDown.xml
generated
17
.idea/deploymentTargetDropDown.xml
generated
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<runningDeviceTargetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="SERIAL_NUMBER" />
|
||||
<value value="20119B1E55" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2022-12-12T15:40:54.351888Z" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 320
|
||||
def appVersionName = '1.30.02'
|
||||
def appVersionCode = 324
|
||||
def appVersionName = '1.30.06'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@@ -88,6 +88,8 @@ import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceComponen
|
||||
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceModule;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__item_edit.BottomSheetItemEditComponent;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__item_edit.BottomSheetItemEditModule;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalComponent;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteComponent;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteModule;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArtsComponent;
|
||||
@@ -163,6 +165,7 @@ import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCr
|
||||
BottomSheetItemEditModule.class,
|
||||
BottomSheetInventarioActionsModule.class,
|
||||
BottomSheetInventarioRowActionsModule.class,
|
||||
BottomSheetMtbColrEditModalModule.class,
|
||||
})
|
||||
public interface MainApplicationComponent {
|
||||
|
||||
@@ -274,6 +277,8 @@ public interface MainApplicationComponent {
|
||||
|
||||
BottomSheetInventarioRowActionsComponent.Factory bottomSheetInventarioRowActionsComponent();
|
||||
|
||||
BottomSheetMtbColrEditModalComponent.Factory bottomSheetMtbColrEditModalComponent();
|
||||
|
||||
void inject(MainApplication mainApplication);
|
||||
|
||||
void inject(AppContext mainApplication);
|
||||
|
||||
@@ -15,6 +15,7 @@ import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
|
||||
public class ArticoliOrdineDataSource extends BaseDataSource implements ArticoliOrdineRepository {
|
||||
|
||||
@@ -53,6 +54,7 @@ public class ArticoliOrdineDataSource extends BaseDataSource implements Articoli
|
||||
}
|
||||
|
||||
public void saveArticoloToOrdine(ArticoloOrdine articolo, Runnable onSuccess, RunnableArgs<Exception> onError) {
|
||||
articolo.setDataIns(UtilityDate.getDateInstance());
|
||||
if (articolo.getArticoloOrdineId() != null && articolo.getArticoloOrdineId() > 0) {
|
||||
execute(() -> mArticoloOrdineDao.update(articolo), onSuccess, onError);
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class ArtNotFoundInGridException extends Exception {
|
||||
|
||||
public ArtNotFoundInGridException() {
|
||||
super(UtilityResources.getString(R.string.lu_already_attache_to_doc));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class GridNotFoundException extends Exception {
|
||||
|
||||
public GridNotFoundException() {
|
||||
super(UtilityResources.getString(R.string.grid_not_found));
|
||||
}
|
||||
|
||||
public GridNotFoundException(String codAlis) {
|
||||
super(UtilityResources.getString(R.string.grid_not_found) + " (" + codAlis + ")");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class InvalidLicenseException extends Exception {
|
||||
|
||||
public InvalidLicenseException() {
|
||||
super(UtilityResources.getString(R.string.invalid_license));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class InvalidOrderedQtyException extends Exception {
|
||||
|
||||
public InvalidOrderedQtyException() {
|
||||
super(UtilityResources.getString(R.string.invalid_quantity_ordered));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public class NoArtsInGridException extends Exception {
|
||||
|
||||
public NoArtsInGridException() {
|
||||
super(UtilityResources.getString(R.string.no_arts_in_grid));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
|
||||
public final class NoDocTypeSelectedException extends Exception {
|
||||
|
||||
public NoDocTypeSelectedException() {
|
||||
super(UtilityResources.getString(R.string.no_doc_type_selected));
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
public class NotValidLicenseException extends Exception {
|
||||
|
||||
public NotValidLicenseException() {
|
||||
super("Licenza non valida");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package it.integry.integrywmsnative.core.exception;
|
||||
|
||||
public class RestException extends Exception {
|
||||
|
||||
public RestException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -97,7 +97,6 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
|
||||
ordineDTO.setChiaveGriglia(ordine.getCodAlis());
|
||||
ordineDTO.setDataCons(UtilityDate.getDateInstance());
|
||||
ordineDTO.setArtRows(artRows);
|
||||
saveDTO.setGestione("O");
|
||||
saveDTO.setOrdineDTO(ordineDTO);
|
||||
|
||||
@@ -5,11 +5,11 @@ import android.util.Log;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.exception.NotValidLicenseException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLicenseException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.rest.CommonRESTException;
|
||||
import it.integry.integrywmsnative.core.rest.model.EsitoType;
|
||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import retrofit2.Response;
|
||||
|
||||
@@ -39,11 +39,10 @@ public abstract class _BaseRESTConsumer {
|
||||
}
|
||||
} else {
|
||||
if (response.code() == 404) {
|
||||
Log.e(logTitle, "Errore " + response.code() + ": risorsa non trovata (" + response.raw().request().url() + ")");
|
||||
onFailed.run(new Exception("Errore " + response.code() + ": risorsa non trovata (" + response.raw().request().url() + ")"));
|
||||
}
|
||||
else if (response.code() == 550)
|
||||
onFailed.run(new NotValidLicenseException());
|
||||
Log.e(logTitle, "Errore " + response.code() + ": risorsa non trovata (" + response.raw().request().url().toString() + ")");
|
||||
onFailed.run(new Exception("Errore " + response.code() + ": risorsa non trovata (" + logTitle + ")"));
|
||||
} else if (response.code() == 550)
|
||||
onFailed.run(new InvalidLicenseException());
|
||||
else {
|
||||
Log.e(logTitle, "Status " + response.code() + ": " + response.message());
|
||||
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
||||
@@ -78,7 +77,7 @@ public abstract class _BaseRESTConsumer {
|
||||
Log.e(logTitle, "Errore " + response.code() + ": risorsa non trovata");
|
||||
onFailed.run(new Exception("Errore " + response.code() + ": risorsa non trovata (" + logTitle + ")"));
|
||||
} else if (response.code() == 550)
|
||||
onFailed.run(new NotValidLicenseException());
|
||||
onFailed.run(new InvalidLicenseException());
|
||||
else {
|
||||
Log.e(logTitle, "Status " + response.code() + ": " + response.message());
|
||||
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
||||
@@ -117,7 +116,7 @@ public abstract class _BaseRESTConsumer {
|
||||
Log.e(logTitle, "Errore " + responseList.code() + ": risorsa non trovata");
|
||||
onFailed.run(new Exception("Errore " + responseList.code() + ": risorsa non trovata (" + logTitle + ")"));
|
||||
} else if (responseList.code() == 550)
|
||||
onFailed.run(new NotValidLicenseException());
|
||||
onFailed.run(new InvalidLicenseException());
|
||||
else {
|
||||
Log.e(logTitle, "Status " + responseList.code() + ": " + responseList.message());
|
||||
onFailed.run(new Exception("Status " + responseList.code() + ": " + responseList.message()));
|
||||
|
||||
@@ -26,6 +26,7 @@ public class OrdineUscitaInevasoDTO extends OrdineInevasoDTO {
|
||||
private String ragSocCom;
|
||||
private String ragSocOrd;
|
||||
private String destinatario;
|
||||
private String codVdes;
|
||||
private String citta;
|
||||
private String provincia;
|
||||
private String indirizzo;
|
||||
@@ -424,4 +425,13 @@ public class OrdineUscitaInevasoDTO extends OrdineInevasoDTO {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public String getCodVdes() {
|
||||
return codVdes;
|
||||
}
|
||||
|
||||
public OrdineUscitaInevasoDTO setCodVdes(String codVdes) {
|
||||
this.codVdes = codVdes;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.net.InetSocketAddress;
|
||||
import java.net.Socket;
|
||||
import java.net.SocketAddress;
|
||||
|
||||
import it.integry.integrywmsnative.core.exception.NotValidLicenseException;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidLicenseException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.gest.login.exception.ServerNotReachableException;
|
||||
import okhttp3.OkHttpClient;
|
||||
@@ -54,7 +54,7 @@ public class UtilityServer {
|
||||
else if (response.code() == 404)
|
||||
onFailed.run(new ServerNotReachableException(serverAddress, serverTCPport, null));
|
||||
else if (response.code() == 550)
|
||||
onFailed.run(new NotValidLicenseException());
|
||||
onFailed.run(new InvalidLicenseException());
|
||||
else onFailed.run(new Exception("Errore non identificato (STATUS: " + response.code() + ")"));
|
||||
} catch (IOException e) {
|
||||
onFailed.run(new ServerNotReachableException(serverAddress, serverTCPport, e));
|
||||
|
||||
@@ -294,9 +294,6 @@ public class AccettazionePickingViewModel {
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Sscc)) {
|
||||
this.sendError(new LUScanNotGrantedException());
|
||||
} else {
|
||||
if (barcodeProd.startsWith("0") || barcodeProd.startsWith("9")) {
|
||||
barcodeProd = barcodeProd.substring(1);
|
||||
}
|
||||
|
||||
PickDataDTO pickDataDTO = PickDataDTO.fromEan128(ean128Model);
|
||||
this.loadArticolo(barcodeProd, pickDataDTO, onComplete);
|
||||
|
||||
@@ -12,6 +12,7 @@ import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.MtbColtRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.wrappers.DocInternoWrapper;
|
||||
import it.integry.integrywmsnative.core.di.BindableInteger;
|
||||
import it.integry.integrywmsnative.core.exception.NoDocTypeSelectedException;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dialog.DialogSelectDocInfoViewModel;
|
||||
@@ -160,7 +161,7 @@ public class DocInterniViewModel {
|
||||
public void newDocument() {
|
||||
SqlMtbColt document = new SqlMtbColt();
|
||||
if (this.dtbTipi.getValue() == null) {
|
||||
this.sendError(new Exception("Nessun tipo documento selezionato!"));
|
||||
this.sendError(new NoDocTypeSelectedException());
|
||||
return;
|
||||
}
|
||||
document.setCodDtipProvv(this.getCodDtip());
|
||||
|
||||
@@ -43,13 +43,13 @@ import it.integry.integrywmsnative.gest.contab_doc_interni.dto.TipiDocDTO;
|
||||
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.ui.FabMenuCustomAnimations;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalView;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogCommon;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||
|
||||
public class DocInterniEditFormActivity extends BaseActivity implements DocInterniEditFormViewModel.Listener, BottomSheetMtbColrEditView.Listener {
|
||||
public class DocInterniEditFormActivity extends BaseActivity implements DocInterniEditFormViewModel.Listener, BottomSheetMtbColrEditModalView.Listener {
|
||||
|
||||
private static final String DATA_KEY_DOCUMENT = "document";
|
||||
private static final String DATA_KEY_PRODUCTS_LIST = "productsList";
|
||||
@@ -144,7 +144,7 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
binding.toolbar.setTitle(R.string.edit_doc);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
FabMenuCustomAnimations.changeIconOnFocus(binding.closeActivityFab, R.drawable.ic_menu_24dp, R.drawable.ic_close_24dp);
|
||||
binding.bottomSheetMtbColrEdit.setListener(this);
|
||||
|
||||
}
|
||||
|
||||
private void initViewModel() {
|
||||
@@ -159,8 +159,9 @@ public class DocInterniEditFormActivity extends BaseActivity implements DocInter
|
||||
binding.documentRowsList.setAdapter(listAdapter);
|
||||
binding.documentRowsList.setLayoutManager(new LinearLayoutManager(this));
|
||||
listAdapter.setOnItemClicked(row -> {
|
||||
binding.bottomSheetMtbColrEdit.setMtbColr(sqlToEntity(row));
|
||||
binding.bottomSheetMtbColrEdit.expand();
|
||||
new BottomSheetMtbColrEditModalView(sqlToEntity(row))
|
||||
.setListener(this)
|
||||
.show(getSupportFragmentManager(), "BottomSheetMtbColrEditModal");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColr;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.SqlMtbColt;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.MtbColrDataSource;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.MtbColtRepository;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
@@ -129,12 +130,12 @@ public class DocInterniEditFormViewModel {
|
||||
public void onSearch(String search) {
|
||||
GrigliaAcquistiChildDTO articolo = this.searchArticolo(search);
|
||||
if (articolo == null) {
|
||||
this.sendError(new Exception("Nessun articolo corrispondente al codice fornito!"));
|
||||
this.sendError(new NoResultFromBarcodeException());
|
||||
return;
|
||||
}
|
||||
List<SqlMtbColr> rows = this.getRowsForArticolo(articolo);
|
||||
if (rows.isEmpty()) {
|
||||
this.sendError(new Exception("Nessun articolo corrispondente al codice fornito!"));
|
||||
this.sendError(new NoResultFromBarcodeException());
|
||||
}
|
||||
if (rows.size() > 1) {
|
||||
this.listener.onMultipleRowsFound(rows, articolo);
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.google.gson.JsonObject;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import it.integry.integrywmsnative.core.exception.RestException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
|
||||
@@ -35,7 +36,7 @@ public class DocInterniRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<DocInterniSetupDTO>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
onFailed.run(new RestException(t.getMessage()));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -50,7 +51,7 @@ public class DocInterniRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ServiceRESTResponse<GrigliaArticoliDTO>> call, Throwable t) {
|
||||
onFailed.run(new Exception(t));
|
||||
onFailed.run(new RestException(t.getMessage()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalView;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_cliente.DialogAskClienteView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
|
||||
@@ -62,7 +62,7 @@ import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQua
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class PickingLiberoFragment extends BaseFragment implements ITitledFragment, IScrollableFragment, ILifecycleFragment, PickingLiberoViewModel.Listener, BottomSheetMtbColrEditView.Listener {
|
||||
public class PickingLiberoFragment extends BaseFragment implements ITitledFragment, IScrollableFragment, ILifecycleFragment, PickingLiberoViewModel.Listener, BottomSheetMtbColrEditModalView.Listener {
|
||||
|
||||
private FragmentPickingLiberoBinding mBindings;
|
||||
|
||||
@@ -135,7 +135,7 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
|
||||
this.initVars();
|
||||
this.initBarcodeReader();
|
||||
this.initBottomSheet();
|
||||
|
||||
this.initRecyclerView();
|
||||
|
||||
boolean flagAskCliente = SettingsManager.iDB().isFlagAskClienteInPickingLibero();
|
||||
@@ -162,10 +162,6 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
private void initBottomSheet() {
|
||||
mBindings.bottomSheetMtbColrEdit.setListener(this);
|
||||
}
|
||||
|
||||
|
||||
private void initRecyclerView() {
|
||||
mBindings.pickingLiberoMainList.setNestedScrollingEnabled(false);
|
||||
@@ -182,8 +178,9 @@ public class PickingLiberoFragment extends BaseFragment implements ITitledFragme
|
||||
mBindings.pickingLiberoMainList.setAdapter(mAdapter);
|
||||
|
||||
this.mAdapter.setOnItemClickListener(clickedMtbColr -> {
|
||||
mBindings.bottomSheetMtbColrEdit.setMtbColr(clickedMtbColr);
|
||||
mBindings.bottomSheetMtbColrEdit.expand();
|
||||
new BottomSheetMtbColrEditModalView(clickedMtbColr)
|
||||
.setListener(this)
|
||||
.show(getParentFragmentManager(), "BottomSheetMtbColrEditModal");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -183,9 +183,6 @@ public class PickingLiberoViewModel {
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Sscc)) {
|
||||
this.executeEtichettaLU(ean128Model.Sscc, onComplete);
|
||||
} else if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||
if (barcodeProd.startsWith("0") || barcodeProd.startsWith("9")) {
|
||||
barcodeProd = barcodeProd.substring(1);
|
||||
}
|
||||
this.loadArticolo(barcodeProd, ean128Model, onComplete);
|
||||
} else {
|
||||
this.sendError(new NoLUFoundException());
|
||||
|
||||
@@ -32,7 +32,7 @@ import it.integry.integrywmsnative.gest.prod_rientro_merce.order_list.ProdRientr
|
||||
import it.integry.integrywmsnative.gest.prod_versamento_materiale.dto.OrdineLavorazioneDTO;
|
||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
|
||||
public class ProdRientroMerceFragment extends BaseFragment implements
|
||||
@@ -41,7 +41,7 @@ public class ProdRientroMerceFragment extends BaseFragment implements
|
||||
ILifecycleFragment,
|
||||
ProdRientroMerceViewModel.Listener,
|
||||
BottomSheetFragmentLUContentView.Listener,
|
||||
BottomSheetMtbColrEditView.Listener,
|
||||
BottomSheetMtbColrEditModalView.Listener,
|
||||
ProdRientroMerceOrderListFragment.OnRefreshListener {
|
||||
|
||||
|
||||
@@ -64,7 +64,6 @@ public class ProdRientroMerceFragment extends BaseFragment implements
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -77,7 +76,6 @@ public class ProdRientroMerceFragment extends BaseFragment implements
|
||||
mProdRientroMerceOrderDetailFragment = ProdRientroMerceOrderDetailFragment.newInstance();
|
||||
|
||||
|
||||
|
||||
mProdRientroMerceOrderListFragment
|
||||
.setOnItemSelectedRunnable(order -> {
|
||||
if (!isLargeLayout) {
|
||||
@@ -92,8 +90,9 @@ public class ProdRientroMerceFragment extends BaseFragment implements
|
||||
})
|
||||
.setOnRefreshListener(this);
|
||||
mProdRientroMerceOrderDetailFragment.setOnMtbColtClicked(item -> {
|
||||
mBindings.bottomSheetMtbColrEdit.setMtbColr(item.getMtbColr().get(0));
|
||||
mBindings.bottomSheetMtbColrEdit.expand();
|
||||
new BottomSheetMtbColrEditModalView(item.getMtbColr().get(0))
|
||||
.setListener(this)
|
||||
.show(getParentFragmentManager(), "BottomSheetMtbColrEditModal");
|
||||
});
|
||||
|
||||
if (isLargeLayout) {
|
||||
@@ -127,8 +126,7 @@ public class ProdRientroMerceFragment extends BaseFragment implements
|
||||
mBindings.setViewmodel(mViewModel);
|
||||
|
||||
mViewModel.setListener(this);
|
||||
|
||||
this.initBottomSheet();
|
||||
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
@@ -182,11 +180,6 @@ public class ProdRientroMerceFragment extends BaseFragment implements
|
||||
}
|
||||
|
||||
|
||||
private void initBottomSheet() {
|
||||
mBindings.bottomSheetMtbColrEdit.setListener(this);
|
||||
mBindings.bottomSheetMtbColrEdit.disableEditButton();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMtbColrEdit(MtbColr mtbColr) {
|
||||
|
||||
@@ -222,7 +215,7 @@ public class ProdRientroMerceFragment extends BaseFragment implements
|
||||
|
||||
@Override
|
||||
public void onPreDestroy(Runnable onComplete) {
|
||||
if(getChildFragmentManager().getBackStackEntryCount() > 0)
|
||||
if (getChildFragmentManager().getBackStackEntryCount() > 0)
|
||||
getChildFragmentManager().popBackStack();
|
||||
|
||||
else onComplete.run();
|
||||
|
||||
@@ -159,15 +159,9 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity implements PVOrdi
|
||||
|
||||
DialogAskActionView.newInstance(articoloOrdine.getDescrizione(),
|
||||
articoloOrdine.getQtaOrd() + " " + articoloOrdine.getUntMis(),
|
||||
() -> {
|
||||
this.mViewModel.checkArticolo(articoloOrdine.getCodMart(),
|
||||
artOrd -> {
|
||||
this.onItemDispatched(artOrd);
|
||||
BarcodeManager.enable();
|
||||
},
|
||||
this::onError);
|
||||
BarcodeManager.enable();
|
||||
},
|
||||
() -> this.onItemDispatched(articoloOrdine, () -> {
|
||||
|
||||
}),
|
||||
() -> {
|
||||
this.deleteArticolo(articoloOrdine);
|
||||
BarcodeManager.enable();
|
||||
@@ -186,23 +180,18 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity implements PVOrdi
|
||||
}
|
||||
|
||||
private final RunnableArgs<BarcodeScanDTO> onScanSuccessful = data -> {
|
||||
mBinding.closeActivityFab.close(false);
|
||||
this.onLoadingStarted();
|
||||
BarcodeManager.disable();
|
||||
|
||||
this.mViewModel.processBarcodeDTO(data, this::onLoadingEnded);
|
||||
|
||||
this.mViewModel.processBarcode(data.getStringValue());
|
||||
};
|
||||
|
||||
@Override
|
||||
public void onItemDispatched(ArticoloOrdine articoloOrdine) {
|
||||
public void onItemDispatched(ArticoloOrdine articoloOrdine, Runnable onSuccess) {
|
||||
DialogEditArticoloView
|
||||
.newInstance(articoloOrdine, articolo -> {
|
||||
runOnUiThread(() -> {
|
||||
if (articolo != null) {
|
||||
Toast.makeText(this, "Articolo aggiunto all'ordine!", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
this.mViewModel.refreshListArticoli();
|
||||
this.mViewModel.refreshListArticoli(onSuccess);
|
||||
});
|
||||
}, null).show(this.getSupportFragmentManager(), "DialogEditArticoloView");
|
||||
}
|
||||
@@ -233,16 +222,9 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity implements PVOrdi
|
||||
|
||||
public void manualSearch() {
|
||||
BarcodeManager.disable();
|
||||
DialogSimpleInputHelper.makeInputDialog(this, "Inserisci il codice a barre/codice articolo da cercare", codice -> {
|
||||
DialogSimpleInputHelper.makeInputDialog(this, "Inserisci il codice a barre/codice articolo da cercare", barcode -> {
|
||||
this.onLoadingStarted();
|
||||
this.mViewModel.checkArticolo(codice,
|
||||
articoloOrdine -> {
|
||||
this.onItemDispatched(articoloOrdine);
|
||||
this.onLoadingEnded();
|
||||
BarcodeManager.enable();
|
||||
},
|
||||
this::onError
|
||||
);
|
||||
this.mViewModel.processBarcode(barcode);
|
||||
}, BarcodeManager::enable).show();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Ordine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
||||
@@ -21,6 +21,8 @@ import it.integry.integrywmsnative.core.data_store.db.repository.ArticoloGriglia
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.GrigliaRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.OrdineRepository;
|
||||
import it.integry.integrywmsnative.core.data_store.db.view_model.ArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.exception.NoArtsInGridException;
|
||||
import it.integry.integrywmsnative.core.exception.NoResultFromBarcodeException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||
import it.integry.integrywmsnative.core.rest.consumers.PVOrdiniAcquistoRESTConsumer;
|
||||
@@ -67,19 +69,23 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
|
||||
public void init(Ordine ordine, List<ArticoloDTO> articoliGriglia) {
|
||||
this.mCurrentOrdine = ordine;
|
||||
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
mArticoliGriglia.clear();
|
||||
mArticoliGriglia.addAll(articoliGriglia);
|
||||
this.refreshListArticoli();
|
||||
}
|
||||
|
||||
public void refreshListArticoli() {
|
||||
refreshListArticoli(null);
|
||||
}
|
||||
|
||||
public void refreshListArticoli(Runnable onSuccess) {
|
||||
this.sendOnLoadingStarted();
|
||||
this.loadArticoli(mCurrentOrdine, articoli -> {
|
||||
articoli = Stream.of(articoli).map(this::completeDataArticoli).toList();
|
||||
articoli = Stream.of(articoli).map(this::completeDataArticoli).sorted((a, b) -> a.getDataIns().after(b.getDataIns()) ? -1 : 1).toList();
|
||||
this.mArticoli.postValue(articoli);
|
||||
this.sendOnLoadingEnded();
|
||||
if (onSuccess != null)
|
||||
onSuccess.run();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -90,6 +96,12 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
art.setQtaProposta(BigDecimal.valueOf(artGrid.getQtaProposta()));
|
||||
art.setQtaPrevistaVendita(BigDecimal.valueOf(artGrid.getQtaPrevistaVendita()));
|
||||
art.setBgTint(getBgTint(art));
|
||||
art.setMediaSett(artGrid.getMediaSett());
|
||||
art.setQtaMinOrdinabile(artGrid.getQtaMinOrdinabile());
|
||||
art.setMerceDaRic(artGrid.getMerceDaRic());
|
||||
art.setNewNoPromo(artGrid.isNewNoPromo());
|
||||
art.setFlagQtaMultipla(artGrid.getFlagQtaMultipla());
|
||||
art.setSystemNote(artGrid.generateSystemNote());
|
||||
return art;
|
||||
}
|
||||
|
||||
@@ -109,15 +121,26 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
return mArticoli;
|
||||
}
|
||||
|
||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||
this.checkArticolo(
|
||||
barcodeScanDTO.getStringValue(),
|
||||
articoloOrdine -> {
|
||||
this.sendOnItemDispatched(articoloOrdine);
|
||||
onComplete.run();
|
||||
},
|
||||
this::sendError
|
||||
);
|
||||
public void processBarcode(String barcode) {
|
||||
try {
|
||||
BarcodeManager.disable();
|
||||
this.sendOnLoadingStarted();
|
||||
ArticoloDTO articoloDTO = getArticoloFromBarcode(barcode);
|
||||
if (articoloDTO == null) {
|
||||
throw new NoResultFromBarcodeException(barcode);
|
||||
}
|
||||
this.addArticoloToOrdine(
|
||||
articoloDTO,
|
||||
BarcodeManager::enable,
|
||||
e -> {
|
||||
this.sendError(e);
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
);
|
||||
} catch (Exception e) {
|
||||
this.sendError(e);
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
}
|
||||
|
||||
private void loadArticoli(Ordine ordine, RunnableArgs<List<ArticoloOrdine>> onLoad) {
|
||||
@@ -128,42 +151,17 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
public void checkArticolo(String barcode, RunnableArgs<ArticoloOrdine> onSuccess, RunnableArgs<Exception> onFail) {
|
||||
public void addArticoloToOrdine(ArticoloDTO art, Runnable onSuccess, RunnableArgs<Exception> onFail) {
|
||||
try {
|
||||
if (mArticoliGriglia == null || mArticoliGriglia.isEmpty()) {
|
||||
onFail.run(new Exception("Nessun articolo è presente nella griglia"));
|
||||
return;
|
||||
}
|
||||
ArticoloDTO art = Stream.of(mArticoliGriglia).filter(articolo ->
|
||||
articolo.getCodMart().equalsIgnoreCase(barcode) ||
|
||||
articolo.getBarcode().equalsIgnoreCase(barcode) ||
|
||||
articolo.getBarcode().equalsIgnoreCase(StringUtils.leftPad(barcode, 13, "0"))
|
||||
).sortBy(x -> x.getSortByBarcodeCondition(barcode)).findFirst().orElse(null);
|
||||
|
||||
if (art == null) {
|
||||
onFail.run(new Exception("L' articolo ( " + barcode + " ) non è presente nella griglia"));
|
||||
return;
|
||||
}
|
||||
|
||||
mArticoliOrdineRepository.findArticoloByScanAndOrdine(mCurrentOrdine, art.codMart, (articolo) -> {
|
||||
|
||||
this.sendOnLoadingEnded();
|
||||
if (articolo != null) {
|
||||
if (isAutoOrderOnScan()) {
|
||||
articolo.setQtaOrd(articolo.getQtaOrd() + articolo.getQtaCnf());
|
||||
mArticoliOrdineRepository.saveArticoloToOrdine(articolo, this::refreshListArticoli, this::sendError);
|
||||
mArticoliOrdineRepository.saveArticoloToOrdine(articolo, () -> this.refreshListArticoli(onSuccess), onFail);
|
||||
} else {
|
||||
articolo
|
||||
.setQtaPrevistaVendita(BigDecimal.valueOf(art.getQtaPrevistaVendita()))
|
||||
.setQtaProposta(BigDecimal.valueOf(art.getQtaProposta()))
|
||||
.setGiacenza(BigDecimal.valueOf(art.getGiacenza()))
|
||||
.setMediaSett(art.getMediaSett());
|
||||
|
||||
articolo.setQtaMinOrdinabile(art.getQtaMinOrdinabile());
|
||||
articolo.setMerceDaRic(art.getMerceDaRic());
|
||||
articolo.setNewNoPromo(art.isNewNoPromo());
|
||||
articolo.setFlagQtaMultipla(art.getFlagQtaMultipla());
|
||||
articolo.setSystemNote(art.generateSystemNote());
|
||||
onSuccess.run(articolo);
|
||||
this.sendOnItemDispatched(articolo, onSuccess);
|
||||
}
|
||||
|
||||
|
||||
@@ -171,9 +169,9 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
articolo = art.convertToArticoloOrdine(mCurrentOrdine);
|
||||
if (isAutoOrderOnScan()) {
|
||||
articolo.setQtaOrd(articolo.getQtaCnf());
|
||||
mArticoliOrdineRepository.saveArticoloToOrdine(articolo, this::refreshListArticoli, this::sendError);
|
||||
mArticoliOrdineRepository.saveArticoloToOrdine(articolo, () -> this.refreshListArticoli(onSuccess), onFail);
|
||||
} else {
|
||||
onSuccess.run(articolo);
|
||||
this.sendOnItemDispatched(articolo, onSuccess);
|
||||
}
|
||||
}
|
||||
}, onFail);
|
||||
@@ -184,6 +182,19 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
public ArticoloDTO getArticoloFromBarcode(String barcode) throws NoArtsInGridException {
|
||||
if (mArticoliGriglia == null || mArticoliGriglia.isEmpty()) {
|
||||
throw new NoArtsInGridException();
|
||||
}
|
||||
|
||||
return Stream.of(mArticoliGriglia).filter(articolo ->
|
||||
articolo.getCodMart().equalsIgnoreCase(barcode) ||
|
||||
articolo.getBarcode().equalsIgnoreCase(barcode) ||
|
||||
articolo.getBarcode().equalsIgnoreCase(StringUtils.leftPad(barcode, 13, "0"))
|
||||
).sortBy(x -> x.getSortByBarcodeCondition(barcode)).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
|
||||
private boolean isAutoOrderOnScan() {
|
||||
return SettingsManager.iDB().isFlagOrdinaArticoliOnScan();
|
||||
}
|
||||
@@ -193,8 +204,6 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
}
|
||||
|
||||
public void orderNewProducts() {
|
||||
this.sendOnLoadingStarted();
|
||||
|
||||
List<ArticoloDTO> newArts = getNewArticoli();
|
||||
if (!newArts.isEmpty()) {
|
||||
List<ArticoloOrdine> articoliToSave = new ArrayList<>();
|
||||
@@ -241,8 +250,8 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
}, this::sendError);
|
||||
}
|
||||
|
||||
private void sendOnItemDispatched(ArticoloOrdine articoloOrdine) {
|
||||
if (this.mListener != null) mListener.onItemDispatched(articoloOrdine);
|
||||
private void sendOnItemDispatched(ArticoloOrdine articoloOrdine, Runnable onSuccess) {
|
||||
if (this.mListener != null) mListener.onItemDispatched(articoloOrdine, onSuccess);
|
||||
}
|
||||
|
||||
private void sendOnLoadingStarted() {
|
||||
@@ -258,7 +267,7 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
}
|
||||
|
||||
public interface Listener extends ILoadingListener {
|
||||
void onItemDispatched(ArticoloOrdine articoloOrdine);
|
||||
void onItemDispatched(ArticoloOrdine articoloOrdine, Runnable onSuccess);
|
||||
|
||||
int getColorFromResource(int resId);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.ArticoloOrdine;
|
||||
import it.integry.integrywmsnative.core.data_store.db.repository.ArticoliOrdineRepository;
|
||||
import it.integry.integrywmsnative.core.exception.InvalidOrderedQtyException;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityBigDecimal;
|
||||
|
||||
@@ -105,7 +106,7 @@ public class DialogEditArticoloViewModel {
|
||||
|
||||
public void save(RunnableArgs<ArticoloOrdine> onComplete) {
|
||||
if (UtilityBigDecimal.equalsOrLowerThan(this.internalQtaTot, BigDecimal.ZERO)) {
|
||||
this.mListener.onError(new Exception("La quantità ordinata deve essere maggiore di 0"));
|
||||
this.mListener.onError(new InvalidOrderedQtyException());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.data_store.db.entity.Griglia;
|
||||
import it.integry.integrywmsnative.core.data_store.db.view_model.ArticoloDTO;
|
||||
import it.integry.integrywmsnative.core.exception.GridNotFoundException;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgss;
|
||||
@@ -106,7 +107,7 @@ public class DialogScanGrigliaAcquistoView extends BaseDialogFragment {
|
||||
pvOrdiniAcquistoRESTConsumer.getArticoliListino(codAlis, dto -> {
|
||||
this.onLoadingEnded();
|
||||
if (dto.getGrigliaAcquistiChild().size() <= 0) {
|
||||
onFailed.run(new Exception("La griglia selezionata (" + codAlis + ") non esiste o non presenta articoli"));
|
||||
onFailed.run(new GridNotFoundException(codAlis));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGExcep
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||
import it.integry.integrywmsnative.gest.spedizione.model.PickingObjectDTO;
|
||||
import it.integry.integrywmsnative.ui.SimpleDividerItemDecoration;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalView;
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLUView;
|
||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||
@@ -65,7 +65,7 @@ import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQua
|
||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView;
|
||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
||||
|
||||
public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFragment, ILifecycleFragment, RettificaGiacenzeViewModel.Listener, BottomSheetMtbColrEditView.Listener {
|
||||
public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFragment, ILifecycleFragment, RettificaGiacenzeViewModel.Listener, BottomSheetMtbColrEditModalView.Listener {
|
||||
|
||||
private FragmentMainRettificaGiacenzeBinding mBinding = null;
|
||||
|
||||
@@ -132,7 +132,6 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
this.initVars();
|
||||
this.initBarcodeReader();
|
||||
this.initBottomSheet();
|
||||
this.initRecyclerView();
|
||||
|
||||
this.init();
|
||||
@@ -152,10 +151,6 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(getActivity(), ex, false)));
|
||||
}
|
||||
|
||||
private void initBottomSheet() {
|
||||
mBinding.bottomSheetMtbColrEdit.setListener(this);
|
||||
}
|
||||
|
||||
private void initRecyclerView() {
|
||||
mBinding.rettificaGiacenzeMainList.setNestedScrollingEnabled(false);
|
||||
mBinding.rettificaGiacenzeMainList.setHasFixedSize(true);
|
||||
@@ -173,8 +168,11 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
|
||||
|
||||
this.mAdapter.setOnItemClickListener(clickedMtbColr -> {
|
||||
mBinding.bottomSheetMtbColrEdit.setMtbColr(clickedMtbColr);
|
||||
mBinding.bottomSheetMtbColrEdit.expand();
|
||||
new BottomSheetMtbColrEditModalView(clickedMtbColr)
|
||||
.setListener(this)
|
||||
.show(getParentFragmentManager(), "tag");
|
||||
// mBinding.bottomSheetMtbColrEdit.setMtbColr(clickedMtbColr);
|
||||
// mBinding.bottomSheetMtbColrEdit.expand();
|
||||
});
|
||||
|
||||
mBinding.rettificaGiacenzeMainList.setAdapter(mAdapter);
|
||||
@@ -475,16 +473,16 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
||||
switch (result) {
|
||||
case YES:
|
||||
DialogAskPositionOfLUView.makeBase(false, (status, mtbDepoPosizione) -> {
|
||||
if (status == DialogConsts.Results.ABORT) {
|
||||
onComplete.run(false, null);
|
||||
} else {
|
||||
if (mtbDepoPosizione != null) {
|
||||
onComplete.run(true, mtbDepoPosizione);
|
||||
} else {
|
||||
onComplete.run(true, null);
|
||||
}
|
||||
}
|
||||
}, this::onError)
|
||||
if (status == DialogConsts.Results.ABORT) {
|
||||
onComplete.run(false, null);
|
||||
} else {
|
||||
if (mtbDepoPosizione != null) {
|
||||
onComplete.run(true, mtbDepoPosizione);
|
||||
} else {
|
||||
onComplete.run(true, null);
|
||||
}
|
||||
}
|
||||
}, this::onError)
|
||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||
break;
|
||||
|
||||
|
||||
@@ -129,9 +129,6 @@ public class RettificaGiacenzeViewModel {
|
||||
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||
if (barcodeProd.startsWith("0") || barcodeProd.startsWith("9")) {
|
||||
barcodeProd = barcodeProd.substring(1);
|
||||
}
|
||||
|
||||
PickDataDTO pickDataDTO = PickDataDTO.fromEan128(ean128Model);
|
||||
this.loadArticolo(barcodeProd, pickDataDTO, onComplete);
|
||||
|
||||
@@ -223,7 +223,6 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
useQtaOrd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private boolean isOrdTrasf() {
|
||||
|
||||
@@ -724,8 +723,8 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
@Override
|
||||
public void onLUPesoRequired(String codTcol, BigDecimal netWeightKG, BigDecimal grossWeightKG, RunnableArgsss<String, BigDecimal, BigDecimal> onComplete) {
|
||||
DialogInputPesoLUView.newInstance(null, new BigDecimal(50), new BigDecimal(55), (newCodTcol, newNetWeight, newGrossWeight) -> {
|
||||
onComplete.run(newCodTcol, netWeightKG, grossWeightKG);
|
||||
})
|
||||
onComplete.run(newCodTcol, netWeightKG, grossWeightKG);
|
||||
})
|
||||
.show(getSupportFragmentManager(), "tag");
|
||||
}
|
||||
|
||||
@@ -832,7 +831,7 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
||||
.setCanOverflowOrderQuantity(canOverflowOrderQuantity)
|
||||
.setCanLUBeClosed(true)
|
||||
.setCanPartitaMagBeChanged(canPartitaMagBeChanged)
|
||||
.setStatoPartitaMag(pickingObjectDTO.getStatoArticoloDTO())
|
||||
.setStatoPartitaMag(pickingObjectDTO != null ? pickingObjectDTO.getStatoArticoloDTO() : null)
|
||||
.setNotifyProductLotStatus(SettingsManager.iDB().isNotifyLotStatus());
|
||||
|
||||
if (!mDialogInputQuantityV2View.isVisible())
|
||||
|
||||
@@ -540,9 +540,6 @@ public class SpedizioneViewModel {
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Sscc)) {
|
||||
this.executeEtichettaLU(ean128Model.Sscc, onComplete);
|
||||
} else {
|
||||
if (barcodeProd.startsWith("0") || barcodeProd.startsWith("9")) {
|
||||
barcodeProd = barcodeProd.substring(1);
|
||||
}
|
||||
|
||||
PickDataDTO pickDataDTO = PickDataDTO.fromEan128(ean128Model);
|
||||
this.loadArticolo(barcodeProd, pickDataDTO, onComplete);
|
||||
@@ -1737,10 +1734,13 @@ public class SpedizioneViewModel {
|
||||
|
||||
var loadCollidto = new LoadColliDTO();
|
||||
var codAnag = Stream.of(mTestateOrdini).map(OrdineUscitaInevasoDTO::getCodAnagOrd).withoutNulls().distinctBy(x -> x).findFirst().get();
|
||||
var codVdes = Stream.of(mTestateOrdini).map(OrdineUscitaInevasoDTO::getCodVdes).withoutNulls().distinctBy(x -> x).findFirst().get();
|
||||
|
||||
loadCollidto.setColli(getCreatedMtbColts());
|
||||
loadCollidto.setCodDtip(SettingsManager.iDB().getCodDtipOrdTrasfV());
|
||||
loadCollidto.setCodMdep(mDefaultCodMdep);
|
||||
loadCollidto.setCodAnag(codAnag);
|
||||
loadCollidto.setCodVdes(codVdes);
|
||||
loadCollidto.setSaveDoc(true);
|
||||
loadCollidto.setGestione("L");
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.Observable;
|
||||
import androidx.databinding.ObservableList;
|
||||
@@ -19,9 +20,9 @@ import it.integry.integrywmsnative.core.expansion.OnSingleClickListener;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.databinding.BottomSheetFragmentLuContentBinding;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__base.BottomSheetFragmentBaseView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalView;
|
||||
|
||||
public class BottomSheetFragmentLUContentView extends BottomSheetFragmentBaseView implements BottomSheetMtbColrEditView.Listener {
|
||||
public class BottomSheetFragmentLUContentView extends BottomSheetFragmentBaseView implements BottomSheetMtbColrEditModalView.Listener {
|
||||
|
||||
private BottomSheetFragmentLuContentBinding mBinding;
|
||||
private BottomSheetFragmentLUContentViewModel mViewModel;
|
||||
@@ -41,7 +42,6 @@ public class BottomSheetFragmentLUContentView extends BottomSheetFragmentBaseVie
|
||||
mViewModel = new BottomSheetFragmentLUContentViewModel();
|
||||
mBinding.setViewModel(mViewModel);
|
||||
|
||||
mBinding.bottomSheetMtbColrEdit.setListener(this);
|
||||
|
||||
mBinding.titleLayout.setOnClickListener(new OnSingleClickListener() {
|
||||
@Override
|
||||
@@ -67,8 +67,11 @@ public class BottomSheetFragmentLUContentView extends BottomSheetFragmentBaseVie
|
||||
this.mBinding.mtbColrRecyclerView.setAdapter(this.mAdapter);
|
||||
|
||||
this.mAdapter.setOnItemClickListener(clickedMtbColr -> {
|
||||
this.mBinding.bottomSheetMtbColrEdit.setMtbColr(clickedMtbColr);
|
||||
this.mBinding.bottomSheetMtbColrEdit.expand();
|
||||
|
||||
new BottomSheetMtbColrEditModalView(clickedMtbColr)
|
||||
.setListener(this)
|
||||
.show(((AppCompatActivity) mContext).getSupportFragmentManager(), "tag");
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent
|
||||
public interface BottomSheetMtbColrEditModalComponent {
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
BottomSheetMtbColrEditModalComponent create();
|
||||
}
|
||||
|
||||
void inject(BottomSheetMtbColrEditModalView bottomSheetMtbColrEditModalView);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
|
||||
@Module(subcomponents = BottomSheetMtbColrEditModalComponent.class)
|
||||
public class BottomSheetMtbColrEditModalModule {
|
||||
|
||||
@Provides
|
||||
BottomSheetMtbColrEditViewModel providesBottomSheetMtbColrEditViewModel() {
|
||||
return new BottomSheetMtbColrEditViewModel();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.databinding.BottomSheetMtbColrEditBinding;
|
||||
|
||||
public class BottomSheetMtbColrEditModalView extends BottomSheetDialogFragment {
|
||||
|
||||
@Inject
|
||||
BottomSheetMtbColrEditViewModel mViewModel;
|
||||
|
||||
public ObservableField<Boolean> enabledEditButton = new ObservableField<>(true);
|
||||
public ObservableField<Boolean> enabledDeleteButton = new ObservableField<>(true);
|
||||
|
||||
private BottomSheetMtbColrEditBinding mBinding;
|
||||
private Listener mListener;
|
||||
|
||||
public final ObservableField<MtbColr> inputMtbColr = new ObservableField<>();
|
||||
|
||||
public BottomSheetMtbColrEditModalView(MtbColr inputMtbColr) {
|
||||
this.inputMtbColr.set(inputMtbColr);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
MainApplication.appComponent
|
||||
.bottomSheetMtbColrEditModalComponent()
|
||||
.create()
|
||||
.inject(this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
mBinding = BottomSheetMtbColrEditBinding.inflate(inflater, container, true);
|
||||
|
||||
mBinding.setLifecycleOwner(this);
|
||||
mBinding.setView(this);
|
||||
|
||||
mBinding.executePendingBindings();
|
||||
|
||||
return mBinding.getRoot();
|
||||
}
|
||||
|
||||
|
||||
public BottomSheetMtbColrEditModalView enableEditButton() {
|
||||
this.enabledEditButton.set(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public BottomSheetMtbColrEditModalView disableEditButton() {
|
||||
this.enabledEditButton.set(false);
|
||||
return this;
|
||||
}
|
||||
|
||||
public BottomSheetMtbColrEditModalView enableDeleteButton() {
|
||||
this.enabledDeleteButton.set(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public BottomSheetMtbColrEditModalView disableDeleteButton() {
|
||||
this.enabledDeleteButton.set(false);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public void editMtbColr() {
|
||||
if (this.mListener != null) this.mListener.onMtbColrEdit(this.inputMtbColr.get());
|
||||
this.dismiss();
|
||||
}
|
||||
|
||||
public void deleteMtbColr() {
|
||||
if (this.mListener != null) this.mListener.onMtbColrDelete(this.inputMtbColr.get());
|
||||
this.dismiss();
|
||||
}
|
||||
|
||||
|
||||
public BottomSheetMtbColrEditModalView setListener(Listener listener) {
|
||||
this.mListener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
|
||||
void onMtbColrEdit(MtbColr mtbColr);
|
||||
|
||||
void onMtbColrDelete(MtbColr mtbColr);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||
import it.integry.integrywmsnative.databinding.BottomSheetMtbColrEditBinding;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__base.BottomSheetFragmentBaseView;
|
||||
import it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.exceptions.NullMtbColrException;
|
||||
|
||||
public class BottomSheetMtbColrEditView extends BottomSheetFragmentBaseView {
|
||||
|
||||
private final BottomSheetMtbColrEditBinding mBinding;
|
||||
private final BottomSheetMtbColrEditViewModel mViewModel;
|
||||
|
||||
public ObservableField<Boolean> enabledEditButton = new ObservableField<>(true);
|
||||
public ObservableField<Boolean> enabledDeleteButton = new ObservableField<>(true);
|
||||
|
||||
private Listener mListener;
|
||||
|
||||
public BottomSheetMtbColrEditView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.bottom_sheet__mtb_colr_edit, this, true);
|
||||
|
||||
|
||||
mViewModel = new BottomSheetMtbColrEditViewModel();
|
||||
mBinding.setViewModel(mViewModel);
|
||||
mBinding.setView(this);
|
||||
}
|
||||
|
||||
public void setMtbColr(MtbColr mtbColr) {
|
||||
this.mBinding.invalidateAll();
|
||||
this.mViewModel.setMtbColr(mtbColr);
|
||||
this.mBinding.executePendingBindings();
|
||||
|
||||
this.parentView.requestLayout();
|
||||
}
|
||||
|
||||
public void editMtbColr() {
|
||||
if(this.mListener != null) this.mListener.onMtbColrEdit(this.mViewModel.getMtbColr());
|
||||
this.collapse();
|
||||
}
|
||||
|
||||
public void deleteMtbColr() {
|
||||
if(this.mListener != null) this.mListener.onMtbColrDelete(this.mViewModel.getMtbColr());
|
||||
this.collapse();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void expand() {
|
||||
if(this.mViewModel.getMtbColr() == null) {
|
||||
UtilityLogger.error(new NullMtbColrException());
|
||||
return;
|
||||
}
|
||||
|
||||
super.expand();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStateChangedCallback(State newState) {
|
||||
if(newState == State.COLLAPSED) this.mViewModel.setMtbColr(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSlideCallback(float slideOffset) {
|
||||
|
||||
}
|
||||
|
||||
public void enableEditButton() {
|
||||
this.enabledEditButton.set(true);
|
||||
}
|
||||
|
||||
public void disableEditButton() {
|
||||
this.enabledEditButton.set(false);
|
||||
}
|
||||
|
||||
public void enableDeleteButton() {
|
||||
this.enabledDeleteButton.set(true);
|
||||
}
|
||||
|
||||
public void disableDeleteButton() {
|
||||
this.enabledDeleteButton.set(false);
|
||||
}
|
||||
|
||||
|
||||
public BottomSheetMtbColrEditViewModel getViewModelInstance() {
|
||||
return this.mViewModel;
|
||||
}
|
||||
|
||||
|
||||
public BottomSheetMtbColrEditView setListener(Listener listener) {
|
||||
this.mListener = listener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
|
||||
void onMtbColrEdit(MtbColr mtbColr);
|
||||
|
||||
void onMtbColrDelete(MtbColr mtbColr);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,22 +1,5 @@
|
||||
package it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit;
|
||||
|
||||
import androidx.databinding.ObservableField;
|
||||
|
||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||
|
||||
public class BottomSheetMtbColrEditViewModel {
|
||||
|
||||
private final ObservableField<MtbColr> mtbColr = new ObservableField<>();
|
||||
|
||||
|
||||
public MtbColr getMtbColr() {
|
||||
return mtbColr.get();
|
||||
}
|
||||
|
||||
public BottomSheetMtbColrEditViewModel setMtbColr(MtbColr mtbColr) {
|
||||
this.mtbColr.set(mtbColr);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -90,9 +90,6 @@ public class DialogScanArtViewModel {
|
||||
if (!UtilityString.isNullOrEmpty(ean128Model.Sscc)) {
|
||||
this.executeEtichettaLU(ean128Model.Sscc, onComplete);
|
||||
} else if (!mForceOnlyUL) {
|
||||
if (barcodeProd.startsWith("0") || barcodeProd.startsWith("9")) {
|
||||
barcodeProd = barcodeProd.substring(1);
|
||||
}
|
||||
|
||||
this.loadArticolo(barcodeProd, ean128Model, onComplete);
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<layout xmlns:tools="http://schemas.android.com/tools">
|
||||
<layout>
|
||||
|
||||
<data>
|
||||
|
||||
@@ -194,6 +194,14 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/bottom_sheet__background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#99000000"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView
|
||||
android:id="@+id/bottom_sheet_lu_content"
|
||||
@@ -203,7 +211,7 @@
|
||||
app:behavior_peekHeight="66dp"
|
||||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
|
||||
app:visibility="@{accettazioneView.bottomSheetEnabled}"
|
||||
app:parentView="@id/bottom_sheet_lu_content"/>
|
||||
app:parentView="@id/bottom_sheet_lu_content" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
@@ -4,13 +4,15 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:fab="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniEditFormActivity"
|
||||
/>
|
||||
type="it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniEditFormActivity" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="it.integry.integrywmsnative.gest.contab_doc_interni.edit_form.DocInterniEditFormViewModel" />
|
||||
@@ -28,16 +30,14 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/full_white"
|
||||
android:orientation="vertical"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
>
|
||||
android:descendantFocusability="blocksDescendants">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/full_white"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
>
|
||||
android:paddingTop="8dp">
|
||||
|
||||
<it.integry.integrywmsnative.ui.ElevatedToolbar
|
||||
android:id="@+id/elevated_toolbar"
|
||||
@@ -48,6 +48,7 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/toolbar_title"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -55,6 +56,7 @@
|
||||
tools:text="@string/edit_doc"
|
||||
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
|
||||
android:layout_gravity="start" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/add_extra_items_toolbar"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -64,7 +66,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_search_black_24dp"
|
||||
android:onClick="@{()->view.manualSearch()}"
|
||||
android:tint="@color/colorPrimaryGray"/>
|
||||
android:tint="@color/colorPrimaryGray" />
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</it.integry.integrywmsnative.ui.ElevatedToolbar>
|
||||
@@ -241,6 +243,7 @@
|
||||
android:layout_marginBottom="92dp"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/scan_art_spinner"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -255,7 +258,7 @@
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -266,7 +269,7 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_horizontal"
|
||||
style="@style/AppTheme.NewMaterial.Text"
|
||||
android:text="@string/scan_item"/>
|
||||
android:text="@string/scan_item" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -323,6 +326,7 @@
|
||||
app:fab_colorRipple="#66FFFFFF"
|
||||
app:onClick="@{() -> viewModel.exportDocument()}"
|
||||
fab:fab_label="@string/export_document" />
|
||||
|
||||
<com.github.clans.fab.FloatingActionButton
|
||||
android:id="@+id/delete_document"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -348,23 +352,5 @@
|
||||
|
||||
|
||||
</com.github.clans.fab.FloatingActionMenu>
|
||||
<View
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit__background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#99000000"
|
||||
android:visibility="gone"
|
||||
android:clickable="true"
|
||||
android:focusable="true"/>
|
||||
|
||||
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
app:layout_behavior=".view.bottom_sheet__base.AutoCloseBottomSheetBehavior"
|
||||
app:parentView="@id/bottom_sheet__mtb_colr_edit"
|
||||
app:backgroundView="@id/bottom_sheet__mtb_colr_edit__background"/>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
@@ -3,6 +3,7 @@
|
||||
xmlns:fab="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
@@ -49,7 +50,7 @@
|
||||
android:gravity="center_horizontal"
|
||||
app:layout_collapseMode="pin">
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</it.integry.integrywmsnative.ui.ElevatedToolbar>
|
||||
|
||||
@@ -127,7 +128,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="72dp"/>
|
||||
android:paddingBottom="72dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -174,7 +175,7 @@
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_playlist_add_check_24dp"
|
||||
android:adjustViewBounds="true"/>
|
||||
android:adjustViewBounds="true" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -182,7 +183,7 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp"
|
||||
android:text="@string/no_item_to_pick_text"/>
|
||||
android:text="@string/no_item_to_pick_text" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -240,17 +241,25 @@
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:id="@+id/empty_space_padding"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="?attr/actionBarSize"-->
|
||||
<!-- android:visibility="@{pickingResiView.bottomSheetEnabled ? View.VISIBLE : View.GONE}"-->
|
||||
<!-- android:layout_alignParentBottom="true">-->
|
||||
<!-- <RelativeLayout-->
|
||||
<!-- android:id="@+id/empty_space_padding"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="?attr/actionBarSize"-->
|
||||
<!-- android:visibility="@{pickingResiView.bottomSheetEnabled ? View.VISIBLE : View.GONE}"-->
|
||||
<!-- android:layout_alignParentBottom="true">-->
|
||||
|
||||
<!-- </RelativeLayout>-->
|
||||
<!-- </RelativeLayout>-->
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/bottom_sheet__background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#99000000"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView
|
||||
android:id="@+id/bottom_sheet_lu_content"
|
||||
@@ -260,7 +269,7 @@
|
||||
app:behavior_hideable="false"
|
||||
app:behavior_peekHeight="66dp"
|
||||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
|
||||
app:parentView="@id/bottom_sheet_lu_content"/>
|
||||
app:parentView="@id/bottom_sheet_lu_content" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
android:src="@drawable/ic_add_24dp"
|
||||
android:tint="@color/colorPrimaryGray"
|
||||
app:visibility="@{spedizioneView.addExtraItemsEnabled}"
|
||||
app:singleClick="@{() -> spedizioneView.addExtraItem()}"/>
|
||||
app:singleClick="@{() -> spedizioneView.addExtraItem()}" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
@@ -293,6 +293,14 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/bottom_sheet__background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#99000000"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView
|
||||
android:id="@+id/bottom_sheet_lu_content"
|
||||
|
||||
@@ -12,11 +12,7 @@
|
||||
|
||||
<variable
|
||||
name="view"
|
||||
type="it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditViewModel" />
|
||||
type="it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditModalView" />
|
||||
</data>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
@@ -52,7 +48,7 @@
|
||||
android:maxLines="2"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="@{viewModel.mtbColr.descrizione}"
|
||||
android:text="@{view.inputMtbColr.descrizione}"
|
||||
android:textColor="#444"
|
||||
android:textStyle="bold"
|
||||
tools:text="Descrizione articolo" />
|
||||
@@ -62,7 +58,7 @@
|
||||
style="@style/AppTheme.NewMaterial.Text.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.mtbColr.codMart}"
|
||||
android:text="@{view.inputMtbColr.codMart}"
|
||||
tools:text="ABF52IL" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
@@ -86,7 +82,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:text="@{UtilityNumber.decimalToString(viewModel.mtbColr.qtaCol)}"
|
||||
android:text="@{UtilityNumber.decimalToString(view.inputMtbColr.qtaCol)}"
|
||||
android:textStyle="bold"
|
||||
tools:text="250" />
|
||||
|
||||
@@ -96,7 +92,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="end"
|
||||
android:text="@{viewModel.mtbColr.untMis}"
|
||||
android:text="@{view.inputMtbColr.untMis}"
|
||||
android:textStyle="bold"
|
||||
tools:text="PZ" />
|
||||
|
||||
@@ -113,7 +109,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:text="@{UtilityNumber.decimalToString(viewModel.mtbColr.numCnf)}"
|
||||
android:text="@{UtilityNumber.decimalToString(view.inputMtbColr.numCnf)}"
|
||||
android:textStyle="bold"
|
||||
tools:text="250" />
|
||||
|
||||
|
||||
@@ -528,24 +528,5 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit__background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#99000000"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
app:layout_behavior=".view.bottom_sheet__base.AutoCloseBottomSheetBehavior"
|
||||
app:parentView="@id/bottom_sheet__mtb_colr_edit"
|
||||
app:backgroundView="@id/bottom_sheet__mtb_colr_edit__background" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
@@ -314,26 +314,6 @@
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<View
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit__background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#99000000"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
app:layout_behavior=".view.bottom_sheet__base.AutoCloseBottomSheetBehavior"
|
||||
app:parentView="@id/bottom_sheet__mtb_colr_edit"
|
||||
app:backgroundView="@id/bottom_sheet__mtb_colr_edit__background"/>
|
||||
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?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:fab="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="it.integry.integrywmsnative.core.utility.UtilityString" />
|
||||
|
||||
<variable
|
||||
@@ -122,41 +123,18 @@
|
||||
style="?attr/floatingActionButtonSecondaryStyle" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <com.github.clans.fab.FloatingActionButton-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_gravity="bottom|end"-->
|
||||
<!-- android:layout_marginEnd="8dp"-->
|
||||
<!-- android:layout_marginBottom="8dp"-->
|
||||
<!-- android:onClick="@{() -> view.closeLU()}"-->
|
||||
<!-- android:src="@drawable/ic_check_white_24dp"-->
|
||||
<!-- app:visibility="@{view.thereIsAnOpenedUL}"-->
|
||||
<!-- fab:fab_colorNormal="@color/mainGreen"-->
|
||||
<!-- fab:fab_colorPressed="@color/white_pressed"-->
|
||||
<!-- fab:fab_colorRipple="#66FFFFFF" />-->
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit__background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#99000000"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
app:layout_behavior=".view.bottom_sheet__base.AutoCloseBottomSheetBehavior"
|
||||
app:backgroundView="@id/bottom_sheet__mtb_colr_edit__background"
|
||||
app:parentView="@id/bottom_sheet__mtb_colr_edit" />
|
||||
<!-- <com.github.clans.fab.FloatingActionButton-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_gravity="bottom|end"-->
|
||||
<!-- android:layout_marginEnd="8dp"-->
|
||||
<!-- android:layout_marginBottom="8dp"-->
|
||||
<!-- android:onClick="@{() -> view.closeLU()}"-->
|
||||
<!-- android:src="@drawable/ic_check_white_24dp"-->
|
||||
<!-- app:visibility="@{view.thereIsAnOpenedUL}"-->
|
||||
<!-- fab:fab_colorNormal="@color/mainGreen"-->
|
||||
<!-- fab:fab_colorPressed="@color/white_pressed"-->
|
||||
<!-- fab:fab_colorRipple="#66FFFFFF" />-->
|
||||
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
@@ -53,29 +53,5 @@
|
||||
tools:layout="@layout/fragment_prod_rientro_merce_order_list" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit__background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#99000000"
|
||||
android:visibility="gone"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
<it.integry.integrywmsnative.view.bottom_sheet__mtb_colr_edit.BottomSheetMtbColrEditView
|
||||
android:id="@+id/bottom_sheet__mtb_colr_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="0dp"
|
||||
app:layout_behavior=".view.bottom_sheet__base.AutoCloseBottomSheetBehavior"
|
||||
app:parentView="@id/bottom_sheet__mtb_colr_edit"
|
||||
app:backgroundView="@id/bottom_sheet__mtb_colr_edit__background" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
@@ -213,6 +213,7 @@
|
||||
<string name="already_used_anonymous_barcode"><![CDATA[L\'etichetta scansionata è stata già utilizzata]]></string>
|
||||
<string name="no_result_from_barcode">Il barcode scansionato non ha fornito alcun risultato</string>
|
||||
<string name="multiple_results_from_barcode">Il barcode scansionato ha fornito multipli risultati</string>
|
||||
<string name="no_doc_type_selected">Nessun tipo documento selezionato</string>
|
||||
|
||||
<string name="filtered_arts_in_list">Filtro articoli applicato</string>
|
||||
<string name="remove_filter_button">Rimuovi filtro</string>
|
||||
@@ -431,4 +432,8 @@
|
||||
<string name="activity_picking_inventario_title">Inventario</string>
|
||||
<string name="not_synchronized">Non sincronizzato</string>
|
||||
<string name="new_item">Nuovo</string>
|
||||
<string name="invalid_license">Licenza non valida</string>
|
||||
<string name="no_arts_in_grid">Nessun articolo presente in griglia</string>
|
||||
<string name="invalid_quantity_ordered">La quantità ordinata non è valida</string>
|
||||
<string name="grid_not_found">La griglia selezionata non esiste o non presenta articoli</string>
|
||||
</resources>
|
||||
@@ -212,6 +212,7 @@
|
||||
<string name="no_available_order_on_line">no compatible orders found</string>
|
||||
<string name="no_item_text">No items</string>
|
||||
<string name="no_item_in_recupera_materiale">No LU poured into production</string>
|
||||
<string name="no_doc_type_selected">No document type selected</string>
|
||||
|
||||
<string name="already_used_anonymous_barcode">The scanned label has already been used</string>
|
||||
<string name="no_result_from_barcode">The scanned barcode did not produce any results</string>
|
||||
@@ -435,8 +436,11 @@
|
||||
<string name="empty_lu">Empty LU</string>
|
||||
<string name="ord_ven_qta_omaggio"><![CDATA[Free qty: <b>%s %s</b>]]></string>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
<string name="activity_picking_inventario_title">Inventory</string>
|
||||
<string name="not_synchronized">Not synchronized</string>
|
||||
<string name="new_item">New</string>
|
||||
<string name="invalid_license">Invalid license</string>
|
||||
<string name="no_arts_in_grid">No product found in grid</string>
|
||||
<string name="invalid_quantity_ordered">Invalid quantity ordered</string>
|
||||
<string name="grid_not_found">The selected grid was not found or is empty</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user