Просмотр исходного кода

Make shortcuts work canvas sections

Vijayakrishnan 4 лет назад
Родитель
Сommit
145f8adc5f

+ 1 - 0
public/css/shortcut.css

@@ -6,6 +6,7 @@
     display: none;
     min-width: 160px;
     max-width: 280px;
+    z-index: 98;
 }
 .stag-shortcuts>.sc {
     font-size: 13px;

+ 1 - 1
public/css/style.css

@@ -858,7 +858,7 @@ body .node input[type="number"] {
     width: 100%;
     height: calc(100% - 55px);
     overflow-x: auto;
-    z-index: 19998;
+    z-index: 97;
     justify-content: center;
     align-items: center;
     display: none;

+ 16 - 0
resources/views/app/patient/dashboard.blade.php

@@ -1,6 +1,22 @@
 @extends ('layouts.patient')
 
 @section('inner-content')
+    <?php
+    $shortCutsObject = [];
+    foreach ($pro->shortcuts as $shortcut) {
+
+        // %replaceables%
+        $shortcut->text = str_replace("%AGE%", $patient->age_in_years, $shortcut->text);
+        $shortcut->text = str_replace("%GENDER%", $patient->sex, $shortcut->text);
+        $shortcut->text = str_replace("%NAME%", $patient->displayName(), $shortcut->text);
+
+        $shortCutsObject[] = [
+            "name" => $shortcut->shortcut,
+            "value" => $shortcut->text
+        ];
+    }
+    ?>
+    <script>window.userShortcuts = <?= json_encode($shortCutsObject); ?>;</script>
     <div>
 
         {{-- CARE PLAN START --}}

+ 2 - 2
resources/views/app/patient/note/_create-bill.blade.php

@@ -30,10 +30,10 @@
                 $maxMinutes = 90;
             }
             else if($note->new_or_fu_or_na === 'FU') {
-                if($note->method === 'Video') {
+                if($note->method === 'VIDEO') {
                     $maxMinutes = 75;
                 }
-                else if($note->method === 'Audio') {
+                else if($note->method === 'AUDIO') {
                     $maxMinutes = 45;
                 }
             }

+ 4 - 4
resources/views/app/patient/note/dashboard.blade.php

@@ -180,10 +180,10 @@
                                 <div class="mb-2">
                                     <select name="method" class="form-control form-control-sm" required>
                                         <option value="">-- select --</option>
-                                        <option value="Video" {{ $note->method === "Video" ? "selected" : "" }}>Video</option>
-                                        <option value="Audio" {{ $note->method === "Audio" ? "selected" : "" }}>Audio</option>
-                                        <option value="In-Clinic" {{ $note->method === "In-Clinic" ? "selected" : "" }}>In-Clinic</option>
-                                        <option value="House Call" {{ $note->method === "House Call" ? "selected" : "" }}>House Call</option>
+                                        <option value="VIDEO" {{ $note->method === "VIDEO" ? "selected" : "" }}>Video</option>
+                                        <option value="AUDIO" {{ $note->method === "AUDIO" ? "selected" : "" }}>Audio</option>
+                                        <option value="IN_CLINIC" {{ $note->method === "IN_CLINIC" ? "selected" : "" }}>In-Clinic</option>
+                                        <option value="HOUSE_CALL" {{ $note->method === "HOUSE_CALL" ? "selected" : "" }}>House Call</option>
                                     </select>
                                 </div>
                                 <div class="mb-0">