浏览代码

fixed notes

= 3 年之前
父节点
当前提交
0ab708f8dc

+ 17 - 0
app/Models/Client.php

@@ -718,6 +718,23 @@ class Client extends Model
         return $this->hasOne(ProTeam::class, 'id', 'system_source_pro_team_id');
     }
 
+    public function adminEngagementAssessmentStatus(){
+        return $this->hasOne(Status::class, 'id', 'admin_engagement_assessment_status_id');
+    }
+
+    public function mcpEngagementAssessmentStatus(){
+        return $this->hasOne(Status::class, 'id', 'mcp_engagement_assessment_status_id');
+    }
+
+    public function defaultNaEngagementAssessmentStatus(){
+        return $this->hasOne(Status::class, 'id', 'default_na_engagement_assessment_status_id');
+    }
+
+    public function clientSelfSatisfactionStatus(){
+        return $this->hasOne(Status::class, 'id', 'client_self_satisfaction_status_id');
+    }
+
+
     public function recentNotes($_pro = null) {
         $notes = Note::where('client_id', $this->id)->where('is_cancelled', false);
         if($_pro) {

+ 11 - 0
app/Models/Status.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace App\Models;
+
+# use Illuminate\Database\Eloquent\Model;
+
+class Status extends Model
+{
+    protected $table = 'status';
+
+}

+ 1 - 22
resources/views/app/patient/note/_create-bill.blade.php

@@ -158,28 +158,7 @@
         </form>
     </span>
 @endif
-@if($pro->pro_type === 'ADMIN')
-<span class="mx-2 text-secondary">|</span>
-<b>{{$bill->hcp && $bill->hcpCompanyPro->company ? $bill->hcpCompanyPro->pro->displayName() . ' / ' . $bill->hcpCompanyPro->company->name : '-'}}</b>
-<div moe class="ml-1">
-    <a class="text-primary" href="" show start>Swap HCP Company Pro</a>
-    <form url="/api/bill/swapHcpCompanyPro">
-        <input type="hidden" name="uid" value="{{$bill->uid}}">
-        <div class="mb-2">
-            <select name="hcpCompanyProUid" class="form-control form-control-sm">
-                <option value="">-- select --</option>
-                @foreach($bill->hcp->companyPros as $companyPro)
-                    <option value="{{$companyPro->uid}}">{{$companyPro->pro->displayName() . ' / ' . $companyPro->company->name}}</option>
-                @endforeach
-            </select>
-        </div>
-        <div class="mb-0">
-            <button class="btn btn-success btn-sm" submit>Submit</button>
-            <button class="btn btn-default border btn-sm" cancel>Cancel</button>
-        </div>
-    </form>
-</div>
-@endif
+
 
 <script>
     (function() {

+ 22 - 0
resources/views/app/patient/note/dashboard.blade.php

@@ -1208,6 +1208,28 @@
                                         @endif
                                     @endif
 
+                                    @if($pro->pro_type === 'ADMIN')                                    
+                                        <b>{{$bill->hcp && $bill->hcp->hcpCompanyPro && $bill->hcpCompanyPro->company ? $bill->hcpCompanyPro->pro->displayName() . ' / ' . $bill->hcpCompanyPro->company->name : '-'}}</b>
+                                        <div moe class="ml-1">
+                                            <a class="text-primary" href="" show start>Swap HCP Company Pro</a>
+                                            <form url="/api/bill/swapHcpCompanyPro">
+                                                <input type="hidden" name="uid" value="{{$bill->uid}}">
+                                                <div class="mb-2">
+                                                    <select name="hcpCompanyProUid" class="form-control form-control-sm">
+                                                        <option value="">-- select --</option>
+                                                        @foreach($bill->hcp->companyPros as $companyPro)
+                                                            <option value="{{$companyPro->uid}}">{{$companyPro->pro->displayName() . ' / ' . $companyPro->company->name}}</option>
+                                                        @endforeach
+                                                    </select>
+                                                </div>
+                                                <div class="mb-0">
+                                                    <button class="btn btn-success btn-sm" submit>Submit</button>
+                                                    <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                                </div>
+                                            </form>
+                                        </div>
+                                    @endif
+
                                 </td>
                                 <td class="pr-3 screen-only">
                                     @if($bill->has_hcp_been_paid)

+ 51 - 1
resources/views/app/patient/settings.blade.php

@@ -692,8 +692,58 @@
                     </form>
                 </div>
                 @endif
-                
 
+                @if($performer->pro->pro_type === 'ADMIN')
+                <hr class="m-negator-3 my-3">
+                <div>
+                    <h3>Adming Engagement Assessment Status</h3>
+                    <p>Category: {{$patient->adminEngagementAssessmentStatus->status_category ?? ''}}</p>
+		            <p>Memo: {{$patient->adminEngagementAssessmentStatus->status_memo ?? ''}}</p>
+		            <p>Detail: {{$patient->adminEngagementAssessmentStatus->status_detail ?? ''}}</p>
+                </div>
+                <div moe class="ml-2">
+                    <a start show><i class="fa fa-edit"></i>Update Admin Engagement Assessment Status</a>
+                    <form url="/api/client/updateAdminEngagementAssessmentStatus" class="mcp-theme-1">
+                        <input type="hidden" name="uid" value="{{$patient->uid}}">
+                        <div class="form-group">
+                            <label class="control-label">Category </label>
+                            <select name="category" class="form-control">
+                                <option value="NULL">--</option> 
+                                <option value="ACTIVE">ACTIVE</option> 
+                                <option value="INACTIVE">INACTIVE</option> 
+                                <option value="ENTRY_ERROR">ENTRY_ERROR</option> 
+                                <option value="DUMMY">DUMMY</option> 
+                                <option value="DECEASED">DECEASED</option>
+	                            <option value="DUPLICATE">DUPLICATE</option> 
+                                <option value="NO_LONGER_INTERESTED">NO_LONGER_INTERESTED</option> 
+                                <option value="BAD_RECORD">BAD_RECORD</option>
+                            </select>
+                        </div>
+                        <div class="form-group">
+                            <label class="control-label">Memo</label>
+                            <input type="text" name="memo" class="form-control">
+                        </div>
+                        <div class="form-group">
+                            <label class="control-label">Detail</label>
+                            <input type="text" name="detail" class="form-control">
+                        </div>
+                        <div>
+                            <button submit class="btn btn-sm btn-primary mr-1">Submit
+                            </button>
+                            <button cancel class="btn btn-sm btn-default border">
+                                Cancel
+                            </button>
+                        </div>
+                    </form>
+                </div>
+                @endif
+                <hr class="m-negator-3 my-3">
+                <!-- <div>
+                /updateMcpEngagementAssessmentStatus
+                /updateDefaultNaEngagementAssessmentStatus
+                /updateClientEngagementAssessmentStatus
+                /updateClientSelfSatisfactionStatus
+                </div> -->
             </div>
             <div class="col-6 border-left">