浏览代码

Point state name UI

Vijayakrishnan 3 年之前
父节点
当前提交
9a9580b74f
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 7 0
      app/Helpers/helpers.php
  2. 1 1
      resources/views/app/patient/wizard-partials/state-row.blade.php

+ 7 - 0
app/Helpers/helpers.php

@@ -477,6 +477,13 @@ if(!function_exists('sanitize_field_name')) {
     }
     }
 }
 }
 
 
+if(!function_exists('sanitize_state_name')) {
+    function sanitize_state_name($name) {
+        $result = strtolower($name);
+        return ucwords(preg_replace("/_/i", " ", $result));
+    }
+}
+
 if(!function_exists('renderNoteTemplate')) {
 if(!function_exists('renderNoteTemplate')) {
     function renderNoteTemplate($template, $topLevel)
     function renderNoteTemplate($template, $topLevel)
     {
     {

+ 1 - 1
resources/views/app/patient/wizard-partials/state-row.blade.php

@@ -8,7 +8,7 @@
             @elseif($point->state === 'ENTRY_ERROR')
             @elseif($point->state === 'ENTRY_ERROR')
                 <i class="text-secondary fa fa-circle text-sm on-hover-opaque mr-2"></i>
                 <i class="text-secondary fa fa-circle text-sm on-hover-opaque mr-2"></i>
             @endif
             @endif
-            <span class="text-secondary text-sm font-weight-bold">{{$point->state}} ({{$counts[$point->state]}})</span>
+            <span class="text-secondary text-sm font-weight-bold">{{sanitize_state_name($point->state)}} ({{$counts[$point->state]}})</span>
         </div>
         </div>
         <hr class="m-0">
         <hr class="m-0">
     </td>
     </td>