2 Commits 554c4309c4 ... 0862ee0d84

Author SHA1 Message Date
  ilhamitubagoes 0862ee0d84 Memunculkan teks ketika data dokumen tidak valid di ProblemWorkingAdapter 2 years ago
  ilhamitubagoes 241429a870 Menambahkan kondisi ketika ada data auto pass dihilangkan teksnya 2 years ago

+ 5 - 2
app/src/main/java/com/fusi24/entryPermitScanner/adapter/ProblemWorkingAdapter.java

@@ -69,10 +69,13 @@ public class ProblemWorkingAdapter extends RecyclerView.Adapter<ProblemWorkingAd
69
         DataResultPermit permit = resultPermits.get(position);
69
         DataResultPermit permit = resultPermits.get(position);
70
         holder.binding.tvGroupName.setText(permit.getWorkingType().getName());
70
         holder.binding.tvGroupName.setText(permit.getWorkingType().getName());
71
 
71
 
72
-        if (permit.getProblems().size() == 0){
72
+        /*if (permit.getProblems().size() == 0){
73
             holder.binding.tvMessage.setVisibility(View.VISIBLE);
73
             holder.binding.tvMessage.setVisibility(View.VISIBLE);
74
             holder.binding.tvMessage.setText(permit.getMessage());
74
             holder.binding.tvMessage.setText(permit.getMessage());
75
-        }
75
+        }*/
76
+
77
+        holder.binding.tvMessage.setVisibility(View.VISIBLE);
78
+        holder.binding.tvMessage.setText(permit.getMessage());
76
 
79
 
77
         groupList = Stream.of(permit.getProblems())
80
         groupList = Stream.of(permit.getProblems())
78
                 .map(v -> v.getDataDocumentType().getGroup())
81
                 .map(v -> v.getDataDocumentType().getGroup())

+ 6 - 2
app/src/main/java/com/fusi24/entryPermitScanner/ui/scanresult/ScanResultActivity.java

@@ -273,8 +273,12 @@ public class ScanResultActivity extends BaseActivity implements ScanResultView {
273
         }
273
         }
274
 
274
 
275
         if (dataWorkingPermit.getMessage() != null) {
275
         if (dataWorkingPermit.getMessage() != null) {
276
-            binding.tvMessage.setVisibility(View.VISIBLE);
277
-            binding.tvMessage.setText(dataWorkingPermit.getMessage());
276
+            if (dataWorkingPermit.getMessage().contains("Auto Pass")){
277
+                binding.tvMessage.setVisibility(View.GONE);
278
+            } else {
279
+                binding.tvMessage.setVisibility(View.VISIBLE);
280
+                binding.tvMessage.setText(dataWorkingPermit.getMessage());
281
+            }
278
         } else {
282
         } else {
279
             binding.tvMessage.setVisibility(View.GONE);
283
             binding.tvMessage.setVisibility(View.GONE);
280
         }
284
         }