notes.blade.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. @extends ('layouts/template')
  2. @section('content')
  3. <div class="p-3 mcp-theme-1">
  4. <div class="card">
  5. <div class="card-header px-3 py-2 d-flex align-items-center">
  6. <strong class="mr-4">
  7. <i class="fas fa-user-injured"></i>
  8. Notes
  9. </strong>
  10. <select class="ml-auto max-width-300px form-control form-control-sm" onchange="fastLoad('/notes/' + this.value, true, false, false)">
  11. <option value="" {{ $filter === '' ? 'selected' : '' }}>All notes</option>
  12. <option value="not-yet-signed" {{ $filter === 'not-yet-signed' ? 'selected' : '' }}>Notes not yet signed</option>
  13. </select>
  14. </div>
  15. <div class="card-body p-0">
  16. <table class="table table-sm table-condensed p-0 m-0">
  17. <thead class="bg-light">
  18. <tr>
  19. <th class="px-3 border-0">Created</th>
  20. <th class="border-0">Effective Date</th>
  21. <th class="border-0">Patient</th>
  22. <th class="border-0 w-50">Content</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. @foreach ($notes as $note)
  27. <tr class="{{ $note->is_cancelled ? 'cancelled-item always-clickable' : '' }}">
  28. <td class="px-3">
  29. {{ friendly_date_time($note->created_at, true) }}
  30. </td>
  31. <td class="">
  32. <a href="/patients/view/{{ $note->client->uid }}/notes/view/{{ $note->uid }}" class="font-weight-bold">
  33. {{ friendly_date_time($note->effective_dateest, false) }}
  34. </a>
  35. <span class="ml-1">{{ $note->is_cancelled ? '[cancelled]' : '' }}</span>
  36. </td>
  37. <td class="">
  38. <a href="/patients/view/{{ $note->client->uid }}">{{ $note->client->displayName() }}</a>
  39. </td>
  40. <td class="">
  41. <?php
  42. $textContent = strip_tags($note->free_text_html);
  43. if(strlen($textContent) > 200) {
  44. $textContent = substr($textContent, 0, 200) . '…';
  45. }
  46. ?>
  47. {!! empty($textContent) ? '-' : $textContent !!}
  48. </td>
  49. </tr>
  50. @endforeach
  51. </tbody>
  52. </table>
  53. </div>
  54. </div>
  55. </div>
  56. @endsection