فهرست منبع

fixed device dropdown

Josh 4 سال پیش
والد
کامیت
3d08cb3e12

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

@@ -20,7 +20,7 @@ class PatientController extends Controller
     {
         $mcpPros = Pro::where('is_enrolled_as_mcp', true)->get();
         $facilities = Facility::where('is_active', true)->get();
-        $devices = BDTDevice::where('is_active', true)->get();
+        $devices = BDTDevice::where('is_active', true)->orderBy('imei', 'asc')->get();
         return view('app.patient.dashboard', compact('patient', 'facilities', 'devices'));
     }
 

+ 1 - 1
resources/views/app/patient/dashboard.blade.php

@@ -37,7 +37,7 @@
                                         @foreach($devices as $device)
                                             @if(!$patient->hasDevice($device))
                                             <option value="{{$device->uid}}">
-                                                {{$device->category}} (IMEI: {{$device->imei}})
+                                                {{$device->imei}} ({{$device->category}})
                                             </option>
                                             @endif
                                         @endforeach

+ 1 - 1
resources/views/app/patient/devices.blade.php

@@ -14,7 +14,7 @@
                             <option value=""> --select-- </option>
                             @foreach($devices as $device)
                                 <option value="{{$device->uid}}">
-                                    {{$device->category}} (IMEI: {{$device->imei}})
+                                {$device->imei}} ({{$device->category}}) 
                                 </option>
                             @endforeach
                         </select>