Finish v1_0_26(29)
This commit is contained in:
commit
70269642ce
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -9,7 +9,7 @@ buildscript {
|
||||
}
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.google.firebase.firebase-perf'
|
||||
//apply plugin: 'io.fabric'
|
||||
apply plugin: 'io.fabric'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
@ -17,8 +17,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 28
|
||||
def appVersionName = '1.0.25'
|
||||
def appVersionCode = 29
|
||||
def appVersionName = '1.0.26'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@ -13,21 +13,17 @@ import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import it.integry.integrywmsnative.core.REST.watcher.ServerStatusChecker;
|
||||
import it.integry.integrywmsnative.core.interfaces.IFilterableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
|
||||
import it.integry.integrywmsnative.core.interfaces.IRecyclerFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ISearcableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ISelectAllFragment;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
@ -207,8 +203,8 @@ public class MainActivity extends AppCompatActivity
|
||||
mBinding.appBarMain.toolbarTitleLeft.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if(fragment instanceof IRecyclerFragment) {
|
||||
((IRecyclerFragment) fragment).setWaterfallToolbar(mBinding.appBarMain.waterfallToolbar);
|
||||
if(fragment instanceof IScrollableFragment) {
|
||||
((IScrollableFragment) fragment).setWaterfallToolbar(mBinding.appBarMain.waterfallToolbar);
|
||||
}
|
||||
|
||||
if(fragment instanceof ISelectAllFragment && ((ISelectAllFragment)fragment).isEnabled()) {
|
||||
|
||||
@ -8,12 +8,16 @@ import com.orhanobut.logger.Logger;
|
||||
|
||||
import io.fabric.sdk.android.Fabric;
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.REST.model.DistribuzioneColloDTO;
|
||||
import it.integry.integrywmsnative.core.REST.watcher.ServerStatusChecker;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecover;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.settings.Stash;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||
@ -84,12 +88,6 @@ public class AppContext {
|
||||
|
||||
private void initRecoverColli() {
|
||||
ColliDataRecover.init(mContext);
|
||||
|
||||
if(ColliDataRecover.thereIsAnExistantSession()){
|
||||
MtbColt recoveredMtbColt = ColliDataRecover.getFirstSession();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
package it.integry.integrywmsnative.core.data_cache;
|
||||
|
||||
import com.annimon.stream.Stream;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class DataCache {
|
||||
|
||||
private static List<DataCacheDTO> dataCacheList = new ArrayList<>();
|
||||
|
||||
|
||||
public static String addItem(Object item) {
|
||||
String uniqueID = UUID.randomUUID().toString();
|
||||
|
||||
DataCacheDTO dataCacheDTO = new DataCacheDTO()
|
||||
.setItem(item)
|
||||
.setUUID(uniqueID);
|
||||
|
||||
dataCacheList.add(dataCacheDTO);
|
||||
|
||||
return uniqueID;
|
||||
}
|
||||
|
||||
public static <T>T retrieveItem(String uuid) {
|
||||
|
||||
List<DataCacheDTO> dataCacheTemp = Stream.of(dataCacheList)
|
||||
.filter(x -> x.getUUID().equals(uuid)).toList();
|
||||
|
||||
Object foundDataCache = null;
|
||||
|
||||
if(dataCacheTemp != null && dataCacheTemp.size() > 0) {
|
||||
foundDataCache = dataCacheTemp.get(0).getItem();
|
||||
dataCacheList.remove(dataCacheTemp.get(0));
|
||||
}
|
||||
|
||||
return (T)foundDataCache;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package it.integry.integrywmsnative.core.data_cache;
|
||||
|
||||
public class DataCacheDTO {
|
||||
|
||||
private String UUID;
|
||||
private Object item;
|
||||
|
||||
public String getUUID() {
|
||||
return UUID;
|
||||
}
|
||||
|
||||
public DataCacheDTO setUUID(String UUID) {
|
||||
this.UUID = UUID;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Object getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
public DataCacheDTO setItem(Object item) {
|
||||
this.item = item;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -2,9 +2,18 @@ package it.integry.integrywmsnative.core.data_recover;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.google.android.gms.common.util.IOUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -19,6 +28,7 @@ public class ColliDataRecover {
|
||||
private String serCollo;
|
||||
private String dataCollo;
|
||||
private String gestioneCollo;
|
||||
private String filtro;
|
||||
|
||||
public int getNumCollo() {
|
||||
return numCollo;
|
||||
@ -55,6 +65,15 @@ public class ColliDataRecover {
|
||||
this.gestioneCollo = gestioneCollo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFiltro() {
|
||||
return filtro;
|
||||
}
|
||||
|
||||
public RecoverDTO setFiltro(String filtro) {
|
||||
this.filtro = filtro;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
private static Context mContext;
|
||||
@ -63,27 +82,38 @@ public class ColliDataRecover {
|
||||
|
||||
public static void init(Context context) {
|
||||
mContext = context;
|
||||
|
||||
if(isFilePresent(CommonConst.Files.RECOVER_COLLO_FILE)) {
|
||||
loadLocalFile();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean thereIsAnExistantSession() {
|
||||
return mtbColtsSessions.size() > 0;
|
||||
}
|
||||
|
||||
public static MtbColt getFirstSession() {
|
||||
public static Integer getFirstSessionID() {
|
||||
|
||||
if(thereIsAnExistantSession()){
|
||||
RecoverDTO dto = mtbColtsSessions.get(0);
|
||||
mtbColtsSessions.remove(dto);
|
||||
return 0;
|
||||
|
||||
|
||||
} else return null;
|
||||
|
||||
}
|
||||
|
||||
public static MtbColt getSession(Integer sessionID) {
|
||||
|
||||
if(sessionID == null) return null;
|
||||
|
||||
RecoverDTO dto = mtbColtsSessions.get(sessionID);
|
||||
|
||||
return new MtbColt()
|
||||
.setNumCollo(dto.getNumCollo())
|
||||
.setSerCollo(dto.getSerCollo())
|
||||
.setGestione(dto.getGestioneCollo())
|
||||
.setDataCollo(dto.getDataCollo());
|
||||
|
||||
|
||||
} else return null;
|
||||
|
||||
.setDataCollo(dto.getDataCollo())
|
||||
.setFiltroOrdini(dto.getFiltro());
|
||||
}
|
||||
|
||||
public static int startNewSession(MtbColt mtbColtSession) {
|
||||
@ -92,7 +122,8 @@ public class ColliDataRecover {
|
||||
.setDataCollo(mtbColtSession.getDataColloS())
|
||||
.setNumCollo(mtbColtSession.getNumCollo())
|
||||
.setSerCollo(mtbColtSession.getSerCollo())
|
||||
.setGestioneCollo(mtbColtSession.getGestione());
|
||||
.setGestioneCollo(mtbColtSession.getGestione())
|
||||
.setFiltro(mtbColtSession.getFiltroOrdini());
|
||||
|
||||
mtbColtsSessions.add(recoverDTO);
|
||||
updateLocalFile();
|
||||
@ -105,6 +136,28 @@ public class ColliDataRecover {
|
||||
}
|
||||
|
||||
|
||||
private static void loadLocalFile() {
|
||||
InputStream inputStream;
|
||||
|
||||
Gson gson = new Gson();
|
||||
|
||||
try {
|
||||
inputStream = mContext.openFileInput(CommonConst.Files.RECOVER_COLLO_FILE);
|
||||
|
||||
byte[] bytes = IOUtils.readInputStreamFully(inputStream);
|
||||
String jsonString = new String(bytes);
|
||||
|
||||
Type listType = new TypeToken<ArrayList<RecoverDTO>>(){}.getType();
|
||||
mtbColtsSessions = gson.fromJson(jsonString, listType);
|
||||
|
||||
inputStream.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
UtilityExceptions.defaultException(mContext, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void updateLocalFile() {
|
||||
FileOutputStream outputStream;
|
||||
|
||||
@ -119,7 +172,13 @@ public class ColliDataRecover {
|
||||
e.printStackTrace();
|
||||
UtilityExceptions.defaultException(mContext, e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static boolean isFilePresent(String fileName) {
|
||||
String path = mContext.getFilesDir().getAbsolutePath() + "/" + fileName;
|
||||
File file = new File(path);
|
||||
return file.exists();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ package it.integry.integrywmsnative.core.interfaces;
|
||||
|
||||
import it.integry.plugins.waterfalltoolbar.WaterfallToolbar;
|
||||
|
||||
public interface IRecyclerFragment {
|
||||
public interface IScrollableFragment {
|
||||
|
||||
void setWaterfallToolbar(WaterfallToolbar waterfallToolbar);
|
||||
|
||||
@ -7,7 +7,7 @@ import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
public class ReportManager {
|
||||
|
||||
|
||||
public static void getRightReportNameByMtbColt(MtbColt mtbColt, RunnableArgs<String> onComplete, RunnableArgs<Exception> onFailed) throws Exception{
|
||||
public static void getRightReportNameByMtbColt(MtbColt mtbColt, RunnableArgs<String> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
if(mtbColt != null){
|
||||
|
||||
@ -28,7 +28,7 @@ public class ReportManager {
|
||||
}
|
||||
|
||||
} else {
|
||||
throw new Exception("mtbColt cannot be NULL");
|
||||
onFailed.run(new Exception("mtbColt cannot be NULL"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package it.integry.integrywmsnative.core.settings;
|
||||
import java.util.List;
|
||||
|
||||
import it.integry.integrywmsnative.core.REST.model.AvailableCodMdepsDTO;
|
||||
import it.integry.integrywmsnative.core.REST.model.DistribuzioneColloDTO;
|
||||
import it.integry.integrywmsnative.core.model.Azienda;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepo;
|
||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||
@ -19,6 +20,7 @@ public class DBSettingsModel {
|
||||
private boolean flagMultiClienteOrdV;
|
||||
private String defaultCodAnag;
|
||||
private String defaultCausaleRettificaGiacenze;
|
||||
private DistribuzioneColloDTO.CriterioDistribuzione defaultCriterioDistribuzione;
|
||||
|
||||
public List<String> getAvailableProfiles() {
|
||||
return availableProfiles;
|
||||
@ -88,4 +90,13 @@ public class DBSettingsModel {
|
||||
this.defaultCausaleRettificaGiacenze = defaultCausaleRettificaGiacenze;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DistribuzioneColloDTO.CriterioDistribuzione getDefaultCriterioDistribuzione() {
|
||||
return defaultCriterioDistribuzione;
|
||||
}
|
||||
|
||||
public DBSettingsModel setDefaultCriterioDistribuzione(String defaultCriterioDistribuzione) {
|
||||
this.defaultCriterioDistribuzione = DistribuzioneColloDTO.CriterioDistribuzione.fromString(defaultCriterioDistribuzione);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,7 +184,15 @@ public class SettingsManager {
|
||||
GestSetupRESTConsumer.getValue("PICKING", "SETUP", "COD_ANAG_DEFAULT", valueCodAnagDefault -> {
|
||||
dbSettingsModelIstance.setDefaultCodAnag(valueCodAnagDefault.value);
|
||||
|
||||
GestSetupRESTConsumer.getValue("PICKING", "SETUP", "DEFAULT_CRITERIO_DISTRIBUZIONE", valueDefaultCriterioDistribuzione -> {
|
||||
dbSettingsModelIstance.setDefaultCriterioDistribuzione(valueDefaultCriterioDistribuzione.value);
|
||||
|
||||
if(onComplete != null) onComplete.run();
|
||||
|
||||
}, ex -> {
|
||||
if(onFailed != null) onFailed.run(ex);
|
||||
});
|
||||
|
||||
}, ex -> {
|
||||
if(onFailed != null) onFailed.run(ex);
|
||||
});
|
||||
|
||||
@ -5,13 +5,12 @@ import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import android.os.Bundle;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
import android.view.LayoutInflater;
|
||||
@ -31,6 +30,7 @@ import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.CommonConst;
|
||||
import it.integry.integrywmsnative.core.REST.CommonRESTException;
|
||||
import it.integry.integrywmsnative.core.coollection.Coollection;
|
||||
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.ISearcableFragment;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
@ -39,7 +39,7 @@ import it.integry.integrywmsnative.gest.accettazione.core.AccettazioneHelper;
|
||||
import it.integry.integrywmsnative.gest.accettazione.core.MainListAccettazioneAdapter;
|
||||
import it.integry.integrywmsnative.gest.accettazione.core.interfaces.ILoadOrdiniCallback;
|
||||
import it.integry.integrywmsnative.gest.accettazione.core.interfaces.ILoadPickingListCallback;
|
||||
import it.integry.integrywmsnative.core.interfaces.IRecyclerFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneDTO;
|
||||
import it.integry.integrywmsnative.gest.accettazione.dto.OrdineAccettazioneGroupedInevasoDTO;
|
||||
@ -48,7 +48,7 @@ import it.integry.integrywmsnative.gest.accettazione_ordine_inevaso.Accettazione
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
||||
import it.integry.plugins.waterfalltoolbar.WaterfallToolbar;
|
||||
|
||||
public class MainAccettazioneFragment extends Fragment implements ISearcableFragment, ITitledFragment, IRecyclerFragment {
|
||||
public class MainAccettazioneFragment extends Fragment implements ISearcableFragment, ITitledFragment, IScrollableFragment {
|
||||
|
||||
private static WaterfallToolbar mWaterfallToolbar;
|
||||
|
||||
@ -212,12 +212,12 @@ public class MainAccettazioneFragment extends Fragment implements ISearcableFrag
|
||||
.and("data", Coollection.eq(filteredByCodAnagOrders.get(j).data)).all();
|
||||
|
||||
|
||||
String prevCodJcom = "";
|
||||
String prevCodJcomAndDataCons = "";
|
||||
|
||||
//Splitto gli ordini per codJcom
|
||||
//Splitto gli ordini per codJcom e dataCons
|
||||
for(int k = 0; k < filteredByCodAnagAndDateAndNumberOrders.size(); k++) {
|
||||
if(prevCodJcom.equalsIgnoreCase(filteredByCodAnagAndDateAndNumberOrders.get(k).codJcom)) continue;
|
||||
else prevCodJcom = filteredByCodAnagAndDateAndNumberOrders.get(k).codJcom;
|
||||
if(prevCodJcomAndDataCons.equalsIgnoreCase(filteredByCodAnagAndDateAndNumberOrders.get(k).codJcom + "_" + filteredByCodAnagAndDateAndNumberOrders.get(k).dataCons)) continue;
|
||||
else prevCodJcomAndDataCons = filteredByCodAnagAndDateAndNumberOrders.get(k).codJcom + "_" + filteredByCodAnagAndDateAndNumberOrders.get(k).dataCons;
|
||||
|
||||
OrdineAccettazioneGroupedInevasoDTO.Cliente cliente = new OrdineAccettazioneGroupedInevasoDTO.Cliente();
|
||||
|
||||
@ -239,9 +239,7 @@ public class MainAccettazioneFragment extends Fragment implements ISearcableFrag
|
||||
}
|
||||
|
||||
mAdapter = new MainListAccettazioneAdapter(getActivity(), groupedOrdiniInevasi, onGroupSelectionChanged);
|
||||
// mAdapter.setHasStableIds(true);
|
||||
mBinding.accettazioneMainList.setAdapter(mAdapter);
|
||||
//mRecyclerView.setAdapter(mAdapter);
|
||||
}
|
||||
|
||||
@OnClick(R.id.accettazione_main_fab)
|
||||
@ -286,8 +284,10 @@ public class MainAccettazioneFragment extends Fragment implements ISearcableFrag
|
||||
null,
|
||||
() -> {
|
||||
|
||||
String cacheItemID = DataCache.addItem(ordini);
|
||||
|
||||
Intent myIntent = new Intent(getActivity(), AccettazioneOrdineInevasoActivity.class);
|
||||
myIntent.putExtra("key", (ArrayList<OrdineAccettazioneDTO>) ordini); //Optional parameters
|
||||
myIntent.putExtra("key", cacheItemID);
|
||||
getActivity().startActivity(myIntent);
|
||||
|
||||
}).show();
|
||||
|
||||
@ -14,6 +14,7 @@ import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.REST.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.databinding.ActivityAccettazioneOrdineInevasoBinding;
|
||||
@ -41,7 +42,7 @@ public class AccettazioneOrdineInevasoActivity extends AppCompatActivity {
|
||||
FragmentArticoliInColloBottomSheetBinding bindings = this.bindings.bottomSheetInclude;
|
||||
mArticoliInColloBottomSheetViewModel = new ArticoliInColloBottomSheetViewModel(this, bindings);
|
||||
|
||||
List<OrdineAccettazioneDTO> orders = (ArrayList<OrdineAccettazioneDTO>)getIntent().getSerializableExtra("key");
|
||||
List<OrdineAccettazioneDTO> orders = DataCache.retrieveItem(getIntent().getStringExtra("key"));
|
||||
mAccettazioneOrdineInevasoViewModel = new AccettazioneOnOrdineAccettazioneInevasoViewModel(
|
||||
this, mArticoliInColloBottomSheetViewModel, orders);
|
||||
|
||||
|
||||
@ -748,7 +748,7 @@ public class AccettazioneOnOrdineAccettazioneInevasoViewModel implements IOnColl
|
||||
dto.setShouldAskDataScad(true);
|
||||
}
|
||||
|
||||
DialogInputQuantity.makeBase(mActivity, dto, true, value -> onOrdineRowDispatched(item, value)).show();
|
||||
DialogInputQuantity.makeBase(mActivity, dto, true, value -> onOrdineRowDispatched(item, value), null).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -22,25 +23,31 @@ import butterknife.OnClick;
|
||||
import de.hdodenhof.circleimageview.CircleImageView;
|
||||
import it.integry.integrywmsnative.MainActivity;
|
||||
import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.REST.model.DistribuzioneColloDTO;
|
||||
import it.integry.integrywmsnative.core.REST.watcher.ServerStatusChecker;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecover;
|
||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||
import it.integry.integrywmsnative.core.wifi.WiFiCheckerViewHolder;
|
||||
import it.integry.integrywmsnative.databinding.FragmentMainBinding;
|
||||
import it.integry.plugins.waterfalltoolbar.WaterfallToolbar;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link MainFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class MainFragment extends Fragment implements ITitledFragment {
|
||||
public class MainFragment extends Fragment implements ITitledFragment, IScrollableFragment {
|
||||
|
||||
private FragmentMainBinding mBindings;
|
||||
|
||||
@BindView(R.id.no_connection_top_layout) ExpandableLayout mNoConnectionLayout;
|
||||
@BindView(R.id.current_user_name) TextView currentUsername;
|
||||
@BindView(R.id.current_deposito) TextView currentDeposito;
|
||||
// @BindView(R.id.drawer_logoAzienda) CircleImageView currentLogoAzienda;
|
||||
|
||||
private View mView;
|
||||
private WaterfallToolbar mWaterfallToolbar;
|
||||
|
||||
public MainFragment() {
|
||||
}
|
||||
@ -61,24 +68,26 @@ public class MainFragment extends Fragment implements ITitledFragment {
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
mView = inflater.inflate(R.layout.fragment_main, container, false);
|
||||
|
||||
ButterKnife.bind(this, mView);
|
||||
mBindings = DataBindingUtil.inflate(inflater, R.layout.fragment_main, container, false);
|
||||
|
||||
ButterKnife.bind(this, mBindings.getRoot());
|
||||
|
||||
mWaterfallToolbar.setNestedScrollView(mBindings.fragmentMainScrollview);
|
||||
|
||||
init();
|
||||
return mView;
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
|
||||
private void init(){
|
||||
ServerStatusChecker.getIstance().addCallback(value -> {
|
||||
if(value && mNoConnectionLayout.isExpanded()){
|
||||
if(value && mBindings.noConnectionTopLayout.isExpanded()){
|
||||
|
||||
collapseNoConnectionLayout();
|
||||
|
||||
|
||||
} else if(!value && !mNoConnectionLayout.isExpanded()){
|
||||
} else if(!value && !mBindings.noConnectionTopLayout.isExpanded()){
|
||||
expandNoConnectionLayout();
|
||||
}
|
||||
});
|
||||
@ -88,26 +97,57 @@ public class MainFragment extends Fragment implements ITitledFragment {
|
||||
|
||||
initSessionData();
|
||||
|
||||
initRecuperoCollo();
|
||||
}
|
||||
|
||||
private void initSessionData() {
|
||||
currentUsername.setText(SettingsManager.i().user.fullname);
|
||||
currentDeposito.setText(String.format("%s - %s", SettingsManager.i().userSession.depo.getCodMdep(), SettingsManager.i().userSession.depo.getDescrizione()));
|
||||
mBindings.currentUserName.setText(SettingsManager.i().user.fullname);
|
||||
mBindings.currentDeposito.setText(String.format("Deposito: %s • %s", SettingsManager.i().userSession.depo.getCodMdep(), SettingsManager.i().userSession.depo.getDescrizione()));
|
||||
|
||||
if(SettingsManager.iDB().getDatiAzienda() != null && SettingsManager.iDB().getDatiAzienda().isLogoAvailable()) {
|
||||
// currentLogoAzienda.setImageBitmap(SettingsManager.iDB().getDatiAzienda().getLogo());
|
||||
}
|
||||
}
|
||||
|
||||
private void initRecuperoCollo() {
|
||||
if(ColliDataRecover.thereIsAnExistantSession()){
|
||||
startRecoverMode();
|
||||
|
||||
Integer recoveredMtbColtID = ColliDataRecover.getFirstSessionID();
|
||||
MtbColt recoveredMtbColt = ColliDataRecover.getSession(recoveredMtbColtID);
|
||||
|
||||
if(recoveredMtbColt != null && recoveredMtbColt.getGestioneEnum() == GestioneEnum.VENDITA && !UtilityString.isNullOrEmpty(recoveredMtbColt.getFiltroOrdini())) {
|
||||
ColliMagazzinoRESTConsumer.distribuisciCollo(recoveredMtbColt, SettingsManager.iDB().getDefaultCriterioDistribuzione(),
|
||||
mtbColts -> {
|
||||
ColliDataRecover.closeSession(recoveredMtbColtID);
|
||||
endRecoverMode();
|
||||
},
|
||||
ex -> {
|
||||
UtilityExceptions.defaultException(getActivity(), ex);
|
||||
endRecoverMode();
|
||||
});
|
||||
} else {
|
||||
ColliDataRecover.closeSession(recoveredMtbColtID);
|
||||
endRecoverMode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void collapseNoConnectionLayout(){
|
||||
if(getActivity() != null) getActivity().runOnUiThread(() -> mNoConnectionLayout.collapse(true));
|
||||
if(getActivity() != null) getActivity().runOnUiThread(() -> mBindings.noConnectionTopLayout.collapse(true));
|
||||
}
|
||||
|
||||
private void expandNoConnectionLayout(){
|
||||
if(getActivity() != null) getActivity().runOnUiThread(() -> mNoConnectionLayout.expand(true));
|
||||
if(getActivity() != null) getActivity().runOnUiThread(() -> mBindings.noConnectionTopLayout.expand(true));
|
||||
}
|
||||
|
||||
private void startRecoverMode() {
|
||||
mBindings.recoverDataExpandableLayout.expand(true);
|
||||
}
|
||||
|
||||
private void endRecoverMode() {
|
||||
mBindings.recoverDataExpandableLayout.collapse(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateActionBar(AppCompatTextView titleText, Context context) {
|
||||
@ -139,4 +179,8 @@ public class MainFragment extends Fragment implements ITitledFragment {
|
||||
((MainActivity) getActivity()).setItem(R.id.nav_free_picking);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWaterfallToolbar(WaterfallToolbar waterfallToolbar) {
|
||||
mWaterfallToolbar = waterfallToolbar;
|
||||
}
|
||||
}
|
||||
|
||||
@ -217,7 +217,22 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||
BarcodeManager.disable();
|
||||
|
||||
if(!thereIsAnOpenedUL.get()) {
|
||||
createNewLU(null, null, progressDialog, () -> {
|
||||
executeEtichetteBehaviour(data, progressDialog);
|
||||
}, () -> {
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
} else {
|
||||
executeEtichetteBehaviour(data, progressDialog);
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
private void executeEtichetteBehaviour(BarcodeScanDTO data, ProgressDialog progressDialog){
|
||||
if(UtilityBarcode.isEtichettaAnonima(data)){
|
||||
//Cerco gli articoli presenti nell'ul dell'etichetta anonima
|
||||
this.executeEtichettaLU(data.getStringValue(), progressDialog);
|
||||
@ -229,8 +244,7 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
private void executeEtichettaLU(String sscc, ProgressDialog progressDialog) {
|
||||
@ -341,6 +355,9 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
saveLU(clonedTestata);
|
||||
}
|
||||
|
||||
}, () -> {
|
||||
progressDialog.dismiss();
|
||||
BarcodeManager.enable();
|
||||
});
|
||||
|
||||
}, () -> {
|
||||
@ -350,21 +367,19 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
}
|
||||
|
||||
|
||||
private void askQuantities(Iterator<MtbColr> sourceMtbColrs, List<MtbColr> destMtbColr, Runnable onComplete){
|
||||
|
||||
private void askQuantities(Iterator<MtbColr> sourceMtbColrs, List<MtbColr> destMtbColr, Runnable onComplete, Runnable onAbort){
|
||||
if(sourceMtbColrs.hasNext()){
|
||||
|
||||
askSingleQuantity(sourceMtbColrs.next(), mtbColr -> {
|
||||
destMtbColr.add(mtbColr);
|
||||
askQuantities(sourceMtbColrs, destMtbColr, onComplete);
|
||||
});
|
||||
askQuantities(sourceMtbColrs, destMtbColr, onComplete, onAbort);
|
||||
}, onAbort);
|
||||
} else {
|
||||
onComplete.run();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void askSingleQuantity(MtbColr mtbColr, RunnableArgs<MtbColr> onComplete) {
|
||||
private void askSingleQuantity(MtbColr mtbColr, RunnableArgs<MtbColr> onComplete, Runnable onAbort) {
|
||||
DialogInputQuantity.DTO dto = new DialogInputQuantity.DTO()
|
||||
.setBatchLot(mtbColr.getPartitaMag())
|
||||
.setDataScad(mtbColr.getDataScadPartitaD())
|
||||
@ -385,7 +400,7 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
.setDatetimeRow(new Date());
|
||||
|
||||
onComplete.run(mtbColr);
|
||||
}).show();
|
||||
}, onAbort).show();
|
||||
}
|
||||
|
||||
|
||||
@ -438,12 +453,13 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
|
||||
|
||||
public void createNewLU() {
|
||||
createNewLU(null, null, null);
|
||||
createNewLU(null, null, null, null, null);
|
||||
}
|
||||
|
||||
private void createNewLU(Integer customNumCollo, String customSerCollo, Runnable onComplete) {
|
||||
private void createNewLU(Integer customNumCollo, String customSerCollo, ProgressDialog progressDialog, Runnable onComplete, Runnable onFailed) {
|
||||
|
||||
ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||
boolean shouldCloseProgress = progressDialog == null;
|
||||
final ProgressDialog progressDialogFinal = progressDialog == null ? UtilityProgress.createDefaultProgressDialog(mContext) : progressDialog;
|
||||
|
||||
MtbColt mtbColt = new MtbColt();
|
||||
mtbColt .setGestione(GestioneEnum.VENDITA)
|
||||
@ -462,7 +478,7 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
savedMtbColt.setMtbColr(new ObservableArrayList<>());
|
||||
setULToCurrentContext(savedMtbColt);
|
||||
|
||||
progressDialog.dismiss();
|
||||
if(shouldCloseProgress) progressDialogFinal.dismiss();
|
||||
|
||||
new StatusBarAlert.Builder(mContext)
|
||||
.autoHide(true)
|
||||
@ -474,7 +490,10 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
|
||||
if(onComplete != null) onComplete.run();
|
||||
|
||||
}, ex -> UtilityExceptions.defaultException(mContext, ex, progressDialog));
|
||||
}, ex -> {
|
||||
UtilityExceptions.defaultException(mContext, ex, progressDialogFinal);
|
||||
if(onFailed != null) onFailed.run();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -485,13 +504,15 @@ public class PickingLiberoViewModel implements IRecyclerItemClicked<MtbColr> {
|
||||
this.mtbColt.set(mtbColt);
|
||||
}
|
||||
|
||||
|
||||
public void closeLU() {
|
||||
if(thereIsAnOpenedUL.get()) {
|
||||
final ProgressDialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||
|
||||
if(thereIsAnyRowInUL.get()) {
|
||||
updateDataFine(progress, null); //() -> distribuisciCollo(progress, () -> printCollo(progress)));
|
||||
updateDataFine(progress, () -> {
|
||||
progress.dismiss();
|
||||
setULToCurrentContext(null);
|
||||
}); //() -> distribuisciCollo(progress, () -> printCollo(progress)));
|
||||
} else {
|
||||
deleteCollo(progress);
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
||||
|
||||
DialogInputQuantity.makeBase(mContext, qtaDto, true, (quantityDTO) -> {
|
||||
onPostDispatch(mtbAart, quantityDTO);
|
||||
}).show();
|
||||
}, null).show();
|
||||
}
|
||||
|
||||
|
||||
@ -520,7 +520,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
||||
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||
});
|
||||
|
||||
}).show();
|
||||
}, null).show();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import android.os.Bundle;
|
||||
@ -30,9 +29,10 @@ import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.REST.CommonRESTException;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||
import it.integry.integrywmsnative.core.interfaces.IFilterableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.IRecyclerFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.ISelectAllFragment;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
@ -52,7 +52,7 @@ import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.VenditaOrdineInev
|
||||
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
||||
import it.integry.plugins.waterfalltoolbar.WaterfallToolbar;
|
||||
|
||||
public class MainVenditaFragment extends Fragment implements ITitledFragment, IRecyclerFragment, ISelectAllFragment, IFilterableFragment {
|
||||
public class MainVenditaFragment extends Fragment implements ITitledFragment, IScrollableFragment, ISelectAllFragment, IFilterableFragment {
|
||||
|
||||
private static WaterfallToolbar mWaterfallToolbar;
|
||||
|
||||
@ -190,7 +190,7 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IR
|
||||
.forEach(anagOrd -> {
|
||||
|
||||
String codAnagOrd = anagOrd.substring(0, anagOrd.indexOf("#_#"));
|
||||
String ragSocOrd = anagOrd.substring(anagOrd.indexOf("#_#") + 3, anagOrd.length());
|
||||
String ragSocOrd = anagOrd.substring(anagOrd.indexOf("#_#") + 3);
|
||||
|
||||
OrdineVenditaGroupedInevasoDTO groupedOrdine = new OrdineVenditaGroupedInevasoDTO();
|
||||
|
||||
@ -354,11 +354,7 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IR
|
||||
null,
|
||||
() -> {
|
||||
|
||||
Intent myIntent = new Intent(getActivity(), VenditaOrdineInevasoActivity.class);
|
||||
myIntent.putExtra("keyPickingList", (ArrayList<PickingObjectDTO>) ordini); //Optional parameters
|
||||
myIntent.putExtra("keyTestateOrdini", (ArrayList<OrdineVenditaGroupedInevasoDTO>)selectedOrders);
|
||||
myIntent.putExtra("keyColliRegistrati", (ArrayList<MtbColt>)mtbColtList);
|
||||
getActivity().startActivity(myIntent);
|
||||
startVenditaActivity(ordini, selectedOrders, mtbColtList);
|
||||
|
||||
}).show();
|
||||
|
||||
@ -404,7 +400,6 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IR
|
||||
public void onFilterClick() {
|
||||
|
||||
DialogVenditaFiltroAvanzato.make(getActivity(), mOriginalOrderList, mAppliedFilterViewModel, (filteredOrderList, filter) -> {
|
||||
|
||||
mAppliedFilterViewModel = filter;
|
||||
|
||||
if(filteredOrderList != null){
|
||||
@ -414,6 +409,25 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IR
|
||||
}
|
||||
|
||||
}).show();
|
||||
}
|
||||
|
||||
private void startVenditaActivity(List<PickingObjectDTO> ordini, List<OrdineVenditaGroupedInevasoDTO> selectedOrders, List<MtbColt> mtbColtList) {
|
||||
|
||||
Intent myIntent = new Intent(getActivity(), VenditaOrdineInevasoActivity.class);
|
||||
|
||||
String keyPickingList = DataCache.addItem(ordini);
|
||||
myIntent.putExtra("keyPickingList", keyPickingList);
|
||||
|
||||
String keyTestateOrdini = DataCache.addItem(selectedOrders);
|
||||
myIntent.putExtra("keyTestateOrdini", keyTestateOrdini);
|
||||
|
||||
String keyColliRegistrati = DataCache.addItem(mtbColtList);
|
||||
myIntent.putExtra("keyColliRegistrati", keyColliRegistrati);
|
||||
|
||||
getActivity().startActivity(myIntent);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ public class PickingObjectDTO implements Parcelable {
|
||||
private Boolean tempHidden = null;
|
||||
private PickData tempPickData = null;
|
||||
|
||||
private List<MtbColr> withdrawRows = new ArrayList<>();
|
||||
private ArrayList<MtbColr> withdrawRows = new ArrayList<>();
|
||||
|
||||
protected PickingObjectDTO(Parcel in) {
|
||||
if (in.readByte() == 0) {
|
||||
@ -423,11 +423,12 @@ public class PickingObjectDTO implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<MtbColr> getWithdrawRows() {
|
||||
public ArrayList<MtbColr> getWithdrawRows() {
|
||||
if(withdrawRows == null) withdrawRows = new ArrayList<>();
|
||||
return withdrawRows;
|
||||
}
|
||||
|
||||
public PickingObjectDTO setWithdrawRows(List<MtbColr> withdrawRows) {
|
||||
public PickingObjectDTO setWithdrawRows(ArrayList<MtbColr> withdrawRows) {
|
||||
this.withdrawRows = withdrawRows;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ import it.integry.integrywmsnative.R;
|
||||
import it.integry.integrywmsnative.core.REST.consumers.PrinterRESTConsumer;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||
import it.integry.integrywmsnative.core.data_cache.DataCache;
|
||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||
import it.integry.integrywmsnative.databinding.ActivityVenditaOrdineInevasoBinding;
|
||||
@ -44,9 +45,9 @@ public class VenditaOrdineInevasoActivity extends AppCompatActivity {
|
||||
FragmentArticoliInColloBottomSheetBinding bindings = this.bindings.bottomSheetInclude;
|
||||
mArticoliInColloBottomSheetViewModel = new ArticoliInColloBottomSheetViewModel(this, bindings);
|
||||
|
||||
List<PickingObjectDTO> pickingList = (ArrayList<PickingObjectDTO>)getIntent().getSerializableExtra("keyPickingList");
|
||||
List<OrdineVenditaGroupedInevasoDTO> testateOrdini = (ArrayList<OrdineVenditaGroupedInevasoDTO>)getIntent().getSerializableExtra("keyTestateOrdini");
|
||||
List<MtbColt> colliRegistrati = (ArrayList<MtbColt>) getIntent().getSerializableExtra("keyColliRegistrati");
|
||||
ArrayList<PickingObjectDTO> pickingList = DataCache.retrieveItem(getIntent().getStringExtra("keyPickingList"));
|
||||
ArrayList<OrdineVenditaGroupedInevasoDTO> testateOrdini = DataCache.retrieveItem(getIntent().getStringExtra("keyTestateOrdini"));
|
||||
ArrayList<MtbColt> colliRegistrati = DataCache.retrieveItem(getIntent().getStringExtra("keyColliRegistrati"));
|
||||
mVenditaOrdineInevasoViewModel = new VenditaOrdineInevasoViewModel(
|
||||
this, mArticoliInColloBottomSheetViewModel, pickingList, testateOrdini, colliRegistrati);
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@ import com.annimon.stream.Stream;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@ -707,7 +708,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
progress.show();
|
||||
|
||||
if(thereIsAnyRowInUL()) {
|
||||
updateDataFine(progress, () -> distribuisciCollo(progress, (generatedMtbColts) -> printCollo(progress)));
|
||||
updateDataFine(progress, () -> distribuisciCollo(progress, (generatedMtbColts) -> printCollo(progress, generatedMtbColts)));
|
||||
} else {
|
||||
ColliDataRecover.closeSession(mtbColtSessionID);
|
||||
deleteCollo(progress);
|
||||
@ -742,7 +743,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
|
||||
MtbColt cloneMtbColt = (MtbColt) mArticoliInColloBottomSheetViewModel.mtbColt.get().clone();
|
||||
|
||||
ColliMagazzinoRESTConsumer.distribuisciCollo(cloneMtbColt, DistribuzioneColloDTO.CriterioDistribuzione.UPDATE,
|
||||
ColliMagazzinoRESTConsumer.distribuisciCollo(cloneMtbColt, SettingsManager.iDB().getDefaultCriterioDistribuzione(),
|
||||
mtbColts -> {
|
||||
ColliDataRecover.closeSession(mtbColtSessionID);
|
||||
onComplete.run(mtbColts);
|
||||
@ -750,7 +751,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
ex -> UtilityExceptions.defaultException(mActivity, ex, progress));
|
||||
}
|
||||
|
||||
private void printCollo(ProgressDialog progress) {
|
||||
private void printCollo(ProgressDialog progress, List<MtbColt> mtbColtsToPrint) {
|
||||
DialogAskShouldPrint.make(mActivity, "Packing List", shouldPrint -> {
|
||||
|
||||
if(shouldPrint) {
|
||||
@ -760,20 +761,10 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
|
||||
if (value.size() > 0) {
|
||||
try {
|
||||
MtbColt currentMtbColt = mArticoliInColloBottomSheetViewModel.mtbColt.get();
|
||||
|
||||
ReportManager.getRightReportNameByMtbColt(currentMtbColt, reportName -> {
|
||||
|
||||
PrinterRESTConsumer.printCollo(
|
||||
value.get(0),
|
||||
currentMtbColt,
|
||||
1, reportName, () -> {
|
||||
|
||||
postCloseOperations();
|
||||
cyclicPrint(mtbColtsToPrint.iterator(), value.get(0), () -> {
|
||||
postCloseOperations(mtbColtsToPrint);
|
||||
progress.dismiss();
|
||||
|
||||
}, ex -> {
|
||||
|
||||
progress.dismiss();
|
||||
String errorMessage = ex.getMessage();
|
||||
DialogSimpleMessageHelper.makeErrorDialog(
|
||||
@ -782,19 +773,17 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
null,
|
||||
null,
|
||||
R.string.button_ignore_print,
|
||||
() -> postCloseOperations()).show();
|
||||
() -> postCloseOperations(mtbColtsToPrint)).show();
|
||||
});
|
||||
|
||||
}, ex -> UtilityExceptions.defaultException(mActivity, ex, progress)
|
||||
);
|
||||
} catch (Exception ex) {
|
||||
UtilityExceptions.defaultException(mActivity, ex, progress);
|
||||
postCloseOperations();
|
||||
postCloseOperations(mtbColtsToPrint);
|
||||
}
|
||||
} else {
|
||||
progress.dismiss();
|
||||
String errorMessage = "Nessuna stampante configurata";
|
||||
DialogSimpleMessageHelper.makeWarningDialog(mActivity, new SpannableString(errorMessage), null, () -> postCloseOperations()).show();
|
||||
DialogSimpleMessageHelper.makeWarningDialog(mActivity, new SpannableString(errorMessage), null, () -> postCloseOperations(mtbColtsToPrint)).show();
|
||||
}
|
||||
}
|
||||
|
||||
@ -804,12 +793,36 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
}
|
||||
});
|
||||
} else {
|
||||
postCloseOperations();
|
||||
postCloseOperations(mtbColtsToPrint);
|
||||
progress.dismiss();
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
|
||||
|
||||
private void cyclicPrint(Iterator<MtbColt> sourceMtbColts, String printerName, Runnable onComplete, RunnableArgs<Exception> onAbort) {
|
||||
if(sourceMtbColts.hasNext()){
|
||||
singlePrint(sourceMtbColts.next(), printerName, () -> {
|
||||
cyclicPrint(sourceMtbColts, printerName, onComplete, onAbort);
|
||||
}, onAbort);
|
||||
} else {
|
||||
onComplete.run();
|
||||
}
|
||||
}
|
||||
|
||||
private void singlePrint(MtbColt mtbColtToPrint, String printerName, Runnable onComplete, RunnableArgs<Exception> onAbort) {
|
||||
ReportManager.getRightReportNameByMtbColt(mtbColtToPrint, reportName -> {
|
||||
|
||||
PrinterRESTConsumer.printCollo(
|
||||
printerName,
|
||||
mtbColtToPrint,
|
||||
1,
|
||||
reportName, onComplete, onAbort);
|
||||
|
||||
}, onAbort);
|
||||
}
|
||||
|
||||
|
||||
private void deleteCollo(ProgressDialog progress) {
|
||||
|
||||
ColliMagazzinoRESTConsumer.deleteCollo(mArticoliInColloBottomSheetViewModel.mtbColt.get(), () -> {
|
||||
@ -833,11 +846,11 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
}
|
||||
|
||||
|
||||
private void postCloseOperations() {
|
||||
private void postCloseOperations(List<MtbColt> generatedMtbColt) {
|
||||
|
||||
MtbColt mtbColt = mArticoliInColloBottomSheetViewModel.mtbColt.get();
|
||||
|
||||
this.mColliRegistrati.add(mtbColt);
|
||||
this.mColliRegistrati.addAll(generatedMtbColt);
|
||||
|
||||
mArticoliInColloBottomSheetViewModel.mtbColt.set(null);
|
||||
isFabVisible.set(true);
|
||||
@ -965,7 +978,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
||||
|
||||
}
|
||||
|
||||
DialogInputQuantity.makeBase(mActivity, dto, false, value -> onOrdineRowDispatched(item, value)).show();
|
||||
DialogInputQuantity.makeBase(mActivity, dto, false, value -> onOrdineRowDispatched(item, value), null).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -333,7 +333,7 @@ public class VersamentoMerceViewModel {
|
||||
.setDatetimeRow(new Date());
|
||||
|
||||
onComplete.run(mtbColr);
|
||||
}).show();
|
||||
}, null).show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -188,7 +188,7 @@ public class ArticoliInColloBottomSheetViewModel {
|
||||
},
|
||||
ex -> UtilityExceptions.defaultException(mContext, ex, progress));
|
||||
|
||||
}).show();
|
||||
}, null).show();
|
||||
}
|
||||
|
||||
private void onItemDelete(int position) {
|
||||
|
||||
@ -4,6 +4,7 @@ import android.app.AlertDialog;
|
||||
import android.app.DatePickerDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.res.ColorStateList;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.Observable;
|
||||
@ -213,11 +214,11 @@ public class DialogInputQuantity {
|
||||
private QuantityDTO currentQuantityDto;
|
||||
private DTO currentDTO;
|
||||
|
||||
public static AlertDialog makeBase(final Context context, final DTO dto, boolean canOverflowQuantity, final ISingleValueOperationCallback<QuantityDTO> dialogCallback) {
|
||||
return new DialogInputQuantity(context, dto, canOverflowQuantity, dialogCallback).currentAlert;
|
||||
public static AlertDialog makeBase(final Context context, final DTO dto, boolean canOverflowQuantity, final ISingleValueOperationCallback<QuantityDTO> dialogCallback, final Runnable onAbort) {
|
||||
return new DialogInputQuantity(context, dto, canOverflowQuantity, dialogCallback, onAbort).currentAlert;
|
||||
}
|
||||
|
||||
public DialogInputQuantity(Context context, final DTO dto, boolean canOverflowQuantity, final ISingleValueOperationCallback<QuantityDTO> dialogCallback) {
|
||||
public DialogInputQuantity(Context context, final DTO dto, boolean canOverflowQuantity, final ISingleValueOperationCallback<QuantityDTO> dialogCallback, final Runnable onAbort) {
|
||||
currentContext = context;
|
||||
currentMtbAart = dto.getMtbAart();
|
||||
currentDTO = dto;
|
||||
@ -251,7 +252,9 @@ public class DialogInputQuantity {
|
||||
final AlertDialog.Builder alertDialog = new AlertDialog.Builder(context)
|
||||
.setView(currentBinding.getRoot())
|
||||
.setPositiveButton(context.getText(R.string.confirm), null)
|
||||
.setNegativeButton(context.getText(R.string.abort), null);
|
||||
.setNegativeButton(context.getText(R.string.abort), (dialog, which) -> {
|
||||
if(onAbort != null) onAbort.run();
|
||||
});
|
||||
|
||||
currentAlert = alertDialog.create();
|
||||
currentAlert.setCanceledOnTouchOutside(false);
|
||||
@ -275,8 +278,8 @@ public class DialogInputQuantity {
|
||||
}, 100);
|
||||
|
||||
Button positiveButton = currentAlert.getButton(AlertDialog.BUTTON_POSITIVE);
|
||||
|
||||
positiveButton.setOnClickListener(view -> onConfirm(context, currentQuantityDto, dialogCallback));
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
19
app/src/main/res/drawable/curved_progress_bar.xml
Normal file
19
app/src/main/res/drawable/curved_progress_bar.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners android:radius="16dp" />
|
||||
<solid android:color="@color/colorPrimaryDark" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<corners android:radius="16dp" />
|
||||
<solid android:color="@color/white" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
BIN
app/src/main/res/drawable/ic_recover_96.png
Normal file
BIN
app/src/main/res/drawable/ic_recover_96.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
16
app/src/main/res/drawable/progress_bar_background.xml
Normal file
16
app/src/main/res/drawable/progress_bar_background.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners android:radius="6.5dp" />
|
||||
|
||||
<solid android:color="@android:color/white" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@android:color/darker_gray" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
@ -52,10 +52,10 @@
|
||||
android:id="@+id/progressBar2"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:indeterminate="true"
|
||||
android:indeterminateTint="@android:color/white"
|
||||
android:indeterminateDrawable="@drawable/curved_progress_bar"
|
||||
app:layout_constraintLeft_toRightOf="@+id/guideline_left_progress"
|
||||
app:layout_constraintRight_toLeftOf="@+id/guideline_right_progress"
|
||||
app:layout_constraintTop_toBottomOf="@id/imageView" />
|
||||
|
||||
@ -27,7 +27,8 @@
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -39,11 +40,12 @@
|
||||
android:id="@+id/print_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_margin="16dp"
|
||||
style="@style/TextInputLayout.OutlinePrimary"
|
||||
android:textColor="#5F6368"
|
||||
android:textSize="16sp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="La procedura stamperà una packing list"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -1,15 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".gest.main.MainFragment"
|
||||
android:background="@color/full_white">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/full_white"
|
||||
tools:context=".gest.main.MainFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<net.cachapa.expandablelayout.ExpandableLayout
|
||||
@ -23,23 +25,33 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/red_600"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:background="@color/red_600">
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:text="NESSUNA CONNESSIONE DISPONIBILE, RIPROVA"/>
|
||||
android:text="NESSUNA CONNESSIONE DISPONIBILE, RIPROVA"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/fragment_main__scrollview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -50,8 +62,11 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:background="@color/colorPrimary">
|
||||
android:background="@color/colorPrimary"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
@ -63,17 +78,17 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_outline_account_circle_48px"
|
||||
android:tint="@android:color/white"
|
||||
android:layout_marginEnd="16dp"/>
|
||||
android:tint="@android:color/white" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -82,88 +97,123 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/current_user_name"
|
||||
style="@style/AppTheme.NewMaterial.Text.TextBoxDashboard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/white"
|
||||
tools:text="Android Studio"
|
||||
style="@style/AppTheme.NewMaterial.Text.TextBoxDashboard" />
|
||||
tools:text="Android Studio" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/current_deposito"
|
||||
style="@style/AppTheme.NewMaterial.Text.TextBoxLittleDashboard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
style="@style/AppTheme.NewMaterial.Text.TextBoxLittleDashboard"
|
||||
tools:text="android.studio@android.com" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<net.cachapa.expandablelayout.ExpandableLayout
|
||||
android:id="@+id/recover_data_expandable_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:el_duration="400"
|
||||
app:el_expanded="false">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_recover_96"
|
||||
android:tint="@android:color/white" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.TextBoxDashboard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/recovering_data"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar2"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:indeterminate="true"
|
||||
android:indeterminateDrawable="@drawable/curved_progress_bar" />
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/AppTheme.NewMaterial.Text.TextBoxLittleDashboard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="@string/wait_a_moment" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!--<RelativeLayout-->
|
||||
<!--android:id="@+id/layout_logo_azienda"-->
|
||||
<!--android:layout_width="100dp"-->
|
||||
<!--android:layout_height="100dp"-->
|
||||
<!--android:background="@drawable/circular_background_alpha_7"-->
|
||||
<!--android:layout_gravity="center_horizontal"-->
|
||||
<!--android:gravity="center_horizontal"-->
|
||||
<!--android:layout_centerHorizontal="true"-->
|
||||
<!--android:padding="8dp">-->
|
||||
|
||||
<!--<RelativeLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="match_parent"-->
|
||||
<!--android:background="@drawable/circular_background">-->
|
||||
|
||||
<!--<de.hdodenhof.circleimageview.CircleImageView-->
|
||||
<!--android:id="@+id/drawer_logoAzienda"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="match_parent" />-->
|
||||
|
||||
<!--</RelativeLayout>-->
|
||||
|
||||
<!--</RelativeLayout>-->
|
||||
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="1"
|
||||
android:padding="8dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/central_guideline_dashboard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:id="@+id/fast_button_accettazione"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:cardBackgroundColor="@android:color/white"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/central_guideline_dashboard">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.5">
|
||||
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/fast_button_accettazione"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardBackgroundColor="@android:color/white"
|
||||
app:cardCornerRadius="4dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
@ -175,88 +225,30 @@
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/accettazione_title_fragment"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/accettazione_title_fragment"
|
||||
android:layout_marginTop="16dp"/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:id="@+id/fast_button_spedizione"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:cardBackgroundColor="@android:color/white"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:layout_constraintStart_toStartOf="@id/central_guideline_dashboard"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="64sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_spedizione_96"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/vendita_title_fragment"
|
||||
android:layout_marginTop="16dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:padding="8dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/central_guideline_dashboard__line2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:id="@+id/fast_button_rettifica_giacenze"
|
||||
android:layout_width="0dp"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_margin="8dp"
|
||||
app:cardBackgroundColor="@android:color/white"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/central_guideline_dashboard__line2">
|
||||
app:cardCornerRadius="4dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
@ -268,92 +260,31 @@
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/rettifica_giacenze_fragment_title"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/rettifica_giacenze_fragment_title"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="16dp"/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:id="@+id/fast_button_versamento"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:cardBackgroundColor="@android:color/white"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:layout_constraintStart_toStartOf="@id/central_guideline_dashboard__line2"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="64sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_versamento_merce_96"/>
|
||||
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/versamento_merce_fragment_title"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="16dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:padding="8dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/central_guideline_dashboard__line3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/fast_button_picking_libero"
|
||||
android:layout_width="0dp"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_margin="8dp"
|
||||
app:cardBackgroundColor="@android:color/white"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/central_guideline_dashboard__line3">
|
||||
app:cardCornerRadius="4dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
@ -366,19 +297,106 @@
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/free_picking"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/free_picking"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="16dp"/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.5">
|
||||
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/fast_button_spedizione"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardBackgroundColor="@android:color/white"
|
||||
app:cardCornerRadius="4dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="64sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_spedizione_96" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/vendita_title_fragment"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/fast_button_versamento"
|
||||
style="@style/Widget.MaterialComponents.CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardBackgroundColor="@android:color/white"
|
||||
app:cardCornerRadius="4dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="64sp"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_versamento_merce_96" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/versamento_merce_fragment_title"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/grey_700"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
<!---->
|
||||
<!--<androidx.cardview.widget.CardView-->
|
||||
<!--app:cardBackgroundColor="@android:color/white"-->
|
||||
@ -423,7 +441,6 @@
|
||||
<!--app:layout_constraintGuide_percent="0.40"/>-->
|
||||
|
||||
|
||||
|
||||
<!--</androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!--<androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
@ -643,3 +660,4 @@
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@ -24,7 +24,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toStartOf="@+id/qta_box"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@ -37,6 +38,18 @@
|
||||
tools:text="COD MART" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:text='@{!UtilityString.isNullOrEmpty(mtbColr.mtbAart.diacod) ? mtbColr.mtbAart.diacod : ""}'
|
||||
android:textColor="@color/red_600"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbColr.mtbAart.diacod) ? View.GONE : View.VISIBLE}"
|
||||
tools:text="DIACOD HERE"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -178,4 +178,7 @@
|
||||
<string name="free_picking_suggestion_2">Scansiona un articolo per iniziare</string>
|
||||
<string name="free_picking_title_fragment">Picking libero</string>
|
||||
|
||||
<string name="recovering_data">Recupero dati</string>
|
||||
<string name="wait_a_moment">Attendi qualche istante</string>
|
||||
|
||||
</resources>
|
||||
@ -179,5 +179,7 @@
|
||||
<string name="free_picking_suggestion_1">Please press + button to start with picking</string>
|
||||
<string name="free_picking_suggestion_2">Scan an item to start</string>
|
||||
|
||||
<string name="recovering_data">Recovering data</string>
|
||||
<string name="wait_a_moment">Wait a moment</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@ -21,26 +21,24 @@
|
||||
<item name="android:fontFamily">@font/open_sans_regular</item>
|
||||
</style>
|
||||
<style name="AppTheme.NewMaterial.Text" parent = "AppTheme.NewMaterial">
|
||||
<item name="android:fontFamily">@font/open_sans_regular</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NewMaterial.Text.ToolbarTitle" parent="AppTheme.NewMaterial.Text">
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:textColor">#5F6368</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:textSize">20sp</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="AppTheme.NewMaterial.Text.TextBoxDashboard" parent="TextAppearance.AppCompat.Widget.ActionBar.Title">
|
||||
<style name="AppTheme.NewMaterial.Text.TextBoxDashboard" parent="AppTheme.NewMaterial.Text">
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NewMaterial.Text.TextBoxLittleDashboard" parent="TextAppearance.AppCompat.Widget.ActionBar.Title">
|
||||
<style name="AppTheme.NewMaterial.Text.TextBoxLittleDashboard" parent="AppTheme.NewMaterial.Text">
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<item name="android:fontFamily">@font/open_sans_regular</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
|
||||
<style name="SplashTheme" parent="AppTheme.NoActionBar">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user