Compare commits
48 Commits
v1.41.07(4
...
v1.42.04(4
| Author | SHA1 | Date | |
|---|---|---|---|
| 49933c8493 | |||
| b1bc72a1a5 | |||
| c498a373f5 | |||
| bd04d6263e | |||
| 6e52a3c0c7 | |||
| 9f92274720 | |||
| 6d431bb251 | |||
| 5265b949af | |||
| db875491d0 | |||
| 778fdff69a | |||
| 4b54aa3c02 | |||
| 019688a5cc | |||
| 00fc3a59eb | |||
| e5244e75a3 | |||
| cb77c21656 | |||
| b3641534c9 | |||
| e23446654d | |||
| a3a5f65e53 | |||
| ac6f64d494 | |||
| 9d001f8896 | |||
| 24e9cffeea | |||
| b0f2763a85 | |||
| cc343c296f | |||
| bc9b60b0ac | |||
| 856592e1fe | |||
| cd28d01354 | |||
| 653cd3fd75 | |||
| 73b1a77a12 | |||
| 777d6a3c5b | |||
| 98f520427e | |||
| 403f2ec57c | |||
| e69d99fdf1 | |||
| b48b2fbac9 | |||
| 00515aaf9b | |||
| e70d5697c3 | |||
| fb6d206203 | |||
| d3a9c87d14 | |||
| 39841f6b0d | |||
| 7ed3b421a1 | |||
| 3b5eb32190 | |||
| be31b87eac | |||
| 3d341ac99d | |||
| 9df1c37ee9 | |||
| 385a28c29b | |||
| e26568cdf1 | |||
| 191953a003 | |||
| 47143fe97d | |||
| 387ce6a555 |
14
.idea/appInsightsSettings.xml
generated
14
.idea/appInsightsSettings.xml
generated
@@ -4,6 +4,20 @@
|
|||||||
<option name="selectedTabId" value="Android Vitals" />
|
<option name="selectedTabId" value="Android Vitals" />
|
||||||
<option name="tabSettings">
|
<option name="tabSettings">
|
||||||
<map>
|
<map>
|
||||||
|
<entry key="Android Vitals">
|
||||||
|
<value>
|
||||||
|
<InsightsFilterSettings>
|
||||||
|
<option name="connection">
|
||||||
|
<ConnectionSetting>
|
||||||
|
<option name="appId" value="it.integry.ordify.dulciar" />
|
||||||
|
</ConnectionSetting>
|
||||||
|
</option>
|
||||||
|
<option name="signal" value="SIGNAL_UNSPECIFIED" />
|
||||||
|
<option name="timeIntervalDays" value="SEVEN_DAYS" />
|
||||||
|
<option name="visibilityType" value="ALL" />
|
||||||
|
</InsightsFilterSettings>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="Firebase Crashlytics">
|
<entry key="Firebase Crashlytics">
|
||||||
<value>
|
<value>
|
||||||
<InsightsFilterSettings>
|
<InsightsFilterSettings>
|
||||||
|
|||||||
4
.idea/deploymentTargetSelector.xml
generated
4
.idea/deploymentTargetSelector.xml
generated
@@ -4,10 +4,10 @@
|
|||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
<DropdownSelection timestamp="2024-09-13T09:26:42.884931500Z">
|
<DropdownSelection timestamp="2025-01-17T09:18:08.345092200Z">
|
||||||
<Target type="DEFAULT_BOOT">
|
<Target type="DEFAULT_BOOT">
|
||||||
<handle>
|
<handle>
|
||||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=R52T60AZ93A" />
|
<DeviceId pluginId="PhysicalDevice" identifier="serial=21088B8EFD" />
|
||||||
</handle>
|
</handle>
|
||||||
</Target>
|
</Target>
|
||||||
</DropdownSelection>
|
</DropdownSelection>
|
||||||
|
|||||||
2
.idea/kotlinc.xml
generated
2
.idea/kotlinc.xml
generated
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="KotlinJpsPluginSettings">
|
<component name="KotlinJpsPluginSettings">
|
||||||
<option name="version" value="1.9.20" />
|
<option name="version" value="1.9.25" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -5,13 +5,13 @@ if (!project.hasProperty("disable-performance-plugin")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.google.firebase.crashlytics'
|
apply plugin: 'com.google.firebase.crashlytics'
|
||||||
apply plugin: 'kotlin-android'
|
//apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 455
|
def appVersionCode = 464
|
||||||
def appVersionName = '1.41.07'
|
def appVersionName = '1.42.04'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
@@ -34,10 +34,10 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "it.integry.integrywmsnative"
|
applicationId "it.integry.integrywmsnative"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 34
|
targetSdkVersion 35
|
||||||
versionCode appVersionCode
|
versionCode appVersionCode
|
||||||
versionName appVersionName
|
versionName appVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
|
|
||||||
javaCompileOptions {
|
javaCompileOptions {
|
||||||
@@ -75,47 +75,54 @@ android {
|
|||||||
build {
|
build {
|
||||||
doLast {
|
doLast {
|
||||||
delete "$projectDir/build/outputs/apk/release/version.txt"
|
delete "$projectDir/build/outputs/apk/release/version.txt"
|
||||||
file("$projectDir/build/outputs/apk/release/version.txt").text = appVersionCode + '\n' + appVersionName
|
file("$projectDir/build/outputs/apk/release/version.txt").text = appVersionCode + '\n' + appVersionName + '\n' + 'forced=true'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
tasks.withType(JavaCompile.class) {
|
tasks.withType(JavaCompile.class).tap {
|
||||||
|
configureEach {
|
||||||
options.compilerArgs << "-Xmaxerrs" << "10000"
|
options.compilerArgs << "-Xmaxerrs" << "10000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
lint {
|
lint {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
namespace 'it.integry.integrywmsnative'
|
namespace 'it.integry.integrywmsnative'
|
||||||
compileSdk 34
|
compileSdk 35
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
all*.exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7'
|
||||||
|
all*.exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
|
// androidTestImplementation('androidx.test.espresso:espresso-core:3.6.1', {
|
||||||
exclude group: 'com.android.support', module: 'support-annotations'
|
// exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
})
|
// })
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
// implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||||
implementation 'com.github.lupaulus:logger:2.3.2'
|
implementation 'com.github.lupaulus:logger:2.3.2'
|
||||||
|
|
||||||
//Firebase
|
//Firebase
|
||||||
|
|
||||||
// Import the Firebase BoM
|
// Import the Firebase BoM
|
||||||
implementation platform('com.google.firebase:firebase-bom:32.8.1')
|
implementation platform('com.google.firebase:firebase-bom:33.8.0')
|
||||||
implementation 'com.google.firebase:firebase-analytics'
|
implementation 'com.google.firebase:firebase-analytics'
|
||||||
implementation 'com.google.firebase:firebase-crashlytics'
|
implementation 'com.google.firebase:firebase-crashlytics'
|
||||||
implementation 'com.google.firebase:firebase-perf'
|
implementation 'com.google.firebase:firebase-perf'
|
||||||
implementation 'com.google.android.gms:play-services-basement:18.3.0'
|
implementation 'com.google.android.gms:play-services-basement:18.5.0'
|
||||||
|
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation 'com.google.android.material:material:1.11.0'
|
implementation 'com.google.android.material:material:1.12.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
implementation 'androidx.recyclerview:recyclerview:1.4.0'
|
||||||
|
|
||||||
implementation('androidx.preference:preference-ktx:1.2.1') {
|
implementation('androidx.preference:preference-ktx:1.2.1') {
|
||||||
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel'
|
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel'
|
||||||
@@ -127,12 +134,12 @@ dependencies {
|
|||||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||||
implementation 'com.annimon:stream:1.2.2'
|
implementation 'com.annimon:stream:1.2.2'
|
||||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
|
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.7'
|
||||||
// implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
// implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||||
implementation 'org.apache.commons:commons-text:1.9'
|
implementation 'org.apache.commons:commons-text:1.9'
|
||||||
|
|
||||||
//MVVM
|
//MVVM
|
||||||
def dagger2_version = '2.46.1'
|
def dagger2_version = '2.55'
|
||||||
api "com.google.dagger:dagger:$dagger2_version"
|
api "com.google.dagger:dagger:$dagger2_version"
|
||||||
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2_version"
|
||||||
api "com.google.dagger:dagger-android:$dagger2_version"
|
api "com.google.dagger:dagger-android:$dagger2_version"
|
||||||
@@ -182,6 +189,9 @@ dependencies {
|
|||||||
// RxJava is also required.
|
// RxJava is also required.
|
||||||
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
||||||
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||||
|
|
||||||
|
//Barcode generator
|
||||||
|
implementation group: 'com.google.zxing', name: 'core', version: '3.5.3'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
|
android:label="@string/app_name"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
|
|||||||
BIN
app/src/main/ic_launcher-playstore.png
Normal file
BIN
app/src/main/ic_launcher-playstore.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
@@ -126,6 +126,8 @@ import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.Di
|
|||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListModule;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_mtbcolr_list.DialogChooseArtsFromMtbColrListModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotComponent;
|
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotModule;
|
import it.integry.integrywmsnative.view.dialogs.choose_batch_lot.DialogChooseBatchLotModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.create_new_art.DialogCreateNewArtComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.create_new_art.DialogCreateNewArtModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUComponent;
|
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUModule;
|
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdComponent;
|
import it.integry.integrywmsnative.view.dialogs.input_lu_prod.DialogInputLUProdComponent;
|
||||||
@@ -142,6 +144,8 @@ import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtComponent;
|
|||||||
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtModule;
|
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUComponent;
|
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUModule;
|
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUModule;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.switch_user_depo.DialogSwitchUserDepoComponent;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.switch_user_depo.DialogSwitchUserDepoModule;
|
||||||
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracciamentoImballiComponent;
|
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracciamentoImballiComponent;
|
||||||
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracciamentoImballiModule;
|
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracciamentoImballiModule;
|
||||||
|
|
||||||
@@ -218,7 +222,9 @@ import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracc
|
|||||||
DialogInfoGiacenzaModule.class,
|
DialogInfoGiacenzaModule.class,
|
||||||
ArticoliInGiacenzaModule.class,
|
ArticoliInGiacenzaModule.class,
|
||||||
DialogTracciamentoImballiModule.class,
|
DialogTracciamentoImballiModule.class,
|
||||||
DialogAskVettoreModule.class
|
DialogAskVettoreModule.class,
|
||||||
|
DialogCreateNewArtModule.class,
|
||||||
|
DialogSwitchUserDepoModule.class
|
||||||
})
|
})
|
||||||
public interface MainApplicationComponent {
|
public interface MainApplicationComponent {
|
||||||
|
|
||||||
@@ -365,6 +371,10 @@ public interface MainApplicationComponent {
|
|||||||
|
|
||||||
DialogAskVettoreComponent.Factory dialogAskVettoreComponent();
|
DialogAskVettoreComponent.Factory dialogAskVettoreComponent();
|
||||||
|
|
||||||
|
DialogCreateNewArtComponent.Factory dialogCreateNewArtComponent();
|
||||||
|
|
||||||
|
DialogSwitchUserDepoComponent.Factory dialogSwitchUserDepoComponent();
|
||||||
|
|
||||||
void inject(MainApplication mainApplication);
|
void inject(MainApplication mainApplication);
|
||||||
|
|
||||||
void inject(AppContext mainApplication);
|
void inject(AppContext mainApplication);
|
||||||
|
|||||||
@@ -111,6 +111,28 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BindingAdapter("binding")
|
||||||
|
public static void bindEditText(AppCompatTextView view, final ValidatableObservableField<String> observableField) {
|
||||||
|
Pair<ValidatableObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
|
if (pair == null || pair.first != observableField) {
|
||||||
|
if (pair != null) {
|
||||||
|
view.removeTextChangedListener(pair.second);
|
||||||
|
}
|
||||||
|
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
if (observableField != null) observableField.set(s.toString());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
view.setTag(R.id.bound_observable, new Pair<>(observableField, watcher));
|
||||||
|
view.addTextChangedListener(watcher);
|
||||||
|
}
|
||||||
|
String newValue = observableField.get();
|
||||||
|
if (!view.getText().toString().equals(newValue)) {
|
||||||
|
view.setText(newValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@BindingAdapter("binding")
|
@BindingAdapter("binding")
|
||||||
public static void bindEditText(EditText view, final BindableString bindableString) {
|
public static void bindEditText(EditText view, final BindableString bindableString) {
|
||||||
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
Pair<BindableString, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
@@ -156,6 +178,28 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BindingAdapter("binding")
|
||||||
|
public static void bindEditText(EditText view, final ValidatableObservableField<String> observableString) {
|
||||||
|
Pair<ValidatableObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
|
if (pair == null || pair.first != observableString) {
|
||||||
|
if (pair != null) {
|
||||||
|
view.removeTextChangedListener(pair.second);
|
||||||
|
}
|
||||||
|
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
observableString.set(s.toString());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
view.setTag(R.id.bound_observable, new Pair<>(observableString, watcher));
|
||||||
|
view.addTextChangedListener(watcher);
|
||||||
|
}
|
||||||
|
String newValue = observableString.get();
|
||||||
|
if (!view.getText().toString().equals(newValue)) {
|
||||||
|
view.setText(newValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@BindingAdapter("binding")
|
@BindingAdapter("binding")
|
||||||
public static void bindEditText(AutoCompleteTextView view, final ObservableField<String> observableString) {
|
public static void bindEditText(AutoCompleteTextView view, final ObservableField<String> observableString) {
|
||||||
Pair<ObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
Pair<ObservableField<String>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
@@ -260,6 +304,36 @@ public class Converters {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BindingAdapter("binding")
|
||||||
|
public static void bindTextInputEditTextBigDecimal(EditText view, final ValidatableObservableField<BigDecimal> observableBigDecimal) {
|
||||||
|
Pair<ValidatableObservableField<BigDecimal>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
|
if (pair == null || pair.first != observableBigDecimal) {
|
||||||
|
if (pair != null) {
|
||||||
|
view.removeTextChangedListener(pair.second);
|
||||||
|
}
|
||||||
|
TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
BigDecimal value = null;
|
||||||
|
String newValueString = s.toString().trim();
|
||||||
|
|
||||||
|
if (!UtilityString.isNullOrEmpty(newValueString))
|
||||||
|
value = new BigDecimal(newValueString);
|
||||||
|
|
||||||
|
observableBigDecimal.set(value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
view.setTag(R.id.bound_observable, new Pair<>(observableBigDecimal, watcher));
|
||||||
|
view.addTextChangedListener(watcher);
|
||||||
|
}
|
||||||
|
BigDecimal newValue = observableBigDecimal.get();
|
||||||
|
BigDecimal viewValue = !view.getText().toString().trim().isEmpty() ? new BigDecimal(view.getText().toString()) : null;
|
||||||
|
|
||||||
|
if (!UtilityBigDecimal.equalsTo(viewValue, newValue)) {
|
||||||
|
view.setText(UtilityNumber.decimalToString(newValue));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@BindingAdapter("binding")
|
@BindingAdapter("binding")
|
||||||
public static void bindTextInputEditTextBigDecimal(TextInputEditText view, final BindableBigDecimal bindableBigDecimal) {
|
public static void bindTextInputEditTextBigDecimal(TextInputEditText view, final BindableBigDecimal bindableBigDecimal) {
|
||||||
Pair<BindableBigDecimal, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
Pair<BindableBigDecimal, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
@@ -657,6 +731,30 @@ public class Converters {
|
|||||||
view.setChecked(newValue);
|
view.setChecked(newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BindingAdapter("checked")
|
||||||
|
public static void bindCheckbox(AppCompatCheckBox view, final ObservableField<Boolean> bindableBoolean) {
|
||||||
|
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||||
|
view.setTag(R.id.bound_observable, bindableBoolean);
|
||||||
|
view.setOnCheckedChangeListener((compoundButton, b) -> {
|
||||||
|
bindableBoolean.set(b);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Boolean newValue = bindableBoolean.get();
|
||||||
|
view.setChecked(newValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
@BindingAdapter("checked")
|
||||||
|
public static void bindCheckbox(AppCompatCheckBox view, final ValidatableObservableField<Boolean> bindableBoolean) {
|
||||||
|
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||||
|
view.setTag(R.id.bound_observable, bindableBoolean);
|
||||||
|
view.setOnCheckedChangeListener((compoundButton, b) -> {
|
||||||
|
bindableBoolean.set(b);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Boolean newValue = bindableBoolean.get();
|
||||||
|
view.setChecked(newValue);
|
||||||
|
}
|
||||||
|
|
||||||
@BindingAdapter("checked")
|
@BindingAdapter("checked")
|
||||||
public static void bindCheckbox(CheckBox view, final BindableBoolean bindableBoolean) {
|
public static void bindCheckbox(CheckBox view, final BindableBoolean bindableBoolean) {
|
||||||
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
||||||
@@ -723,8 +821,8 @@ public class Converters {
|
|||||||
|
|
||||||
@BindingAdapter({"reverse_visibility"})
|
@BindingAdapter({"reverse_visibility"})
|
||||||
public static void bindViewReverseVisibility(View view, final BindableBoolean bindableBoolean) {
|
public static void bindViewReverseVisibility(View view, final BindableBoolean bindableBoolean) {
|
||||||
if (view.getTag(R.id.bound_observable) != bindableBoolean) {
|
if (view.getTag(R.id.bound_reverse_visibility) != bindableBoolean) {
|
||||||
view.setTag(R.id.bound_observable, bindableBoolean);
|
view.setTag(R.id.bound_reverse_visibility, bindableBoolean);
|
||||||
}
|
}
|
||||||
bindableBoolean.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
bindableBoolean.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package it.integry.integrywmsnative.core.di;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.databinding.BaseObservable;
|
||||||
|
import androidx.databinding.Bindable;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.BR;
|
||||||
|
import it.integry.integrywmsnative.core.di.validators.Validator;
|
||||||
|
|
||||||
|
public class ValidatableObservableField<T> extends BaseObservable {
|
||||||
|
private T mValue;
|
||||||
|
private final List<Validator<T>> validators = new ArrayList<>();
|
||||||
|
public String errorMessage;
|
||||||
|
|
||||||
|
public ValidatableObservableField() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public ValidatableObservableField(T value) {
|
||||||
|
mValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the stored value.
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public T get() {
|
||||||
|
return mValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void set(T value) {
|
||||||
|
if (value != mValue) {
|
||||||
|
mValue = value;
|
||||||
|
notifyChange();
|
||||||
|
validate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addValidator(Validator<T> validator) {
|
||||||
|
validators.add(validator);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean validate() {
|
||||||
|
for (Validator<T> validator : validators) {
|
||||||
|
if (!validator.isValid(mValue)) {
|
||||||
|
setErrorMessage(validator.getErrorMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setErrorMessage(null);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bindable
|
||||||
|
public String getErrorMessage() {
|
||||||
|
return errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setErrorMessage(String errorMessage) {
|
||||||
|
this.errorMessage = errorMessage;
|
||||||
|
notifyPropertyChanged(BR.errorMessage); // Notifica il cambiamento di errorMessage
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,5 +2,25 @@ package it.integry.integrywmsnative.core.di.binders;
|
|||||||
|
|
||||||
public class AutoCompleteTextViewBinders {
|
public class AutoCompleteTextViewBinders {
|
||||||
|
|
||||||
|
// @BindingAdapter("binding")
|
||||||
|
// public static void bindUntMisText(AppCompatAutoCompleteTextView view, ObservableField<MtbUntMis> untMisField) {
|
||||||
|
// Pair<ObservableField<MtbUntMis>, TextWatcherAdapter> pair = (Pair) view.getTag(R.id.bound_observable);
|
||||||
|
// if (pair == null || pair.first != untMisField) {
|
||||||
|
// if (pair != null) {
|
||||||
|
// view.removeTextChangedListener(pair.second);
|
||||||
|
// }
|
||||||
|
// TextWatcherAdapter watcher = new TextWatcherAdapter() {
|
||||||
|
// @Override
|
||||||
|
// public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
// if (untMisField != null) untMisField.set(s.toString());
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// view.setTag(R.id.bound_observable, new Pair<>(untMisField, watcher));
|
||||||
|
// view.addTextChangedListener(watcher);
|
||||||
|
// }
|
||||||
|
// String newValue = untMisField != null && untMisField.get() != null ? Objects.requireNonNull(untMisField.get()).getUntMis() : "";
|
||||||
|
// if (!view.getText().toString().equals(newValue)) {
|
||||||
|
// view.setText(newValue);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.di.binders;
|
package it.integry.integrywmsnative.core.di.binders;
|
||||||
|
|
||||||
import androidx.databinding.BindingAdapter;
|
import androidx.databinding.BindingAdapter;
|
||||||
|
|
||||||
import com.google.android.material.textfield.TextInputLayout;
|
import com.google.android.material.textfield.TextInputLayout;
|
||||||
|
|
||||||
public class TextInputLayoutBinders {
|
public class TextInputLayoutBinders {
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package it.integry.integrywmsnative.core.di.validators;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class GreaterThenValidator implements Validator<BigDecimal> {
|
||||||
|
private final String errorMessage;
|
||||||
|
private final BigDecimal greaterThanValue;
|
||||||
|
|
||||||
|
public GreaterThenValidator(BigDecimal greaterThanValue, String errorMessage) {
|
||||||
|
this.greaterThanValue = greaterThanValue;
|
||||||
|
this.errorMessage = errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid(BigDecimal value) {
|
||||||
|
return value != null && value.compareTo(greaterThanValue) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getErrorMessage() {
|
||||||
|
return errorMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package it.integry.integrywmsnative.core.di.validators;
|
||||||
|
|
||||||
|
public class MinLengthValidator implements Validator<String> {
|
||||||
|
private final int minLength;
|
||||||
|
private final String errorMessage;
|
||||||
|
|
||||||
|
public MinLengthValidator(int minLength, String errorMessage) {
|
||||||
|
this.minLength = minLength;
|
||||||
|
this.errorMessage = errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid(String value) {
|
||||||
|
return value != null && value.length() >= minLength;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getErrorMessage() {
|
||||||
|
return errorMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package it.integry.integrywmsnative.core.di.validators;
|
||||||
|
|
||||||
|
public class NotEmptyValidator implements Validator<String> {
|
||||||
|
private final String errorMessage;
|
||||||
|
|
||||||
|
public NotEmptyValidator(String errorMessage) {
|
||||||
|
this.errorMessage = errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid(String value) {
|
||||||
|
return value != null && !value.trim().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getErrorMessage() {
|
||||||
|
return errorMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package it.integry.integrywmsnative.core.di.validators;
|
||||||
|
|
||||||
|
public class NotNullValidator<T> implements Validator<T>{
|
||||||
|
private final String errorMessage;
|
||||||
|
|
||||||
|
public NotNullValidator(String errorMessage) {
|
||||||
|
this.errorMessage = errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid(T value) {
|
||||||
|
return value != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getErrorMessage() {
|
||||||
|
return errorMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package it.integry.integrywmsnative.core.di.validators;
|
||||||
|
|
||||||
|
public interface Validator<T> {
|
||||||
|
boolean isValid(T value);
|
||||||
|
|
||||||
|
String getErrorMessage();
|
||||||
|
}
|
||||||
@@ -53,16 +53,16 @@ public class BaseActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private void openProgress() {
|
private void openProgress() {
|
||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
//executorService.execute(() -> {
|
// executorService.execute(() -> {
|
||||||
this.mCurrentProgress.show(getSupportFragmentManager());
|
this.mCurrentProgress.show(getSupportFragmentManager());
|
||||||
//});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void closeProgress() {
|
private void closeProgress() {
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
//executorService.execute(() -> {
|
// executorService.execute(() -> {
|
||||||
mCurrentProgress.dismiss();
|
mCurrentProgress.dismiss();
|
||||||
//});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -91,8 +91,9 @@ public abstract class BaseDialogFragment extends DialogFragment implements Dialo
|
|||||||
|
|
||||||
|
|
||||||
public void onError(Exception ex) {
|
public void onError(Exception ex) {
|
||||||
requireActivity().runOnUiThread(() -> {
|
|
||||||
this.onLoadingEnded();
|
this.onLoadingEnded();
|
||||||
|
|
||||||
|
requireActivity().runOnUiThread(() -> {
|
||||||
UtilityExceptions.defaultException(requireActivity(), ex);
|
UtilityExceptions.defaultException(requireActivity(), ex);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package it.integry.integrywmsnative.core.mapper;
|
|||||||
|
|
||||||
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRowRoomDTO;
|
import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRowRoomDTO;
|
||||||
import it.integry.integrywmsnative.core.model.MtbInvenr;
|
import it.integry.integrywmsnative.core.model.MtbInvenr;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
|
||||||
public class InventarioRowMapper extends BaseMapper<MtbInvenr, InventarioRowRoomDTO> {
|
public class InventarioRowMapper extends BaseMapper<MtbInvenr, InventarioRowRoomDTO> {
|
||||||
|
|
||||||
@@ -32,6 +33,7 @@ public class InventarioRowMapper extends BaseMapper<MtbInvenr, InventarioRowRoom
|
|||||||
data.setDataOraInv(inputData.getDataOraInv());
|
data.setDataOraInv(inputData.getDataOraInv());
|
||||||
data.setScanCodBarre(inputData.getScanCodBarre());
|
data.setScanCodBarre(inputData.getScanCodBarre());
|
||||||
data.setZona(inputData.getZona());
|
data.setZona(inputData.getZona());
|
||||||
|
data.setIdDisp(SettingsManager.i().getUserSession().getDeviceId());
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class MtbGrup extends EntityBase {
|
public class MtbGrup extends EntityBase {
|
||||||
|
|
||||||
private String codMgrp;
|
private String codMgrp;
|
||||||
@@ -8,6 +11,7 @@ public class MtbGrup extends EntityBase {
|
|||||||
private String logoWeb;
|
private String logoWeb;
|
||||||
private String criterioVal;
|
private String criterioVal;
|
||||||
private String tipoMgrp;
|
private String tipoMgrp;
|
||||||
|
private List<MtbSgrp> mtbSgrp = new ArrayList<>();
|
||||||
|
|
||||||
public MtbGrup() {
|
public MtbGrup() {
|
||||||
this.type = "mtb_grup";
|
this.type = "mtb_grup";
|
||||||
@@ -66,4 +70,13 @@ public class MtbGrup extends EntityBase {
|
|||||||
this.tipoMgrp = tipoMgrp;
|
this.tipoMgrp = tipoMgrp;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<MtbSgrp> getMtbSgrp() {
|
||||||
|
return mtbSgrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbGrup setMtbSgrp(List<MtbSgrp> mtbSgrp) {
|
||||||
|
this.mtbSgrp = mtbSgrp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
public class MtbSfam extends EntityBase {
|
||||||
|
|
||||||
|
private String codMgrp;
|
||||||
|
private String codMsgr;
|
||||||
|
private String codMsfa;
|
||||||
|
private String descrizione;
|
||||||
|
|
||||||
|
public MtbSfam() {
|
||||||
|
this.type = "mtb_sfam";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMgrp() {
|
||||||
|
return codMgrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSfam setCodMgrp(String codMgrp) {
|
||||||
|
this.codMgrp = codMgrp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMsgr() {
|
||||||
|
return codMsgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSfam setCodMsgr(String codMsgr) {
|
||||||
|
this.codMsgr = codMsgr;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMsfa() {
|
||||||
|
return codMsfa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSfam setCodMsfa(String codMsfa) {
|
||||||
|
this.codMsfa = codMsfa;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizione() {
|
||||||
|
return descrizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSfam setDescrizione(String descrizione) {
|
||||||
|
this.descrizione = descrizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class MtbSgrp extends EntityBase {
|
||||||
|
|
||||||
|
private String codMgrp;
|
||||||
|
private String codMsgr;
|
||||||
|
private String descrizione;
|
||||||
|
private String inclInStat;
|
||||||
|
private String contoRimFin;
|
||||||
|
private Integer ordinamento;
|
||||||
|
private Boolean chkGiacenzaNeg;
|
||||||
|
private Boolean flagReso;
|
||||||
|
private String codCconWip;
|
||||||
|
private List<MtbSfam> mtbSfam = new ArrayList<>();
|
||||||
|
|
||||||
|
public MtbSgrp() {
|
||||||
|
this.type = "mtb_sgrp";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMgrp() {
|
||||||
|
return codMgrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSgrp setCodMgrp(String codMgrp) {
|
||||||
|
this.codMgrp = codMgrp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMsgr() {
|
||||||
|
return codMsgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSgrp setCodMsgr(String codMsgr) {
|
||||||
|
this.codMsgr = codMsgr;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizione() {
|
||||||
|
return descrizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSgrp setDescrizione(String descrizione) {
|
||||||
|
this.descrizione = descrizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInclInStat() {
|
||||||
|
return inclInStat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSgrp setInclInStat(String inclInStat) {
|
||||||
|
this.inclInStat = inclInStat;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContoRimFin() {
|
||||||
|
return contoRimFin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSgrp setContoRimFin(String contoRimFin) {
|
||||||
|
this.contoRimFin = contoRimFin;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrdinamento() {
|
||||||
|
return ordinamento;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSgrp setOrdinamento(Integer ordinamento) {
|
||||||
|
this.ordinamento = ordinamento;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getChkGiacenzaNeg() {
|
||||||
|
return chkGiacenzaNeg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSgrp setChkGiacenzaNeg(Boolean chkGiacenzaNeg) {
|
||||||
|
this.chkGiacenzaNeg = chkGiacenzaNeg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getFlagReso() {
|
||||||
|
return flagReso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSgrp setFlagReso(Boolean flagReso) {
|
||||||
|
this.flagReso = flagReso;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodCconWip() {
|
||||||
|
return codCconWip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSgrp setCodCconWip(String codCconWip) {
|
||||||
|
this.codCconWip = codCconWip;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MtbSfam> getMtbSfam() {
|
||||||
|
return mtbSfam;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MtbSgrp setMtbSfam(List<MtbSfam> mtbSfam) {
|
||||||
|
this.mtbSfam = mtbSfam;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,7 +18,10 @@ import it.integry.integrywmsnative.core.model.MtbUntMis;
|
|||||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.ArticoloDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCodMartRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCodMartRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.SaveArticoloRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.SaveArticoloResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.articolo.UpdateBarcodeImballoRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.articolo.UpdateBarcodeImballoRequestDTO;
|
||||||
@@ -36,6 +39,41 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
this.systemRESTConsumer = systemRESTConsumer;
|
this.systemRESTConsumer = systemRESTConsumer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void retrieveAvailableUntMis(RunnableArgs<List<MtbUntMis>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
|
articoloRESTConsumerService
|
||||||
|
.retrieveAvailableUntMis()
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<MtbUntMis>> call, Response<ServiceRESTResponse<MtbUntMis>> response) {
|
||||||
|
analyzeAnswerList(response, "retrieveAvailableUntMis", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<MtbUntMis>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void retrieveAvailableGruppiMerceologici(RunnableArgs<List<MtbGrup>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
|
articoloRESTConsumerService
|
||||||
|
.retrieveAvailableGruppiMerceologici()
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<MtbGrup>> call, Response<ServiceRESTResponse<MtbGrup>> response) {
|
||||||
|
analyzeAnswerList(response, "retrieveAvailableGruppiMerceologici", onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<MtbGrup>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void searchByBarcode(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void searchByBarcode(String barcodeProd, RunnableArgs<List<MtbAart>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
|
|
||||||
@@ -205,4 +243,28 @@ public class ArticoloRESTConsumer extends _BaseRESTConsumer {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void saveArticolo(ArticoloDTO articoloToSave, RunnableArgs<String> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
ArticoloRESTConsumerService articoloRESTConsumerService = RESTBuilder.getService(ArticoloRESTConsumerService.class);
|
||||||
|
|
||||||
|
var request = new SaveArticoloRequestDTO()
|
||||||
|
.setArtToSave(articoloToSave);
|
||||||
|
|
||||||
|
articoloRESTConsumerService
|
||||||
|
.saveArticolo(request)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<SaveArticoloResponseDTO>> call, Response<ServiceRESTResponse<SaveArticoloResponseDTO>> response) {
|
||||||
|
analyzeAnswer(response, "saveArticolo", data -> {
|
||||||
|
onComplete.run(data.getCodMart());
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<SaveArticoloResponseDTO>> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,13 @@ package it.integry.integrywmsnative.core.rest.consumers;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.model.MtbAart;
|
import it.integry.integrywmsnative.core.model.MtbAart;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||||
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
import it.integry.integrywmsnative.core.model.dto.StatoArticoloDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCodMartRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.articolo.RetrieveArticoloByCodMartRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.SaveArticoloRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.SaveArticoloResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.articolo.SearchArticoloByBarcodeResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.articolo.UpdateBarcodeImballoRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.articolo.UpdateBarcodeImballoRequestDTO;
|
||||||
@@ -17,6 +21,13 @@ import retrofit2.http.Query;
|
|||||||
|
|
||||||
public interface ArticoloRESTConsumerService {
|
public interface ArticoloRESTConsumerService {
|
||||||
|
|
||||||
|
|
||||||
|
@GET("wms/articolo/availableUntMis")
|
||||||
|
Call<ServiceRESTResponse<MtbUntMis>> retrieveAvailableUntMis();
|
||||||
|
|
||||||
|
@GET("wms/articolo/availableGruppiMerceologici")
|
||||||
|
Call<ServiceRESTResponse<MtbGrup>> retrieveAvailableGruppiMerceologici();
|
||||||
|
|
||||||
@POST("wms/articolo/searchByBarcode")
|
@POST("wms/articolo/searchByBarcode")
|
||||||
Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> searchByBarcode(@Body() SearchArticoloByBarcodeRequestDTO searchArticoloByBarcodeRequest);
|
Call<ServiceRESTResponse<SearchArticoloByBarcodeResponseDTO>> searchByBarcode(@Body() SearchArticoloByBarcodeRequestDTO searchArticoloByBarcodeRequest);
|
||||||
|
|
||||||
@@ -29,4 +40,7 @@ public interface ArticoloRESTConsumerService {
|
|||||||
@GET("getProductLotStatus")
|
@GET("getProductLotStatus")
|
||||||
Call<ServiceRESTResponse<List<StatoArticoloDTO>>> getStatoPartita(@Query("codMart") String codMart, @Query("partitaMag") String partitaMag);
|
Call<ServiceRESTResponse<List<StatoArticoloDTO>>> getStatoPartita(@Query("codMart") String codMart, @Query("partitaMag") String partitaMag);
|
||||||
|
|
||||||
|
@POST("wms/articolo/saveArticolo")
|
||||||
|
Call<ServiceRESTResponse<SaveArticoloResponseDTO>> saveArticolo(@Body SaveArticoloRequestDTO saveArticoloRequest);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -31,6 +32,8 @@ import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.SpostaULRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.UpdateTipoULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||||
@@ -286,7 +289,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
|
public void onResponse(Call<ServiceRESTResponse<MtbColt>> call, Response<ServiceRESTResponse<MtbColt>> response) {
|
||||||
analyzeAnswer(response, "GetBySSCC", mtbColt -> {
|
analyzeAnswer(response, "GetBySSCC", mtbColt -> {
|
||||||
|
|
||||||
if (mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
|
if (mtbColt != null && mtbColt.getMtbColr() != null && !mtbColt.getMtbColr().isEmpty()) {
|
||||||
List<MtbColt> mtbColtList = new ArrayList<>();
|
List<MtbColt> mtbColtList = new ArrayList<>();
|
||||||
mtbColtList.add(mtbColt);
|
mtbColtList.add(mtbColt);
|
||||||
fillMtbAartsOfMtbColts(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed);
|
fillMtbAartsOfMtbColts(mtbColtList, mtbColts -> onComplete.run(mtbColts.get(0)), onFailed);
|
||||||
@@ -404,11 +407,7 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changePosizione(MtbColt mtbColtToMove, MtbDepoPosizione posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void spostaUL(MtbColt mtbColtToMove, String codMdep, String posizione, boolean createDocAutomatically, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
String codMdep = posizione.getCodMdep();
|
|
||||||
String posizioneString = posizione.getPosizione();
|
|
||||||
|
|
||||||
MtbColt mtbColtToMoveClone = (MtbColt) mtbColtToMove.clone();
|
MtbColt mtbColtToMoveClone = (MtbColt) mtbColtToMove.clone();
|
||||||
|
|
||||||
for (int i = 0; i < mtbColtToMoveClone.getMtbColr().size(); i++) {
|
for (int i = 0; i < mtbColtToMoveClone.getMtbColr().size(); i++) {
|
||||||
@@ -417,26 +416,66 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
.setMtbPartitaMag(null);
|
.setMtbPartitaMag(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SpostaULRequestDTO spostaUlRequestDTO = new SpostaULRequestDTO()
|
||||||
|
.setCodMdep(codMdep)
|
||||||
|
.setPosizione(posizione)
|
||||||
|
.setMtbColtsToMove(Collections.singletonList(mtbColtToMoveClone))
|
||||||
|
.setCreateDocAutomatically(createDocAutomatically);
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
colliMagazzinoRESTConsumerService
|
colliMagazzinoRESTConsumerService
|
||||||
.spostaULInPosizione(codMdep,
|
.spostaUL(spostaUlRequestDTO)
|
||||||
posizioneString,
|
.enqueue(new Callback<>() {
|
||||||
mtbColtToMoveClone)
|
|
||||||
.enqueue(new Callback<ServiceRESTResponse<Object>>() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
analyzeAnswer(response, "changePosizione", mtbColts -> {
|
analyzeAnswer(response, "spostaUL", mtbColts -> {
|
||||||
onComplete.run();
|
onComplete.run();
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
if (onFailed != null) onFailed.run(new Exception(t));
|
if (onFailed != null) onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void spostaUL(MtbColt mtbColtToMove, MtbDepoPosizione posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
String codMdep = posizione.getCodMdep();
|
||||||
|
String posizioneString = posizione.getPosizione();
|
||||||
|
|
||||||
|
spostaUL(mtbColtToMove, codMdep, posizioneString, true, onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateTipoUL(MtbColt mtbColt, String codTcol, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
MtbColt mtbColtClone = (MtbColt) mtbColt.clone();
|
||||||
|
mtbColtClone.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
|
UpdateTipoULRequestDTO updateTipoULRequest = new UpdateTipoULRequestDTO()
|
||||||
|
.setMtbColt(mtbColtClone)
|
||||||
|
.setCodTcol(codTcol);
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
|
colliMagazzinoRESTConsumerService
|
||||||
|
.updateTipoUL(updateTipoULRequest)
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
|
analyzeAnswer(response, "updateTipoUL", mtbColts -> {
|
||||||
|
onComplete.run();
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
|
if (onFailed != null) onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void updateDataFine(MtbColt mtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public void updateDataFine(MtbColt mtbColt, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
MtbColt cloneMtbColt = (MtbColt) mtbColt.clone();
|
MtbColt cloneMtbColt = (MtbColt) mtbColt.clone();
|
||||||
@@ -517,14 +556,14 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
ColliMagazzinoRESTConsumerService colliMagazzinoRESTConsumerService = RESTBuilder.getService(ColliMagazzinoRESTConsumerService.class);
|
||||||
colliMagazzinoRESTConsumerService.spostaArtsTraUL(spostaArtsTraULRequestDTO).enqueue(new Callback<>() {
|
colliMagazzinoRESTConsumerService.spostaArtsTraUL(spostaArtsTraULRequestDTO).enqueue(new Callback<>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
public void onResponse(Call<ServiceRESTResponse<Void>> call, Response<ServiceRESTResponse<Void>> response) {
|
||||||
analyzeAnswer(response, "spostaArtsTraUL", data -> {
|
analyzeAnswer(response, "spostaArtsTraUL", data -> {
|
||||||
onComplete.run();
|
onComplete.run();
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<Object>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<Void>> call, Throwable t) {
|
||||||
if (onFailed != null) onFailed.run(new Exception(t));
|
if (onFailed != null) onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import it.integry.integrywmsnative.core.model.MtbColt;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
import it.integry.integrywmsnative.core.rest.model.RettificaULDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.SpostaArtsTraULRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.SpostaULRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.UpdateTipoULRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.VersamentoAutomaticoULResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CanULBeDeletedRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.DeleteULRequestDTO;
|
||||||
@@ -31,11 +33,14 @@ public interface ColliMagazzinoRESTConsumerService {
|
|||||||
@POST("creaRettificaCollo")
|
@POST("creaRettificaCollo")
|
||||||
Call<ServiceRESTResponse<MtbColr>> creaRettificaCollo(@Query("codMdep") String codMdep, @Body RettificaULDTO rettificaULDTO);
|
Call<ServiceRESTResponse<MtbColr>> creaRettificaCollo(@Query("codMdep") String codMdep, @Body RettificaULDTO rettificaULDTO);
|
||||||
|
|
||||||
@POST("wms/spostaULInPosizione")
|
@POST("wms/updateTipoUL")
|
||||||
Call<ServiceRESTResponse<Object>> spostaULInPosizione(@Query("codMdep") String codMdep, @Query("posizione") String posizione, @Body MtbColt mtbColtToMove);
|
Call<ServiceRESTResponse<Void>> updateTipoUL(@Body UpdateTipoULRequestDTO requestDto);
|
||||||
|
|
||||||
|
@POST("wms/spostaUL")
|
||||||
|
Call<ServiceRESTResponse<Void>> spostaUL(@Body SpostaULRequestDTO requestDto);
|
||||||
|
|
||||||
@POST("wms/spostaArtsTraUL")
|
@POST("wms/spostaArtsTraUL")
|
||||||
Call<ServiceRESTResponse<Object>> spostaArtsTraUL(@Body SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO);
|
Call<ServiceRESTResponse<Void>> spostaArtsTraUL(@Body SpostaArtsTraULRequestDTO spostaArtsTraULRequestDTO);
|
||||||
|
|
||||||
@POST("wms/assegnaLottoSuColloScarico")
|
@POST("wms/assegnaLottoSuColloScarico")
|
||||||
Call<ServiceRESTResponse<MtbColt>> assegnaLottoSuColloScarico(@Body MtbColt mtbColt);
|
Call<ServiceRESTResponse<MtbColt>> assegnaLottoSuColloScarico(@Body MtbColt mtbColt);
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import it.integry.integrywmsnative.core.rest.RESTBuilder;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityThread;
|
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ArtDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ArtDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.OrdineDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.OrdineDTO;
|
||||||
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.SaveDTO;
|
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.SaveDTO;
|
||||||
@@ -42,17 +41,13 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void onResponse(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Response<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> response) {
|
public void onResponse(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Response<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> response) {
|
||||||
var startTime = new Date().getTime();
|
var startTime = new Date().getTime();
|
||||||
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
|
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
|
||||||
UtilityThread.executeParallel(() -> {
|
|
||||||
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
|
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
|
||||||
onSuccess.run(articoliOrdineWrapper);
|
onSuccess.run(articoliOrdineWrapper);
|
||||||
}, false);
|
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Throwable t) {
|
||||||
Log.e("getArticoliListino_pv", t.toString());
|
|
||||||
UtilityLogger.error(new Exception(t));
|
|
||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -66,17 +61,13 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void onResponse(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Response<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> response) {
|
public void onResponse(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Response<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> response) {
|
||||||
var startTime = new Date().getTime();
|
var startTime = new Date().getTime();
|
||||||
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
|
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
|
||||||
UtilityThread.executeParallel(() -> {
|
|
||||||
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
|
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
|
||||||
onSuccess.run(articoliOrdineWrapper);
|
onSuccess.run(articoliOrdineWrapper);
|
||||||
}, false);
|
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Throwable t) {
|
public void onFailure(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Throwable t) {
|
||||||
Log.e("getArticoliListino_pv", t.toString());
|
|
||||||
UtilityLogger.error(new Exception(t));
|
|
||||||
onFailed.run(new Exception(t));
|
onFailed.run(new Exception(t));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -105,7 +96,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
|
||||||
var startTime = new Date().getTime();
|
var startTime = new Date().getTime();
|
||||||
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
|
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
|
||||||
UtilityThread.executeParallel(() -> {
|
// UtilityThread.executeParallel(() -> {
|
||||||
// if (data == null) {
|
// if (data == null) {
|
||||||
// onFailed.run(new Exception("Nessun ordine generato"));
|
// onFailed.run(new Exception("Nessun ordine generato"));
|
||||||
// return;
|
// return;
|
||||||
@@ -117,7 +108,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
|
|||||||
// ordine.setCodMdep(data.getCodMdep());
|
// ordine.setCodMdep(data.getCodMdep());
|
||||||
// ordine.setNumOrd(data.getNumOrd());
|
// ordine.setNumOrd(data.getNumOrd());
|
||||||
onSuccess.run(ordine);
|
onSuccess.run(ordine);
|
||||||
}, false);
|
// }, false);
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,6 @@ import android.text.TextUtils;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
|
||||||
import com.google.gson.JsonDeserializer;
|
|
||||||
import com.google.gson.JsonParseException;
|
|
||||||
import com.orhanobut.logger.Logger;
|
import com.orhanobut.logger.Logger;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
@@ -15,7 +12,6 @@ import java.io.InputStreamReader;
|
|||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.net.ConnectException;
|
import java.net.ConnectException;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
@@ -29,9 +25,9 @@ import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.NativeSqlRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.NativeSqlRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.system.LatestAppVersionInfoDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.system.RegisterDeviceRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.system.RegisterDeviceRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityGson;
|
import it.integry.integrywmsnative.core.utility.UtilityGson;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@@ -42,6 +38,23 @@ import retrofit2.Response;
|
|||||||
public class SystemRESTConsumer extends _BaseRESTConsumer {
|
public class SystemRESTConsumer extends _BaseRESTConsumer {
|
||||||
|
|
||||||
|
|
||||||
|
public void retrieveUpdatesInfo(final RunnableArgs<LatestAppVersionInfoDTO> onSuccess, final RunnableArgs<Exception> onFailed) {
|
||||||
|
SystemRESTConsumerService systemRESTConsumerService = RESTBuilder.getService(SystemRESTConsumerService.class);
|
||||||
|
systemRESTConsumerService.retrieveUpdatesInfo()
|
||||||
|
.enqueue(new Callback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<LatestAppVersionInfoDTO> call, Response<LatestAppVersionInfoDTO> response) {
|
||||||
|
analyzeAnswerGeneric(response, "updates", onSuccess, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<LatestAppVersionInfoDTO> call, Throwable t) {
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void registerDevice(final Runnable onSuccess, final RunnableArgs<Exception> onFailed) {
|
public void registerDevice(final Runnable onSuccess, final RunnableArgs<Exception> onFailed) {
|
||||||
RegisterDeviceRequestDTO registerDeviceRequestDTO = new RegisterDeviceRequestDTO()
|
RegisterDeviceRequestDTO registerDeviceRequestDTO = new RegisterDeviceRequestDTO()
|
||||||
.setApp("WMS");
|
.setApp("WMS");
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
|||||||
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.NativeSqlRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.NativeSqlRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.system.LatestAppVersionInfoDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.system.RegisterDeviceRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.system.RegisterDeviceRequestDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
@@ -15,6 +16,9 @@ import retrofit2.http.Query;
|
|||||||
|
|
||||||
public interface SystemRESTConsumerService {
|
public interface SystemRESTConsumerService {
|
||||||
|
|
||||||
|
@GET("wms/currentVersion")
|
||||||
|
Call<LatestAppVersionInfoDTO> retrieveUpdatesInfo();
|
||||||
|
|
||||||
@POST("device/register")
|
@POST("device/register")
|
||||||
Call<ServiceRESTResponse<Void>> registerDevice(@Body RegisterDeviceRequestDTO registerDeviceRequestDTO);
|
Call<ServiceRESTResponse<Void>> registerDevice(@Body RegisterDeviceRequestDTO registerDeviceRequestDTO);
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,32 @@ import retrofit2.Response;
|
|||||||
|
|
||||||
public abstract class _BaseRESTConsumer {
|
public abstract class _BaseRESTConsumer {
|
||||||
|
|
||||||
|
|
||||||
|
public static <T> void analyzeAnswerGeneric(Response<T> response, String logTitle, RunnableArgs<T> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
try {
|
||||||
|
var data = analyzeAnswerGeneric(response, logTitle);
|
||||||
|
onComplete.run(data);
|
||||||
|
} catch (Exception e) {
|
||||||
|
onFailed.run(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> T analyzeAnswerGeneric(Response<T> response, String logTitle) throws Exception {
|
||||||
|
if (response.isSuccessful()) {
|
||||||
|
return response.body();
|
||||||
|
} else {
|
||||||
|
if (response.code() == 404) {
|
||||||
|
Log.e(logTitle, "Errore " + response.code() + ": risorsa non trovata (" + response.raw().request().url() + ")");
|
||||||
|
throw new Exception("Errore " + response.code() + ": risorsa non trovata (" + logTitle + ")");
|
||||||
|
} else if (response.code() == 550)
|
||||||
|
throw new InvalidLicenseException();
|
||||||
|
else {
|
||||||
|
Log.e(logTitle, "Status " + response.code() + ": " + response.message());
|
||||||
|
throw new Exception("Status " + response.code() + ": " + response.message());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static <T> T analyzeAnswer(Response<ServiceRESTResponse<T>> response, String logTitle) throws Exception {
|
public static <T> T analyzeAnswer(Response<ServiceRESTResponse<T>> response, String logTitle) throws Exception {
|
||||||
if (response.isSuccessful()) {
|
if (response.isSuccessful()) {
|
||||||
if (response.body() != null) {
|
if (response.body() != null) {
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class SpostaULRequestDTO {
|
||||||
|
|
||||||
|
private String codMdep;
|
||||||
|
private String posizione;
|
||||||
|
private String annotazioni;
|
||||||
|
private boolean createDocAutomatically = true;
|
||||||
|
private List<MtbColt> mtbColtsToMove = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
public String getCodMdep() {
|
||||||
|
return codMdep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpostaULRequestDTO setCodMdep(String codMdep) {
|
||||||
|
this.codMdep = codMdep;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPosizione() {
|
||||||
|
return posizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpostaULRequestDTO setPosizione(String posizione) {
|
||||||
|
this.posizione = posizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAnnotazioni() {
|
||||||
|
return annotazioni;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpostaULRequestDTO setAnnotazioni(String annotazioni) {
|
||||||
|
this.annotazioni = annotazioni;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCreateDocAutomatically() {
|
||||||
|
return createDocAutomatically;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpostaULRequestDTO setCreateDocAutomatically(boolean createDocAutomatically) {
|
||||||
|
this.createDocAutomatically = createDocAutomatically;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MtbColt> getMtbColtsToMove() {
|
||||||
|
return mtbColtsToMove;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpostaULRequestDTO setMtbColtsToMove(List<MtbColt> mtbColtsToMove) {
|
||||||
|
this.mtbColtsToMove = mtbColtsToMove;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
|
||||||
|
public class UpdateTipoULRequestDTO {
|
||||||
|
|
||||||
|
private MtbColt mtbColt;
|
||||||
|
private String codTcol;
|
||||||
|
|
||||||
|
public MtbColt getMtbColt() {
|
||||||
|
return mtbColt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UpdateTipoULRequestDTO setMtbColt(MtbColt mtbColt) {
|
||||||
|
this.mtbColt = mtbColt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodTcol() {
|
||||||
|
return codTcol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UpdateTipoULRequestDTO setCodTcol(String codTcol) {
|
||||||
|
this.codTcol = codTcol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,257 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.articolo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class ArticoloDTO {
|
||||||
|
|
||||||
|
private String codMart;
|
||||||
|
private String descrizione;
|
||||||
|
private String untMis;
|
||||||
|
private String barcode;
|
||||||
|
private BigDecimal qtaCnf;
|
||||||
|
private String codAliq;
|
||||||
|
private String articoloComposto;
|
||||||
|
private String descrizioneEstesa;
|
||||||
|
private String note;
|
||||||
|
private String posizione;
|
||||||
|
private String codMgrp;
|
||||||
|
private String codMsfa;
|
||||||
|
private String codMsgr;
|
||||||
|
private String codMstp;
|
||||||
|
private String codMtip;
|
||||||
|
private boolean flagStato;
|
||||||
|
private String barcodeImballo;
|
||||||
|
private String diacod;
|
||||||
|
private boolean flagQtaCnfFissa;
|
||||||
|
private String idArtEqui;
|
||||||
|
private boolean flagKit;
|
||||||
|
private String precode;
|
||||||
|
private String gruppo;
|
||||||
|
private String sottoGruppo;
|
||||||
|
private String sottoFamiglia;
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setCodMart(String codMart) {
|
||||||
|
this.codMart = codMart;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizione() {
|
||||||
|
return descrizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setDescrizione(String descrizione) {
|
||||||
|
this.descrizione = descrizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUntMis() {
|
||||||
|
return untMis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setUntMis(String untMis) {
|
||||||
|
this.untMis = untMis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBarcode() {
|
||||||
|
return barcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setBarcode(String barcode) {
|
||||||
|
this.barcode = barcode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQtaCnf() {
|
||||||
|
return qtaCnf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setQtaCnf(BigDecimal qtaCnf) {
|
||||||
|
this.qtaCnf = qtaCnf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodAliq() {
|
||||||
|
return codAliq;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setCodAliq(String codAliq) {
|
||||||
|
this.codAliq = codAliq;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getArticoloComposto() {
|
||||||
|
return articoloComposto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setArticoloComposto(String articoloComposto) {
|
||||||
|
this.articoloComposto = articoloComposto;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescrizioneEstesa() {
|
||||||
|
return descrizioneEstesa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setDescrizioneEstesa(String descrizioneEstesa) {
|
||||||
|
this.descrizioneEstesa = descrizioneEstesa;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNote() {
|
||||||
|
return note;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setNote(String note) {
|
||||||
|
this.note = note;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPosizione() {
|
||||||
|
return posizione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setPosizione(String posizione) {
|
||||||
|
this.posizione = posizione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMgrp() {
|
||||||
|
return codMgrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setCodMgrp(String codMgrp) {
|
||||||
|
this.codMgrp = codMgrp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMsfa() {
|
||||||
|
return codMsfa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setCodMsfa(String codMsfa) {
|
||||||
|
this.codMsfa = codMsfa;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMsgr() {
|
||||||
|
return codMsgr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setCodMsgr(String codMsgr) {
|
||||||
|
this.codMsgr = codMsgr;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMstp() {
|
||||||
|
return codMstp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setCodMstp(String codMstp) {
|
||||||
|
this.codMstp = codMstp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodMtip() {
|
||||||
|
return codMtip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setCodMtip(String codMtip) {
|
||||||
|
this.codMtip = codMtip;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagStato() {
|
||||||
|
return flagStato;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setFlagStato(boolean flagStato) {
|
||||||
|
this.flagStato = flagStato;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBarcodeImballo() {
|
||||||
|
return barcodeImballo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setBarcodeImballo(String barcodeImballo) {
|
||||||
|
this.barcodeImballo = barcodeImballo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiacod() {
|
||||||
|
return diacod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setDiacod(String diacod) {
|
||||||
|
this.diacod = diacod;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagQtaCnfFissa() {
|
||||||
|
return flagQtaCnfFissa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setFlagQtaCnfFissa(boolean flagQtaCnfFissa) {
|
||||||
|
this.flagQtaCnfFissa = flagQtaCnfFissa;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdArtEqui() {
|
||||||
|
return idArtEqui;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setIdArtEqui(String idArtEqui) {
|
||||||
|
this.idArtEqui = idArtEqui;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagKit() {
|
||||||
|
return flagKit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setFlagKit(boolean flagKit) {
|
||||||
|
this.flagKit = flagKit;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrecode() {
|
||||||
|
return precode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setPrecode(String precode) {
|
||||||
|
this.precode = precode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGruppo() {
|
||||||
|
return gruppo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setGruppo(String gruppo) {
|
||||||
|
this.gruppo = gruppo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSottoGruppo() {
|
||||||
|
return sottoGruppo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setSottoGruppo(String sottoGruppo) {
|
||||||
|
this.sottoGruppo = sottoGruppo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSottoFamiglia() {
|
||||||
|
return sottoFamiglia;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArticoloDTO setSottoFamiglia(String sottoFamiglia) {
|
||||||
|
this.sottoFamiglia = sottoFamiglia;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.articolo;
|
||||||
|
|
||||||
|
public class SaveArticoloRequestDTO {
|
||||||
|
private ArticoloDTO artToSave;
|
||||||
|
|
||||||
|
public ArticoloDTO getArtToSave() {
|
||||||
|
return artToSave;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SaveArticoloRequestDTO setArtToSave(ArticoloDTO artToSave) {
|
||||||
|
this.artToSave = artToSave;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.articolo;
|
||||||
|
|
||||||
|
public class SaveArticoloResponseDTO {
|
||||||
|
private String codMart;
|
||||||
|
|
||||||
|
public String getCodMart() {
|
||||||
|
return codMart;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package it.integry.integrywmsnative.core.rest.model.system;
|
||||||
|
|
||||||
|
public class LatestAppVersionInfoDTO {
|
||||||
|
private String latestVersion;
|
||||||
|
private int latestVersionCode;
|
||||||
|
private String url;
|
||||||
|
private boolean forced;
|
||||||
|
|
||||||
|
public String getLatestVersion() {
|
||||||
|
return latestVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LatestAppVersionInfoDTO setLatestVersion(String latestVersion) {
|
||||||
|
this.latestVersion = latestVersion;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLatestVersionCode() {
|
||||||
|
return latestVersionCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LatestAppVersionInfoDTO setLatestVersionCode(int latestVersionCode) {
|
||||||
|
this.latestVersionCode = latestVersionCode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LatestAppVersionInfoDTO setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isForced() {
|
||||||
|
return forced;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LatestAppVersionInfoDTO setForced(boolean forced) {
|
||||||
|
this.forced = forced;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -83,6 +83,9 @@ public class DBSettingsModel {
|
|||||||
private boolean suggestDataScad = false;
|
private boolean suggestDataScad = false;
|
||||||
private boolean flagPositionChangeRequest = false;
|
private boolean flagPositionChangeRequest = false;
|
||||||
private String docInterniRequestNumDoc;
|
private String docInterniRequestNumDoc;
|
||||||
|
private boolean flagEnableArtCreation;
|
||||||
|
private List<String> allowedCodMgrpForArtCreation;
|
||||||
|
private boolean flagAccettazioneGroupListForn = false;
|
||||||
|
|
||||||
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
public boolean isFlagSpedizioneEnableFakeGiacenza() {
|
||||||
return flagSpedizioneEnableFakeGiacenza;
|
return flagSpedizioneEnableFakeGiacenza;
|
||||||
@@ -705,6 +708,24 @@ public class DBSettingsModel {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getAllowedCodMgrpForArtCreation() {
|
||||||
|
return allowedCodMgrpForArtCreation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setAllowedCodMgrpForArtCreation(List<String> allowedCodMgrpForArtCreation) {
|
||||||
|
this.allowedCodMgrpForArtCreation = allowedCodMgrpForArtCreation;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFlagEnableArtCreation() {
|
||||||
|
return flagEnableArtCreation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setFlagEnableArtCreation(boolean flagEnableArtCreation) {
|
||||||
|
this.flagEnableArtCreation = flagEnableArtCreation;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isFlagPositionChangeRequest() {
|
public boolean isFlagPositionChangeRequest() {
|
||||||
return flagPositionChangeRequest;
|
return flagPositionChangeRequest;
|
||||||
}
|
}
|
||||||
@@ -713,4 +734,12 @@ public class DBSettingsModel {
|
|||||||
this.flagPositionChangeRequest = flagPositionChangeRequest;
|
this.flagPositionChangeRequest = flagPositionChangeRequest;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isFlagAccettazioneGroupListForn() {
|
||||||
|
return flagAccettazioneGroupListForn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlagAccettazioneGroupListForn(boolean flagAccettazioneGroupListForn) {
|
||||||
|
this.flagAccettazioneGroupListForn = flagAccettazioneGroupListForn;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,6 +243,11 @@ public class SettingsManager {
|
|||||||
.setSection("ACCETTAZIONE")
|
.setSection("ACCETTAZIONE")
|
||||||
.setKeySection("FLAG_AUTO_OPEN_NEW_UL")
|
.setKeySection("FLAG_AUTO_OPEN_NEW_UL")
|
||||||
.setSetter(dbSettingsModelIstance::setFlagCanAutoOpenNewULAccettazione));
|
.setSetter(dbSettingsModelIstance::setFlagCanAutoOpenNewULAccettazione));
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("ACCETTAZIONE")
|
||||||
|
.setKeySection("FLAG_GROUP_LIST_FORN")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagAccettazioneGroupListForn));
|
||||||
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
.setGestName("PICKING")
|
.setGestName("PICKING")
|
||||||
.setSection("ACCETTAZIONE")
|
.setSection("ACCETTAZIONE")
|
||||||
@@ -569,6 +574,21 @@ public class SettingsManager {
|
|||||||
.setKeySection("REQUEST_NUM_DOC")
|
.setKeySection("REQUEST_NUM_DOC")
|
||||||
.setSetter(dbSettingsModelIstance::setDocInterniRequestNumDoc));
|
.setSetter(dbSettingsModelIstance::setDocInterniRequestNumDoc));
|
||||||
|
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(Boolean.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("SETUP")
|
||||||
|
.setKeySection("ENABLE_ART_CREATION")
|
||||||
|
.setSetter(dbSettingsModelIstance::setFlagEnableArtCreation));
|
||||||
|
|
||||||
|
stbGestSetupReaderList.add(new StbGestSetupReader<>(String.class)
|
||||||
|
.setGestName("PICKING")
|
||||||
|
.setSection("SETUP")
|
||||||
|
.setKeySection("ENABLE_ART_CREATION_GRP_MERC")
|
||||||
|
.setSetter(data -> {
|
||||||
|
if (data != null)
|
||||||
|
dbSettingsModelIstance.setAllowedCodMgrpForArtCreation(Arrays.asList(data.split("\\|")));
|
||||||
|
}));
|
||||||
|
|
||||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,16 +15,19 @@ import java.io.File;
|
|||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.FileDownloader;
|
import it.integry.integrywmsnative.core.utility.FileDownloader;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class UpdatesManager {
|
public class UpdatesManager {
|
||||||
|
|
||||||
|
|
||||||
private AppCompatActivity mContext;
|
private AppCompatActivity mContext;
|
||||||
|
|
||||||
public void init(AppCompatActivity activityContext) {
|
public void init(AppCompatActivity activityContext, SystemRESTConsumer systemRESTConsumer) {
|
||||||
this.mContext = activityContext;
|
this.mContext = activityContext;
|
||||||
|
|
||||||
final String baseEndpoint = SettingsManager.i().getServer().getProtocol() + "://" + SettingsManager.i().getServer().getHost() +
|
final String baseEndpoint = SettingsManager.i().getServer().getProtocol() + "://" + SettingsManager.i().getServer().getHost() +
|
||||||
@@ -34,6 +37,8 @@ public class UpdatesManager {
|
|||||||
final String currentDownloadUrl = baseEndpoint + "/ems-api/wms/android-release.apk";
|
final String currentDownloadUrl = baseEndpoint + "/ems-api/wms/android-release.apk";
|
||||||
|
|
||||||
|
|
||||||
|
systemRESTConsumer.retrieveUpdatesInfo(latestData -> {
|
||||||
|
|
||||||
AppUpdater appUpdater = new AppUpdater(mContext)
|
AppUpdater appUpdater = new AppUpdater(mContext)
|
||||||
.setDisplay(Display.DIALOG)
|
.setDisplay(Display.DIALOG)
|
||||||
.setUpdateFrom(UpdateFrom.JSON)
|
.setUpdateFrom(UpdateFrom.JSON)
|
||||||
@@ -42,7 +47,12 @@ public class UpdatesManager {
|
|||||||
.setButtonUpdateClickListener((dialog, which) -> {
|
.setButtonUpdateClickListener((dialog, which) -> {
|
||||||
installAPK(currentDownloadUrl);
|
installAPK(currentDownloadUrl);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(latestData.isForced())
|
||||||
|
appUpdater.setButtonDismiss(null);
|
||||||
|
|
||||||
appUpdater.start();
|
appUpdater.start();
|
||||||
|
}, ex -> UtilityExceptions.defaultException(mContext, ex));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -67,6 +77,11 @@ public class UpdatesManager {
|
|||||||
mContext.runOnUiThread(() -> {
|
mContext.runOnUiThread(() -> {
|
||||||
progressDialogBuilder.dismiss();
|
progressDialogBuilder.dismiss();
|
||||||
|
|
||||||
|
if (!destination.exists()) {
|
||||||
|
UtilityExceptions.defaultException(mContext, new Exception("Errore durante il download dell'aggiornamento"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Uri fileLoc;
|
Uri fileLoc;
|
||||||
Intent intent;
|
Intent intent;
|
||||||
|
|
||||||
@@ -93,7 +108,8 @@ public class UpdatesManager {
|
|||||||
try {
|
try {
|
||||||
fileDownloader.download();
|
fileDownloader.download();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
progressDialogBuilder.dismissAllowingStateLoss();
|
||||||
|
UtilityExceptions.defaultException(mContext, e);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ public class FileDownloader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
if(downloadFile != null && downloadFile.exists())
|
||||||
|
downloadFile.delete();
|
||||||
throw e;
|
throw e;
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
package it.integry.integrywmsnative.core.utility;
|
package it.integry.integrywmsnative.core.utility;
|
||||||
|
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.Color;
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
|
import com.google.zxing.BarcodeFormat;
|
||||||
|
import com.google.zxing.MultiFormatWriter;
|
||||||
|
import com.google.zxing.common.BitMatrix;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
@@ -109,12 +115,12 @@ public class UtilityBarcode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static String convertITF14toEAN13(String barcodeITF14) {
|
public static String convertITF14toEAN13(String barcodeITF14) throws Exception {
|
||||||
String barcodeEAN13 = null;
|
String barcodeEAN13 = null;
|
||||||
|
|
||||||
if (barcodeITF14.length() == 14) {
|
if (barcodeITF14.length() == 14) {
|
||||||
barcodeEAN13 = barcodeITF14.substring(1, barcodeITF14.length() - 1).trim();
|
barcodeEAN13 = barcodeITF14.substring(1, barcodeITF14.length() - 1).trim();
|
||||||
barcodeEAN13 += getEAN13CheckDigit(barcodeEAN13);
|
barcodeEAN13 += calculateEAN13CheckDigit(barcodeEAN13);
|
||||||
}
|
}
|
||||||
|
|
||||||
return barcodeEAN13;
|
return barcodeEAN13;
|
||||||
@@ -131,18 +137,69 @@ public class UtilityBarcode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static String getEAN13CheckDigit(String ean) {
|
public static boolean isValidEan13(String ean13) {
|
||||||
|
// Verifica che il codice sia lungo esattamente 13 cifre
|
||||||
|
if (ean13.length() != 13 || !ean13.matches("\\d+")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (ean.length() != 12) {
|
// Calcola il check digit dalle prime 12 cifre
|
||||||
UtilityLogger.error(new Exception("Please provide an input string of 12 chars. Current lenght: " + ean.length()));
|
int calculatedCheckDigit = calculateEAN13CheckDigit(ean13.substring(0, 12));
|
||||||
return null;
|
int providedCheckDigit = Character.getNumericValue(ean13.charAt(12));
|
||||||
}
|
|
||||||
long tot = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < 12; i++) {
|
// Confronta il check digit calcolato con quello fornito
|
||||||
tot = tot + (Long.parseLong(String.valueOf(ean.charAt(i))) * (i % 2 == 0 ? 1 : 3));
|
return calculatedCheckDigit == providedCheckDigit;
|
||||||
}
|
}
|
||||||
return tot % 10 == 0 ? "0" : "" + (10 - (tot % 10));
|
|
||||||
|
private static int calculateEAN13CheckDigit(String ean12) {
|
||||||
|
int sum = 0;
|
||||||
|
for (int i = 0; i < ean12.length(); i++) {
|
||||||
|
int digit = Character.getNumericValue(ean12.charAt(i));
|
||||||
|
sum += (i % 2 == 0) ? digit : digit * 3;
|
||||||
}
|
}
|
||||||
|
return (10 - (sum % 10)) % 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Bitmap generateBarcodeImage(String barcode, int width, int height) throws Exception {
|
||||||
|
if(barcode == null) return null;
|
||||||
|
|
||||||
|
BarcodeType barcodeType;
|
||||||
|
|
||||||
|
if(barcode.length() == 8)
|
||||||
|
barcodeType = BarcodeType.EAN8;
|
||||||
|
else if(barcode.length() == 13)
|
||||||
|
barcodeType = BarcodeType.EAN13;
|
||||||
|
else if(barcode.length() == 14)
|
||||||
|
barcodeType = BarcodeType.INTERLEAVED_2OF5;
|
||||||
|
else throw new Exception("Barcode " + barcode + " non valido");
|
||||||
|
|
||||||
|
return generateBarcodeImage(barcode, barcodeType, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Bitmap generateBarcodeImage(String barcode, BarcodeType type, int width, int height) throws Exception {
|
||||||
|
// Genera la matrice del codice a barre
|
||||||
|
MultiFormatWriter writer = new MultiFormatWriter();
|
||||||
|
|
||||||
|
BarcodeFormat barcodeFormat = switch (type) {
|
||||||
|
case EAN8 -> BarcodeFormat.EAN_8;
|
||||||
|
case EAN13 -> BarcodeFormat.EAN_13;
|
||||||
|
case INTERLEAVED_2OF5 -> BarcodeFormat.ITF;
|
||||||
|
case CODE128 -> BarcodeFormat.CODE_128;
|
||||||
|
default -> throw new Exception("Barcode " + barcode + " non valido (tipo: " + type + ")");
|
||||||
|
};
|
||||||
|
|
||||||
|
BitMatrix bitMatrix = writer.encode(barcode, barcodeFormat, width, height);
|
||||||
|
|
||||||
|
// Crea un bitmap a partire dalla matrice
|
||||||
|
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
|
||||||
|
for (int x = 0; x < width; x++) {
|
||||||
|
for (int y = 0; y < height; y++) {
|
||||||
|
bitmap.setPixel(x, y, bitMatrix.get(x, y) ? Color.BLACK : Color.WHITE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return bitmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ public class UtilityExceptions {
|
|||||||
if (!BuildConfig.DEBUG && !toIgnore) {
|
if (!BuildConfig.DEBUG && !toIgnore) {
|
||||||
if (sendEmail) UtilityLogger.error(ex);
|
if (sendEmail) UtilityLogger.error(ex);
|
||||||
FirebaseCrashlytics.getInstance().recordException(ex);
|
FirebaseCrashlytics.getInstance().recordException(ex);
|
||||||
|
} else {
|
||||||
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
package it.integry.integrywmsnative.core.utility;
|
package it.integry.integrywmsnative.core.utility;
|
||||||
|
|
||||||
import androidx.databinding.Observable;
|
import androidx.databinding.Observable;
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
|
import androidx.databinding.ObservableList;
|
||||||
|
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.OnGeneralChangedCallback;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgsWithReturn;
|
||||||
|
|
||||||
public class UtilityObservable {
|
public class UtilityObservable {
|
||||||
|
|
||||||
@@ -16,4 +23,36 @@ public class UtilityObservable {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static <T, R> ObservableField<R> convertObservable(ObservableField<T> observableField, RunnableArgsWithReturn<T, R> dataConverter) {
|
||||||
|
ObservableField<R> returnObservable = new ObservableField<>();
|
||||||
|
|
||||||
|
observableField.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
returnObservable.set(dataConverter.run(observableField.get()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
returnObservable.set(dataConverter.run(observableField.get()));
|
||||||
|
|
||||||
|
return returnObservable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T, R> ObservableArrayList<R> convertObservableArrayList(ObservableArrayList<T> observableField, RunnableArgsWithReturn<T, R> dataConverter) {
|
||||||
|
ObservableArrayList<R> returnObservable = new ObservableArrayList<>();
|
||||||
|
|
||||||
|
observableField.addOnListChangedCallback(new OnListGeneralChangedCallback<T>() {
|
||||||
|
@Override
|
||||||
|
public void onChanged(ObservableList<T> sender) {
|
||||||
|
|
||||||
|
returnObservable.clear();
|
||||||
|
returnObservable.addAll(sender.stream().map(dataConverter::run).collect(Collectors.toUnmodifiableList()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
returnObservable.addAll(observableField.stream().map(dataConverter::run).collect(Collectors.toUnmodifiableList()));
|
||||||
|
|
||||||
|
return returnObservable;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import it.integry.integrywmsnative.core.di.BindableBoolean;
|
|||||||
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
import it.integry.integrywmsnative.core.interfaces.IScrollableFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.databinding.FragmentMainAccettazioneBollaBinding;
|
import it.integry.integrywmsnative.databinding.FragmentMainAccettazioneBollaBinding;
|
||||||
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.SitBollaAccettazioneDTO;
|
import it.integry.integrywmsnative.gest.accettazione_bolla_elenco.rest.dto.SitBollaAccettazioneDTO;
|
||||||
@@ -166,7 +167,7 @@ public class MainAccettazioneBollaElencoFragment extends BaseFragment implements
|
|||||||
|
|
||||||
this.mBolleInevaseMutableData.clear();
|
this.mBolleInevaseMutableData.clear();
|
||||||
|
|
||||||
if(tmpList != null)
|
if (tmpList != null)
|
||||||
this.mBolleInevaseMutableData.addAll(convertDataModelToListModel(tmpList));
|
this.mBolleInevaseMutableData.addAll(convertDataModelToListModel(tmpList));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,33 +183,44 @@ public class MainAccettazioneBollaElencoFragment extends BaseFragment implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private List<MainAccettazioneBolleElencoListModel> convertDataModelToListModel(List<TestataBollaAccettazioneDTO> dataList) {
|
private List<MainAccettazioneBolleElencoListModel> convertDataModelToListModel(List<TestataBollaAccettazioneDTO> dataList) {
|
||||||
if(dataList == null)
|
boolean group = !SettingsManager.iDB().isFlagAccettazioneGroupListForn();
|
||||||
return null;
|
if (dataList == null) return null;
|
||||||
|
|
||||||
|
Stream<TestataBollaAccettazioneDTO> stream = Stream.of(dataList);
|
||||||
|
|
||||||
|
if (group) {
|
||||||
final Comparator<TestataBollaAccettazioneDTO> comparer = Comparator.comparing(TestataBollaAccettazioneDTO::getListino)
|
final Comparator<TestataBollaAccettazioneDTO> comparer = Comparator.comparing(TestataBollaAccettazioneDTO::getListino)
|
||||||
.thenComparing(TestataBollaAccettazioneDTO::getRagSoc)
|
.thenComparing(TestataBollaAccettazioneDTO::getRagSoc)
|
||||||
.thenComparing(TestataBollaAccettazioneDTO::getNumDoc);
|
.thenComparing(TestataBollaAccettazioneDTO::getNumDoc);
|
||||||
|
stream = stream.sorted(comparer);
|
||||||
|
} else {
|
||||||
|
stream = stream.sortBy(x -> x.getRagSoc() + UtilityDate.formatDate(x.getDataDoc(), UtilityDate.COMMONS_DATE_FORMATS.YMD_SLASH));
|
||||||
|
}
|
||||||
|
|
||||||
return Stream.of(dataList)
|
return stream.map(x -> {
|
||||||
.sorted(comparer)
|
|
||||||
.map(x -> {
|
|
||||||
MainAccettazioneBolleElencoListModel listModel = new MainAccettazioneBolleElencoListModel();
|
MainAccettazioneBolleElencoListModel listModel = new MainAccettazioneBolleElencoListModel();
|
||||||
|
|
||||||
listModel.setOriginalModel(x);
|
listModel.setOriginalModel(x);
|
||||||
listModel.setGroupTitle(x.getListino() + " - " + x.getRagSoc());
|
|
||||||
listModel.setDescription(String.format(getString(R.string.ord_acq_testata), x.getNumDoc(), UtilityDate.formatDate(x.getDataDoc(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)));
|
|
||||||
|
|
||||||
|
if (group)
|
||||||
|
listModel.setGroupTitle(x.getListino() + " - " + x.getRagSoc());
|
||||||
|
else
|
||||||
|
listModel.setGroupTitle(x.getRagSoc());
|
||||||
|
|
||||||
|
listModel.setDescription(String.format(getString(R.string.ord_acq_testata),
|
||||||
|
x.getNumDoc(),
|
||||||
|
UtilityDate.formatDate(x.getDataDoc(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN)));
|
||||||
|
|
||||||
|
if (group)
|
||||||
listModel.setSubDescription(x.getDescrizioneListino());
|
listModel.setSubDescription(x.getDescrizioneListino());
|
||||||
|
else
|
||||||
|
listModel.setSubDescription(x.getListino() + " - " + x.getDescrizioneListino());
|
||||||
|
|
||||||
listModel.setRightDescription(x.getCodAnag());
|
listModel.setRightDescription(x.getCodAnag());
|
||||||
listModel.setRightSubDescription(x.getCodJcom());
|
listModel.setRightSubDescription(x.getCodJcom());
|
||||||
|
|
||||||
return listModel;
|
return listModel;
|
||||||
})
|
}).toList();
|
||||||
.toList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -464,6 +464,8 @@ public class AccettazioneBollaPickingActivity extends BaseActivity implements Ac
|
|||||||
.findFirstOrElse(null)
|
.findFirstOrElse(null)
|
||||||
.isCanBeRecovered(),
|
.isCanBeRecovered(),
|
||||||
|
|
||||||
|
false,
|
||||||
|
|
||||||
ReportManager.getReportNameLUFromGestione(GestioneEnum.ACQUISTO));
|
ReportManager.getReportNameLUFromGestione(GestioneEnum.ACQUISTO));
|
||||||
|
|
||||||
this.startActivityForResult(myIntent, PICK_UL_REQUEST);
|
this.startActivityForResult(myIntent, PICK_UL_REQUEST);
|
||||||
|
|||||||
@@ -544,10 +544,6 @@ public class AccettazioneBollaPickingViewModel {
|
|||||||
initialQtaCnf = qtaCnfDaPrelevare;
|
initialQtaCnf = qtaCnfDaPrelevare;
|
||||||
initialQtaTot = qtaColDaPrelevare;
|
initialQtaTot = qtaColDaPrelevare;
|
||||||
|
|
||||||
} else if (totalQtaDoc != null) {
|
|
||||||
initialNumCnf = totalNumCnfDoc;
|
|
||||||
initialQtaCnf = qtaCnfDoc;
|
|
||||||
initialQtaTot = totalQtaDoc;
|
|
||||||
} else {
|
} else {
|
||||||
initialNumCnf = BigDecimal.ONE;
|
initialNumCnf = BigDecimal.ONE;
|
||||||
initialQtaCnf = mtbAart.getQtaCnf();
|
initialQtaCnf = mtbAart.getQtaCnf();
|
||||||
|
|||||||
@@ -2,10 +2,12 @@ package it.integry.integrywmsnative.gest.accettazione_bolla_picking.ui;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.os.Build;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.RequiresApi;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.content.res.ResourcesCompat;
|
import androidx.core.content.res.ResourcesCompat;
|
||||||
import androidx.databinding.ObservableArrayList;
|
import androidx.databinding.ObservableArrayList;
|
||||||
@@ -15,7 +17,11 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
import com.zhukic.sectionedrecyclerview.SectionedRecyclerViewAdapter;
|
import com.zhukic.sectionedrecyclerview.SectionedRecyclerViewAdapter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||||
@@ -62,10 +68,29 @@ public class AccettazioneBollaPickingListAdapter extends SectionedRecyclerViewAd
|
|||||||
this.mShowSecondaryUntMis = showSecondaryUntMis;
|
this.mShowSecondaryUntMis = showSecondaryUntMis;
|
||||||
|
|
||||||
mutableDataSet.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
mutableDataSet.addOnListChangedCallback(new OnListGeneralChangedCallback() {
|
||||||
|
@RequiresApi(api = Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(ObservableList sender) {
|
public void onChanged(ObservableList sender) {
|
||||||
|
List<AccettazioneBollaPickingListModel> listaOrdinata = new ArrayList<>();
|
||||||
|
if (!sender.isEmpty()) {
|
||||||
|
listaOrdinata = new ArrayList<>(sender);
|
||||||
|
|
||||||
|
Collections.sort(listaOrdinata, (a, b) -> {
|
||||||
|
|
||||||
|
boolean condA = a.getQtaEvasa().subtract(a.getQtaTot()).floatValue() == 0;
|
||||||
|
boolean condB = b.getQtaEvasa().subtract(b.getQtaTot()).floatValue() == 0;
|
||||||
|
|
||||||
|
if (condA && !condB) {
|
||||||
|
return -1;
|
||||||
|
} else if (!condA && condB) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
mDataset.clear();
|
mDataset.clear();
|
||||||
mDataset.addAll(sender);
|
mDataset.addAll(listaOrdinata);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
notifyDataChanged();
|
notifyDataChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package it.integry.integrywmsnative.gest.contab_doc_interni.dialog;
|
|||||||
import androidx.lifecycle.MutableLiveData;
|
import androidx.lifecycle.MutableLiveData;
|
||||||
import androidx.lifecycle.ViewModel;
|
import androidx.lifecycle.ViewModel;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -36,7 +37,8 @@ public class DialogSelectDocInfoViewModel extends ViewModel {
|
|||||||
private final MutableLiveData<Boolean> noteRequired = new MutableLiveData<>(false);
|
private final MutableLiveData<Boolean> noteRequired = new MutableLiveData<>(false);
|
||||||
|
|
||||||
public DialogSelectDocInfoViewModel() {
|
public DialogSelectDocInfoViewModel() {
|
||||||
List<String> requestNumDocList = Arrays.asList(SettingsManager.iDB().getDocInterniRequestNumDoc().split("\\|"));
|
String docInterniRequestNumDoc = SettingsManager.iDB().getDocInterniRequestNumDoc();
|
||||||
|
List<String> requestNumDocList = docInterniRequestNumDoc != null ? Arrays.asList(docInterniRequestNumDoc.split("\\|")) : new ArrayList<>();
|
||||||
|
|
||||||
tipoDoc.observeForever(val -> fornitoreRequired.postValue(val != null && (val.getGestioneDoc().equals("T") || val.getGestioneDoc().equals("A") || (val.getGestioneDoc().equals("P") && !val.getGestione().equals("L")))));
|
tipoDoc.observeForever(val -> fornitoreRequired.postValue(val != null && (val.getGestioneDoc().equals("T") || val.getGestioneDoc().equals("A") || (val.getGestioneDoc().equals("P") && !val.getGestione().equals("L")))));
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ public class ListaBancaliActivity extends BaseActivity implements ListaBancaliVi
|
|||||||
.create()
|
.create()
|
||||||
.inject(this);
|
.inject(this);
|
||||||
|
|
||||||
|
mViewModel.setListener(this);
|
||||||
|
|
||||||
mCanRecoverUl = DataCache.retrieveItem(getIntent().getStringExtra(Key.CanRecoverUL));
|
mCanRecoverUl = DataCache.retrieveItem(getIntent().getStringExtra(Key.CanRecoverUL));
|
||||||
mReportName = DataCache.retrieveItem(getIntent().getStringExtra(Key.ReportName));
|
mReportName = DataCache.retrieveItem(getIntent().getStringExtra(Key.ReportName));
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import it.integry.integrywmsnative.core.interfaces.ISearchableFragment;
|
|||||||
import it.integry.integrywmsnative.core.interfaces.ISelectAllFragment;
|
import it.integry.integrywmsnative.core.interfaces.ISelectAllFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||||
import it.integry.integrywmsnative.core.menu.MenuService;
|
import it.integry.integrywmsnative.core.menu.MenuService;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||||
import it.integry.integrywmsnative.core.update.UpdatesManager;
|
import it.integry.integrywmsnative.core.update.UpdatesManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityContext;
|
import it.integry.integrywmsnative.core.utility.UtilityContext;
|
||||||
@@ -69,6 +70,9 @@ public class MainActivity extends BaseActivity
|
|||||||
@Inject
|
@Inject
|
||||||
UpdatesManager updatesManager;
|
UpdatesManager updatesManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
SystemRESTConsumer systemRESTConsumer;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
DialogProgressView mDialogProgressView;
|
DialogProgressView mDialogProgressView;
|
||||||
|
|
||||||
@@ -85,7 +89,7 @@ public class MainActivity extends BaseActivity
|
|||||||
mBinding = DataBindingUtil.inflate(LayoutInflater.from(this), R.layout.activity_main, null, false);
|
mBinding = DataBindingUtil.inflate(LayoutInflater.from(this), R.layout.activity_main, null, false);
|
||||||
setContentView(mBinding.getRoot());
|
setContentView(mBinding.getRoot());
|
||||||
|
|
||||||
updatesManager.init(this);
|
updatesManager.init(this, systemRESTConsumer);
|
||||||
UtilityContext.initMainActivity(this);
|
UtilityContext.initMainActivity(this);
|
||||||
|
|
||||||
setSupportActionBar(mBinding.appBarMain.toolbar);
|
setSupportActionBar(mBinding.appBarMain.toolbar);
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliLavorazioneRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliLavorazioneRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliMagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.ColliSpedizioneRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
import it.integry.integrywmsnative.core.rest.model.uds.CloseUDSResponseDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
import it.integry.integrywmsnative.core.rest.watcher.ServerStatusChecker;
|
||||||
@@ -51,6 +52,7 @@ import it.integry.integrywmsnative.core.utility.UtilityResources;
|
|||||||
import it.integry.integrywmsnative.databinding.FragmentMainBinding;
|
import it.integry.integrywmsnative.databinding.FragmentMainBinding;
|
||||||
import it.integry.integrywmsnative.databinding.FragmentMainMenuGroupLayoutBinding;
|
import it.integry.integrywmsnative.databinding.FragmentMainMenuGroupLayoutBinding;
|
||||||
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
import it.integry.integrywmsnative.ui.ElevatedToolbar;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.switch_user_depo.DialogSwitchUserDepoView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple {@link Fragment} subclass.
|
* A simple {@link Fragment} subclass.
|
||||||
@@ -153,6 +155,8 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
|||||||
initSessionData();
|
initSessionData();
|
||||||
|
|
||||||
initRecuperoCollo();
|
initRecuperoCollo();
|
||||||
|
|
||||||
|
mBindings.switchDepoButton.setVisibility(SettingsManager.iDB().getAvailableCodMdep().size() > 1 ? View.VISIBLE : View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initSessionData() {
|
private void initSessionData() {
|
||||||
@@ -278,8 +282,8 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
|||||||
|
|
||||||
private void initGestMenu() {
|
private void initGestMenu() {
|
||||||
int menuSpanCount = 2;
|
int menuSpanCount = 2;
|
||||||
if (UtilityDimension.getDisplayInchs(this.getActivity()) > 8) menuSpanCount = 4;
|
if (UtilityDimension.getDisplayInchs(this.requireActivity()) > 8) menuSpanCount = 4;
|
||||||
else if (UtilityDimension.getDisplayInchs(this.getActivity()) > 6.5) menuSpanCount = 3;
|
else if (UtilityDimension.getDisplayInchs(this.requireActivity()) > 6.5) menuSpanCount = 3;
|
||||||
|
|
||||||
MenuConfiguration baseMenuConfiguration = new MenuConfiguration();
|
MenuConfiguration baseMenuConfiguration = new MenuConfiguration();
|
||||||
List<MenuConfiguration.MenuGroup> menuGroups = baseMenuConfiguration.getGroups();
|
List<MenuConfiguration.MenuGroup> menuGroups = baseMenuConfiguration.getGroups();
|
||||||
@@ -319,7 +323,7 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
|||||||
|
|
||||||
|
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
exception.printStackTrace();
|
UtilityExceptions.defaultException(requireActivity(), exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -421,4 +425,14 @@ public class MainFragment extends Fragment implements ITitledFragment, IScrollab
|
|||||||
colorFadeTitleTextColor.setDuration(animationTimeMillis);
|
colorFadeTitleTextColor.setDuration(animationTimeMillis);
|
||||||
colorFadeTitleTextColor.start();
|
colorFadeTitleTextColor.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void changeUserDepo() {
|
||||||
|
DialogSwitchUserDepoView.newInstance(SettingsManager.iDB().getAvailableCodMdep(), this::onUserDepoChanged)
|
||||||
|
.show(getParentFragmentManager(), "switch-user-depo");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onUserDepoChanged(AvailableCodMdepsDTO newDepo) {
|
||||||
|
SettingsManager.i().getUserSession().setDepo(newDepo);
|
||||||
|
initSessionData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,11 +50,12 @@ import it.integry.integrywmsnative.gest.spedizione.exceptions.InvalidPesoKGExcep
|
|||||||
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
import it.integry.integrywmsnative.gest.spedizione.model.PickedQuantityDTO;
|
||||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentView;
|
||||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUView;
|
import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAggiuntiveLUView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
||||||
|
|
||||||
public class PickingResiActivity extends BaseActivity implements BottomSheetFragmentLUContentView.Listener, BottomSheetFragmentLUContentViewModel.Listener, PickingResiViewModel.Listener {
|
public class PickingResiActivity extends BaseActivity implements BottomSheetFragmentLUContentView.Listener, BottomSheetFragmentLUContentViewModel.Listener, PickingResiViewModel.Listener {
|
||||||
|
|
||||||
@@ -392,14 +393,18 @@ public class PickingResiActivity extends BaseActivity implements BottomSheetFrag
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLUPrintRequest(RunnableArgs<Boolean> onComplete) {
|
public void onLUPrintRequest(RunnableArgs<Boolean> onComplete) {
|
||||||
DialogAskShouldPrint.make(this, "Packing List", onComplete).show();
|
DialogYesNoView.newInstance(getString(R.string.action_print),
|
||||||
|
String.format(getString(R.string.message_print_packing_list), "Packing List"),
|
||||||
|
result -> {
|
||||||
|
onComplete.run(result == DialogConsts.Results.YES);
|
||||||
|
})
|
||||||
|
.show(getSupportFragmentManager(), "dialog-print");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLUPrintError(Exception ex, Runnable onComplete) {
|
public void onLUPrintError(Exception ex, Runnable onComplete) {
|
||||||
this.onLoadingEnded();
|
this.onLoadingEnded();
|
||||||
DialogSimpleMessageView.makeErrorDialog(
|
DialogSimpleMessageView.makeErrorDialog(new SpannableString(ex.getMessage()),
|
||||||
new SpannableString(ex.getMessage()),
|
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
R.string.button_ignore_print,
|
R.string.button_ignore_print,
|
||||||
|
|||||||
@@ -195,6 +195,9 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
mtbColtScarico.getMtbColr().add(mtbColrScarico);
|
mtbColtScarico.getMtbColr().add(mtbColrScarico);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BigDecimal qtaColToSave;
|
BigDecimal qtaColToSave;
|
||||||
BigDecimal numCnfToSave;
|
BigDecimal numCnfToSave;
|
||||||
if (SettingsManager.iDB().isFlagForceAllToColli() || (item.getMtbAart() != null && !item.getMtbAart().isFlagQtaCnfFissaBoolean())) {
|
if (SettingsManager.iDB().isFlagForceAllToColli() || (item.getMtbAart() != null && !item.getMtbAart().isFlagQtaCnfFissaBoolean())) {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class ProdRecuperMaterialeRESTConsumer extends _BaseRESTConsumer {
|
|||||||
" dtb_ord_steps.hr_num as hr, " +
|
" dtb_ord_steps.hr_num as hr, " +
|
||||||
" mtb_colr.riga_ord, " +
|
" mtb_colr.riga_ord, " +
|
||||||
" CONVERT(INTEGER, ROUND((CAST(dtb_ord_steps.hr_num AS DECIMAL(20, 5)) / " +
|
" CONVERT(INTEGER, ROUND((CAST(dtb_ord_steps.hr_num AS DECIMAL(20, 5)) / " +
|
||||||
" SUM(dtb_ord_steps.hr_num) OVER (PARTITION BY mtb_colr.num_collo)) * 100, " +
|
" SUM(CASE WHEN dtb_ord_steps.hr_num > 0 then dtb_ord_steps.hr_num else 1 end) OVER (PARTITION BY mtb_colr.num_collo)) * 100, " +
|
||||||
" 0)) as percentage_hr " +
|
" 0)) as percentage_hr " +
|
||||||
" FROM mtb_colr " +
|
" FROM mtb_colr " +
|
||||||
" INNER JOIN mtb_colt ON mtb_colr.num_collo = mtb_colt.num_collo " +
|
" INNER JOIN mtb_colt ON mtb_colr.num_collo = mtb_colt.num_collo " +
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ public class ProdRiposizionamentoDaProdViewModel {
|
|||||||
this.sendError(new ScannedPositionNotExistException());
|
this.sendError(new ScannedPositionNotExistException());
|
||||||
} else {
|
} else {
|
||||||
if (mtbColt != null) {
|
if (mtbColt != null) {
|
||||||
mColliMagazzinoRESTConsumer.changePosizione(mtbColt, mtbDepoPosizione, () -> {
|
mColliMagazzinoRESTConsumer.spostaUL(mtbColt, mtbDepoPosizione, () -> {
|
||||||
List<MvwSitArtUdcDetInventario> mvwSitArtUdcDetInventarioList = mMvwSitArtUdcDetInventarioLiveData.getValue();
|
List<MvwSitArtUdcDetInventario> mvwSitArtUdcDetInventarioList = mMvwSitArtUdcDetInventarioLiveData.getValue();
|
||||||
|
|
||||||
if (mvwSitArtUdcDetInventarioList != null) {
|
if (mvwSitArtUdcDetInventarioList != null) {
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity implements PVOrdi
|
|||||||
}
|
}
|
||||||
String testataOrdString = String.format(this.getString(R.string.ord_acq_testata), ordine.getOrdineId(), UtilityDate.formatDate(ordine.getDataIns(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
String testataOrdString = String.format(this.getString(R.string.ord_acq_testata), ordine.getOrdineId(), UtilityDate.formatDate(ordine.getDataIns(), UtilityDate.COMMONS_DATE_FORMATS.DMY_HUMAN));
|
||||||
mBinding.orderIdentifier.setText(Html.fromHtml(testataOrdString));
|
mBinding.orderIdentifier.setText(Html.fromHtml(testataOrdString));
|
||||||
FabMenuCustomAnimations.changeIconOnFocus(mBinding.closeActivityFab, R.drawable.ic_check_white_24dp, R.drawable.ic_close_24dp);
|
FabMenuCustomAnimations.changeIconOnFocus(mBinding.closeActivityFab, R.drawable.ic_round_check_24, R.drawable.ic_close_24dp);
|
||||||
|
|
||||||
|
|
||||||
initBarcodeReader();
|
initBarcodeReader();
|
||||||
|
|||||||
@@ -130,8 +130,10 @@ public class DialogScanGrigliaAcquistoView extends BaseDialogFragment {
|
|||||||
this.onLoadingStarted();
|
this.onLoadingStarted();
|
||||||
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
|
||||||
pvOrdiniAcquistoRESTConsumer.retrieveArticoli(codAlis, codMdep, dto -> {
|
pvOrdiniAcquistoRESTConsumer.retrieveArticoli(codAlis, codMdep, dto -> {
|
||||||
|
|
||||||
this.onLoadingEnded();
|
this.onLoadingEnded();
|
||||||
if (dto.getArticoli().size() == 0) {
|
|
||||||
|
if (dto.getArticoli().isEmpty()) {
|
||||||
if (UtilityString.isNullOrEmpty(codAlis)) {
|
if (UtilityString.isNullOrEmpty(codAlis)) {
|
||||||
onFailed.run(new NoArtsFoundException());
|
onFailed.run(new NoArtsFoundException());
|
||||||
} else {
|
} else {
|
||||||
@@ -146,6 +148,7 @@ public class DialogScanGrigliaAcquistoView extends BaseDialogFragment {
|
|||||||
mGriglia.setDescrDepo(dto.getDescrDepo());
|
mGriglia.setDescrDepo(dto.getDescrDepo());
|
||||||
mListArticoli = dto.getArticoli();
|
mListArticoli = dto.getArticoli();
|
||||||
this.dismiss();
|
this.dismiss();
|
||||||
|
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ import android.view.inputmethod.EditorInfo;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.widget.AppCompatTextView;
|
import androidx.appcompat.widget.AppCompatTextView;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.content.res.ResourcesCompat;
|
|
||||||
import androidx.databinding.DataBindingUtil;
|
|
||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
@@ -63,6 +61,7 @@ import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
|||||||
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLUView;
|
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLUView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArtsView;
|
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArtsView;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.create_new_art.DialogCreateNewArtView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||||
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView;
|
import it.integry.integrywmsnative.view.dialogs.scan_or_create_lu.DialogScanOrCreateLUView;
|
||||||
@@ -142,7 +141,7 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
|
|
||||||
setRetainInstance(true);
|
setRetainInstance(true);
|
||||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_main_rettifica_giacenze, container, false);
|
mBinding = FragmentMainRettificaGiacenzeBinding.inflate(inflater, container, false);
|
||||||
|
|
||||||
|
|
||||||
mBinding.setLifecycleOwner(this);
|
mBinding.setLifecycleOwner(this);
|
||||||
@@ -205,14 +204,17 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
mBinding.autoCompleteFornitori.setOnFocusChangeListener((v, hasFocus) -> {
|
mBinding.autoCompleteFornitori.setOnFocusChangeListener((v, hasFocus) -> {
|
||||||
|
if (hasFocus)
|
||||||
setUIToForn();
|
setUIToForn();
|
||||||
});
|
});
|
||||||
|
|
||||||
mBinding.inputCodArtDescrForn.setOnFocusChangeListener((v, hasFocus) -> {
|
mBinding.inputCodArtDescrForn.setOnFocusChangeListener((v, hasFocus) -> {
|
||||||
|
if (hasFocus)
|
||||||
setUIToForn();
|
setUIToForn();
|
||||||
});
|
});
|
||||||
|
|
||||||
mBinding.inputCodArtDescrInt.setOnFocusChangeListener((v, hasFocus) -> {
|
mBinding.inputCodArtDescrInt.setOnFocusChangeListener((v, hasFocus) -> {
|
||||||
|
if (hasFocus)
|
||||||
setUIToIntArt();
|
setUIToIntArt();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -238,23 +240,30 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
|
|
||||||
public void setUIToForn() {
|
public void setUIToForn() {
|
||||||
mBinding.rettificaGiacenzeFornCheckBox.setChecked(true);
|
mBinding.rettificaGiacenzeFornCheckBox.setChecked(true);
|
||||||
mBinding.rettificaGiacenzeFornLayout.setBackground(ResourcesCompat.getDrawable(getActivity().getResources(), R.drawable.circular_background_left, null));
|
|
||||||
mBinding.rettificaGiacenzeFornLayout.setBackgroundTintList(ColorStateList.valueOf(getActivity().getResources().getColor(R.color.alpha_blue_500)));
|
mBinding.rettificaGiacenzeFornLayout.setBackgroundTintList(ColorStateList.valueOf(getActivity().getResources().getColor(R.color.alpha_blue_500)));
|
||||||
|
|
||||||
mBinding.rettificaGiacenzeArtIntCheckBox.setChecked(false);
|
mBinding.rettificaGiacenzeArtIntCheckBox.setChecked(false);
|
||||||
mBinding.rettificaGiacenzeArtIntLayout.setBackground(null);
|
|
||||||
mBinding.rettificaGiacenzeArtIntLayout.setBackgroundTintList(null);
|
mBinding.rettificaGiacenzeArtIntLayout.setBackgroundTintList(null);
|
||||||
|
|
||||||
|
mBinding.inputCodArtDescrInt.clearFocus();
|
||||||
|
|
||||||
|
if (!mBinding.inputCodArtDescrForn.hasFocus() && !mBinding.autoCompleteFornitori.hasFocus()) {
|
||||||
|
mBinding.inputCodArtDescrForn.clearFocus();
|
||||||
|
mBinding.autoCompleteFornitori.requestFocusFromTouch();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setUIToIntArt() {
|
public void setUIToIntArt() {
|
||||||
mBinding.rettificaGiacenzeArtIntCheckBox.setChecked(true);
|
mBinding.rettificaGiacenzeArtIntCheckBox.setChecked(true);
|
||||||
mBinding.rettificaGiacenzeArtIntLayout.setBackground(ResourcesCompat.getDrawable(getActivity().getResources(), R.drawable.circular_background_left, null));
|
|
||||||
mBinding.rettificaGiacenzeArtIntLayout.setBackgroundTintList(ColorStateList.valueOf(getActivity().getResources().getColor(R.color.alpha_blue_500)));
|
mBinding.rettificaGiacenzeArtIntLayout.setBackgroundTintList(ColorStateList.valueOf(getActivity().getResources().getColor(R.color.alpha_blue_500)));
|
||||||
|
|
||||||
mBinding.rettificaGiacenzeFornCheckBox.setChecked(false);
|
mBinding.rettificaGiacenzeFornCheckBox.setChecked(false);
|
||||||
mBinding.rettificaGiacenzeFornLayout.setBackground(null);
|
|
||||||
mBinding.rettificaGiacenzeFornLayout.setBackgroundTintList(null);
|
mBinding.rettificaGiacenzeFornLayout.setBackgroundTintList(null);
|
||||||
|
|
||||||
|
mBinding.inputCodArtDescrForn.clearFocus();
|
||||||
|
mBinding.autoCompleteFornitori.clearFocus();
|
||||||
|
mBinding.inputCodArtDescrInt.requestFocusFromTouch();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -295,13 +304,22 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
mViewModel.searchArtInt(mBinding.inputCodArtDescrInt.getText().toString(), null);
|
mViewModel.searchArtInt(mBinding.inputCodArtDescrInt.getText().toString(), null, null);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRequestNewArtCreation(String description, BarcodeScanDTO barcode) {
|
||||||
|
DialogCreateNewArtView.newInstance(description, barcode, currentMtbColtObs.get().getPosizione(),
|
||||||
|
createdCodMart -> {
|
||||||
|
mViewModel.searchArtInt(createdCodMart, null, null);
|
||||||
|
})
|
||||||
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed) {
|
public void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed) {
|
||||||
new DialogChooseArtFromListaArtsView(true, artList, onArtChoosed)
|
new DialogChooseArtFromListaArtsView(true, artList, onArtChoosed)
|
||||||
@@ -418,10 +436,11 @@ public class RettificaGiacenzeFragment extends BaseFragment implements ITitledFr
|
|||||||
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
onComplete.run(pickedQuantityDTO, shouldCloseLU);
|
||||||
})
|
})
|
||||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
.show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
}, () -> {});
|
}, () -> {
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkIfItemIsActive(String flagStato, String codMart, Runnable onContinue, Runnable onNegativeClick){
|
private void checkIfItemIsActive(String flagStato, String codMart, Runnable onContinue, Runnable onNegativeClick) {
|
||||||
if (flagStato.equalsIgnoreCase("I")) {
|
if (flagStato.equalsIgnoreCase("I")) {
|
||||||
DialogSimpleMessageView.makeWarningDialog(
|
DialogSimpleMessageView.makeWarningDialog(
|
||||||
new SpannableString(Html.fromHtml(String.format(UtilityResources.getString(R.string.item_not_enabled), codMart))),
|
new SpannableString(Html.fromHtml(String.format(UtilityResources.getString(R.string.item_not_enabled), codMart))),
|
||||||
|
|||||||
@@ -111,7 +111,10 @@ public class RettificaGiacenzeViewModel {
|
|||||||
|
|
||||||
|
|
||||||
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
public void processBarcodeDTO(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||||
if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
if(UtilityBarcode.isEtichettaPosizione(barcodeScanDTO)) {
|
||||||
|
//Not implemented now
|
||||||
|
onComplete.run();
|
||||||
|
} else if (UtilityBarcode.isEtichetta128(barcodeScanDTO)) {
|
||||||
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
||||||
this.executeEtichettaEan128(barcodeScanDTO, onComplete);
|
this.executeEtichettaEan128(barcodeScanDTO, onComplete);
|
||||||
|
|
||||||
@@ -120,7 +123,7 @@ public class RettificaGiacenzeViewModel {
|
|||||||
this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
this.executeEtichettaEanPeso(barcodeScanDTO, onComplete);
|
||||||
|
|
||||||
} else if (UtilityBarcode.isEtichettaArt(barcodeScanDTO)) {
|
} else if (UtilityBarcode.isEtichettaArt(barcodeScanDTO)) {
|
||||||
this.searchArtInt(barcodeScanDTO.getStringValue(), onComplete);
|
this.searchArtInt(null, barcodeScanDTO, onComplete);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
onComplete.run();
|
onComplete.run();
|
||||||
@@ -145,9 +148,9 @@ public class RettificaGiacenzeViewModel {
|
|||||||
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
if (!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||||
|
|
||||||
PickDataDTO pickDataDTO = PickDataDTO.fromEan128(ean128Model);
|
PickDataDTO pickDataDTO = PickDataDTO.fromEan128(ean128Model);
|
||||||
this.loadArticolo(barcodeProd, pickDataDTO, onComplete);
|
this.loadArticolo(barcodeProd, pickDataDTO, barcodeScanDTO, onComplete);
|
||||||
} else if (!UtilityString.isNullOrEmpty(codMart)) {
|
} else if (!UtilityString.isNullOrEmpty(codMart)) {
|
||||||
this.searchArtInt(codMart, onComplete);
|
this.searchArtInt(codMart, barcodeScanDTO, onComplete);
|
||||||
} else {
|
} else {
|
||||||
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||||
onComplete.run();
|
onComplete.run();
|
||||||
@@ -158,18 +161,18 @@ public class RettificaGiacenzeViewModel {
|
|||||||
private void executeEtichettaEanPeso(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
private void executeEtichettaEanPeso(BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||||
try {
|
try {
|
||||||
Ean13PesoModel ean13PesoModel = Ean13PesoModel.fromBarcode(barcodeScanDTO.getStringValue());
|
Ean13PesoModel ean13PesoModel = Ean13PesoModel.fromBarcode(barcodeScanDTO.getStringValue());
|
||||||
this.loadArticolo(ean13PesoModel.getPrecode(), PickDataDTO.fromEan128(ean13PesoModel.toEan128()), onComplete);
|
this.loadArticolo(ean13PesoModel.getPrecode(), PickDataDTO.fromEan128(ean13PesoModel.toEan128()), barcodeScanDTO, onComplete);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
this.sendError(ex);
|
this.sendError(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadArticolo(String barcodeProd, PickDataDTO pickData, Runnable onComplete) {
|
private void loadArticolo(String barcodeProd, PickDataDTO pickData, BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||||
this.mArticoloRESTConsumer.searchByBarcode(barcodeProd, mtbAartList -> {
|
this.mArticoloRESTConsumer.searchByBarcode(barcodeProd, mtbAartList -> {
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
|
|
||||||
if (mtbAartList != null && !mtbAartList.isEmpty()) {
|
if (mtbAartList != null && !mtbAartList.isEmpty()) {
|
||||||
this.dispatchArts(mtbAartList, pickData);
|
this.dispatchArts(mtbAartList, pickData, null, barcodeScanDTO);
|
||||||
} else {
|
} else {
|
||||||
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
this.sendError(new NoResultFromBarcodeException(barcodeProd));
|
||||||
}
|
}
|
||||||
@@ -190,24 +193,28 @@ public class RettificaGiacenzeViewModel {
|
|||||||
.map(x -> (MtbAart) x.getMtbAart())
|
.map(x -> (MtbAart) x.getMtbAart())
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
dispatchArts(mtbAarts, null);
|
dispatchArts(mtbAarts, null, queryText, null);
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void searchArtInt(String queryText, Runnable onComplete) {
|
public void searchArtInt(String queryText, BarcodeScanDTO barcodeScanDTO, Runnable onComplete) {
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
mRettificaGiacenzeRESTConsumer.searchArtInt(queryText, listaArts -> {
|
String barcode = barcodeScanDTO != null ? barcodeScanDTO.getStringValue() : null;
|
||||||
|
mRettificaGiacenzeRESTConsumer.searchArtInt(UtilityString.isNull(queryText, barcode), listaArts -> {
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
|
|
||||||
dispatchArts(listaArts, null);
|
dispatchArts(listaArts, null, queryText, barcodeScanDTO);
|
||||||
|
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dispatchArts(List<MtbAart> artsList, PickDataDTO pickData) {
|
private void dispatchArts(List<MtbAart> artsList, PickDataDTO pickData, String description, BarcodeScanDTO barcodeProd) {
|
||||||
if (artsList == null || artsList.size() == 0) {
|
if (artsList == null || artsList.isEmpty()) {
|
||||||
|
if(SettingsManager.iDB().isFlagEnableArtCreation())
|
||||||
|
this.sendRequestNewArtCreation(description, barcodeProd);
|
||||||
|
else
|
||||||
this.sendError(new NoArtsFoundException());
|
this.sendError(new NoArtsFoundException());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -556,8 +563,6 @@ public class RettificaGiacenzeViewModel {
|
|||||||
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, LocalDate dataScad, boolean shouldCloseLU) {
|
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, LocalDate dataScad, boolean shouldCloseLU) {
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
// if(!mIsCreatedLU && mCurrentMtbColt.isDocumentPresent()) {
|
|
||||||
|
|
||||||
this.mColliMagazzinoRESTConsumer.creaRettificaCollo(
|
this.mColliMagazzinoRESTConsumer.creaRettificaCollo(
|
||||||
mtbColrToUpdate,
|
mtbColrToUpdate,
|
||||||
numCnf,
|
numCnf,
|
||||||
@@ -579,47 +584,6 @@ public class RettificaGiacenzeViewModel {
|
|||||||
},
|
},
|
||||||
this::sendError
|
this::sendError
|
||||||
);
|
);
|
||||||
|
|
||||||
// } else {
|
|
||||||
//
|
|
||||||
// MtbColt mtbColt = new MtbColt()
|
|
||||||
// .setNumCollo(mtbColrToUpdate.getNumCollo())
|
|
||||||
// .setDataCollo(mtbColrToUpdate.getDataColloS())
|
|
||||||
// .setSerCollo(mtbColrToUpdate.getSerCollo())
|
|
||||||
// .setGestione(mtbColrToUpdate.getGestione())
|
|
||||||
// .setMtbColr(new ObservableArrayList<>());
|
|
||||||
// mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
|
||||||
//
|
|
||||||
// final MtbColr mtbColr = (MtbColr) mtbColrToUpdate.clone();
|
|
||||||
// mtbColr
|
|
||||||
// .setNumCnf(numCnf.subtract(mtbColr.getNumCnf()))
|
|
||||||
// .setQtaCnf(qtaCnf)
|
|
||||||
// .setQtaCol(qtaTot.subtract(mtbColr.getQtaCol()))
|
|
||||||
// .setPartitaMag(partitaMag)
|
|
||||||
// .setDataScadPartita(dataScad)
|
|
||||||
// .setUtente(SettingsManager.i().getUser().getFullname())
|
|
||||||
// .setCausale(MtbColr.Causale.RETTIFICA)
|
|
||||||
// .setDatetimeRow(UtilityDate.getDateInstance())
|
|
||||||
// .setOperation(CommonModelConsts.OPERATION.INSERT);
|
|
||||||
//
|
|
||||||
// mtbColt.getMtbColr().add(mtbColr);
|
|
||||||
//
|
|
||||||
// this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
|
||||||
//
|
|
||||||
// mtbColr.setNumCnf(numCnf)
|
|
||||||
// .setQtaCnf(qtaCnf)
|
|
||||||
// .setQtaCol(qtaTot);
|
|
||||||
//
|
|
||||||
// this.mCurrentMtbColt.getMtbColr().remove(mtbColrToUpdate);
|
|
||||||
// this.mCurrentMtbColt.getMtbColr().add(mtbColr);
|
|
||||||
//
|
|
||||||
// this.mAnyEditDone = true;
|
|
||||||
//
|
|
||||||
// this.sendOnRowSaved();
|
|
||||||
// this.sendOnLoadingEnded();
|
|
||||||
//
|
|
||||||
// }, this::sendError);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteRow(MtbColr mtbColrToDelete) {
|
public void deleteRow(MtbColr mtbColrToDelete) {
|
||||||
@@ -627,7 +591,6 @@ public class RettificaGiacenzeViewModel {
|
|||||||
if (shouldDelete) {
|
if (shouldDelete) {
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
// if(!mIsCreatedLU && mCurrentMtbColt.isDocumentPresent()) {
|
|
||||||
this.mColliMagazzinoRESTConsumer.creaRettificaCollo(
|
this.mColliMagazzinoRESTConsumer.creaRettificaCollo(
|
||||||
mtbColrToDelete,
|
mtbColrToDelete,
|
||||||
BigDecimal.ZERO,
|
BigDecimal.ZERO,
|
||||||
@@ -639,37 +602,6 @@ public class RettificaGiacenzeViewModel {
|
|||||||
},
|
},
|
||||||
this::sendError
|
this::sendError
|
||||||
);
|
);
|
||||||
// } else {
|
|
||||||
// MtbColt mtbColt = new MtbColt()
|
|
||||||
// .setNumCollo(mtbColrToDelete.getNumCollo())
|
|
||||||
// .setDataCollo(mtbColrToDelete.getDataColloS())
|
|
||||||
// .setSerCollo(mtbColrToDelete.getSerCollo())
|
|
||||||
// .setGestione(mtbColrToDelete.getGestione())
|
|
||||||
// .setMtbColr(new ObservableArrayList<>());
|
|
||||||
// mtbColt.setOperation(CommonModelConsts.OPERATION.NO_OP);
|
|
||||||
//
|
|
||||||
// MtbColr mtbColr = (MtbColr) mtbColrToDelete.clone();
|
|
||||||
// mtbColr
|
|
||||||
// .setNumCnf(mtbColr.getNumCnf().multiply(new BigDecimal(-1)))
|
|
||||||
// .setQtaCnf(mtbColr.getQtaCnf())
|
|
||||||
// .setQtaCol(mtbColr.getQtaCol().multiply(new BigDecimal(-1)))
|
|
||||||
// .setPartitaMag(mtbColr.getPartitaMag())
|
|
||||||
// .setDataScadPartita(mtbColr.getDataScadPartitaD())
|
|
||||||
// .setUtente(SettingsManager.i().getUser().getFullname())
|
|
||||||
// .setCausale(MtbColr.Causale.RETTIFICA)
|
|
||||||
// .setDatetimeRow(UtilityDate.getDateInstance())
|
|
||||||
// .setOperation(CommonModelConsts.OPERATION.INSERT);
|
|
||||||
//
|
|
||||||
// mtbColt.getMtbColr().add(mtbColr);
|
|
||||||
//
|
|
||||||
// this.mColliMagazzinoRESTConsumer.saveCollo(mtbColt, (value) -> {
|
|
||||||
// this.mCurrentMtbColt.getMtbColr().remove(mtbColrToDelete);
|
|
||||||
//
|
|
||||||
// this.sendOnRowSaved();
|
|
||||||
// this.sendOnLoadingEnded();
|
|
||||||
//
|
|
||||||
// }, this::sendError);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -686,6 +618,10 @@ public class RettificaGiacenzeViewModel {
|
|||||||
if (this.mListener != null) mListener.onFornitoriLoaded(fornitoriList);
|
if (this.mListener != null) mListener.onFornitoriLoaded(fornitoriList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void sendRequestNewArtCreation(String description, BarcodeScanDTO barcode) {
|
||||||
|
if(this.mListener != null) mListener.onRequestNewArtCreation(description, barcode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void sendOnArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed) {
|
private void sendOnArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed) {
|
||||||
if (this.mListener != null) mListener.onArtListLoaded(artList, onArtChoosed);
|
if (this.mListener != null) mListener.onArtListLoaded(artList, onArtChoosed);
|
||||||
@@ -777,6 +713,8 @@ public class RettificaGiacenzeViewModel {
|
|||||||
|
|
||||||
void onFornitoriLoaded(ArrayList<FornitoreDTO> fornitoriList);
|
void onFornitoriLoaded(ArrayList<FornitoreDTO> fornitoriList);
|
||||||
|
|
||||||
|
void onRequestNewArtCreation(String description, BarcodeScanDTO barcode);
|
||||||
|
|
||||||
void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed);
|
void onArtListLoaded(ArrayList<MtbAart> artList, RunnableArgs<MtbAart> onArtChoosed);
|
||||||
|
|
||||||
void onLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgss<MtbColt, Boolean> onComplete);
|
void onLUOpenRequest(boolean enableCreation, boolean checkIfDocumentExists, boolean warnOnOpeningVendita, RunnableArgss<MtbColt, Boolean> onComplete);
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import androidx.preference.PreferenceFragmentCompat;
|
|||||||
import androidx.sqlite.db.SimpleSQLiteQuery;
|
import androidx.sqlite.db.SimpleSQLiteQuery;
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
|
||||||
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
import com.harrysoft.androidbluetoothserial.BluetoothManager;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@@ -45,6 +44,7 @@ import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
|||||||
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.rest.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.rest.model.MailAttachmentDTO;
|
import it.integry.integrywmsnative.core.rest.model.MailAttachmentDTO;
|
||||||
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
import it.integry.integrywmsnative.core.rest.model.MailRequestDTO;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
import it.integry.integrywmsnative.view.dialogs.DialogProgressView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
@@ -293,13 +293,16 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
requireActivity().runOnUiThread(() -> {
|
UtilityExceptions.defaultException(requireContext(), ex);
|
||||||
DialogSimpleMessageView
|
this.closeProgress();
|
||||||
.makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
|
||||||
.show(requireActivity().getSupportFragmentManager(), "tag");
|
|
||||||
});
|
|
||||||
|
|
||||||
FirebaseCrashlytics.getInstance().recordException(ex);
|
// requireActivity().runOnUiThread(() -> {
|
||||||
|
// DialogSimpleMessageView
|
||||||
|
// .makeErrorDialog(new SpannableString(Html.fromHtml(ex.getMessage())), null, null)
|
||||||
|
// .show(requireActivity().getSupportFragmentManager(), "tag");
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// FirebaseCrashlytics.getInstance().recordException(ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@@ -330,6 +333,12 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
String line;
|
String line;
|
||||||
|
|
||||||
while ((line = br.readLine()) != null) {
|
while ((line = br.readLine()) != null) {
|
||||||
|
|
||||||
|
if(!line.matches("\\d{13}.*")) {
|
||||||
|
int lastNewLineChar = text.lastIndexOf("\n");
|
||||||
|
text.deleteCharAt(text.length() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
text.append(line);
|
text.append(line);
|
||||||
text.append('\n');
|
text.append('\n');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFrag
|
|||||||
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
import it.integry.integrywmsnative.view.bottom_sheet__lu_content.BottomSheetFragmentLUContentViewModel;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
import it.integry.integrywmsnative.view.dialogs.DialogConsts;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLUView;
|
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLUView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_should_print.DialogAskShouldPrint;
|
|
||||||
import it.integry.integrywmsnative.view.dialogs.ask_vettore.DialogAskVettoreView;
|
import it.integry.integrywmsnative.view.dialogs.ask_vettore.DialogAskVettoreView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleInputHelper;
|
||||||
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
import it.integry.integrywmsnative.view.dialogs.base.DialogSimpleMessageView;
|
||||||
@@ -81,7 +80,6 @@ import it.integry.integrywmsnative.view.dialogs.info_aggiuntive_lu.DialogInfoAgg
|
|||||||
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUView;
|
import it.integry.integrywmsnative.view.dialogs.input_peso_lu.DialogInputPesoLUView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2DTO;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.DialogInputQuantityV2View;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity_v2.exception.OverflowQtaTotOrderedQuantityException;
|
|
||||||
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtView;
|
import it.integry.integrywmsnative.view.dialogs.scan_art.DialogScanArtView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracciamentoImballiView;
|
import it.integry.integrywmsnative.view.dialogs.tracciamento_imballi.DialogTracciamentoImballiView;
|
||||||
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
import it.integry.integrywmsnative.view.dialogs.yes_no.DialogYesNoView;
|
||||||
@@ -818,7 +816,12 @@ public class SpedizioneActivity extends BaseActivity implements SpedizioneViewMo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLUPrintRequest(RunnableArgs<Boolean> onComplete) {
|
public void onLUPrintRequest(RunnableArgs<Boolean> onComplete) {
|
||||||
DialogAskShouldPrint.make(this, "Packing List", onComplete).show();
|
DialogYesNoView.newInstance(getString(R.string.action_print),
|
||||||
|
String.format(getString(R.string.message_print_packing_list), "Packing List"),
|
||||||
|
result -> {
|
||||||
|
onComplete.run(result == DialogConsts.Results.YES);
|
||||||
|
})
|
||||||
|
.show(getSupportFragmentManager(), "dialog-print");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -855,7 +855,7 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
|
|
||||||
private void loadMatchedRows(List<PickingObjectDTO> matchedRows) {
|
private void loadMatchedRows(List<PickingObjectDTO> matchedRows) {
|
||||||
if (matchedRows == null || matchedRows.size() == 0) {
|
if (matchedRows == null || matchedRows.isEmpty()) {
|
||||||
this.sendError(new NoArtsFoundException());
|
this.sendError(new NoArtsFoundException());
|
||||||
} else if (matchedRows.size() == 1) {
|
} else if (matchedRows.size() == 1) {
|
||||||
PickingObjectDTO matchedItem = matchedRows.get(0);
|
PickingObjectDTO matchedItem = matchedRows.get(0);
|
||||||
@@ -898,9 +898,6 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
public void dispatchOrdineRow(final PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, MtbColr refMtbColr, boolean canPartitaMagBeChanged) {
|
public void dispatchOrdineRow(final PickingObjectDTO pickingObjectDTO, MtbColt refMtbColt, MtbColr refMtbColr, boolean canPartitaMagBeChanged) {
|
||||||
|
|
||||||
//TODO: Al posto di prelevare la prima riga bisognerebbe controllare se c'è ne una che corrisponde con la partita richiesta
|
|
||||||
// MtbColr refMtbColr = refMtbColt != null ? refMtbColt.getMtbColr().get(0) : null;
|
|
||||||
|
|
||||||
|
|
||||||
if (pickingObjectDTO.getTempPickData() != null && pickingObjectDTO.getTempPickData().getSourceMtbColt() != null && pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr() != null) {
|
if (pickingObjectDTO.getTempPickData() != null && pickingObjectDTO.getTempPickData().getSourceMtbColt() != null && pickingObjectDTO.getTempPickData().getSourceMtbColt().getMtbColr() != null) {
|
||||||
|
|
||||||
@@ -942,7 +939,7 @@ public class SpedizioneViewModel {
|
|||||||
if (availableBatchLots.stream().anyMatch(x -> x.getDataScad() == null)) {
|
if (availableBatchLots.stream().anyMatch(x -> x.getDataScad() == null)) {
|
||||||
tmp.addAll(availableBatchLots.stream()
|
tmp.addAll(availableBatchLots.stream()
|
||||||
.filter(x -> x.getDataScad() == null)
|
.filter(x -> x.getDataScad() == null)
|
||||||
.sorted(Comparator.comparing(MtbPartitaMag::getPartitaMag))
|
.sorted(Comparator.comparing(x -> UtilityString.isNull(x.getPartitaMag(), "")))
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1100,8 +1097,12 @@ public class SpedizioneViewModel {
|
|||||||
BigDecimal initialQtaTot = mUseColliPedana ? initialNumCnf.multiply(initialQtaCnf) : mUseQtaOrd ? qtaColDaPrelevare : null;
|
BigDecimal initialQtaTot = mUseColliPedana ? initialNumCnf.multiply(initialQtaCnf) : mUseQtaOrd ? qtaColDaPrelevare : null;
|
||||||
|
|
||||||
MtbColt finalRefMtbColt = refMtbColt;
|
MtbColt finalRefMtbColt = refMtbColt;
|
||||||
|
|
||||||
this.onItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), initialNumCnf, initialQtaCnf, initialQtaTot, qtaDaEvadere, numCnfDaEvadere, qtaCnfDaEvadere, qtaColDaPrelevare, numCnfDaPrelevare, qtaCnfDaPrelevare, totalQtaAvailable, totalNumCnfAvailable, qtaCnfAvailable, partitaMag, dataScad, mCanOverflowOrderQuantity, canPartitaMagBeChanged, (pickedQuantityDTO, shouldCloseLU) -> {
|
this.onItemDispatched(pickingObjectDTO, pickingObjectDTO.getMtbAart(), initialNumCnf, initialQtaCnf, initialQtaTot, qtaDaEvadere, numCnfDaEvadere, qtaCnfDaEvadere, qtaColDaPrelevare, numCnfDaPrelevare, qtaCnfDaPrelevare, totalQtaAvailable, totalNumCnfAvailable, qtaCnfAvailable, partitaMag, dataScad, mCanOverflowOrderQuantity, canPartitaMagBeChanged, (pickedQuantityDTO, shouldCloseLU) -> {
|
||||||
|
|
||||||
this.saveNewRow(pickingObjectDTO, finalRefMtbColt, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag(), pickedQuantityDTO.getDataScad(), shouldCloseLU);
|
this.saveNewRow(pickingObjectDTO, finalRefMtbColt, pickedQuantityDTO.getNumCnf(), pickedQuantityDTO.getQtaCnf(), pickedQuantityDTO.getQtaTot(), pickedQuantityDTO.getPartitaMag(), pickedQuantityDTO.getDataScad(), shouldCloseLU);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1430,7 +1431,9 @@ public class SpedizioneViewModel {
|
|||||||
insertUDSRowRequestDto
|
insertUDSRowRequestDto
|
||||||
.setDataScad(dataScad);
|
.setDataScad(dataScad);
|
||||||
|
|
||||||
this.mColliScaricoRESTConsumer.insertUDSRow(insertUDSRowRequestDto, createdMtbColr -> {
|
executeDepositChangeIfNeeded(refMtbColt,
|
||||||
|
() -> executeTipoUlChangeIfNeeded(refMtbColt,
|
||||||
|
() -> this.mColliScaricoRESTConsumer.insertUDSRow(insertUDSRowRequestDto, createdMtbColr -> {
|
||||||
pickingObjectDTO.getWithdrawMtbColrs().add(createdMtbColr);
|
pickingObjectDTO.getWithdrawMtbColrs().add(createdMtbColr);
|
||||||
this.mCurrentMtbColt.getMtbColr().add(createdMtbColr);
|
this.mCurrentMtbColt.getMtbColr().add(createdMtbColr);
|
||||||
|
|
||||||
@@ -1448,7 +1451,7 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
if (refMtbColt != null) {
|
if (refMtbColt != null) {
|
||||||
|
|
||||||
MtbColr originalRefMtbColr = refMtbColt.getMtbColr() != null && refMtbColt.getMtbColr().size() > 0 ? refMtbColt.getMtbColr().get(0) : null;
|
MtbColr originalRefMtbColr = refMtbColt.getMtbColr() != null && !refMtbColt.getMtbColr().isEmpty() ? refMtbColt.getMtbColr().get(0) : null;
|
||||||
|
|
||||||
if (originalRefMtbColr != null) {
|
if (originalRefMtbColr != null) {
|
||||||
refMtbColr.setId(originalRefMtbColr.getId());
|
refMtbColr.setId(originalRefMtbColr.getId());
|
||||||
@@ -1470,10 +1473,38 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
if (shouldCloseLU) requestCloseLU(shouldPrint);
|
if (shouldCloseLU) requestCloseLU(shouldPrint);
|
||||||
|
|
||||||
}, this::sendError);
|
}, this::sendError)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void executeDepositChangeIfNeeded(MtbColt refMtbColt, Runnable onComplete) {
|
||||||
|
//Considero solo la prima UDC scansionata
|
||||||
|
boolean shouldChangeCodMdep = refMtbColt != null && !refMtbColt.getCodMdep().equalsIgnoreCase(mCurrentMtbColt.getCodMdep()) &&
|
||||||
|
mCurrentMtbColt.getMtbColr().isEmpty();
|
||||||
|
String newCodMdep = shouldChangeCodMdep ? refMtbColt.getCodMdep() : null;
|
||||||
|
|
||||||
|
if (shouldChangeCodMdep) {
|
||||||
|
mColliMagazzinoRESTConsumer.spostaUL(mCurrentMtbColt, newCodMdep, null, false, () -> {
|
||||||
|
mCurrentMtbColt.setCodMdep(newCodMdep);
|
||||||
|
onComplete.run();
|
||||||
|
}, this::sendError);
|
||||||
|
} else onComplete.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void executeTipoUlChangeIfNeeded(MtbColt refMtbColt, Runnable onComplete) {
|
||||||
|
boolean shouldChangeCodTcol = refMtbColt != null && refMtbColt.getCodTcol() != null &&
|
||||||
|
!refMtbColt.getCodTcol().equalsIgnoreCase(mCurrentMtbColt.getCodTcol()) &&
|
||||||
|
mCurrentMtbColt.getMtbColr().isEmpty();
|
||||||
|
String newTipoUL = shouldChangeCodTcol ? refMtbColt.getCodTcol() : null;
|
||||||
|
|
||||||
|
if (shouldChangeCodTcol) {
|
||||||
|
mColliMagazzinoRESTConsumer.updateTipoUL(mCurrentMtbColt, newTipoUL, () -> {
|
||||||
|
mCurrentMtbColt.setCodTcol(newTipoUL);
|
||||||
|
onComplete.run();
|
||||||
|
}, this::sendError);
|
||||||
|
} else onComplete.run();
|
||||||
|
}
|
||||||
|
|
||||||
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, LocalDate dataScad, boolean shouldCloseLU) {
|
private void saveEditedRow(MtbColr mtbColrToUpdate, BigDecimal numCnf, BigDecimal qtaCnf, BigDecimal qtaTot, String partitaMag, LocalDate dataScad, boolean shouldCloseLU) {
|
||||||
|
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
@@ -1732,7 +1763,7 @@ public class SpedizioneViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void askInfoAggiuntive(Runnable onComplete) {
|
private void askInfoAggiuntive(Runnable onComplete) {
|
||||||
if (mDefaultSegnoCol != -1 || !SettingsManager.iDB().isFlagAskInfoAggiuntiveSpedizione()) {
|
if (!SettingsManager.iDB().isFlagAskInfoAggiuntiveSpedizione()) {
|
||||||
onComplete.run();
|
onComplete.run();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,8 @@ public class DialogUltimeConsegneFiltroAvanzato {
|
|||||||
|
|
||||||
private void initView(DialogUltimeConsegneFiltroAvanzatoBinding bindings, DialogUltimeConsegneFiltroAvanzatoViewModel viewModel) {
|
private void initView(DialogUltimeConsegneFiltroAvanzatoBinding bindings, DialogUltimeConsegneFiltroAvanzatoViewModel viewModel) {
|
||||||
|
|
||||||
arrayAdapterRagSoc = new SimpleAutoCompleteDropdownAdapter(mContext, R.layout.dialog_vendita_filtro_avanzato__single_item, getAvailableRagSocs(false));
|
arrayAdapterRagSoc = new SimpleAutoCompleteDropdownAdapter<>(mContext, R.layout.dialog_vendita_filtro_avanzato__single_item, getAvailableRagSocs(false));
|
||||||
|
arrayAdapterRagSoc.addAll();
|
||||||
bindings.filledExposedDropdownRagSoc.setAdapter(arrayAdapterRagSoc);
|
bindings.filledExposedDropdownRagSoc.setAdapter(arrayAdapterRagSoc);
|
||||||
|
|
||||||
bindings.filledExposedDropdownDataDoc.setOnClickListener(view -> {
|
bindings.filledExposedDropdownDataDoc.setOnClickListener(view -> {
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ public class VersamentoMerceViewModel {
|
|||||||
|
|
||||||
public void updatePosizione(MtbDepoPosizione mtbDepoPosizione) {
|
public void updatePosizione(MtbDepoPosizione mtbDepoPosizione) {
|
||||||
this.sendOnLoadingStarted();
|
this.sendOnLoadingStarted();
|
||||||
mColliMagazzinoRESTConsumer.changePosizione(mCurrentMtbColt.getValue(), mtbDepoPosizione, () -> {
|
mColliMagazzinoRESTConsumer.spostaUL(mCurrentMtbColt.getValue(), mtbDepoPosizione, () -> {
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
this.sendOnDataSaved();
|
this.sendOnDataSaved();
|
||||||
}, this::sendError);
|
}, this::sendError);
|
||||||
|
|||||||
@@ -1,105 +1,116 @@
|
|||||||
package it.integry.integrywmsnative.ui.adapter;
|
package it.integry.integrywmsnative.ui.adapter;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Filter;
|
import android.widget.Filter;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
import androidx.databinding.ObservableList;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class SimpleAutoCompleteDropdownAdapter extends ArrayAdapter {
|
public class SimpleAutoCompleteDropdownAdapter<T> extends ArrayAdapter<T> {
|
||||||
|
|
||||||
private List<Object> mObjects;
|
private final ObservableArrayList<T> objects;
|
||||||
|
private final LayoutInflater mInflater;
|
||||||
|
private int mDropDownResource;
|
||||||
|
|
||||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource) {
|
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, @NonNull List<T> objects) {
|
||||||
super(context, resource);
|
this(context, resource, new ObservableArrayList<>());
|
||||||
|
this.objects.addAll(objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, int textViewResourceId) {
|
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, @NonNull ObservableArrayList<T> objects) {
|
||||||
super(context, resource, textViewResourceId);
|
super(context, resource, new ArrayList<>(objects));
|
||||||
|
mInflater = LayoutInflater.from(context);
|
||||||
|
mDropDownResource = resource;
|
||||||
|
this.objects = objects;
|
||||||
|
|
||||||
|
// Listener per aggiornare l'adapter quando la lista cambia
|
||||||
|
this.objects.addOnListChangedCallback(new ObservableList.OnListChangedCallback<ObservableList<T>>() {
|
||||||
|
@Override
|
||||||
|
public void onChanged(ObservableList<T> sender) {
|
||||||
|
updateAdapter();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, @NonNull Object[] objects) {
|
@Override
|
||||||
super(context, resource, objects);
|
public void onItemRangeChanged(ObservableList<T> sender, int positionStart, int itemCount) {
|
||||||
mObjects = Arrays.asList(objects);
|
updateAdapter();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, int textViewResourceId, @NonNull Object[] objects) {
|
@Override
|
||||||
super(context, resource, textViewResourceId, objects);
|
public void onItemRangeInserted(ObservableList<T> sender, int positionStart, int itemCount) {
|
||||||
mObjects = Arrays.asList(objects);
|
updateAdapter();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, @NonNull List objects) {
|
@Override
|
||||||
super(context, resource, objects);
|
public void onItemRangeMoved(ObservableList<T> sender, int fromPosition, int toPosition, int itemCount) {
|
||||||
mObjects = objects;
|
updateAdapter();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleAutoCompleteDropdownAdapter(@NonNull Context context, int resource, int textViewResourceId, @NonNull List objects) {
|
@Override
|
||||||
super(context, resource, textViewResourceId, objects);
|
public void onItemRangeRemoved(ObservableList<T> sender, int positionStart, int itemCount) {
|
||||||
mObjects = objects;
|
updateAdapter();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateAdapter() {
|
||||||
|
clear();
|
||||||
|
addAll(objects);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Filter getFilter() {
|
public Filter getFilter() {
|
||||||
return new StringFilter(mObjects);
|
return new StringFilter(objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class StringFilter extends Filter {
|
||||||
|
|
||||||
|
private final List<T> sourceObjects;
|
||||||
|
|
||||||
private class StringFilter<T> extends Filter {
|
|
||||||
|
|
||||||
private ArrayList<T> sourceObjects;
|
|
||||||
|
|
||||||
public StringFilter(List<T> objects) {
|
public StringFilter(List<T> objects) {
|
||||||
if(objects == null) return;
|
this.sourceObjects = objects;
|
||||||
sourceObjects = new ArrayList<T>();
|
|
||||||
synchronized (this) {
|
|
||||||
sourceObjects.addAll(objects);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected FilterResults performFiltering(CharSequence chars) {
|
protected FilterResults performFiltering(CharSequence chars) {
|
||||||
String filterSeq = chars.toString().toLowerCase();
|
String filterSeq = chars == null ? "" : chars.toString().toLowerCase();
|
||||||
FilterResults result = new FilterResults();
|
FilterResults result = new FilterResults();
|
||||||
if (filterSeq != null && filterSeq.length() > 0) {
|
|
||||||
ArrayList<T> filter = new ArrayList<T>();
|
|
||||||
|
|
||||||
for (T object : sourceObjects) {
|
if (filterSeq.isEmpty()) {
|
||||||
// the filtering itself:
|
result.values = new ArrayList<>(sourceObjects);
|
||||||
if (object.toString().toLowerCase().contains(filterSeq))
|
|
||||||
filter.add(object);
|
|
||||||
}
|
|
||||||
result.count = filter.size();
|
|
||||||
result.values = filter;
|
|
||||||
} else {
|
|
||||||
// add all objects
|
|
||||||
synchronized (this) {
|
|
||||||
result.values = sourceObjects;
|
|
||||||
result.count = sourceObjects.size();
|
result.count = sourceObjects.size();
|
||||||
|
} else {
|
||||||
|
ArrayList<T> filtered = new ArrayList<>();
|
||||||
|
for (T object : sourceObjects) {
|
||||||
|
String stringObject = object.toString();
|
||||||
|
|
||||||
|
if (stringObject.toLowerCase().contains(filterSeq)) {
|
||||||
|
filtered.add(object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
result.values = filtered;
|
||||||
|
result.count = filtered.size();
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
protected void publishResults(CharSequence constraint,
|
protected void publishResults(CharSequence constraint, FilterResults results) {
|
||||||
FilterResults results) {
|
List<T> filtered = (List<T>) results.values;
|
||||||
// NOTE: this function is *always* called from the UI thread.
|
if (filtered != null) {
|
||||||
if(constraint != null && constraint.length() > 2) {
|
synchronized (this) {
|
||||||
ArrayList<T> filtered = (ArrayList<T>) results.values;
|
|
||||||
notifyDataSetChanged();
|
|
||||||
clear();
|
clear();
|
||||||
for (int i = 0, l = filtered.size(); i < l; i++)
|
addAll(filtered);
|
||||||
add(filtered.get(i));
|
notifyDataSetChanged();
|
||||||
notifyDataSetInvalidated();
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
package it.integry.integrywmsnative.view.dialogs.ask_should_print;
|
|
||||||
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.graphics.drawable.ColorDrawable;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
|
|
||||||
import androidx.databinding.DataBindingUtil;
|
|
||||||
import it.integry.integrywmsnative.R;
|
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
|
||||||
import it.integry.integrywmsnative.databinding.DialogAskShouldPrintBinding;
|
|
||||||
|
|
||||||
public class DialogAskShouldPrint {
|
|
||||||
|
|
||||||
private Dialog currentDialog;
|
|
||||||
|
|
||||||
public static Dialog make(final Context context, final String nomeEtichettaEN, RunnableArgs<Boolean> onDialogDismiss) {
|
|
||||||
return new DialogAskShouldPrint(context, nomeEtichettaEN, onDialogDismiss).currentDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
private DialogAskShouldPrint(Context context, String nomeEtichettaEN, RunnableArgs<Boolean> onDialogDismiss) {
|
|
||||||
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
|
||||||
DialogAskShouldPrintBinding bindings = DataBindingUtil.inflate(inflater, R.layout.dialog_ask_should_print, null, false);
|
|
||||||
|
|
||||||
currentDialog = new Dialog(context);
|
|
||||||
currentDialog.setContentView(bindings.getRoot());
|
|
||||||
|
|
||||||
currentDialog.setCanceledOnTouchOutside(false);
|
|
||||||
currentDialog.setCancelable(false);
|
|
||||||
currentDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
|
||||||
|
|
||||||
bindings.descriptionText.setText(String.format(context.getResources().getString(R.string.message_print_packing_list), nomeEtichettaEN));
|
|
||||||
|
|
||||||
bindings.buttonConfirm.setOnClickListener(v -> {
|
|
||||||
currentDialog.dismiss();
|
|
||||||
onDialogDismiss.run(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
bindings.buttonAbort.setOnClickListener(v -> {
|
|
||||||
currentDialog.dismiss();
|
|
||||||
onDialogDismiss.run(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -136,31 +136,26 @@ public class DialogSimpleMessageView extends BaseDialogFragment {
|
|||||||
|
|
||||||
private void initContent() {
|
private void initContent() {
|
||||||
int colorBackgroundTitle = -1;
|
int colorBackgroundTitle = -1;
|
||||||
Drawable titleIconRes = null;
|
Drawable titleIconRes = switch (mType) {
|
||||||
|
case INFO -> {
|
||||||
switch (mType) {
|
|
||||||
case INFO:
|
|
||||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.colorPrimary);
|
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.colorPrimary);
|
||||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_info_78dp, null);
|
yield ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_info_78dp, null);
|
||||||
break;
|
|
||||||
|
|
||||||
case SUCCESS:
|
|
||||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.green_300);
|
|
||||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_done_white_24dp, null);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WARNING:
|
|
||||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.yellow_600);
|
|
||||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_warning_white_24dp, null);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ERROR:
|
|
||||||
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.red_300);
|
|
||||||
titleIconRes = ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_mood_bad_24dp, null);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
case SUCCESS -> {
|
||||||
|
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.green_300);
|
||||||
|
yield ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_done_white_24dp, null);
|
||||||
|
}
|
||||||
|
case WARNING -> {
|
||||||
|
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.yellow_600);
|
||||||
|
yield ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_warning_white_24dp, null);
|
||||||
|
}
|
||||||
|
case ERROR -> {
|
||||||
|
colorBackgroundTitle = ContextCompat.getColor(requireContext(), R.color.red_300);
|
||||||
|
yield ResourcesCompat.getDrawable(requireContext().getResources(), R.drawable.ic_mood_bad_24dp, null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
this.positiveButtonText = requireContext().getText(R.string.ok).toString();
|
this.positiveButtonText = requireContext().getText(mOnNegativeClick != null ? R.string.yes : R.string.ok).toString();
|
||||||
this.negativeButtonText = requireContext().getText(R.string.no).toString();
|
this.negativeButtonText = requireContext().getText(R.string.no).toString();
|
||||||
|
|
||||||
//Title VIEW
|
//Title VIEW
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.create_new_art;
|
||||||
|
|
||||||
|
import dagger.Subcomponent;
|
||||||
|
|
||||||
|
@Subcomponent
|
||||||
|
public interface DialogCreateNewArtComponent {
|
||||||
|
|
||||||
|
@Subcomponent.Factory
|
||||||
|
interface Factory {
|
||||||
|
DialogCreateNewArtComponent create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void inject(DialogCreateNewArtView dialogCreateNewArtView);
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.create_new_art;
|
||||||
|
|
||||||
|
import dagger.Module;
|
||||||
|
import dagger.Provides;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
|
|
||||||
|
@Module(subcomponents = DialogCreateNewArtComponent.class)
|
||||||
|
public class DialogCreateNewArtModule {
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
DialogCreateNewArtViewModel providesDialogCreateNewArtViewModel(ArticoloRESTConsumer articoloRESTConsumer) {
|
||||||
|
return new DialogCreateNewArtViewModel(articoloRESTConsumer);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,302 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.create_new_art;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.InputFilter;
|
||||||
|
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 androidx.databinding.ObservableList;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.barcode_base_android_library.model.BarcodeScanDTO;
|
||||||
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.OnGeneralChangedCallback;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.OnListGeneralChangedCallback;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbSfam;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbSgrp;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityObservable;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.databinding.DialogCreateNewArtBinding;
|
||||||
|
import it.integry.integrywmsnative.ui.adapter.SimpleAutoCompleteDropdownAdapter;
|
||||||
|
|
||||||
|
public class DialogCreateNewArtView extends BaseDialogFragment implements DialogCreateNewArtViewModel.Listener {
|
||||||
|
|
||||||
|
public final ObservableField<String> selectedUntMisText = new ObservableField<>();
|
||||||
|
public final ObservableField<String> selectedMtbGrupText = new ObservableField<>();
|
||||||
|
public final ObservableField<String> selectedMtbSubGrupText = new ObservableField<>();
|
||||||
|
public final ObservableField<String> selectedMtbSubSubGrupText = new ObservableField<>();
|
||||||
|
public final ObservableField<String> selectedPosizioneText = new ObservableField<>();
|
||||||
|
public final BindableBoolean editingBarcode = new BindableBoolean(false);
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
DialogCreateNewArtViewModel mViewModel;
|
||||||
|
|
||||||
|
private DialogCreateNewArtBinding mBindings;
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
public final BarcodeScanDTO mScannedBarcode;
|
||||||
|
private int mBarcodeScannerIstanceID;
|
||||||
|
|
||||||
|
private final String initialPosizione;
|
||||||
|
private final RunnableArgs<String> onArticleCreated;
|
||||||
|
|
||||||
|
//Pass here all external parameters
|
||||||
|
public static DialogCreateNewArtView newInstance() {
|
||||||
|
return newInstance(null, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Pass here all external parameters
|
||||||
|
public static DialogCreateNewArtView newInstance(String description, BarcodeScanDTO barcode, String posizione) {
|
||||||
|
return new DialogCreateNewArtView(description, barcode, posizione, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DialogCreateNewArtView newInstance(String description, BarcodeScanDTO barcode, String posizione, RunnableArgs<String> onArticleCreated) {
|
||||||
|
return new DialogCreateNewArtView(description, barcode, posizione, onArticleCreated);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DialogCreateNewArtView(String description, BarcodeScanDTO barcode, String posizione, RunnableArgs<String> onArticleCreated) {
|
||||||
|
super();
|
||||||
|
this.mScannedBarcode = barcode;
|
||||||
|
this.onArticleCreated = onArticleCreated;
|
||||||
|
this.initialPosizione = posizione;
|
||||||
|
|
||||||
|
MainApplication.appComponent
|
||||||
|
.dialogCreateNewArtComponent()
|
||||||
|
.create()
|
||||||
|
.inject(this);
|
||||||
|
|
||||||
|
mViewModel.setListener(this);
|
||||||
|
if (description != null) mViewModel.descrizione.set(description.toUpperCase());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getTheme() {
|
||||||
|
return R.style.AppTheme_NewMaterial_Dialog_FullscreenDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
this.mContext = requireContext();
|
||||||
|
|
||||||
|
mBindings = DialogCreateNewArtBinding.inflate(LayoutInflater.from(this.mContext), null, false);
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
|
mBindings.setViewmodel(mViewModel);
|
||||||
|
mBindings.setView(this);
|
||||||
|
mBindings.toolbar.setTitle("Nuovo articolo");
|
||||||
|
|
||||||
|
this.initBarcodeReader();
|
||||||
|
this.initObservable();
|
||||||
|
this.initBarcodes();
|
||||||
|
|
||||||
|
mBindings.inputDescrizioneText.setFilters(new InputFilter.AllCaps[]{
|
||||||
|
new InputFilter.AllCaps()
|
||||||
|
});
|
||||||
|
|
||||||
|
SimpleAutoCompleteDropdownAdapter<String> arrayAdapterPosizioni = new SimpleAutoCompleteDropdownAdapter<>(mContext,
|
||||||
|
android.R.layout.simple_dropdown_item_1line,
|
||||||
|
UtilityObservable.convertObservableArrayList(mViewModel.retrieveAvailablePosizioni(), MtbDepoPosizione::getPosizione));
|
||||||
|
mBindings.inputDefaultPosText.setAdapter(arrayAdapterPosizioni);
|
||||||
|
mViewModel.retrieveAvailablePosizioni().addOnListChangedCallback(new OnListGeneralChangedCallback<MtbDepoPosizione>() {
|
||||||
|
@Override
|
||||||
|
public void onChanged(ObservableList<MtbDepoPosizione> sender) {
|
||||||
|
if(!UtilityString.isNullOrEmpty(initialPosizione)) {
|
||||||
|
selectedPosizioneText.set(initialPosizione);
|
||||||
|
} else if(sender.size() == 1) {
|
||||||
|
selectedPosizioneText.set(sender.get(0).getPosizione());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
SimpleAutoCompleteDropdownAdapter<String> arrayAdapterUntMis = new SimpleAutoCompleteDropdownAdapter<>(mContext,
|
||||||
|
android.R.layout.simple_dropdown_item_1line,
|
||||||
|
UtilityObservable.convertObservableArrayList(mViewModel.retrieveAvailableUntMis(), MtbUntMis::getUntMis));
|
||||||
|
mBindings.filledUntMisText.setAdapter(arrayAdapterUntMis);
|
||||||
|
mViewModel.retrieveAvailableUntMis().addOnListChangedCallback(new OnListGeneralChangedCallback<MtbUntMis>() {
|
||||||
|
@Override
|
||||||
|
public void onChanged(ObservableList<MtbUntMis> sender) {
|
||||||
|
if(sender.size() == 1) {
|
||||||
|
selectedUntMisText.set(sender.get(0).getUntMis());
|
||||||
|
} else if(sender.stream().anyMatch(x -> x.getUntMis().equalsIgnoreCase("PZ"))) {
|
||||||
|
MtbUntMis pzUntMis = sender.stream().filter(x -> x.getUntMis().equalsIgnoreCase("PZ")).findFirst().get();
|
||||||
|
selectedUntMisText.set(pzUntMis.getUntMis());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
SimpleAutoCompleteDropdownAdapter<String> arrayAdapterGruppoArt = new SimpleAutoCompleteDropdownAdapter<>(mContext,
|
||||||
|
android.R.layout.simple_dropdown_item_1line,
|
||||||
|
UtilityObservable.convertObservableArrayList(mViewModel.retrieveAvailableArtGroups(), x -> String.format("%s - %s", x.getCodMgrp(), x.getDescrizione())));
|
||||||
|
mBindings.filledGruppoText.setAdapter(arrayAdapterGruppoArt);
|
||||||
|
mViewModel.retrieveAvailableArtGroups().addOnListChangedCallback(new OnListGeneralChangedCallback<MtbGrup>() {
|
||||||
|
@Override
|
||||||
|
public void onChanged(ObservableList<MtbGrup> sender) {
|
||||||
|
if(sender.size() == 1) {
|
||||||
|
selectedMtbGrupText.set(String.format("%s - %s", sender.get(0).getCodMgrp(), sender.get(0).getDescrizione()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
SimpleAutoCompleteDropdownAdapter<String> arrayAdapterSottoGruppoArt = new SimpleAutoCompleteDropdownAdapter<>(mContext,
|
||||||
|
android.R.layout.simple_dropdown_item_1line,
|
||||||
|
UtilityObservable.convertObservableArrayList(mViewModel.retrieveAvailableArtSubGroups(), x -> String.format("%s - %s", x.getCodMsgr(), x.getDescrizione())));
|
||||||
|
mBindings.filledSottoGruppoText.setAdapter(arrayAdapterSottoGruppoArt);
|
||||||
|
mViewModel.retrieveAvailableArtSubGroups().addOnListChangedCallback(new OnListGeneralChangedCallback<MtbSgrp>() {
|
||||||
|
@Override
|
||||||
|
public void onChanged(ObservableList<MtbSgrp> sender) {
|
||||||
|
if(sender.size() == 1) {
|
||||||
|
selectedMtbSubGrupText.set(String.format("%s - %s", sender.get(0).getCodMsgr(), sender.get(0).getDescrizione()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
SimpleAutoCompleteDropdownAdapter<String> arrayAdapterSottoSottoGruppoArt = new SimpleAutoCompleteDropdownAdapter<>(mContext,
|
||||||
|
android.R.layout.simple_dropdown_item_1line,
|
||||||
|
UtilityObservable.convertObservableArrayList(mViewModel.retrieveAvailableArtSubSubGroups(), x -> String.format("%s - %s", x.getCodMsfa(), x.getDescrizione())));
|
||||||
|
mBindings.filledSottoSottoGruppoText.setAdapter(arrayAdapterSottoSottoGruppoArt);
|
||||||
|
mViewModel.retrieveAvailableArtSubSubGroups().addOnListChangedCallback(new OnListGeneralChangedCallback<MtbSfam>() {
|
||||||
|
@Override
|
||||||
|
public void onChanged(ObservableList<MtbSfam> sender) {
|
||||||
|
if(sender.size() == 1) {
|
||||||
|
selectedMtbSubSubGrupText.set(String.format("%s - %s", sender.get(0).getCodMsfa(), sender.get(0).getDescrizione()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mViewModel.init();
|
||||||
|
|
||||||
|
return mBindings.getRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initBarcodeReader() {
|
||||||
|
mBarcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
|
.setOnScanSuccessful(data -> {
|
||||||
|
requireActivity().runOnUiThread(() -> {
|
||||||
|
|
||||||
|
if (UtilityBarcode.isEtichettaPosizione(data)) {
|
||||||
|
selectedPosizioneText.set(data.getStringValue());
|
||||||
|
} else if (editingBarcode.get()) {
|
||||||
|
mViewModel.barcodeProdotto.set(data.getStringValue());
|
||||||
|
saveBarcode();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.setOnScanFailed(this::onError));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||||
|
super.onDismiss(dialog);
|
||||||
|
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initObservable() {
|
||||||
|
this.selectedUntMisText.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mViewModel.selectedUntMis.set(mViewModel.retrieveAvailableUntMis().stream()
|
||||||
|
.filter(x -> x.getUntMis().equals(selectedUntMisText.get()))
|
||||||
|
.findFirst().orElse(null));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.selectedMtbGrupText.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mViewModel.selectedMtbGrup.set(mViewModel.retrieveAvailableArtGroups().stream()
|
||||||
|
.filter(x -> String.format("%s - %s", x.getCodMgrp(), x.getDescrizione()).equals(selectedMtbGrupText.get()))
|
||||||
|
.findFirst().orElse(null));
|
||||||
|
|
||||||
|
selectedMtbSubGrupText.set(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.selectedMtbSubGrupText.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mViewModel.selectedMtbSubGrup.set(mViewModel.retrieveAvailableArtSubGroups().stream()
|
||||||
|
.filter(x -> String.format("%s - %s", x.getCodMsgr(), x.getDescrizione()).equals(selectedMtbSubGrupText.get()))
|
||||||
|
.findFirst().orElse(null));
|
||||||
|
|
||||||
|
selectedMtbSubSubGrupText.set(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
this.selectedMtbSubSubGrupText.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mViewModel.selectedMtbSubSubGrup.set(mViewModel.retrieveAvailableArtSubSubGroups().stream()
|
||||||
|
.filter(x -> String.format("%s - %s", x.getCodMsfa(), x.getDescrizione()).equals(selectedMtbSubSubGrupText.get()))
|
||||||
|
.findFirst().orElse(null));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.selectedPosizioneText.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mViewModel.selectedPosizioneDefault.set(mViewModel.retrieveAvailablePosizioni().stream()
|
||||||
|
.filter(x -> x.getPosizione().equals(selectedPosizioneText.get()))
|
||||||
|
.findFirst().orElse(null));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void initBarcodes() {
|
||||||
|
if (mScannedBarcode != null) {
|
||||||
|
mViewModel.barcodeProdotto.set(mScannedBarcode.getStringValue());
|
||||||
|
try {
|
||||||
|
generateBarcodeBitmap();
|
||||||
|
} catch (Exception e) {
|
||||||
|
onError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveBarcode() {
|
||||||
|
try {
|
||||||
|
generateBarcodeBitmap();
|
||||||
|
editingBarcode.toggle();
|
||||||
|
} catch (Exception e) {
|
||||||
|
onError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void generateBarcodeBitmap() throws Exception {
|
||||||
|
Bitmap barcodeBitmap = UtilityBarcode.generateBarcodeImage(mViewModel.barcodeProdotto.get(), 500, 170);
|
||||||
|
mBindings.barcodeProdottoImage.setImageBitmap(barcodeBitmap);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSaved(String codMart) {
|
||||||
|
this.dismiss();
|
||||||
|
|
||||||
|
if (this.onArticleCreated != null) this.onArticleCreated.run(codMart);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,209 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.create_new_art;
|
||||||
|
|
||||||
|
import androidx.databinding.ObservableArrayList;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.di.ValidatableObservableField;
|
||||||
|
import it.integry.integrywmsnative.core.di.validators.GreaterThenValidator;
|
||||||
|
import it.integry.integrywmsnative.core.di.validators.NotEmptyValidator;
|
||||||
|
import it.integry.integrywmsnative.core.di.validators.NotNullValidator;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.OnGeneralChangedCallback;
|
||||||
|
import it.integry.integrywmsnative.core.interfaces.viewmodel_listeners.ILoadingListener;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbGrup;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbSfam;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbSgrp;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbUntMis;
|
||||||
|
import it.integry.integrywmsnative.core.rest.consumers.ArticoloRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.articolo.ArticoloDTO;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
|
||||||
|
public class DialogCreateNewArtViewModel {
|
||||||
|
|
||||||
|
|
||||||
|
private Listener mListener;
|
||||||
|
|
||||||
|
private final ArticoloRESTConsumer articoloRESTConsumer;
|
||||||
|
|
||||||
|
private final ObservableArrayList<MtbUntMis> availableUntMis = new ObservableArrayList<>();
|
||||||
|
private final ObservableArrayList<MtbGrup> availableMtbGroups = new ObservableArrayList<>();
|
||||||
|
private final ObservableArrayList<MtbSgrp> availableMtbSubGroups = new ObservableArrayList<>();
|
||||||
|
private final ObservableArrayList<MtbSfam> availableMtbSubSubGroups = new ObservableArrayList<>();
|
||||||
|
|
||||||
|
private final ObservableArrayList<MtbDepoPosizione> availablePosizioni = new ObservableArrayList<>();
|
||||||
|
|
||||||
|
public ValidatableObservableField<String> descrizione = new ValidatableObservableField<>() {{
|
||||||
|
addValidator(new NotEmptyValidator("La descrizione non può essere vuota"));
|
||||||
|
}};
|
||||||
|
|
||||||
|
public final ValidatableObservableField<String> noteAggiuntive = new ValidatableObservableField<>();
|
||||||
|
public final ValidatableObservableField<BigDecimal> qtaCnf = new ValidatableObservableField<>(BigDecimal.ONE) {{
|
||||||
|
addValidator(new NotNullValidator<>("La qta x cnf deve essere > 0"));
|
||||||
|
addValidator(new GreaterThenValidator(BigDecimal.ZERO, "La qta x cnf deve essere > 0"));
|
||||||
|
}};
|
||||||
|
|
||||||
|
public final ValidatableObservableField<String> barcodeProdotto = new ValidatableObservableField<>();
|
||||||
|
public final ValidatableObservableField<Boolean> qtaCnfFissa = new ValidatableObservableField<>(true);
|
||||||
|
|
||||||
|
public ValidatableObservableField<MtbUntMis> selectedUntMis = new ValidatableObservableField<>(null) {{
|
||||||
|
addValidator(new NotNullValidator<>("Seleziona un'unità di misura"));
|
||||||
|
}};
|
||||||
|
public ValidatableObservableField<MtbGrup> selectedMtbGrup = new ValidatableObservableField<>(null) {{
|
||||||
|
addValidator(new NotNullValidator<>("Seleziona un gruppo"));
|
||||||
|
}};
|
||||||
|
public ValidatableObservableField<MtbSgrp> selectedMtbSubGrup = new ValidatableObservableField<>(null) {{
|
||||||
|
addValidator(new NotNullValidator<>("Seleziona un sotto gruppo"));
|
||||||
|
}};
|
||||||
|
public ValidatableObservableField<MtbSfam> selectedMtbSubSubGrup = new ValidatableObservableField<>(null) {{
|
||||||
|
addValidator(new NotNullValidator<>("Seleziona un sotto-sotto gruppo"));
|
||||||
|
}};
|
||||||
|
|
||||||
|
public ValidatableObservableField<MtbDepoPosizione> selectedPosizioneDefault = new ValidatableObservableField<>(null) {{
|
||||||
|
addValidator(new NotNullValidator<>("Seleziona una posizione"));
|
||||||
|
}};
|
||||||
|
|
||||||
|
|
||||||
|
public DialogCreateNewArtViewModel(ArticoloRESTConsumer articoloRESTConsumer) {
|
||||||
|
this.articoloRESTConsumer = articoloRESTConsumer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init() {
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
|
||||||
|
this.availablePosizioni.addAll(SettingsManager.iDB().getAvailablePosizioni());
|
||||||
|
|
||||||
|
this.articoloRESTConsumer.retrieveAvailableUntMis(untMisList -> {
|
||||||
|
this.availableUntMis.addAll(untMisList);
|
||||||
|
|
||||||
|
this.articoloRESTConsumer.retrieveAvailableGruppiMerceologici(mtbGrupList -> {
|
||||||
|
|
||||||
|
List<String> allowedCodMgrpForArtCreation = SettingsManager.iDB().getAllowedCodMgrpForArtCreation();
|
||||||
|
|
||||||
|
if(allowedCodMgrpForArtCreation != null && !allowedCodMgrpForArtCreation.isEmpty()) {
|
||||||
|
mtbGrupList = mtbGrupList.stream()
|
||||||
|
.filter(x -> allowedCodMgrpForArtCreation.contains(x.getCodMgrp()))
|
||||||
|
.collect(Collectors.toUnmodifiableList());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(mtbGrupList.size() == 1)
|
||||||
|
this.selectedMtbGrup.set(mtbGrupList.get(0));
|
||||||
|
|
||||||
|
this.availableMtbGroups.addAll(mtbGrupList);
|
||||||
|
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
}, this::sendError);
|
||||||
|
}, this::sendError);
|
||||||
|
|
||||||
|
this.selectedMtbGrup.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
availableMtbSubGroups.clear();
|
||||||
|
|
||||||
|
if (selectedMtbGrup != null && selectedMtbGrup.get() != null)
|
||||||
|
availableMtbSubGroups.addAll(Objects.requireNonNull(selectedMtbGrup.get()).getMtbSgrp());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.selectedMtbSubGrup.addOnPropertyChangedCallback(new OnGeneralChangedCallback() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
availableMtbSubSubGroups.clear();
|
||||||
|
|
||||||
|
if (selectedMtbSubGrup != null && selectedMtbSubGrup.get() != null)
|
||||||
|
availableMtbSubSubGroups.addAll(Objects.requireNonNull(selectedMtbSubGrup.get()).getMtbSfam());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObservableArrayList<MtbDepoPosizione> retrieveAvailablePosizioni() {
|
||||||
|
return availablePosizioni;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObservableArrayList<MtbUntMis> retrieveAvailableUntMis() {
|
||||||
|
return availableUntMis;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObservableArrayList<MtbGrup> retrieveAvailableArtGroups() {
|
||||||
|
return availableMtbGroups;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObservableArrayList<MtbSgrp> retrieveAvailableArtSubGroups() {
|
||||||
|
return availableMtbSubGroups;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObservableArrayList<MtbSfam> retrieveAvailableArtSubSubGroups() {
|
||||||
|
return availableMtbSubSubGroups;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void save() {
|
||||||
|
if (descrizione.validate() &
|
||||||
|
noteAggiuntive.validate() &
|
||||||
|
selectedMtbGrup.validate() &
|
||||||
|
selectedMtbSubGrup.validate() &
|
||||||
|
selectedMtbSubSubGrup.validate() &
|
||||||
|
selectedUntMis.validate() &
|
||||||
|
qtaCnf.validate() &
|
||||||
|
qtaCnfFissa.validate() &
|
||||||
|
selectedPosizioneDefault.validate() &
|
||||||
|
barcodeProdotto.validate()
|
||||||
|
) {
|
||||||
|
ArticoloDTO articoloToSave = new ArticoloDTO()
|
||||||
|
.setDescrizione(descrizione.get())
|
||||||
|
.setDescrizioneEstesa(descrizione.get())
|
||||||
|
.setNote(UtilityString.empty2null(noteAggiuntive.get()))
|
||||||
|
.setCodMgrp(selectedMtbGrup.get().getCodMgrp())
|
||||||
|
.setCodMsgr(selectedMtbSubGrup.get().getCodMsgr())
|
||||||
|
.setCodMsfa(selectedMtbSubSubGrup.get().getCodMsfa())
|
||||||
|
.setUntMis(selectedUntMis.get().getUntMis())
|
||||||
|
.setFlagQtaCnfFissa(qtaCnfFissa.get().booleanValue())
|
||||||
|
.setQtaCnf(qtaCnf.get())
|
||||||
|
.setPosizione(selectedPosizioneDefault.get().getPosizione())
|
||||||
|
.setBarcode(UtilityString.empty2null(barcodeProdotto.get()))
|
||||||
|
.setFlagStato(true);
|
||||||
|
|
||||||
|
this.sendOnLoadingStarted();
|
||||||
|
articoloRESTConsumer.saveArticolo(articoloToSave, codMart -> {
|
||||||
|
this.sendOnLoadingEnded();
|
||||||
|
this.sendOnSaved(codMart);
|
||||||
|
}, this::sendError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void sendOnLoadingStarted() {
|
||||||
|
if (this.mListener != null) mListener.onLoadingStarted();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendOnLoadingEnded() {
|
||||||
|
if (this.mListener != null) mListener.onLoadingEnded();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendError(Exception ex) {
|
||||||
|
if (this.mListener != null) mListener.onError(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendOnSaved(String codMart) {
|
||||||
|
if (this.mListener != null) mListener.onSaved(codMart);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setListener(Listener listener) {
|
||||||
|
this.mListener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
interface Listener extends ILoadingListener {
|
||||||
|
|
||||||
|
void onSaved(String codMart);
|
||||||
|
|
||||||
|
void onError(Exception ex);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -188,7 +188,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
this.initProductLotStatusNotification();
|
this.initProductLotStatusNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
MtbUntMis mtbUntMis = mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis() != null && mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis().size() > 0 ? mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis().get(0) : null;
|
MtbUntMis mtbUntMis = mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis() != null && !mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis().isEmpty() ? mDialogInputQuantityV2DTO.getMtbAart().getMtbUntMis().get(0) : null;
|
||||||
if (!(mtbUntMis != null && mtbUntMis.isFlagDig())) {
|
if (!(mtbUntMis != null && mtbUntMis.isFlagDig())) {
|
||||||
mBindings.inputQtaTotText.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
|
mBindings.inputQtaTotText.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
|
||||||
}
|
}
|
||||||
@@ -231,7 +231,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), com.tfb.fbtoast.R.color.error_color)));
|
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), com.tfb.fbtoast.R.color.error_color)));
|
||||||
}
|
}
|
||||||
case NON_IN_SCADENZA -> {
|
case NON_IN_SCADENZA -> {
|
||||||
this.mBindings.inputDataScadLayout.setEndIconDrawable(R.drawable.ic_check_white_24dp);
|
this.mBindings.inputDataScadLayout.setEndIconDrawable(R.drawable.ic_round_check_24);
|
||||||
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), com.tfb.fbtoast.R.color.success_color)));
|
this.mBindings.inputDataScadLayout.setEndIconTintList(ColorStateList.valueOf(ContextCompat.getColor(requireContext(), com.tfb.fbtoast.R.color.success_color)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -295,6 +295,8 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
|||||||
int onNumCnfInputChanged = SettingsManager.iDB().getOnNumCnfInputChanged();
|
int onNumCnfInputChanged = SettingsManager.iDB().getOnNumCnfInputChanged();
|
||||||
int onQtaTotInputChanged = SettingsManager.iDB().getOnQtaTotInputChanged();
|
int onQtaTotInputChanged = SettingsManager.iDB().getOnQtaTotInputChanged();
|
||||||
|
|
||||||
|
onNumCnfInputChanged = onNumCnfInputChanged == 0 && mViewModel.getMtbAart().isFlagQtaCnfFissaBoolean() ? 2 : onNumCnfInputChanged;
|
||||||
|
|
||||||
this.mViewModel.setListener(this);
|
this.mViewModel.setListener(this);
|
||||||
this.mViewModel.init(onNumCnfInputChanged, onQtaTotInputChanged);
|
this.mViewModel.init(onNumCnfInputChanged, onQtaTotInputChanged);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.switch_user_depo;
|
||||||
|
|
||||||
|
import dagger.Subcomponent;
|
||||||
|
|
||||||
|
@Subcomponent
|
||||||
|
public interface DialogSwitchUserDepoComponent {
|
||||||
|
|
||||||
|
@Subcomponent.Factory
|
||||||
|
interface Factory {
|
||||||
|
DialogSwitchUserDepoComponent create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void inject(DialogSwitchUserDepoView dialogSwitchUserDepoView);
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.switch_user_depo;
|
||||||
|
|
||||||
|
import dagger.Module;
|
||||||
|
import dagger.Provides;
|
||||||
|
|
||||||
|
@Module(subcomponents = DialogSwitchUserDepoComponent.class)
|
||||||
|
public class DialogSwitchUserDepoModule {
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
DialogSwitchUserDepoViewModel providesDialogSwitchUserDepoViewModel() {
|
||||||
|
return new DialogSwitchUserDepoViewModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.switch_user_depo;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.BR;
|
||||||
|
import it.integry.integrywmsnative.MainApplication;
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.di.binders.recyclerview.BindingRecyclerViewAdapter;
|
||||||
|
import it.integry.integrywmsnative.core.di.binders.recyclerview.ItemBinder;
|
||||||
|
import it.integry.integrywmsnative.core.di.binders.recyclerview.ItemBinderBase;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.BaseDialogFragment;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.rest.model.AvailableCodMdepsDTO;
|
||||||
|
import it.integry.integrywmsnative.databinding.DialogSwitchUserDepoBinding;
|
||||||
|
|
||||||
|
public class DialogSwitchUserDepoView extends BaseDialogFragment {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
DialogSwitchUserDepoViewModel mViewModel;
|
||||||
|
|
||||||
|
private DialogSwitchUserDepoBinding mBindings;
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
private final List<AvailableCodMdepsDTO> availableCodMdeps;
|
||||||
|
private final RunnableArgs<AvailableCodMdepsDTO> onComplete;
|
||||||
|
|
||||||
|
//Pass here all external parameters
|
||||||
|
public static DialogSwitchUserDepoView newInstance(List<AvailableCodMdepsDTO> availableCodMdeps, RunnableArgs<AvailableCodMdepsDTO> onComplete) {
|
||||||
|
return new DialogSwitchUserDepoView(availableCodMdeps, onComplete);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DialogSwitchUserDepoView(List<AvailableCodMdepsDTO> availableCodMdeps, RunnableArgs<AvailableCodMdepsDTO> onComplete) {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.availableCodMdeps = availableCodMdeps;
|
||||||
|
this.onComplete = onComplete;
|
||||||
|
|
||||||
|
MainApplication.appComponent
|
||||||
|
.dialogSwitchUserDepoComponent()
|
||||||
|
.create()
|
||||||
|
.inject(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||||
|
this.mContext = requireContext();
|
||||||
|
|
||||||
|
mBindings = DialogSwitchUserDepoBinding.inflate(LayoutInflater.from(this.mContext), null, false);
|
||||||
|
mBindings.setLifecycleOwner(this);
|
||||||
|
|
||||||
|
setCancelable(true);
|
||||||
|
|
||||||
|
var alertDialog = new MaterialAlertDialogBuilder(this.mContext)
|
||||||
|
.setView(mBindings.getRoot())
|
||||||
|
.setCancelable(isCancelable())
|
||||||
|
.create();
|
||||||
|
|
||||||
|
alertDialog.setCanceledOnTouchOutside(isCancelable());
|
||||||
|
alertDialog.setOnShowListener(this);
|
||||||
|
|
||||||
|
return alertDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInit(DialogInterface dialogInterface) {
|
||||||
|
super.onInit(dialogInterface);
|
||||||
|
|
||||||
|
ItemBinder<AvailableCodMdepsDTO> itemBinder = new ItemBinderBase<>(BR.item, R.layout.dialog_switch_user_depo__list_item);
|
||||||
|
|
||||||
|
BindingRecyclerViewAdapter<AvailableCodMdepsDTO> adapter = new BindingRecyclerViewAdapter<>(itemBinder, availableCodMdeps);
|
||||||
|
adapter.setClickHandler(data -> {
|
||||||
|
onComplete.run(data);
|
||||||
|
dismiss();
|
||||||
|
});
|
||||||
|
|
||||||
|
mBindings.availableDepoList.setAdapter(adapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.switch_user_depo;
|
||||||
|
|
||||||
|
public class DialogSwitchUserDepoViewModel {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import androidx.fragment.app.DialogFragment;
|
|||||||
|
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.databinding.DialogYesNoBinding;
|
import it.integry.integrywmsnative.databinding.DialogYesNoBinding;
|
||||||
@@ -56,10 +57,10 @@ public class DialogYesNoView extends DialogFragment {
|
|||||||
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||||
.setView(binding.getRoot())
|
.setView(binding.getRoot())
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setPositiveButton("Ok", (dialog, which) -> {
|
.setPositiveButton(R.string.yes, (dialog, which) -> {
|
||||||
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.YES);
|
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.YES);
|
||||||
})
|
})
|
||||||
.setNegativeButton("Annulla", (dialog, which) -> {
|
.setNegativeButton(R.string.no, (dialog, which) -> {
|
||||||
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.NO);
|
if (onDialogDismiss != null) onDialogDismiss.run(DialogConsts.Results.NO);
|
||||||
})
|
})
|
||||||
.create();
|
.create();
|
||||||
|
|||||||
@@ -1,37 +1,39 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="128dp"
|
android:width="222.9dp"
|
||||||
android:height="128dp"
|
android:height="222.9dp"
|
||||||
android:viewportWidth="512"
|
android:viewportWidth="222.9"
|
||||||
android:viewportHeight="512">
|
android:viewportHeight="222.9">
|
||||||
|
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFFFFF"
|
android:pathData="M190.62,137.94c-0.67,0 -1.34,-0.06 -2.02,-0.18 -6.2,-1.11 -10.33,-7.04 -9.22,-13.24 0.72,-4 1.08,-8.11 1.08,-12.21 0,-8.6 -1.56,-16.98 -4.64,-24.91 -2.28,-5.88 0.63,-12.49 6.51,-14.77 5.88,-2.28 12.49,0.64 14.77,6.51 4.1,10.58 6.18,21.73 6.18,33.17 0,5.45 -0.48,10.91 -1.43,16.23 -0.99,5.52 -5.8,9.4 -11.22,9.4Z"
|
||||||
android:pathData="M256,485.5c-61.3,0-118.9-23.9-162.3-67.2c-43.3-43.3-67.2-101-67.2-162.3S50.4,137.1,93.7,93.7 c43.3-43.3,101-67.2,162.3-67.2s118.9,23.9,162.3,67.2c43.3,43.3,67.2,101,67.2,162.3s-23.9,118.9-67.2,162.3 C374.9,461.6,317.3,485.5,256,485.5z" />
|
android:fillColor="#269c38"/>
|
||||||
<path
|
<path
|
||||||
android:fillColor="#CCCCCC"
|
android:pathData="M167.26,65.87c-2.85,0 -5.7,-1.06 -7.91,-3.19 -12.9,-12.42 -29.87,-19.27 -47.78,-19.27 -4.06,0 -8.12,0.35 -12.07,1.05 -6.2,1.09 -12.13,-3.05 -13.22,-9.25 -1.1,-6.21 3.05,-12.13 9.25,-13.22 5.26,-0.93 10.66,-1.4 16.04,-1.4 23.85,0 46.44,9.11 63.62,25.65 4.54,4.37 4.67,11.6 0.3,16.13 -2.24,2.33 -5.23,3.5 -8.22,3.5Z"
|
||||||
android:pathData="M256,27c30.9,0,60.9,6.1,89.1,18c27.3,11.5,51.8,28,72.8,49.1c21,21,37.5,45.5,49.1,72.8 c11.9,28.2,18,58.2,18,89.1s-6.1,60.9-18,89.1c-11.5,27.3-28,51.8-49.1,72.8c-21,21-45.5,37.5-72.8,49.1 c-28.2,11.9-58.2,18-89.1,18s-60.9-6.1-89.1-18c-27.3-11.5-51.8-28-72.8-49.1c-21-21-37.5-45.5-49.1-72.8 c-11.9-28.2-18-58.2-18-89.1s6.1-60.9,18-89.1c11.5-27.3,28-51.8,49.1-72.8c21-21,45.5-37.5,72.8-49.1C195.1,33.1,225.1,27,256,27 M256,26C129,26,26,129,26,256s103,230,230,230s230-103,230-230S383,26,256,26L256,26z" />
|
android:fillColor="#e62400"/>
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FF9900"
|
android:pathData="M111.45,111.45m-111.45,0a111.45,111.45 0,1 1,222.9 0a111.45,111.45 0,1 1,-222.9 0"
|
||||||
android:pathData="M443.6,222.4C427.8,132.9,349.7,65,255.8,65c-23.9,0-46.7,4.4-67.8,12.4l14.3,36.4c16-5.8,33.4-9,51.4-9 c74.1,0,135.8,53.4,148.5,123.9L443.6,222.4z" />
|
android:fillColor="#fff"/>
|
||||||
<path
|
<path
|
||||||
android:fillColor="#EC0200"
|
android:pathData="M35.21,149.37c-4.78,0 -9.23,-3.02 -10.83,-7.79 -3.16,-9.41 -4.76,-19.26 -4.76,-29.27 0,-29.92 14.63,-58.06 39.14,-75.28 5.17,-3.63 12.29,-2.38 15.92,2.78 3.63,5.16 2.38,12.29 -2.78,15.92 -18.43,12.94 -29.43,34.1 -29.43,56.58 0,7.54 1.2,14.94 3.57,22 2.01,5.98 -1.21,12.46 -7.2,14.47 -1.21,0.4 -2.43,0.6 -3.64,0.6Z"
|
||||||
android:pathData="M250.9,446.5c1.6,0,3.2,0.1,4.9,0.1c105.4,0,190.8-85.4,190.8-190.8c0-3.3-0.1-6.6-0.3-9.9l-41.8,1.4 c0.2,2.8,0.2,5.6,0.2,8.5c0,83.4-69.5,150.9-152.9,150.9L250.9,446.5" />
|
android:fillColor="#f39200"/>
|
||||||
<path
|
<path
|
||||||
android:fillColor="#349933"
|
android:pathData="M111.56,204.25c-24.94,0 -48.28,-9.82 -65.72,-27.64 -4.41,-4.51 -4.33,-11.74 0.17,-16.16s11.74,-4.33 16.16,0.18c13.11,13.4 30.65,20.77 49.39,20.77 22.28,0 43.32,-10.84 56.28,-29 3.67,-5.14 10.8,-6.33 15.94,-2.66 5.14,3.67 6.33,10.8 2.66,15.94 -17.24,24.16 -45.24,38.58 -74.88,38.58Z"
|
||||||
android:pathData="M126.1,395.7c26,24.1,58.8,41,95.1,47.7l6.6-38.9c-28.8-5-55.3-18.7-76.1-37.5L126.1,395.7" />
|
android:fillColor="#00a0de"/>
|
||||||
<path
|
<path
|
||||||
android:fillColor="#0199CB"
|
android:pathData="M190.62,137.94c-0.67,0 -1.34,-0.06 -2.02,-0.18 -6.2,-1.11 -10.33,-7.04 -9.22,-13.24 0.72,-4 1.08,-8.11 1.08,-12.21 0,-8.6 -1.56,-16.98 -4.64,-24.91 -2.28,-5.88 0.63,-12.49 6.51,-14.77 5.88,-2.28 12.49,0.64 14.77,6.51 4.1,10.58 6.18,21.73 6.18,33.17 0,5.45 -0.48,10.91 -1.43,16.23 -0.99,5.52 -5.8,9.4 -11.22,9.4Z"
|
||||||
android:pathData="M160.6,90.4C103.5,123.3,65,185,65,255.8c0,45.3,15.8,86.9,42.1,119.6l29.7-24c-21.3-26-34.1-59.3-34.1-95.6 c0-56.4,30.9-105.5,76.7-131.5L160.6,90.4" />
|
android:fillColor="#269c38"/>
|
||||||
<path
|
<path
|
||||||
android:pathData="M 113.4 205 H 471.3 V 346.3 H 113.4 V 205 Z" />
|
android:pathData="M167.26,65.87c-2.85,0 -5.7,-1.06 -7.91,-3.19 -12.9,-12.42 -29.87,-19.27 -47.78,-19.27 -4.06,0 -8.12,0.35 -12.07,1.05 -6.2,1.09 -12.13,-3.05 -13.22,-9.25 -1.1,-6.21 3.05,-12.13 9.25,-13.22 5.26,-0.93 10.66,-1.4 16.04,-1.4 23.85,0 46.44,9.11 63.62,25.65 4.54,4.37 4.67,11.6 0.3,16.13 -2.24,2.33 -5.23,3.5 -8.22,3.5Z"
|
||||||
|
android:fillColor="#e62400"/>
|
||||||
<path
|
<path
|
||||||
android:fillColor="#000000"
|
android:fillColor="#FF000000"
|
||||||
android:pathData="M168,250.1l-13.8,45.3h-19.4l-23.2-66.4h18.4l14.6,46.5l14.5-46.5h18.6l14.8,46.5l14.6-46.5h18l-22.5,66.4h-20.2L168,250.1 z" />
|
android:pathData="M144.99,151.22c-2.08,0 -4.13,-0.28 -6.15,-0.83 -2.03,-0.56 -3.89,-1.33 -5.58,-2.32 -1.69,-0.99 -3.16,-2.14 -4.42,-3.44l6.37,-6.37c1.21,1.26 2.59,2.23 4.16,2.93 1.57,0.7 3.32,1.05 5.25,1.05 1.21,0 2.16,-0.19 2.86,-0.58 0.7,-0.39 1.05,-0.94 1.05,-1.67 0,-0.87 -0.41,-1.51 -1.23,-1.92 -0.82,-0.41 -1.9,-0.8 -3.22,-1.16 -1.33,-0.36 -2.71,-0.77 -4.16,-1.23 -1.45,-0.46 -2.82,-1.07 -4.13,-1.85 -1.3,-0.77 -2.37,-1.83 -3.19,-3.18 -0.82,-1.35 -1.23,-3.11 -1.23,-5.29s0.58,-4.24 1.74,-5.9c1.16,-1.67 2.8,-2.98 4.92,-3.95s4.66,-1.45 7.6,-1.45 5.7,0.52 8.26,1.56c2.56,1.04 4.61,2.57 6.15,4.6l-6.3,6.45c-1.11,-1.3 -2.35,-2.23 -3.73,-2.79 -1.38,-0.55 -2.71,-0.83 -4.02,-0.83s-2.2,0.19 -2.82,0.58c-0.63,0.39 -0.94,0.89 -0.94,1.52 0,0.72 0.42,1.3 1.27,1.74 0.84,0.43 1.91,0.82 3.19,1.16 1.28,0.34 2.64,0.74 4.09,1.2 1.45,0.46 2.82,1.11 4.13,1.95 1.3,0.84 2.36,1.95 3.19,3.33 0.82,1.37 1.23,3.17 1.23,5.39 0,3.43 -1.29,6.17 -3.87,8.22 -2.58,2.05 -6.07,3.08 -10.46,3.08Z"/>
|
||||||
<path
|
<path
|
||||||
android:fillColor="#000000"
|
android:fillColor="#FF000000"
|
||||||
android:pathData="M225.2,229.1h67.3c9.8,0,16.8,1.9,21.1,5.7s6.5,10,6.5,18.6v42.1h-17.7v-39.8c0-4.9-0.7-8.1-2.2-9.7 c-1.5-1.6-4.5-2.3-9.1-2.3h-9.8v51.8h-17.9v-51.8h-20.5v51.8h-17.7V229.1z" />
|
android:pathData="M129.58,69.43l-6.28,20.92l-6.8,-20.92l-9.41,0l-6.76,20.99l-6.24,-20.99l-11.28,0l12.55,36.31l9.41,0l7.09,-20.88l6.96,20.88l9.41,0l12.63,-36.31l-11.28,0z"/>
|
||||||
<path
|
<path
|
||||||
android:fillColor="#000000"
|
android:fillColor="#FF000000"
|
||||||
android:pathData="M328.8,281.6h37c3.3,0,5.7-0.5,7.2-1.5c1.5-1,2.2-2.7,2.2-4.9c0-2.3-0.8-3.9-2.3-5c-1.5-1-3.9-1.6-7.1-1.6h-15.1 c-9,0-15.1-1.4-18.2-4.1c-3.2-2.7-4.7-7.6-4.7-14.6c0-7.1,1.9-12.4,5.7-15.8c3.8-3.4,9.7-5,17.7-5h37.7v13.8h-30.9 c-5,0-8.3,0.4-9.8,1.3c-1.5,0.9-2.3,2.5-2.3,4.7c0,2.1,0.7,3.6,2,4.5c1.3,1,3.4,1.4,6.3,1.4h15.9c7.3,0,12.8,1.7,16.6,5.1 c3.8,3.4,5.7,8.3,5.7,14.7c0,6.2-1.7,11.2-5.1,15c-3.4,3.9-7.7,5.8-13.1,5.8h-45.3V281.6z" />
|
android:pathData="M119.23,120.88c-1.21,-2.08 -2.87,-3.68 -5,-4.82 -2.13,-1.13 -4.51,-1.7 -7.17,-1.7s-5.24,0.58 -7.46,1.74c-1.5,0.78 -2.76,1.81 -3.84,3.05 -1.01,-1.27 -2.23,-2.31 -3.65,-3.12 -1.96,-1.11 -4.14,-1.67 -6.55,-1.67 -2.66,0 -5.01,0.54 -7.06,1.63 -0.93,0.49 -1.77,1.1 -2.53,1.78l0.04,-2.68h-11.15l-0.2,14.83h11.35s0,-0.2 0,-0.2c0,-1.16 0.25,-2.15 0.76,-2.97 0.51,-0.82 1.2,-1.46 2.06,-1.92 0.87,-0.46 1.86,-0.69 2.97,-0.69 1.59,0 2.93,0.5 4.02,1.48 1.09,0.99 1.63,2.35 1.63,4.09v20.56h11.15v-20.56c0,-1.16 0.24,-2.15 0.72,-2.97 0.48,-0.82 1.17,-1.46 2.06,-1.92 0.89,-0.46 1.87,-0.69 2.93,-0.69 1.54,0 2.86,0.5 3.95,1.48 1.09,0.99 1.63,2.35 1.63,4.09v20.56h11.15v-21.87c0,-2.94 -0.6,-5.45 -1.81,-7.53Z"/>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M70.36,142.69m-7.58,0a7.58,7.58 0,1 1,15.16 0a7.58,7.58 0,1 1,-15.16 0"/>
|
||||||
</vector>
|
</vector>
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24.0"
|
|
||||||
android:viewportHeight="24.0">
|
|
||||||
<path
|
|
||||||
android:fillColor="#FF000000"
|
|
||||||
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
|
|
||||||
</vector>
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24.0"
|
|
||||||
android:viewportHeight="24.0">
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFFFFFFF"
|
|
||||||
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
|
|
||||||
</vector>
|
|
||||||
41
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
41
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="222.9"
|
||||||
|
android:viewportHeight="222.9">
|
||||||
|
<group android:scaleX="0.72"
|
||||||
|
android:scaleY="0.72"
|
||||||
|
android:translateX="31.206"
|
||||||
|
android:translateY="31.206">
|
||||||
|
<path
|
||||||
|
android:pathData="M190.6,137.9c-0.7,0 -1.3,0 -2,-0.2 -6.2,-1.1 -10.3,-7 -9.2,-13.2 0.7,-4 1.1,-8.1 1.1,-12.2 0,-8.6 -1.6,-17 -4.6,-24.9 -2.3,-5.9 0.6,-12.5 6.5,-14.8 5.9,-2.3 12.5,0.6 14.8,6.5 4.1,10.6 6.2,21.7 6.2,33.2s-0.5,10.9 -1.4,16.2c-1,5.5 -5.8,9.4 -11.2,9.4h0Z"
|
||||||
|
android:fillColor="#269c38"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M167.3,65.9c-2.9,0 -5.7,-1.1 -7.9,-3.2 -12.9,-12.4 -29.9,-19.3 -47.8,-19.3s-8.1,0.3 -12.1,1c-6.2,1.1 -12.1,-3 -13.2,-9.2 -1.1,-6.2 3.1,-12.1 9.2,-13.2 5.3,-0.9 10.7,-1.4 16,-1.4 23.9,0 46.4,9.1 63.6,25.6 4.5,4.4 4.7,11.6 0.3,16.1 -2.2,2.3 -5.2,3.5 -8.2,3.5h0Z"
|
||||||
|
android:fillColor="#e62400"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M35.2,149.4c-4.8,0 -9.2,-3 -10.8,-7.8 -3.2,-9.4 -4.8,-19.3 -4.8,-29.3 0,-29.9 14.6,-58.1 39.1,-75.3 5.2,-3.6 12.3,-2.4 15.9,2.8 3.6,5.2 2.4,12.3 -2.8,15.9 -18.4,12.9 -29.4,34.1 -29.4,56.6s1.2,14.9 3.6,22c2,6 -1.2,12.5 -7.2,14.5 -1.2,0.4 -2.4,0.6 -3.6,0.6h0Z"
|
||||||
|
android:fillColor="#f39200"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M111.6,204.3c-24.9,0 -48.3,-9.8 -65.7,-27.6 -4.4,-4.5 -4.3,-11.7 0.2,-16.2s11.7,-4.3 16.2,0.2c13.1,13.4 30.6,20.8 49.4,20.8s43.3,-10.8 56.3,-29c3.7,-5.1 10.8,-6.3 15.9,-2.7s6.3,10.8 2.7,15.9c-17.2,24.2 -45.2,38.6 -74.9,38.6h0Z"
|
||||||
|
android:fillColor="#00a0de"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M190.6,137.9c-0.7,0 -1.3,0 -2,-0.2 -6.2,-1.1 -10.3,-7 -9.2,-13.2 0.7,-4 1.1,-8.1 1.1,-12.2 0,-8.6 -1.6,-17 -4.6,-24.9 -2.3,-5.9 0.6,-12.5 6.5,-14.8 5.9,-2.3 12.5,0.6 14.8,6.5 4.1,10.6 6.2,21.7 6.2,33.2s-0.5,10.9 -1.4,16.2c-1,5.5 -5.8,9.4 -11.2,9.4h0Z"
|
||||||
|
android:fillColor="#269c38"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M167.3,65.9c-2.9,0 -5.7,-1.1 -7.9,-3.2 -12.9,-12.4 -29.9,-19.3 -47.8,-19.3s-8.1,0.3 -12.1,1c-6.2,1.1 -12.1,-3 -13.2,-9.2 -1.1,-6.2 3.1,-12.1 9.2,-13.2 5.3,-0.9 10.7,-1.4 16,-1.4 23.9,0 46.4,9.1 63.6,25.6 4.5,4.4 4.7,11.6 0.3,16.1 -2.2,2.3 -5.2,3.5 -8.2,3.5h0Z"
|
||||||
|
android:fillColor="#e62400"/>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M145,151.2c-2.1,0 -4.1,-0.3 -6.1,-0.8 -2,-0.6 -3.9,-1.3 -5.6,-2.3s-3.2,-2.1 -4.4,-3.4l6.4,-6.4c1.2,1.3 2.6,2.2 4.2,2.9s3.3,1.1 5.2,1.1 2.2,-0.2 2.9,-0.6 1.1,-0.9 1.1,-1.7 -0.4,-1.5 -1.2,-1.9c-0.8,-0.4 -1.9,-0.8 -3.2,-1.2 -1.3,-0.4 -2.7,-0.8 -4.2,-1.2 -1.4,-0.5 -2.8,-1.1 -4.1,-1.9 -1.3,-0.8 -2.4,-1.8 -3.2,-3.2 -0.8,-1.4 -1.2,-3.1 -1.2,-5.3s0.6,-4.2 1.7,-5.9c1.2,-1.7 2.8,-3 4.9,-3.9s4.7,-1.4 7.6,-1.4 5.7,0.5 8.3,1.6 4.6,2.6 6.1,4.6l-6.3,6.4c-1.1,-1.3 -2.4,-2.2 -3.7,-2.8 -1.4,-0.6 -2.7,-0.8 -4,-0.8s-2.2,0.2 -2.8,0.6c-0.6,0.4 -0.9,0.9 -0.9,1.5s0.4,1.3 1.3,1.7c0.8,0.4 1.9,0.8 3.2,1.2 1.3,0.3 2.6,0.7 4.1,1.2 1.4,0.5 2.8,1.1 4.1,1.9 1.3,0.8 2.4,1.9 3.2,3.3 0.8,1.4 1.2,3.2 1.2,5.4 0,3.4 -1.3,6.2 -3.9,8.2s-6.1,3.1 -10.5,3.1h0Z"/>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M129.6,69.4l-6.3,20.9l-6.8,-20.9l-9.4,0l-6.8,21l-6.2,-21l-11.3,0l12.6,36.3l9.4,0l7.1,-20.8l6.9,20.8l9.4,0l12.7,-36.3l-11.3,0z"/>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M119.2,120.9c-1.2,-2.1 -2.9,-3.7 -5,-4.8 -2.1,-1.1 -4.5,-1.7 -7.2,-1.7s-5.2,0.6 -7.5,1.7c-1.5,0.8 -2.8,1.8 -3.8,3.1 -1,-1.3 -2.2,-2.3 -3.7,-3.1 -2,-1.1 -4.1,-1.7 -6.6,-1.7s-5,0.5 -7.1,1.6c-0.9,0.5 -1.8,1.1 -2.5,1.8v-2.7s-11.1,0 -11.1,0l-0.2,14.8h11.3v-0.2c0,-1.2 0.2,-2.2 0.8,-3s1.2,-1.5 2.1,-1.9c0.9,-0.5 1.9,-0.7 3,-0.7 1.6,0 2.9,0.5 4,1.5 1.1,1 1.6,2.3 1.6,4.1v20.6h11.2v-20.6c0,-1.2 0.2,-2.2 0.7,-3s1.2,-1.5 2.1,-1.9 1.9,-0.7 2.9,-0.7c1.5,0 2.9,0.5 3.9,1.5 1.1,1 1.6,2.3 1.6,4.1v20.6h11.2v-21.9c0,-2.9 -0.6,-5.4 -1.8,-7.5h0Z"/>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M70.4,142.7m-7.6,0a7.6,7.6 0,1 1,15.2 0a7.6,7.6 0,1 1,-15.2 0"/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
5
app/src/main/res/drawable/ic_round_check_24.xml
Normal file
5
app/src/main/res/drawable/ic_round_check_24.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M9,16.17L5.53,12.7c-0.39,-0.39 -1.02,-0.39 -1.41,0 -0.39,0.39 -0.39,1.02 0,1.41l4.18,4.18c0.39,0.39 1.02,0.39 1.41,0L20.29,7.71c0.39,-0.39 0.39,-1.02 0,-1.41 -0.39,-0.39 -1.02,-0.39 -1.41,0L9,16.17z"/>
|
||||||
|
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="960" android:viewportWidth="960" android:width="24dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M483,619Q454,620 427.5,609.5Q401,599 381,579Q361,559 350.5,534Q340,509 340,481Q340,471 341,461.5Q342,452 345,443Q349,431 344.5,419Q340,407 329,402Q317,397 305.5,402Q294,407 290,419Q285,434 282.5,449Q280,464 280,480Q280,520 295.5,556.5Q311,593 339,621Q366,649 402.5,664Q439,679 478,680L461,697Q452,706 452,718Q452,730 461,739Q470,748 482,748Q494,748 503,739L567,675Q579,663 579,647Q579,631 567,619L503,555Q494,546 482,546Q470,546 461,555Q452,564 452,576Q452,588 461,597L483,619ZM476,340Q505,340 532,350.5Q559,361 579,381Q599,401 609.5,426Q620,451 620,479Q620,489 619,498.5Q618,508 615,517Q611,529 615.5,541.5Q620,554 631,559Q643,564 654.5,559Q666,554 670,542Q675,527 677.5,511.5Q680,496 680,480Q680,440 665.5,403.5Q651,367 622,338Q594,310 557.5,295.5Q521,281 482,281L500,263Q508,254 508,242Q508,230 499,221Q490,212 478,212Q466,212 457,221L393,285Q381,297 381,313Q381,329 393,341L457,405Q466,414 478,414Q490,414 499,405Q508,396 508,384Q508,372 499,363L476,340ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,563 848.5,636Q817,709 763,763Q709,817 636,848.5Q563,880 480,880ZM480,800Q614,800 707,707Q800,614 800,480Q800,346 707,253Q614,160 480,160Q346,160 253,253Q160,346 160,480Q160,614 253,707Q346,800 480,800ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Z"/>
|
||||||
|
|
||||||
|
</vector>
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_num_cnf_layout"
|
android:id="@+id/input_num_cnf_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_qta_cnf_layout"
|
android:id="@+id/input_qta_cnf_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_qta_tot_layout"
|
android:id="@+id/input_qta_tot_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_tara_ped_layout"
|
android:id="@+id/input_tara_ped_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -282,7 +282,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_tara_col_layout"
|
android:id="@+id/input_tara_col_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -306,7 +306,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_peso_lordo_layout"
|
android:id="@+id/input_peso_lordo_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
|||||||
@@ -712,7 +712,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_partita_mag_layout"
|
android:id="@+id/input_partita_mag_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? 1f : 2f}"
|
android:layout_weight="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? 1f : 2f}"
|
||||||
@@ -721,7 +721,7 @@
|
|||||||
android:visibility="@{viewmodel.canPartitaMagBeChanged() || viewmodel.partitaMag != null ? View.VISIBLE : View.GONE}"
|
android:visibility="@{viewmodel.canPartitaMagBeChanged() || viewmodel.partitaMag != null ? View.VISIBLE : View.GONE}"
|
||||||
tools:layout_weight="1">
|
tools:layout_weight="1">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_partita_mag_text"
|
android:id="@+id/input_partita_mag_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -735,14 +735,14 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_data_scad_layout"
|
android:id="@+id/input_data_scad_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:enabled="@{view.enabledChangePartitaMag}"
|
android:enabled="@{view.enabledChangePartitaMag}"
|
||||||
android:visibility="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? View.VISIBLE : View.GONE}">
|
android:visibility="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_data_scad_text"
|
android:id="@+id/input_data_scad_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -768,7 +768,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_num_cnf_layout"
|
android:id="@+id/input_num_cnf_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||||
@@ -777,7 +777,7 @@
|
|||||||
android:paddingEnd="4dp"
|
android:paddingEnd="4dp"
|
||||||
tools:layout_weight="1">
|
tools:layout_weight="1">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_num_cnf_text"
|
android:id="@+id/input_num_cnf_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -791,7 +791,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_qta_cnf_layout"
|
android:id="@+id/input_qta_cnf_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -800,7 +800,7 @@
|
|||||||
android:paddingEnd="4dp"
|
android:paddingEnd="4dp"
|
||||||
android:visibility="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? View.VISIBLE : View.GONE}">
|
android:visibility="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_qta_cnf_text"
|
android:id="@+id/input_qta_cnf_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -814,7 +814,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_qta_tot_layout"
|
android:id="@+id/input_qta_tot_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||||
@@ -823,7 +823,7 @@
|
|||||||
android:imeOptions="actionDone"
|
android:imeOptions="actionDone"
|
||||||
tools:layout_weight="1">
|
tools:layout_weight="1">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_qta_tot_text"
|
android:id="@+id/input_qta_tot_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -848,7 +848,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_tara_ped_layout"
|
android:id="@+id/input_tara_ped_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -857,7 +857,7 @@
|
|||||||
android:paddingEnd="4dp"
|
android:paddingEnd="4dp"
|
||||||
tools:layout_weight="1">
|
tools:layout_weight="1">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_tara_ped_text"
|
android:id="@+id/input_tara_ped_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -872,7 +872,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_tara_col_layout"
|
android:id="@+id/input_tara_col_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -880,7 +880,7 @@
|
|||||||
android:focusableInTouchMode="false"
|
android:focusableInTouchMode="false"
|
||||||
android:paddingEnd="4dp">
|
android:paddingEnd="4dp">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_tara_col_text"
|
android:id="@+id/input_tara_col_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -896,7 +896,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_peso_lordo_layout"
|
android:id="@+id/input_peso_lordo_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -905,7 +905,7 @@
|
|||||||
android:imeOptions="actionDone"
|
android:imeOptions="actionDone"
|
||||||
tools:layout_weight="1">
|
tools:layout_weight="1">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_peso_lordo_text"
|
android:id="@+id/input_peso_lordo_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -929,13 +929,13 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_note_layout"
|
android:id="@+id/input_note_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:enabled="@{view.enabledNotes}"
|
android:enabled="@{view.enabledNotes}"
|
||||||
android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }">
|
android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_note_text"
|
android:id="@+id/input_note_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -959,7 +959,7 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/close_lu_btn"
|
android:id="@+id/close_lu_btn"
|
||||||
style="@style/Button.PrimaryOutline"
|
style="@style/Widget.Material3.Button.TonalButton"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="0dp"
|
android:layout_marginStart="0dp"
|
||||||
@@ -975,7 +975,7 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/abort_btn"
|
android:id="@+id/abort_btn"
|
||||||
style="@style/Button.DangerFull"
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
@@ -983,14 +983,14 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:onClick="@{() -> view.dismiss()}"
|
android:onClick="@{() -> view.dismiss()}"
|
||||||
android:paddingEnd="3dp"
|
android:paddingEnd="3dp"
|
||||||
app:icon="@drawable/ic_close_24dp"
|
android:textColor="@color/red_400"
|
||||||
app:iconGravity="textStart"
|
app:strokeColor="@color/red_400"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/save_btn"
|
android:id="@+id/save_btn"
|
||||||
style="@style/Button.PrimaryFull"
|
style="@style/Widget.Material3.Button"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
|
|||||||
@@ -46,13 +46,12 @@
|
|||||||
|
|
||||||
<!-- Username Label -->
|
<!-- Username Label -->
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:errorText="@{view.usernameError}"
|
app:errorText="@{view.usernameError}">
|
||||||
app:hintTextAppearance="@style/hint_text">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_username"
|
android:id="@+id/input_username"
|
||||||
@@ -66,13 +65,12 @@
|
|||||||
|
|
||||||
<!-- Password Label -->
|
<!-- Password Label -->
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:errorText="@{view.passwordError}"
|
app:errorText="@{view.passwordError}"
|
||||||
app:hintTextAppearance="@style/hint_text"
|
|
||||||
app:passwordToggleEnabled="true">
|
app:passwordToggleEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
@@ -102,19 +100,18 @@
|
|||||||
app:el_duration="400"
|
app:el_duration="400"
|
||||||
app:el_expanded_bind="@{view.customSettingsCheckboxChecked}">
|
app:el_expanded_bind="@{view.customSettingsCheckboxChecked}">
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!--Host Label-->
|
<!--Host Label-->
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:errorText="@{view.codAziendaError}"
|
app:errorText="@{view.codAziendaError}">
|
||||||
app:hintTextAppearance="@style/hint_text">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_cod_azienda"
|
android:id="@+id/input_cod_azienda"
|
||||||
@@ -125,7 +122,7 @@
|
|||||||
app:binding="@{view.codAzienda}" />
|
app:binding="@{view.codAzienda}" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -32,13 +32,12 @@
|
|||||||
|
|
||||||
<!-- Username Label -->
|
<!-- Username Label -->
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:errorText="@{view.usernameError}"
|
app:errorText="@{view.usernameError}">
|
||||||
app:hintTextAppearance="@style/hint_text">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_username"
|
android:id="@+id/input_username"
|
||||||
@@ -51,13 +50,12 @@
|
|||||||
|
|
||||||
<!-- Password Label -->
|
<!-- Password Label -->
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:errorText="@{view.passwordError}"
|
app:errorText="@{view.passwordError}"
|
||||||
app:hintTextAppearance="@style/hint_text"
|
|
||||||
app:passwordToggleEnabled="true">
|
app:passwordToggleEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
@@ -86,19 +84,18 @@
|
|||||||
app:el_duration="400"
|
app:el_duration="400"
|
||||||
app:el_expanded_bind="@{view.customSettingsCheckboxChecked}">
|
app:el_expanded_bind="@{view.customSettingsCheckboxChecked}">
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!--Host Label-->
|
<!--Host Label-->
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:errorText="@{view.codAziendaError}"
|
app:errorText="@{view.codAziendaError}">
|
||||||
app:hintTextAppearance="@style/hint_text">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_cod_azienda"
|
android:id="@+id/input_cod_azienda"
|
||||||
@@ -109,7 +106,7 @@
|
|||||||
app:binding="@{view.codAzienda}" />
|
app:binding="@{view.codAzienda}" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</net.cachapa.expandablelayout.ExpandableLayout>
|
</net.cachapa.expandablelayout.ExpandableLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -209,7 +209,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:menu_icon="@drawable/ic_check_white_24dp"
|
app:menu_icon="@drawable/ic_round_check_24"
|
||||||
fab:menu_animationDelayPerItem="50"
|
fab:menu_animationDelayPerItem="50"
|
||||||
fab:menu_backgroundColor="@color/white_bg_alpha"
|
fab:menu_backgroundColor="@color/white_bg_alpha"
|
||||||
fab:menu_buttonSpacing="0dp"
|
fab:menu_buttonSpacing="0dp"
|
||||||
@@ -255,7 +255,7 @@
|
|||||||
android:id="@+id/pv_ordine_close"
|
android:id="@+id/pv_ordine_close"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_check_black_24dp"
|
android:src="@drawable/ic_round_check_24"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
app:fab_colorNormal="@color/white"
|
app:fab_colorNormal="@color/white"
|
||||||
app:fab_colorPressed="@color/white_pressed"
|
app:fab_colorPressed="@color/white_pressed"
|
||||||
|
|||||||
@@ -33,12 +33,10 @@
|
|||||||
android:layout_gravity="center">
|
android:layout_gravity="center">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="36dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="36dp"
|
||||||
android:src="@drawable/app_round_icon"
|
android:src="@drawable/app_round_icon"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingBottom="8dp"
|
|
||||||
android:layout_gravity="center"/>
|
android:layout_gravity="center"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
@@ -95,7 +93,7 @@
|
|||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:layout_toStartOf="@id/main_filter"
|
android:layout_toStartOf="@id/main_filter"
|
||||||
android:src="@drawable/ic_check_black_24dp"
|
android:src="@drawable/ic_round_check_24"
|
||||||
android:tint="@android:color/black"/>
|
android:tint="@android:color/black"/>
|
||||||
|
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|||||||
@@ -25,7 +25,10 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="8dp">
|
android:padding="8dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:background="?attr/selectableItemBackground">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/art_detail"
|
android:id="@+id/art_detail"
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_inventory_id"
|
android:id="@+id/input_inventory_id"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/inventory_id"
|
android:hint="@string/inventory_id"
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_zone"
|
android:id="@+id/input_zone"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/zone"
|
android:hint="@string/zone"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
style="@style/TextInputLayout.OutlinePrimary">
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/level_number"
|
android:id="@+id/level_number"
|
||||||
|
|||||||
@@ -1,177 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:cardCornerRadius="12dp"
|
|
||||||
app:cardElevation="0dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/light_blue_300"
|
|
||||||
android:gravity="center_horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="24dp"
|
|
||||||
android:src="@drawable/ic_error_white_24dp" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingLeft="24dp"
|
|
||||||
android:paddingTop="24dp"
|
|
||||||
android:paddingRight="24dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/title_text"
|
|
||||||
style="@style/TextViewMaterial.Dialog.HeadlineText"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/action_print" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/description_text"
|
|
||||||
style="@style/TextViewMaterial"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
android:gravity="left"
|
|
||||||
android:text="@string/message_print_packing_list" />
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
|
||||||
android:id="@+id/center_buttons_guideline"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintGuide_percent="0.5" />
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/button_abort"
|
|
||||||
style="@style/Button.PrimaryOutline"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="8dp"
|
|
||||||
android:layout_marginRight="8dp"
|
|
||||||
android:text="@string/no"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/center_buttons_guideline"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:strokeColor="?colorPrimary" />
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/button_confirm"
|
|
||||||
style="@style/Button.PrimaryFull"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="8dp"
|
|
||||||
android:layout_marginRight="8dp"
|
|
||||||
android:text="@string/yes"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/center_buttons_guideline"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
<!--<androidx.appcompat.widget.AppCompatTextView-->
|
|
||||||
<!--android:layout_width="match_parent"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--android:text="@string/action_print"-->
|
|
||||||
<!--style="@style/TextViewMaterial.Dialog.HeadlineText"-->
|
|
||||||
<!--android:gravity="center_horizontal"/>-->
|
|
||||||
|
|
||||||
|
|
||||||
<!--<LinearLayout-->
|
|
||||||
<!--android:orientation="vertical"-->
|
|
||||||
<!--android:layout_width="match_parent"-->
|
|
||||||
<!--android:layout_height="match_parent"-->
|
|
||||||
<!--android:padding="16dp">-->
|
|
||||||
|
|
||||||
<!--<LinearLayout-->
|
|
||||||
<!--android:layout_width="match_parent"-->
|
|
||||||
<!--android:layout_height="match_parent"-->
|
|
||||||
<!--android:orientation="horizontal"-->
|
|
||||||
<!--android:gravity="center_horizontal">-->
|
|
||||||
|
|
||||||
<!--<androidx.appcompat.widget.AppCompatTextView-->
|
|
||||||
<!--android:id="@+id/print_message"-->
|
|
||||||
<!--android:layout_width="wrap_content"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--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>-->
|
|
||||||
|
|
||||||
|
|
||||||
<!--<LinearLayout-->
|
|
||||||
<!--android:layout_width="match_parent"-->
|
|
||||||
<!--android:layout_height="match_parent"-->
|
|
||||||
<!--android:orientation="horizontal"-->
|
|
||||||
<!--android:paddingTop="8dp"-->
|
|
||||||
<!--android:gravity="bottom|center_horizontal">-->
|
|
||||||
|
|
||||||
|
|
||||||
<!--<com.google.android.material.button.MaterialButton-->
|
|
||||||
<!--android:id="@+id/button_abort"-->
|
|
||||||
<!--android:layout_width="wrap_content"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--style="@style/Button.PrimaryOutline"-->
|
|
||||||
<!--app:icon="@drawable/ic_clear_24dp"-->
|
|
||||||
<!--android:layout_marginEnd="8dp"-->
|
|
||||||
<!--android:text="@android:string/no"/>-->
|
|
||||||
|
|
||||||
|
|
||||||
<!--<com.google.android.material.button.MaterialButton-->
|
|
||||||
<!--android:id="@+id/button_confirm"-->
|
|
||||||
<!--android:layout_width="wrap_content"-->
|
|
||||||
<!--android:layout_height="wrap_content"-->
|
|
||||||
<!--style="@style/Button.PrimaryFull"-->
|
|
||||||
<!--app:icon="@drawable/ic_print_24dp"-->
|
|
||||||
<!--android:text="@android:string/yes"/>-->
|
|
||||||
<!--</LinearLayout>-->
|
|
||||||
|
|
||||||
<!--</LinearLayout>-->
|
|
||||||
|
|
||||||
<!--</LinearLayout>-->
|
|
||||||
<!--</androidx.cardview.widget.CardView>-->
|
|
||||||
|
|
||||||
</layout>
|
|
||||||
424
app/src/main/res/layout/dialog_create_new_art.xml
Normal file
424
app/src/main/res/layout/dialog_create_new_art.xml
Normal file
@@ -0,0 +1,424 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewmodel"
|
||||||
|
type="it.integry.integrywmsnative.view.dialogs.create_new_art.DialogCreateNewArtViewModel" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="view"
|
||||||
|
type="it.integry.integrywmsnative.view.dialogs.create_new_art.DialogCreateNewArtView" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@android:color/white"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorPrimary"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
app:titleTextColor="@android:color/white">
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="12dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="?android:attr/textAppearanceSmall"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:text="Informazioni generali"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_descrizione_layout"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:error="@{viewmodel.descrizione.errorMessage}"
|
||||||
|
app:errorEnabled="true">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_descrizione_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/description"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:lines="3"
|
||||||
|
android:nextFocusDown="@id/input_note_text"
|
||||||
|
app:binding="@{viewmodel.descrizione}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_note_layout"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
app:error="@{viewmodel.noteAggiuntive.errorMessage}"
|
||||||
|
app:errorEnabled="true">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/input_note_text"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/hint_additional_notes"
|
||||||
|
android:inputType="textMultiLine"
|
||||||
|
android:lines="2"
|
||||||
|
android:nextFocusDown="@id/filled_unt_mis_text"
|
||||||
|
app:binding="@{viewmodel.noteAggiuntive}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="?android:attr/textAppearanceSmall"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:text="Classificazione merceologica"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_gruppo_layout"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/group"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
app:error="@{viewmodel.selectedMtbGrup.errorMessage}"
|
||||||
|
app:errorEnabled="true">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_gruppo_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="false"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:focusable="false"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="none"
|
||||||
|
android:nextFocusDown="@id/filled_sotto_gruppo_text"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:binding="@{view.selectedMtbGrupText}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_sotto_gruppo_layout"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/sub_group"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
app:error="@{viewmodel.selectedMtbSubGrup.errorMessage}"
|
||||||
|
app:errorEnabled="true">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_sotto_gruppo_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="false"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:focusable="false"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="none"
|
||||||
|
android:nextFocusDown="@id/filled_sotto_sotto_gruppo_text"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:binding="@{view.selectedMtbSubGrupText}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_sotto_sotto_gruppo_layout"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/sub_sub_group"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
app:error="@{viewmodel.selectedMtbSubSubGrup.errorMessage}"
|
||||||
|
app:errorEnabled="true">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_sotto_sotto_gruppo_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="false"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:focusable="false"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="none"
|
||||||
|
android:nextFocusDown="@id/input_qta_cnf_text"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:binding="@{view.selectedMtbSubSubGrupText}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="?android:attr/textAppearanceSmall"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:text="Dati magazzino"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatCheckBox
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Quantità per confezione fissa"
|
||||||
|
app:checked="@{viewmodel.qtaCnfFissa}"/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="10">
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_unt_mis_layout"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="4"
|
||||||
|
android:hint="@string/unt_mis"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
app:error="@{viewmodel.selectedUntMis.errorMessage}"
|
||||||
|
app:errorEnabled="true">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/filled_unt_mis_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="false"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:focusable="false"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="none"
|
||||||
|
android:nextFocusDown="@id/input_qta_cnf_text"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:binding="@{view.selectedUntMisText}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_qta_cnf_layout"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_weight="6"
|
||||||
|
android:hint="@string/qty_x_pck"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
app:error="@{viewmodel.qtaCnf.errorMessage}"
|
||||||
|
app:errorEnabled="true">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/input_qta_cnf_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
|
android:nextFocusDown="@id/input_default_pos_text"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:binding="@{viewmodel.qtaCnf}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_default_pos_layout"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:hint="@string/position_text"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
app:error="@{viewmodel.selectedPosizioneDefault.errorMessage}"
|
||||||
|
app:errorEnabled="true">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
|
||||||
|
android:id="@+id/input_default_pos_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="false"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:focusable="false"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="none"
|
||||||
|
android:nextFocusDown="@id/filled_gruppo_text"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:binding="@{view.selectedPosizioneText}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="?android:attr/textAppearanceSmall"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:text="Barcode prodotto" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/barcode_prodotto_image"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="10">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:fontFamily="monospace"
|
||||||
|
app:binding="@{viewmodel.barcodeProdotto}"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:reverse_visibility="@{view.editingBarcode}"
|
||||||
|
tools:visibility="gone"
|
||||||
|
tools:text="809462372" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/input_barcode_layout"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="5"
|
||||||
|
android:hint="Barcode"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
tools:visibility="gone"
|
||||||
|
app:errorEnabled="true"
|
||||||
|
app:visibility="@{view.editingBarcode}">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/input_barcode_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:imeOptions="actionNext"
|
||||||
|
android:inputType="text"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:binding="@{viewmodel.barcodeProdotto}" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
|
style="@style/Widget.Material3.Button"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/ic_edit_24dp"
|
||||||
|
android:tint="?attr/colorTertiary"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:onClick="@{() -> view.editingBarcode.toggle()}"
|
||||||
|
app:reverse_visibility="@{view.editingBarcode}"/>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
|
style="@style/Widget.Material3.Button"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/ic_round_check_24"
|
||||||
|
android:tint="?attr/colorPrimary"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:onClick="@{() -> view.saveBarcode()}"
|
||||||
|
app:visibility="@{view.editingBarcode}"/>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="?attr/borderlessButtonStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_gravity="start"
|
||||||
|
android:text="@string/abort"
|
||||||
|
android:onClick="@{() -> view.dismissAllowingStateLoss()}"/>
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/save_button"
|
||||||
|
style="?attr/borderlessButtonStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:text="@string/action_save"
|
||||||
|
android:onClick="@{() -> viewmodel.save()}"/>
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
</layout>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/level_number_layout"
|
android:id="@+id/level_number_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/level_number_layout"
|
android:id="@+id/level_number_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_num_cnf_layout"
|
android:id="@+id/input_num_cnf_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:enabled="@{view.enabledNumCnf}"
|
android:enabled="@{view.enabledNumCnf}"
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_qta_cnf_layout"
|
android:id="@+id/input_qta_cnf_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -209,7 +209,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_qta_tot_layout"
|
android:id="@+id/input_qta_tot_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -242,7 +242,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_tara_ped_layout"
|
android:id="@+id/input_tara_ped_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -267,7 +267,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_tara_col_layout"
|
android:id="@+id/input_tara_col_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -291,7 +291,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_peso_lordo_layout"
|
android:id="@+id/input_peso_lordo_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
app:layout_constraintGuide_percent="0.51" />
|
app:layout_constraintGuide_percent="0.51" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="@id/guide_left"
|
app:layout_constraintStart_toStartOf="@id/guide_left"
|
||||||
app:layout_constraintEnd_toStartOf="@id/guide_right"
|
app:layout_constraintEnd_toStartOf="@id/guide_right"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
style="@style/TextInputLayout.OutlinePrimary">
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/additional_notes_text"
|
android:id="@+id/additional_notes_text"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/full_white"
|
android:background="@color/full_white"
|
||||||
@@ -723,7 +723,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_partita_mag_layout"
|
android:id="@+id/input_partita_mag_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? 1f : 2f}"
|
android:layout_weight="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? 1f : 2f}"
|
||||||
@@ -732,7 +732,7 @@
|
|||||||
android:visibility="@{viewmodel.canPartitaMagBeChanged() || viewmodel.partitaMag != null ? View.VISIBLE : View.GONE}"
|
android:visibility="@{viewmodel.canPartitaMagBeChanged() || viewmodel.partitaMag != null ? View.VISIBLE : View.GONE}"
|
||||||
tools:layout_weight="1">
|
tools:layout_weight="1">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_partita_mag_text"
|
android:id="@+id/input_partita_mag_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -746,14 +746,14 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_data_scad_layout"
|
android:id="@+id/input_data_scad_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:enabled="@{view.enabledChangePartitaMag}"
|
android:enabled="@{view.enabledChangePartitaMag}"
|
||||||
android:visibility="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? View.VISIBLE : View.GONE}">
|
android:visibility="@{viewmodel.shouldAskDataScad || viewmodel.shouldShowDataScad ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_data_scad_text"
|
android:id="@+id/input_data_scad_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -779,7 +779,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_num_cnf_layout"
|
android:id="@+id/input_num_cnf_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||||
@@ -788,7 +788,7 @@
|
|||||||
android:paddingEnd="4dp"
|
android:paddingEnd="4dp"
|
||||||
tools:layout_weight="1">
|
tools:layout_weight="1">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_num_cnf_text"
|
android:id="@+id/input_num_cnf_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -804,7 +804,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_qta_cnf_layout"
|
android:id="@+id/input_qta_cnf_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -813,7 +813,7 @@
|
|||||||
android:paddingEnd="4dp"
|
android:paddingEnd="4dp"
|
||||||
android:visibility="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? View.VISIBLE : View.GONE}">
|
android:visibility="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_qta_cnf_text"
|
android:id="@+id/input_qta_cnf_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -829,7 +829,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_qta_tot_layout"
|
android:id="@+id/input_qta_tot_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
android:layout_weight="@{!viewmodel.mtbAart.flagQtaCnfFissaBoolean ? 1f : 1.5f}"
|
||||||
@@ -837,7 +837,7 @@
|
|||||||
android:focusableInTouchMode="false"
|
android:focusableInTouchMode="false"
|
||||||
tools:layout_weight="1">
|
tools:layout_weight="1">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_qta_tot_text"
|
android:id="@+id/input_qta_tot_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -864,7 +864,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_tara_ped_layout"
|
android:id="@+id/input_tara_ped_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -873,7 +873,7 @@
|
|||||||
android:paddingEnd="4dp"
|
android:paddingEnd="4dp"
|
||||||
tools:layout_weight="1">
|
tools:layout_weight="1">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_tara_ped_text"
|
android:id="@+id/input_tara_ped_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -888,7 +888,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_tara_col_layout"
|
android:id="@+id/input_tara_col_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -896,7 +896,7 @@
|
|||||||
android:focusableInTouchMode="false"
|
android:focusableInTouchMode="false"
|
||||||
android:paddingEnd="4dp">
|
android:paddingEnd="4dp">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_tara_col_text"
|
android:id="@+id/input_tara_col_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -912,7 +912,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_peso_lordo_layout"
|
android:id="@+id/input_peso_lordo_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -922,7 +922,7 @@
|
|||||||
tools:enabled="false"
|
tools:enabled="false"
|
||||||
tools:layout_weight="1">
|
tools:layout_weight="1">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_peso_lordo_text"
|
android:id="@+id/input_peso_lordo_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -945,13 +945,13 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/input_note_layout"
|
android:id="@+id/input_note_layout"
|
||||||
style="@style/TextInputLayout.OutlinePrimary"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:enabled="@{view.enabledNotes}"
|
android:enabled="@{view.enabledNotes}"
|
||||||
android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }">
|
android:visibility="@{view.enabledNotes ? View.VISIBLE : View.GONE }">
|
||||||
|
|
||||||
<EditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/input_note_text"
|
android:id="@+id/input_note_text"
|
||||||
style="@style/TextInputEditText.OutlinePrimary"
|
style="@style/TextInputEditText.OutlinePrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -971,16 +971,15 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:weightSum="3">
|
android:weightSum="11">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
style="@style/Widget.Material3.Button.TonalButton"
|
||||||
android:id="@+id/close_lu_btn"
|
android:id="@+id/close_lu_btn"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="0dp"
|
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="4"
|
||||||
android:onClick="@{() -> view.saveAndCloseLU()}"
|
android:onClick="@{() -> view.saveAndCloseLU()}"
|
||||||
android:text="@string/action_close_ul"
|
android:text="@string/action_close_ul"
|
||||||
app:strokeColor="?colorPrimary"
|
app:strokeColor="?colorPrimary"
|
||||||
@@ -989,33 +988,32 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/abort_btn"
|
android:id="@+id/abort_btn"
|
||||||
style="@style/Button.DangerOutline"
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="4"
|
||||||
android:onClick="@{() -> view.dismiss()}"
|
android:onClick="@{() -> view.dismiss()}"
|
||||||
android:text="@string/abort"
|
android:text="@string/abort"
|
||||||
app:iconGravity="start" />
|
android:textColor="@color/red_400"
|
||||||
|
app:strokeColor="@color/red_400"/>
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
style="@style/Widget.Material3.Button"
|
||||||
android:id="@+id/save_btn"
|
android:id="@+id/save_btn"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginEnd="0dp"
|
android:layout_marginEnd="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="3"
|
||||||
android:onClick="@{() -> view.save()}"
|
android:onClick="@{() -> view.save()}"
|
||||||
android:text="@string/action_save"
|
android:text="@string/action_save"
|
||||||
app:icon="@drawable/ic_save_24"
|
|
||||||
app:iconGravity="start" />
|
app:iconGravity="start" />
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user