diff --git a/.gradle/4.6/fileHashes/fileHashes.bin b/.gradle/4.6/fileHashes/fileHashes.bin
index 80f9b94..984d0c8 100644
Binary files a/.gradle/4.6/fileHashes/fileHashes.bin and b/.gradle/4.6/fileHashes/fileHashes.bin differ
diff --git a/.gradle/4.6/fileHashes/fileHashes.lock b/.gradle/4.6/fileHashes/fileHashes.lock
index 9dde3fd..eba34f2 100644
Binary files a/.gradle/4.6/fileHashes/fileHashes.lock and b/.gradle/4.6/fileHashes/fileHashes.lock differ
diff --git a/.gradle/4.6/javaCompile/classAnalysis.bin b/.gradle/4.6/javaCompile/classAnalysis.bin
index c717b37..457d5b9 100644
Binary files a/.gradle/4.6/javaCompile/classAnalysis.bin and b/.gradle/4.6/javaCompile/classAnalysis.bin differ
diff --git a/.gradle/4.6/javaCompile/javaCompile.lock b/.gradle/4.6/javaCompile/javaCompile.lock
index 63913f1..8166bea 100644
Binary files a/.gradle/4.6/javaCompile/javaCompile.lock and b/.gradle/4.6/javaCompile/javaCompile.lock differ
diff --git a/.gradle/4.6/javaCompile/taskHistory.bin b/.gradle/4.6/javaCompile/taskHistory.bin
index cd53a58..a08f145 100644
Binary files a/.gradle/4.6/javaCompile/taskHistory.bin and b/.gradle/4.6/javaCompile/taskHistory.bin differ
diff --git a/.gradle/4.6/taskHistory/taskHistory.bin b/.gradle/4.6/taskHistory/taskHistory.bin
index 53252cb..288c6fd 100644
Binary files a/.gradle/4.6/taskHistory/taskHistory.bin and b/.gradle/4.6/taskHistory/taskHistory.bin differ
diff --git a/.gradle/4.6/taskHistory/taskHistory.lock b/.gradle/4.6/taskHistory/taskHistory.lock
index 4e46269..57b1376 100644
Binary files a/.gradle/4.6/taskHistory/taskHistory.lock and b/.gradle/4.6/taskHistory/taskHistory.lock differ
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
index a1b0aa6..95cc2e5 100644
Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
index 586764e..acee100 100644
Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ
diff --git a/.idea/misc.xml b/.idea/misc.xml
index e0d5b93..b0c7b20 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 9208789..c0c0f9d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -12,176 +12,23 @@
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -204,12 +51,12 @@
-
+
-
-
+
+
@@ -217,8 +64,47 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -226,14 +112,20 @@
-
-
+
+
+
+
+ textView3
+ txtDriver
+
+
@@ -2503,8 +2395,12 @@
@@ -2518,9 +2414,7 @@
-
-
@@ -2528,17 +2422,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -2547,6 +2430,8 @@
+
+
@@ -2691,13 +2576,13 @@
+
-
-
+
@@ -2706,20 +2591,21 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -2727,10 +2613,179 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2785,13 +2840,6 @@
-
-
-
-
-
-
-
@@ -2799,17 +2847,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
diff --git a/app/build.gradle b/app/build.gradle
index c1229ce..21967ef 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -6,8 +6,8 @@ android {
applicationId "verdnatura.es.repartoverdnatura"
minSdkVersion 19
targetSdkVersion 28
- versionCode 3
- versionName "1.3"
+ versionCode 4
+ versionName "1.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
diff --git a/app/release/output.json b/app/release/output.json
index e71d682..dccaa98 100644
--- a/app/release/output.json
+++ b/app/release/output.json
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":3,"versionName":"1.3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":4,"versionName":"1.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
diff --git a/app/release/vndelivery.apk b/app/release/vndelivery.apk
index 1db6b64..4ff36e0 100644
Binary files a/app/release/vndelivery.apk and b/app/release/vndelivery.apk differ
diff --git a/app/src/main/java/verdnatura/es/repartoverdnatura/ADAPTERS/RutaAdapter.java b/app/src/main/java/verdnatura/es/repartoverdnatura/ADAPTERS/RutaAdapter.java
index a91cc12..615624c 100644
--- a/app/src/main/java/verdnatura/es/repartoverdnatura/ADAPTERS/RutaAdapter.java
+++ b/app/src/main/java/verdnatura/es/repartoverdnatura/ADAPTERS/RutaAdapter.java
@@ -45,6 +45,7 @@ public class RutaAdapter extends ArrayAdapter {
TextView txtPalete = convertView.findViewById(R.id.textView12);
TextView txtM3 = convertView.findViewById(R.id.txtM3);
TextView txtHour = convertView.findViewById(R.id.textView15);
+ TextView txtDriver = convertView.findViewById(R.id.txtDriver);
LinearLayout btnShow = convertView.findViewById(R.id.linearLayout);
TextView btnCargador = convertView.findViewById(R.id.btnCargadores);
TextView txtOnline = convertView.findViewById(R.id.txtOnline);
@@ -55,6 +56,7 @@ public class RutaAdapter extends ArrayAdapter {
txtPalete.setText(ruta.getPlate());
txtM3.setText(ruta.getM3());
txtHour.setText(ruta.getHour());
+ txtDriver.setText(ruta.getDriver());
btnShow.setOnClickListener(new View.OnClickListener() {
@Override
diff --git a/app/src/main/java/verdnatura/es/repartoverdnatura/LoadersActivity.java b/app/src/main/java/verdnatura/es/repartoverdnatura/LoadersActivity.java
index 80e58a8..0074297 100644
--- a/app/src/main/java/verdnatura/es/repartoverdnatura/LoadersActivity.java
+++ b/app/src/main/java/verdnatura/es/repartoverdnatura/LoadersActivity.java
@@ -106,13 +106,29 @@ public class LoadersActivity extends AppCompatActivity {
w.setSelected(true);
listWorkersSelected.add(w);
}else{
- if(w.getRouteLoader() == null){
+
+ if (listWorkersNoSelected.size() > 0 && !listWorkersNoSelected.get(listWorkersNoSelected.size() -1).getId().equals(w.getId()) ){
+ w.setSelected(false);
+ listWorkersNoSelected.add(w);
+ }else if(listWorkersNoSelected.size() == 0){
w.setSelected(false);
listWorkersNoSelected.add(w);
}
}
+ }
+
+ for (Worker work : listWorkersSelected){
+
+ for(Worker workNo : listWorkersNoSelected){
+ if (workNo.getId().equals(work.getId())){
+ listWorkersNoSelected.remove(listWorkersNoSelected.indexOf(workNo));
+ break;
+ }
+ }
+
+
}
listWorkers.addAll(listWorkersSelected);
listWorkers.addAll(listWorkersNoSelected);
diff --git a/app/src/main/java/verdnatura/es/repartoverdnatura/MainActivity.java b/app/src/main/java/verdnatura/es/repartoverdnatura/MainActivity.java
index 02f0c55..088930b 100644
--- a/app/src/main/java/verdnatura/es/repartoverdnatura/MainActivity.java
+++ b/app/src/main/java/verdnatura/es/repartoverdnatura/MainActivity.java
@@ -99,7 +99,7 @@ public class MainActivity extends AppCompatActivity {
private void setViews(){
listViewRutas = findViewById(R.id.listRutas);
listViewPendingTickets = findViewById(R.id.listPendingTickets);
- heightCellRoute = Utils.convertDipToPixels(120f,this);
+ heightCellRoute = Utils.convertDipToPixels(130f,this);
heightCellHeader = Utils.convertDipToPixels(45f,this);
txtDriver = findViewById(R.id.textView3);
btnUpload = findViewById(R.id.btnUpload);
@@ -119,7 +119,7 @@ public class MainActivity extends AppCompatActivity {
if(response.isSuccessful()){
for (Ruta ruta : response.body()){
LocalStorage.saveRutas(that,response.body());
- txtDriver.setText(ruta.getDriver());
+ //txtDriver.setText(ruta.getDriver());
try {
if (date.compareTo(format.parse(ruta.getDate())) == 0){
@@ -380,13 +380,7 @@ public class MainActivity extends AppCompatActivity {
"Actualizar",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
- final String appPackageName = getPackageName(); // getPackageName() from Context or Activity object
- try {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
- } catch (android.content.ActivityNotFoundException anfe) {
- //startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://app.verdnatura.es/bin/vndelivery.apk")));
- }
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://app.verdnatura.es/bin/vndelivery.apk")));
}
});
diff --git a/app/src/main/res/layout/row_route.xml b/app/src/main/res/layout/row_route.xml
index b4cc5ba..abdd04f 100644
--- a/app/src/main/res/layout/row_route.xml
+++ b/app/src/main/res/layout/row_route.xml
@@ -8,7 +8,7 @@
-
+
+