Преглед на файлове

Merge branch 'dev' of rav.triplestart.com:jmudaka/stagfe2

= преди 3 години
родител
ревизия
82f65b5057
променени са 2 файла, в които са добавени 16 реда и са изтрити 3 реда
  1. 1 1
      app/Http/Controllers/PatientController.php
  2. 15 2
      resources/views/app/patient/handouts-list.blade.php

+ 1 - 1
app/Http/Controllers/PatientController.php

@@ -330,7 +330,7 @@ class PatientController extends Controller
     public function handouts(Request $request, Client $patient )
     {
         $clientHandouts = HandoutClient::where('client_id', $patient->id)->get();
-        $handouts = Handout::where('is_active', true)->get();
+        $handouts = Handout::where('is_active', true)->orderBy('display_name', 'ASC')->get();
         return view('app.patient.handouts', compact('patient', 'clientHandouts', 'handouts'));
     }
 

+ 15 - 2
resources/views/app/patient/handouts-list.blade.php

@@ -1,10 +1,19 @@
+<link href="/select2/select2.min.css" rel="stylesheet" />
+<script src="/select2/select2.min.js"></script>
+
+<style>
+    .select2-container {
+    width: 100% !important;
+}
+</style>
+
 <div class="">
     <div class="d-flex align-items-center pb-2">
         <p class="font-weight-bold text-secondary m-0 font-size-14">Handouts</p>
         <span class="mx-2 text-secondary">|</span>
         <div moe>
             <a start show class="">Add</a>
-            <form url="/api/handoutClient/create">
+            <form url="/api/handoutClient/create" style="min-width: 300px;">
                 <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
                 @if(@$note)
                     <input type="hidden" name="noteUid" value="{{ $note->uid }}">
@@ -75,4 +84,8 @@
         </tbody>
     </table>
 </div>
-
+<script>
+    $(document).ready(function(){
+        $('select[name=handoutUid]').select2();
+    });
+</script>