template.blade.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <!DOCTYPE html>
  2. <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>{{ config('app.name') }}</title>
  7. <!-- Fonts -->
  8. <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
  9. {{-- mc initializers --}}
  10. <script src="/js/mc-init.js?_=2"></script>
  11. {{-- vue --}}
  12. <script src="/js/vue.js"></script>
  13. {{-- Quill RTE --}}
  14. <script>
  15. let stagQuillConfig = {
  16. toolbar: ['bold', 'italic', 'underline', { 'list': 'ordered'}, { 'list': 'bullet' }],
  17. keyboard: {
  18. bindings: {
  19. handleEnter: {
  20. key: 13,
  21. handler: function() {
  22. if(!$('.stag-shortcuts:visible').length) return true;
  23. }
  24. }
  25. }
  26. }
  27. };
  28. </script>
  29. <link href="/quill/quill.snow.css" rel="stylesheet">
  30. <script src="/quill/quill.js"></script>
  31. <!-- <link href="{{ asset('bootstrap-4.5.0/css/bootstrap.css') }}" rel="stylesheet"> -->
  32. <link rel="stylesheet" href="/fontawesome-free-5.13.1-web/css/all.min.css">
  33. <link href="{{ asset('/css/app.css') }}" rel="stylesheet">
  34. <link href="{{ asset('/css/style.css') }}" rel="stylesheet">
  35. <link href="{{ asset('/css/yemi.css') }}" rel="stylesheet">
  36. <link rel="stylesheet" href="{{ asset('/css/toastr.min.css') }}">
  37. <link href="{{asset('/css/z.css')}}" rel=stylesheet>
  38. <!-- Styles -->
  39. <script src="{{ asset('js/app.js') }}" type="application/javascript"></script>
  40. <script src="/js/jquery-3.5.1.min.js"></script>
  41. <script src="/js/jquery.form.min.js"></script>
  42. <script src="{{ asset('js/toastr.min.js') }}" type="application/javascript"></script>
  43. <script src="/js/yemi.js?_=7" type="application/javascript"></script>
  44. {{-- med ac --}}
  45. <link href='/css/autocomplete-lhc.min.css' rel="stylesheet">
  46. <script src='/js/autocomplete-lhc.js'></script>
  47. {{-- inline bootstrap datepicker --}}
  48. <link href='/bootstrap-datepicker/css/bootstrap-datepicker.min.css' rel="stylesheet">
  49. <script src='/bootstrap-datepicker/js/bootstrap-datepicker.min.js'></script>
  50. {{-- pdfjs --}}
  51. <script src="https://mozilla.github.io/pdf.js/build/pdf.js"></script>
  52. {{-- WebSockets --}}
  53. <script src="https://cdnjs.cloudflare.com/ajax/libs/sockjs-client/1.5.0/sockjs.min.js"
  54. integrity="sha512-5yJ548VSnLflcRxWNqVWYeQZnby8D8fJTmYRLyvs445j1XmzR8cnWi85lcHx3CUEeAX+GrK3TqTfzOO6LKDpdw=="
  55. crossorigin="anonymous"></script>
  56. <script src="https://cdnjs.cloudflare.com/ajax/libs/stomp.js/2.3.3/stomp.min.js"
  57. integrity="sha512-iKDtgDyTHjAitUDdLljGhenhPwrbBfqTKWO1mkhSFH3A7blITC9MhYon6SjnMhp4o0rADGw9yAC6EW4t5a4K3g=="
  58. crossorigin="anonymous"></script>
  59. @yield('head')
  60. </head>
  61. <body>
  62. <div id="mask" style="background: rgba(0, 0, 0, 0) url(&quot;/vanillaspin.gif&quot;) no-repeat scroll center center; position: fixed; top: 0px; left: 0px; z-index: 9999; width: 100%; height: 100%; display: none;">
  63. </div>
  64. <div id="moe-form-mask" style="background: rgba(0, 0, 0, .1) no-repeat scroll center center; position: fixed; top: 0px; left: 0px; z-index: 97; width: 100%; height: 100%; display: none;">
  65. </div>
  66. <nav class="navbar navbar-expand-md navbar-dark stag-primary-bg py-1">
  67. <a class="navbar-brand" href="{{ route('dashboard') }}">Scholar</a>
  68. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navBar" aria-controls="navBar" aria-expanded="false" aria-label="Toggle navigation">
  69. <span class="navbar-toggler-icon"></span>
  70. </button>
  71. <div class="collapse navbar-collapse" id="navBar">
  72. <ul class="navbar-nav mr-auto">
  73. <li class="nav-item"><a class="nav-link" href="{{ route('dashboard') }}"><i class="mr-1 fas fa-tachometer-alt"></i> Dashboard</a> </li>
  74. <li class="nav-item"><a class="nav-link" href="{{ route('patients') }}"><i class="mr-1 fas fa-user-injured"></i> Patients</a> </li>
  75. @if($pro && $pro->pro_type == 'ADMIN')
  76. <li class="nav-item"><a class="nav-link" href="{{ route('new-patient') }}"><i class="mr-1 fas fa-user-plus"></i> New Patient</a> </li>
  77. @endif
  78. <li class="nav-item dropdown">
  79. <a class="nav-link dropdown-toggle" href="#" id="practice-management" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="mr-1 fas fa-tasks"></i> Practice</a>
  80. <div class="dropdown-menu mcp-theme-1" aria-labelledby="practice-management">
  81. {{--<a class="dropdown-item" href="{{ route('practice-management.dashboard') }}">Dashboard</a>--}}
  82. @if($pro && $pro->pro_type == 'ADMIN')
  83. <a class="dropdown-item" href="/practice-management/rates/all">Payment Rates</a>
  84. @endif
  85. {{--<a class="dropdown-item" href="{{ route('practice-management.previousBills') }}">Previous Bills</a>--}}
  86. <a class="dropdown-item" href="{{ route('practice-management.financialTransactions') }}">Financial Transactions</a>
  87. <a class="dropdown-item" href="/practice-management/bills/not-yet-signed">Pending Bills to Sign</a>
  88. <a class="dropdown-item" href="/practice-management/notes/not-yet-signed">Pending Notes to Sign</a>
  89. <a class="dropdown-item" href="{{ route('unmapped-sms') }}">Unmapped SMS</a>
  90. <a class="dropdown-item" href="{{ route('practice-management.myTickets') }}">My Tickets</a>
  91. <a class="dropdown-item" href="{{ route('practice-management.myTextShortcuts') }}">My Text Shortcuts</a>
  92. <a class="dropdown-item" href="{{ route('practice-management.myFavorites') }}">My Favorites</a>
  93. <a class="dropdown-item" href="{{ route('practice-management.proAvailability') }}">Pro Availability</a>
  94. <a class="dropdown-item" href="{{ route('practice-management.proCalendar') }}">Pro Calendar</a>
  95. @if($pro && $pro->pro_type == 'ADMIN')
  96. <a class="dropdown-item" href="{{ route('practice-management.billingManager') }}">Billing Manager</a>
  97. <a class="dropdown-item" href="{{ route('practice-management.tickets') }}">Tickets</a>
  98. @endif
  99. </div>
  100. </li>
  101. </ul>
  102. {{-- if pro is working on a client and is not in tht client --}}
  103. <div class="current-work mr-2">
  104. @include('app/current-work')
  105. </div>
  106. <a href="#" class="mr-2 text-white small" onclick="fastReload()"><i class="fa fa-sync"></i></a>
  107. <div class="d-inline-flex pr-2 mcp-theme-1 position-relative">
  108. <input id="patient-search" type="search" class="form-control form-control-sm outline-0" autocomplete="off" placeholder="Search Patients">
  109. <div class="suggestions-outer position-absolute d-none">
  110. </div>
  111. </div>
  112. <div class="d-flex align-items-center">
  113. <p class="text-white my-0 small">Hi, <b title="Cell# {{$pro->cell_number}}">{{ $pro->name_first }}!</b></p>
  114. <a native target="_top" href="{{route('logout')}}" class="small text-white ml-2">
  115. <i class="fas fa-sign-out-alt"></i>
  116. Log Out
  117. </a>
  118. </div>
  119. @if($pro->pro_type == 'ADMIN')
  120. <div class="ml-1 d-inline-block text-secondary">|</div>
  121. <div class="d-flex align-items-center">
  122. <a href="{{route('log-in-as')}}" native target="_top" class="small text-white ml-1">Log In As</a>
  123. </div>
  124. @endif
  125. @if($performer->logged_in_as_pro_from_admin_pro_app_session_id)
  126. <div class="ml-1 d-inline-block text-secondary">|</div>
  127. <form action="{{route('back-to-admin-pro')}}" method="post" target="_top">
  128. @csrf
  129. <button class="small text-white ml-1">
  130. <span class="small"></span>Admin
  131. </button>
  132. </form>
  133. @endif
  134. @if($pro->pro_type == 'ADMIN')
  135. <div class="ml-1 d-inline-block text-secondary">|</div>
  136. <a native target="_top" class="small text-white ml-1" href="{{config('stag.adminPortalUrl')}}/pro_log_in_with_session_key/{{$performer->session_key}}" title="">
  137. Admin
  138. </a>
  139. @endif
  140. </div>
  141. <a href="#" class="stag_rhs_toggle d-none d-md-block" title="Toggle Video Pane">
  142. <i class="fa fa-arrow-right"></i>
  143. </a>
  144. </nav>
  145. <main role="main" class="stag-content px-0">
  146. @yield('content')
  147. </main><!-- /.container -->
  148. <!-- shortcut/suggest component -->
  149. <link href="/css/shortcut.css" rel=stylesheet>
  150. <script src="/js/shortcut.js" type="application/javascript"></script>
  151. <!-- script to handle history/back/forward for mc/xxx pages
  152. + all other JS initialization needed in fastLoaded pages -->
  153. <script src="/js/find-event-handlers.js" type="application/javascript"></script>
  154. <script src="/js/mc.js?_=4" type="application/javascript"></script>
  155. <form url="/api/proTextShortcut/create" id="create-shortcut-form" class="mcp-theme-1">
  156. <input type="hidden" name="proUid" value="{{ $pro->uid }}">
  157. <div class="mb-2">
  158. <input type="text" class="form-control form-control-sm" name="shortcut" value="" placeholder="Shortcut Name" required>
  159. </div>
  160. <div class="mb-2">
  161. <textarea name="text" class="form-control form-control-sm" rows="3" id="selected-sc-text" placeholder="Content" required></textarea>
  162. </div>
  163. <div class="mb-0">
  164. <button class="btn btn-primary btn-sm" type="submit">Save</button>
  165. <button class="btn btn-default border btn-sm ml-1" type="reset">Cancel</button>
  166. </div>
  167. </form>
  168. <script>
  169. $(document).ready(function() {
  170. window.toggleChildLinks = function(_element) {
  171. $(_element).closest('.nav-item').toggleClass('nav-child-collapsed');
  172. return false;
  173. }
  174. const debounce = (func, wait) => {
  175. let timeout;
  176. return function executedFunction(...args) {
  177. const later = () => {
  178. clearTimeout(timeout);
  179. func(...args);
  180. };
  181. clearTimeout(timeout);
  182. timeout = setTimeout(later, wait);
  183. };
  184. };
  185. var lastTerm = '';
  186. var returnedFunction = debounce(function() {
  187. var term = $.trim($('#patient-search').val());
  188. if (!!term && lastTerm !== term) {
  189. $.get('/patients-suggest?term=' + term, function(_data) {
  190. $('.suggestions-outer').html(_data).removeClass('d-none');
  191. });
  192. lastTerm = term;
  193. } else {
  194. $('.suggestions-outer').addClass('d-none');
  195. }
  196. }, 250);
  197. $('#patient-search')
  198. .on('keydown', function(e) {
  199. var activeItem = $('.suggestions-outer .suggest-item.active');
  200. switch (e.which) {
  201. case 27:
  202. $('.suggestions-outer').addClass('d-none');
  203. return false;
  204. case 38:
  205. if (activeItem.prev().length) {
  206. activeItem.prev()
  207. .addClass('active')
  208. .siblings().removeClass('active');
  209. activeItem = $('.suggestions-outer .suggest-item.active');
  210. if (activeItem.length) {
  211. activeItem[0].scrollIntoView();
  212. }
  213. }
  214. return false;
  215. case 40:
  216. if (activeItem.next().length) {
  217. activeItem.next()
  218. .addClass('active')
  219. .siblings().removeClass('active');
  220. activeItem = $('.suggestions-outer .suggest-item.active');
  221. if (activeItem.length) {
  222. activeItem[0].scrollIntoView();
  223. }
  224. }
  225. return false;
  226. case 13:
  227. if (activeItem.length) {
  228. activeItem.first().click();
  229. }
  230. return false;
  231. default:
  232. window.setTimeout(onQueryChange, 50);
  233. break;
  234. }
  235. })
  236. .on('keypress paste', function(e) {
  237. window.setTimeout(onQueryChange, 50);
  238. });
  239. function onQueryChange() {
  240. var term = $.trim($('#patient-search').val());
  241. if (!!term) {
  242. $('.suggestions-outer')
  243. .html('<span class="d-block no-suggest-items">Searching...</span>')
  244. .removeClass('d-none');
  245. returnedFunction();
  246. } else {
  247. $('.suggestions-outer').addClass('d-none');
  248. }
  249. }
  250. $(document).on('click', '.suggest-item.patient-suggest[data-target-uid]', function() {
  251. $('#patient-search').val('');
  252. $('.suggestions-outer').addClass('d-none');
  253. fastLoad('/patients/view/' + $(this).attr('data-target-uid'), true, false, false);
  254. return false;
  255. });
  256. });
  257. </script>
  258. <script src="/js/stag-popup.js"></script>
  259. <script src="/js/option-list.js"></script>
  260. @include('app/pdf/viewer')
  261. <script>
  262. let socket = new SockJS("{{ config('app.backend_ws_url') }}");
  263. window.socketClient = Stomp.over(socket);
  264. window.socketClient.connect({}, (frame) => {
  265. window.socketClient.send("/app/register", {}, // register self
  266. JSON.stringify({
  267. sessionKey: '{{$performer->session_key}}'
  268. })
  269. );
  270. window.socketClient.subscribe("/user/topic/newMcpRequest", function(message) {
  271. console.log("Received new mcp request: ", message);
  272. //TODO: Update the mcp queue on the DOM
  273. }); // once in 15 seconds
  274. window.socketClient.subscribe("/user/topic/removeMcpRequest", function(message) {
  275. console.log("An mcp request has been removed: ", message);
  276. //TODO: Update the mcp queue on the DOM
  277. });
  278. window.socketClient.subscribe("/user/topic/myCurrentProClientWork", function(message) {
  279. console.log("You have a client pro work: ", message);
  280. $.get('/current-work', function(_data) {
  281. $('.current-work').html(_data);
  282. initFastLoad($('.current-work'));
  283. });
  284. });
  285. });
  286. </script>
  287. </body>
  288. </html>