|
@@ -24,19 +24,9 @@
|
|
|
<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="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>
|
|
|
+
|
|
|
+ @include('app.patient.partials.ticket_action_links')
|
|
|
+
|
|
|
</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
@@ -66,28 +56,7 @@
|
|
|
</div>
|
|
|
</form>
|
|
|
</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>
|
|
|
+ @include('app.patient.partials.ticket_update_pro_form',['ticketType'=>'other'])
|
|
|
</div>
|
|
|
|
|
|
<script>
|
|
@@ -125,9 +94,7 @@
|
|
|
title: '',
|
|
|
description: ''
|
|
|
},
|
|
|
- proToUpdate: '',
|
|
|
- proTypes: ['Assigned', 'Manager', 'Initiating', 'Ordering'],
|
|
|
- newProUid:''
|
|
|
+ @include('app.patient.partials.ticket_vue_data')
|
|
|
},
|
|
|
methods: {
|
|
|
showPopup: function(_name, _item) {
|
|
@@ -180,40 +147,6 @@
|
|
|
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) {
|
|
|
showMask();
|
|
|
$.post('/api/ticket/close', {
|
|
@@ -232,95 +165,7 @@
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- 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();
|
|
|
- })
|
|
|
- }
|
|
|
+ @include('app.patient.partials.ticket_vue_methods',['ticketType'=>'other'])
|
|
|
},
|
|
|
mounted: function () {
|
|
|
}
|