ソースを参照

Tickets v1 (wip) - Mark Complete feature

Vijayakrishnan 4 年 前
コミット
977c4c407a
2 ファイル変更22 行追加9 行削除
  1. 3 0
      public/css/style.css
  2. 19 9
      resources/views/app/patient/tickets.blade.php

+ 3 - 0
public/css/style.css

@@ -1062,6 +1062,9 @@ body .node input[type="number"] {
     color: #bbb !important;
     font-weight: normal !important;
 }
+.stag-slide .text-success {
+    color: #00bf9c !important;
+}
 
 .no-scroll {
     overflow: hidden;

+ 19 - 9
resources/views/app/patient/tickets.blade.php

@@ -61,7 +61,7 @@
         </div>
 
         <div class="my-4">
-            <div class="d-flex align-items-end pb-2">
+            <div class="d-flex align-items-end mb-3">
                 <h4 class="font-weight-bold m-0 text-secondary font-size-16">ERx
                     <span v-if="statusFilter === 'open'" class="text-secondary font-weight-normal">(@{{ erxNumOpen }} open)</span>
                     <span v-if="statusFilter === 'closed'" class="text-secondary font-weight-normal">(@{{ erxNumClosed }} closed)</span>
@@ -151,8 +151,20 @@
             <div class="stag-popup stag-popup-sm stag-slide mcp-theme-1" stag-popup-key="erx-popup">
                 <form method="POST" action="" class="p-0">
                     <h3 class="stag-popup-title mb-0 p-3 bg-light">
-                        <span class="text-nowrap overflow-hidden text-ellipsis">@{{ erxPopupMode === 'add' ? 'Add ERx Ticket' : erxPopupItem.data.medication + '  •  ' + erxPopupItem.data.strength }}</span>
-                        <a href="#" class="ml-auto text-secondary"
+                        <span class="text-nowrap overflow-hidden text-ellipsis mr-3">@{{ erxPopupMode === 'add' ? 'Add ERx Ticket' : erxPopupItem.data.medication + '  •  ' + erxPopupItem.data.strength }}</span>
+                        <div v-if="erxPopupMode === 'edit'" class="ml-auto mr-3">
+                            <a v-if="erxPopupItem.is_open" href="#"
+                               class="btn btn-sm btn-default border bg-white text-dark text-nowrap shadow-none"
+                               v-on:click.prevent="closeItem(erxPopupItem)">
+                                <i class="fa fa-check text-success mr-2"></i>Mark Complete
+                            </a>
+                            <a v-if="!erxPopupItem.is_open" href="#"
+                               class="btn btn-sm btn-success text-nowrap text-white shadow-none"
+                               v-on:click.prevent="openItem(erxPopupItem)">
+                                <i class="fa fa-check mr-2"></i>Complete
+                            </a>
+                        </div>
+                        <a href="#" class="text-secondary"
                            onclick="return closeStagPopup()"><i class="fa fa-chevron-right"></i></a>
                     </h3>
 
@@ -595,19 +607,17 @@
                             }, 'json');
                         },
                         closeItem: function(_item) {
-                            showMask();
                             $.post('/api/ticket/close', {
                                 uid: _item.uid
-                            }, function(_data) {
-                                fastReload();
+                            }, (_data) => {
+                                this.reloadPopupItem('erx');
                             });
                         },
                         openItem: function(_item) {
-                            showMask();
                             $.post('/api/ticket/open', {
                                 uid: _item.uid
-                            }, function(_data) {
-                                fastReload();
+                            }, (_data) => {
+                                this.reloadPopupItem('erx');
                             });
                         },
                         initRxAutoSuggest: function() {