|
@@ -84,7 +84,18 @@
|
|
|
<div>@{{prescription.hcpProDisplayName}}</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
- <td class="px-2"></td>
|
|
|
+ <td class="px-2">
|
|
|
+ <div v-if="prescription.has_hcp_pro_signed" class="d-flex align-items-baseline">
|
|
|
+ <i class="text-secondary fa fa-check mr-1"></i>
|
|
|
+ <span class="text-secondary">Signed</span>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <a v-if="prescription.hcp_pro_id === {{$pro->id}}"
|
|
|
+ href="#"
|
|
|
+ v-on:click.prevent="signAsHcpPro(prescription)">Sign</a>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
<td class="px-2">@{{prescription.pro_declared_status}}</td>
|
|
|
<td class="px-2">@{{prescription.client_declared_status}}</td>
|
|
|
<td class="px-2"></td>
|
|
@@ -99,6 +110,7 @@
|
|
|
@include('app.patient.prescriptions.other-form')
|
|
|
@include('app.patient.prescriptions.logistics-form')
|
|
|
@include('app.patient.prescriptions.hcp-pro-form')
|
|
|
+ @include('app.patient.prescriptions.sign-as-hcp-form')
|
|
|
</div>
|
|
|
<script>
|
|
|
(function() {
|
|
@@ -419,11 +431,26 @@
|
|
|
},
|
|
|
|
|
|
// edit sign
|
|
|
- editHcpProSign: function(_prescription) {
|
|
|
-
|
|
|
+ signAsHcpPro: function(_prescription) {
|
|
|
+ this.currentPrescriptionAction = 'SIGN_AS_HCP';
|
|
|
+ this.currentPrescriptionType = _prescription.erx_category;
|
|
|
+ this.currentPrescriptionSign = {
|
|
|
+ uid: _prescription.uid,
|
|
|
+ declaredVersionNumber: _prescription.version_number
|
|
|
+ };
|
|
|
+ Vue.nextTick(() => {
|
|
|
+ showStagPopup('sign-as-hcp-popup', true);
|
|
|
+ });
|
|
|
},
|
|
|
- saveHcpProSign: function() {
|
|
|
-
|
|
|
+ saveSignAsHcpPro: function() {
|
|
|
+ let payload = JSON.parse(JSON.stringify(this.currentPrescriptionSign));
|
|
|
+ $.post('/api/erx/signAsHcp', payload, _data => {
|
|
|
+ if(!hasResponseError(_data)) {
|
|
|
+ toastr.success('Signed');
|
|
|
+ closeStagPopup();
|
|
|
+ fastReload();
|
|
|
+ }
|
|
|
+ }, 'json');
|
|
|
},
|
|
|
|
|
|
// edit pro status
|