Pārlūkot izejas kodu

Main dashboard - popup open support for tickets (wip)

Vijayakrishnan 4 gadi atpakaļ
vecāks
revīzija
72259809ca

+ 29 - 0
public/css/style.css

@@ -1551,4 +1551,33 @@ th.only-screen, td.only-screen {
 .pdf-viewer-auto {
     max-height: 600px;
     overflow: auto;
+}
+.ticket-popup .stag-popup.stag-slide.show {
+    position: static;
+    min-width: 100% !important;
+    max-width: unset !important;
+    padding-bottom: 2rem;
+}
+.ticket-popup .stag-popup.stag-slide.show form {
+    min-width: 100% !important;
+    max-width: unset !important;
+}
+.ticket-popup .stag-popup.stag-slide>form {
+    position: absolute;
+    top: 0;
+    height: auto !important;
+    overflow: hidden;
+    border-radius: 5px;
+    transition: none;
+    border: 1px solid #aaa;
+}
+.ticket-popup .stag-popup.stag-slide .stag-popup-title.sticky-top {
+    position: static;
+}
+.ticket-popup.stag-popup.stag-popup-md>.container-fluid {
+    max-width: 632pt;
+}
+.ticket-popup.stag-popup.stag-popup-md>.container-fluid>.main-row>main>.card {
+    border: 0;
+    background: transparent;
 }

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

@@ -231,6 +231,8 @@
     </div>
 </div>
 
+<div class="stag-popup stag-popup-md ticket-popup mcp-theme-1" stag-popup-key="ticket-popup"></div>
+
 <script>
     (function() {
         function init() {
@@ -451,6 +453,20 @@
 
                     // init fast load
                     initFastLoad($('#pro-dashboard-container'));
+
+                    // ticket-popup
+                    $(document)
+                        .off('click', '.ticket-popup-trigger')
+                        .on('click', '.ticket-popup-trigger', function() {
+                            window.noMc = true;
+                            $.get(this.href, (_data) => {
+                                $('.ticket-popup').html(_data);
+                                showStagPopup('ticket-popup');
+                                $('.ticket-popup .stag-popup.stag-slide').attr('close-all-with-self', 1);
+                                runMCInitializer('patient-tickets'); // run specific mc initer
+                            });
+                            return false;
+                        });
                 }
             });
         }

+ 19 - 3
resources/views/app/dashboard/erx.blade.php

@@ -5,6 +5,7 @@
     <thead>
     <tr class="bg-light">
         <th class="px-2 text-secondary border-bottom-0 width-30px">Created</th>
+        <th class="px-2 text-secondary border-bottom-0 width-30px">View/Open</th>
         <th class="px-2 text-secondary border-bottom-0 width-30px">Patient</th>
         <th class="px-2 text-secondary border-bottom-0">Medication</th>
     </tr>
@@ -15,10 +16,25 @@
             <?php $data = json_decode($ticket->data); ?>
             <tr>
                 <td class="px-2 text-nowrap">
-                    <a href="/patients/view/{{$ticket->patient->uid}}/tickets/erx/{{$ticket->uid}}">
-                        <i class="fa fa-arrow-right"></i>
+                    <div>
                         {{friendlier_date_time($ticket->created_at)}}
-                    </a>
+                    </div>
+
+                </td>
+                <td class="px-2 text-nowrap">
+                    <div class="d-flex align-items-center flex-nowrap">
+                        <a href="/patients/view/{{$ticket->patient->uid}}/tickets/erx/{{$ticket->uid}}?popupmode=1"
+                           native target="_blank"
+                           class="ticket-popup-trigger d-block text-nowrap mr-3">
+                            <i class="fa fa-eye"></i>
+                            View
+                        </a>
+                        <a href="/patients/view/{{$ticket->patient->uid}}/tickets/erx/{{$ticket->uid}}"
+                           class="d-block text-nowrap">
+                            <i class="fa fa-external-link-alt"></i>
+                            Open
+                        </a>
+                    </div>
                 </td>
                 <td class="px-2 text-nowrap">
                     <a href="/patients/view/{{$ticket->patient->uid}}/tickets/erx">