|
@@ -20,10 +20,23 @@
|
|
<td class="px-2" v-html="item.category"></td>
|
|
<td class="px-2" v-html="item.category"></td>
|
|
<td class="px-2" v-html="item.title"></td>
|
|
<td class="px-2" v-html="item.title"></td>
|
|
<td class="px-2" v-html="item.description"></td>
|
|
<td class="px-2" v-html="item.description"></td>
|
|
- <td class="px-2 text-nowrap">
|
|
|
|
|
|
+ <td class="px-2">
|
|
<a class="mr-2 c-pointer" v-on:click.prevent="showPopup('other-popup', item)">Edit</a>
|
|
<a class="mr-2 c-pointer" v-on:click.prevent="showPopup('other-popup', item)">Edit</a>
|
|
<a class="mr-2 c-pointer" v-if="item.is_open" v-on:click.prevent="closeItem(item)">Close</a>
|
|
<a class="mr-2 c-pointer" v-if="item.is_open" v-on:click.prevent="closeItem(item)">Close</a>
|
|
<a class="mr-2 c-pointer" v-if="!item.is_open" v-on:click.prevent="openItem(item)">Open</a>
|
|
<a class="mr-2 c-pointer" v-if="!item.is_open" v-on:click.prevent="openItem(item)">Open</a>
|
|
|
|
+ <a class="mr-2 c-pointer" v-if="!item.is_entry_error" v-on:click.prevent="setIsEntryErrorToTrue(item)">@{{item.is_entry_error}}-setIsEntryErrorToTrue</a>
|
|
|
|
+ <a class="mr-2 c-pointer" v-if="item.is_entry_error" v-on:click.prevent="setIsEntryErrorToFalse(item)">setIsEntryErrorToFalse</a>
|
|
|
|
+ <a class="mr-2 c-pointer" v-if="!item.has_assigned_pro_signed" v-on:click.prevent="signAsAssignedPro(item)">signAsAssignedPro</a>
|
|
|
|
+ <a class="mr-2 c-pointer" v-if="item.has_assigned_pro_signed" v-on:click.prevent="undoSignAsAssignedPro(item)">undoSignAsAssignedPro</a>
|
|
|
|
+ <a class="mr-2 c-pointer" v-if="!item.has_manager_pro_signed" v-on:click.prevent="signAsManagerPro(item)">signAsManagerPro</a>
|
|
|
|
+ <a class="mr-2 c-pointer" v-if="item.has_manager_pro_signed" v-on:click.prevent="undoSignAsManagerPro(item)">undoSignAsManagerPro</a>
|
|
|
|
+ <a class="mr-2 c-pointer" v-if="!item.has_ordering_pro_signed" v-on:click.prevent="signAsOrderingPro(item)">signAsOrderingPro</a>
|
|
|
|
+ <a class="mr-2 c-pointer" v-if="item.has_ordering_pro_signed" v-on:click.prevent="undoSignAsOrderingPro(item)">undoSignAsOrderingPro</a>
|
|
|
|
+ <a class="mr-2 c-pointer" v-if="!item.has_initiating_pro_signed" v-on:click.prevent="signAsInitiatingPro(item)">signAsInitiatingPro</a>
|
|
|
|
+ <a class="mr-2 c-pointer" v-if="item.has_initiating_pro_signed" v-on:click.prevent="undoSignAsInitiatingPro(item)">undoSignAsInitiatingPro</a>
|
|
|
|
+ <template v-for="proType in proTypes">
|
|
|
|
+ <a class="mr-2 c-pointer" v-on:click.prevent="showProUpdatePopup('other-popup', proType, item)">Update @{{proType}} Pro</a>
|
|
|
|
+ </template>
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
</tbody>
|
|
</tbody>
|
|
@@ -53,18 +66,47 @@
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="stag-popup stag-popup-sm mcp-theme-1" stag-popup-key="other-pro-update-popup">
|
|
|
|
+ <form method="POST" class="overflow-visible">
|
|
|
|
+ <h3 class="stag-popup-title mb-2">
|
|
|
|
+ <span>Update @{{ proToUpdate}} Pro</span>
|
|
|
|
+ <a href="#" class="ml-auto text-secondary"
|
|
|
|
+ onclick="return closeStagPopup()"><i class="fa fa-times-circle"></i></a>
|
|
|
|
+ </h3>
|
|
|
|
+ <div class="form-group mb-2">
|
|
|
|
+ <label class="text-sm text-secondary mb-1">@{{proToUpdate}} Pro</label>
|
|
|
|
+ <select v-model="newProUid" class="form-control">
|
|
|
|
+ <option value="">-- select ---</option>
|
|
|
|
+ @foreach($pros as $pro)
|
|
|
|
+ <option value="{{$pro->uid}}">{{$pro->name_first}} {{$pro->name_last}}</option>
|
|
|
|
+ @endforeach
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="d-flex align-items-center justify-content-center mt-3">
|
|
|
|
+ <button type="button" class="btn btn-sm btn-primary mr-2" v-on:click.prevent="updateTicketPro()">Submit</button>
|
|
|
|
+ <button type="button" class="btn btn-sm btn-default border" onclick="return closeStagPopup()">Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
<script>
|
|
<script>
|
|
(function() {
|
|
(function() {
|
|
<?php
|
|
<?php
|
|
$tickets = $patient->tickets->filter(function($_item) {
|
|
$tickets = $patient->tickets->filter(function($_item) {
|
|
return $_item->category === 'other';
|
|
return $_item->category === 'other';
|
|
});
|
|
});
|
|
|
|
+
|
|
$items = [];
|
|
$items = [];
|
|
foreach ($tickets as $ticket) {
|
|
foreach ($tickets as $ticket) {
|
|
$item = json_decode($ticket->data);
|
|
$item = json_decode($ticket->data);
|
|
$item->uid = $ticket->uid;
|
|
$item->uid = $ticket->uid;
|
|
$item->is_open = $ticket->is_open;
|
|
$item->is_open = $ticket->is_open;
|
|
|
|
+ $item->has_assigned_pro_signed = $ticket->has_assigned_pro_signed;
|
|
|
|
+ $item->has_initiating_pro_signed = $ticket->has_initiating_pro_signed;
|
|
|
|
+ $item->has_manager_pro_signed = $ticket->has_manager_pro_signed;
|
|
|
|
+ $item->has_ordering_pro_signed = $ticket->has_ordering_pro_signed;
|
|
|
|
+ $item->is_entry_error = $ticket->is_entry_error;
|
|
$items[] = $item;
|
|
$items[] = $item;
|
|
}
|
|
}
|
|
?>
|
|
?>
|
|
@@ -81,8 +123,11 @@
|
|
is_open: true,
|
|
is_open: true,
|
|
category: '',
|
|
category: '',
|
|
title: '',
|
|
title: '',
|
|
- description: '',
|
|
|
|
|
|
+ description: ''
|
|
},
|
|
},
|
|
|
|
+ proToUpdate: '',
|
|
|
|
+ proTypes: ['Assigned', 'Manager', 'Initiating', 'Ordering'],
|
|
|
|
+ newProUid:''
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
showPopup: function(_name, _item) {
|
|
showPopup: function(_name, _item) {
|
|
@@ -134,6 +179,41 @@
|
|
|
|
|
|
return false;
|
|
return false;
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ showProUpdatePopup: function(_name, _proToUpdate, _item) {
|
|
|
|
+ closeStagPopup();
|
|
|
|
+ this.proToUpdate = _proToUpdate
|
|
|
|
+ this.popupItem =JSON.parse(JSON.stringify(_item))
|
|
|
|
+ let self = this;
|
|
|
|
+ Vue.nextTick(function() {
|
|
|
|
+ showStagPopup('other-pro-update-popup', true);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ updateTicketPro: function() {
|
|
|
|
+ let self = this;
|
|
|
|
+ let form = $('#otherApp form').first();
|
|
|
|
+ if(!form[0].checkValidity()) {
|
|
|
|
+ form[0].reportValidity();
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ showMask();
|
|
|
|
+ let payload = this.popupItem;
|
|
|
|
+ payload.newProUid = self.newProUid;
|
|
|
|
+
|
|
|
|
+ $.post(
|
|
|
|
+ '/api/ticket/update' + self.proToUpdate +'Pro',
|
|
|
|
+ payload,
|
|
|
|
+ function(_data) {
|
|
|
|
+ console.log(_data);
|
|
|
|
+ fastReload();
|
|
|
|
+ },
|
|
|
|
+ 'json');
|
|
|
|
+
|
|
|
|
+ return false;
|
|
|
|
+ },
|
|
|
|
+
|
|
closeItem: function(_item) {
|
|
closeItem: function(_item) {
|
|
showMask();
|
|
showMask();
|
|
$.post('/api/ticket/close', {
|
|
$.post('/api/ticket/close', {
|
|
@@ -142,6 +222,7 @@
|
|
fastReload();
|
|
fastReload();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
openItem: function(_item) {
|
|
openItem: function(_item) {
|
|
showMask();
|
|
showMask();
|
|
$.post('/api/ticket/open', {
|
|
$.post('/api/ticket/open', {
|
|
@@ -149,6 +230,96 @@
|
|
}, function(_data) {
|
|
}, function(_data) {
|
|
fastReload();
|
|
fastReload();
|
|
});
|
|
});
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ setIsEntryErrorToTrue: function(_item){
|
|
|
|
+ showMask();
|
|
|
|
+ $.post('/api/ticket/setIsEntryErrorToTrue', {
|
|
|
|
+ uid:_item.uid
|
|
|
|
+ }, function(_data){
|
|
|
|
+ fastReload();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ setIsEntryErrorToFalse: function(_item){
|
|
|
|
+ showMask();
|
|
|
|
+ $.post('/api/ticket/setIsEntryErrorToFalse', {
|
|
|
|
+ uid:_item.uid
|
|
|
|
+ }, function(_data){
|
|
|
|
+ fastReload();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ signAsAssignedPro: function(_item){
|
|
|
|
+ showMask();
|
|
|
|
+ $.post('/api/ticket/signAsAssignedPro', {
|
|
|
|
+ uid:_item.uid
|
|
|
|
+ }, function(_data){
|
|
|
|
+ fastReload();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ undoSignAsAssignedPro: function(_item){
|
|
|
|
+ showMask();
|
|
|
|
+ $.post('/api/ticket/undoSignAsAssignedPro', {
|
|
|
|
+ uid:_item.uid
|
|
|
|
+ }, function(_data){
|
|
|
|
+ fastReload();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ signAsManagerPro: function(_item){
|
|
|
|
+ showMask();
|
|
|
|
+ $.post('/api/ticket/signAsManagerPro', {
|
|
|
|
+ uid:_item.uid
|
|
|
|
+ }, function(_data){
|
|
|
|
+ fastReload();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ undoSignAsManagerPro: function(_item){
|
|
|
|
+ showMask();
|
|
|
|
+ $.post('/api/ticket/undoSignAsManagerPro', {
|
|
|
|
+ uid:_item.uid
|
|
|
|
+ }, function(_data){
|
|
|
|
+ fastReload();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ signAsOrderingPro: function(_item){
|
|
|
|
+ showMask();
|
|
|
|
+ $.post('/api/ticket/signAsOrderingPro', {
|
|
|
|
+ uid:_item.uid
|
|
|
|
+ }, function(_data){
|
|
|
|
+ fastReload();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ undoSignAsOrderingPro: function(_item){
|
|
|
|
+ showMask();
|
|
|
|
+ $.post('/api/ticket/undoSignAsOrderingPro', {
|
|
|
|
+ uid:_item.uid
|
|
|
|
+ }, function(_data){
|
|
|
|
+ fastReload();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ signAsInitiatingPro: function(_item){
|
|
|
|
+ showMask();
|
|
|
|
+ $.post('/api/ticket/signAsInitiatingPro', {
|
|
|
|
+ uid:_item.uid
|
|
|
|
+ }, function(_data){
|
|
|
|
+ fastReload();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ undoSignAsInitiatingPro: function(_item){
|
|
|
|
+ showMask();
|
|
|
|
+ $.post('/api/ticket/undoSignAsInitiatingPro', {
|
|
|
|
+ uid:_item.uid
|
|
|
|
+ }, function(_data){
|
|
|
|
+ fastReload();
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted: function () {
|
|
mounted: function () {
|