Fix e updates
This commit is contained in:
parent
1e7a296c61
commit
1f4f4729d0
@ -7,8 +7,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 136
|
||||
def appVersionName = '1.12.7'
|
||||
def appVersionCode = 137
|
||||
def appVersionName = '1.13.0'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@ -88,10 +88,10 @@ dependencies {
|
||||
})
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'com.orhanobut:logger:2.2.0'
|
||||
implementation 'com.google.firebase:firebase-core:17.2.3'
|
||||
implementation 'com.google.firebase:firebase-core:17.3.0'
|
||||
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
||||
implementation 'com.google.firebase:firebase-perf:19.0.5'
|
||||
implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta02'
|
||||
implementation 'com.google.firebase:firebase-perf:19.0.6'
|
||||
implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta04'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.1.0'
|
||||
@ -99,9 +99,9 @@ dependencies {
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'androidx.preference:preference:1.1.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.4.1'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.8.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.8.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.5.0'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.8.1'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.8.1'
|
||||
implementation 'com.annimon:stream:1.2.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
|
||||
@ -30,6 +30,7 @@ import it.integry.integrywmsnative.core.class_router.configs.BaseMenuConfigurati
|
||||
import it.integry.integrywmsnative.core.class_router.configs.MenuConfiguration;
|
||||
import it.integry.integrywmsnative.core.class_router.interfaces.ICustomConfiguration;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseActivity;
|
||||
import it.integry.integrywmsnative.core.expansion.OnSingleClickListener;
|
||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||
import it.integry.integrywmsnative.core.interfaces.IFilterableFragment;
|
||||
import it.integry.integrywmsnative.core.interfaces.IPoppableActivity;
|
||||
@ -278,7 +279,12 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
if(fragment instanceof ISelectAllFragment && ((ISelectAllFragment)fragment).isEnabled()) {
|
||||
mBinding.appBarMain.mainSelectAll.setVisibility(View.VISIBLE);
|
||||
mBinding.appBarMain.mainSelectAll.setOnClickListener(v -> ((ISelectAllFragment)fragment).onSelectAll());
|
||||
mBinding.appBarMain.mainSelectAll.setOnClickListener(new OnSingleClickListener() {
|
||||
@Override
|
||||
public void onSingleClick(View v) {
|
||||
((ISelectAllFragment)fragment).onSelectAll();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
mBinding.appBarMain.mainSelectAll.setVisibility(View.GONE);
|
||||
mBinding.appBarMain.mainSelectAll.setOnClickListener(null);
|
||||
@ -286,7 +292,12 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
if(fragment instanceof IFilterableFragment) {
|
||||
mBinding.appBarMain.mainFilter.setVisibility(View.VISIBLE);
|
||||
mBinding.appBarMain.mainFilter.setOnClickListener(v -> ((IFilterableFragment)fragment).onFilterClick());
|
||||
mBinding.appBarMain.mainFilter.setOnClickListener(new OnSingleClickListener() {
|
||||
@Override
|
||||
public void onSingleClick(View v) {
|
||||
((IFilterableFragment)fragment).onFilterClick();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
mBinding.appBarMain.mainFilter.setVisibility(View.GONE);
|
||||
mBinding.appBarMain.mainFilter.setOnClickListener(null);
|
||||
|
||||
@ -117,25 +117,6 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
|
||||
}
|
||||
|
||||
public static void saveRigaCollo(MtbColr mtbColrToSave, RunnableArgs<MtbColr> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
|
||||
mtbColrToSave.setMtbAart(null);
|
||||
mtbColrToSave.setRifPartitaMag(null);
|
||||
|
||||
EntityRESTConsumer.processEntity(mtbColrToSave, new ISimpleOperationCallback<MtbColr>() {
|
||||
@Override
|
||||
public void onSuccess(MtbColr value) {
|
||||
if (onComplete != null) onComplete.run(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Exception ex) {
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
}, MtbColr.class);
|
||||
|
||||
}
|
||||
|
||||
public static void createColloLavorazione(int segno, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||
MtbColt mtbColtToCreate = new MtbColt()
|
||||
.setSegno(segno)
|
||||
@ -574,51 +555,25 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
||||
}
|
||||
|
||||
|
||||
public static void deleteRiga(MtbColr mtbColrToDelete, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
MtbColr newMtbColr = new MtbColr();
|
||||
|
||||
newMtbColr.setNumCollo(mtbColrToDelete.getNumCollo());
|
||||
newMtbColr.setDataCollo(mtbColrToDelete.getDataColloS());
|
||||
newMtbColr.setSerCollo(mtbColrToDelete.getSerCollo());
|
||||
newMtbColr.setGestione(mtbColrToDelete.getGestione());
|
||||
newMtbColr.setRiga(mtbColrToDelete.getRiga());
|
||||
|
||||
|
||||
newMtbColr.setOperation(CommonModelConsts.OPERATION.DELETE);
|
||||
|
||||
EntityRESTConsumer.processEntity(newMtbColr, new ISimpleOperationCallback<MtbColr>() {
|
||||
@Override
|
||||
public void onSuccess(MtbColr value) {
|
||||
if (onComplete != null) onComplete.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Exception ex) {
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
}, MtbColr.class);
|
||||
|
||||
}
|
||||
|
||||
public void updateRiga(MtbColr mtbColrToUpdate, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
updateRigaStatic(mtbColrToUpdate, onComplete, onFailed);
|
||||
}
|
||||
|
||||
public static void updateRigaStatic(MtbColr mtbColrToUpdate, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||
MtbColt mtbColt = new MtbColt()
|
||||
.setGestione(mtbColrToUpdate.getGestioneEnum())
|
||||
.setNumCollo(mtbColrToUpdate.getNumCollo())
|
||||
.setSerCollo(mtbColrToUpdate.getSerCollo())
|
||||
.setDataCollo(mtbColrToUpdate.getDataColloS());
|
||||
|
||||
mtbColt.getMtbColr().add(mtbColrToUpdate);
|
||||
|
||||
mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
||||
mtbColrToUpdate.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
||||
|
||||
EntityRESTConsumer.processEntity(mtbColrToUpdate, new ISimpleOperationCallback<MtbColr>() {
|
||||
@Override
|
||||
public void onSuccess(MtbColr value) {
|
||||
if (onComplete != null) onComplete.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Exception ex) {
|
||||
if (onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
}, MtbColr.class);
|
||||
EntityRESTConsumer.processEntity(mtbColt, value -> {
|
||||
if(onComplete != null) onComplete.run();
|
||||
}, onFailed, MtbColt.class);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -22,6 +22,23 @@ import retrofit2.Response;
|
||||
|
||||
public class EntityRESTConsumer {
|
||||
|
||||
public static <T extends EntityBase> void processEntity(T entityToSave, RunnableArgs<T> onComplete, RunnableArgs<Exception> onFailed, Class<T> type) {
|
||||
|
||||
processEntity(entityToSave, new ISimpleOperationCallback<T>() {
|
||||
@Override
|
||||
public void onSuccess(T value) {
|
||||
if(onComplete != null) onComplete.run(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(Exception ex) {
|
||||
if(onFailed != null) onFailed.run(ex);
|
||||
}
|
||||
}, type);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static <T extends EntityBase> void processEntity(T entityToSave, final ISimpleOperationCallback<T> callback, Class<T> type) {
|
||||
|
||||
RunnableArgs<Exception> tmpFailed = ex -> {
|
||||
|
||||
@ -730,7 +730,11 @@ public class SpedizioneViewModel {
|
||||
|
||||
if (qtaColDaPrelevare != null && numCnfDaPrelevare == null) {
|
||||
numCnfDaPrelevare = UtilityBigDecimal.divideToInteger(qtaColDaPrelevare, mtbAart.getQtaCnf());
|
||||
qtaCnfDaPrelevare = UtilityBigDecimal.divide(qtaColDaPrelevare, numCnfDaPrelevare);
|
||||
|
||||
if(!mtbAart.isFlagQtaCnfFissaBoolean()) {
|
||||
if(UtilityBigDecimal.equalsTo(numCnfDaPrelevare, BigDecimal.ZERO)) numCnfDaPrelevare = BigDecimal.ONE;
|
||||
qtaCnfDaPrelevare = UtilityBigDecimal.divide(qtaColDaPrelevare, numCnfDaPrelevare);
|
||||
}
|
||||
} else if (numCnfDaPrelevare != null && qtaColDaPrelevare == null) {
|
||||
qtaCnfDaPrelevare = mtbAart.getQtaCnf();
|
||||
qtaColDaPrelevare = UtilityBigDecimal.multiply(numCnfDaPrelevare, qtaCnfDaPrelevare);
|
||||
|
||||
@ -342,7 +342,7 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IS
|
||||
.toList();
|
||||
|
||||
if (foundGestioni != null && foundGestioni.size() > 1) {
|
||||
DialogSimpleMessageHelper.makeErrorDialog(getContext(), new SpannableString(getString(R.string.error_multiple_gest)), null, onFailed::run).show();
|
||||
DialogSimpleMessageHelper.makeErrorDialog(getContext(), new SpannableString(getString(R.string.error_multiple_gest)), null, onFailed).show();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -354,7 +354,7 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IS
|
||||
.toList();
|
||||
|
||||
if (foundCodMdep != null && foundCodMdep.size() > 1) {
|
||||
DialogSimpleMessageHelper.makeErrorDialog(getContext(), new SpannableString(getString(R.string.error_multiple_cod_mdep_ordv)), null, onFailed::run).show();
|
||||
DialogSimpleMessageHelper.makeErrorDialog(getContext(), new SpannableString(getString(R.string.error_multiple_cod_mdep_ordv)), null, onFailed).show();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
@ -77,7 +77,7 @@
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
@ -184,7 +184,7 @@
|
||||
|
||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@ -211,7 +211,7 @@
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@ -31,7 +31,7 @@ dependencies {
|
||||
implementation 'androidx.core:core-ktx:1.1.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
|
||||
implementation 'com.google.android.material:material:1.1.0-alpha10'
|
||||
implementation 'com.google.android.material:material:1.2.0-alpha06'
|
||||
|
||||
api 'androidx.camera:camera-core:1.0.0-alpha03'
|
||||
api 'androidx.camera:camera-camera2:1.0.0-alpha03'
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
buildscript {
|
||||
ext {
|
||||
kotlin_version = '1.3.71'
|
||||
kotlin_version = '1.3.72'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user