Samson Mutunga 3 年之前
父節點
當前提交
66997239e3
共有 3 個文件被更改,包括 33 次插入3 次删除
  1. 5 0
      app/Models/ClientMemo.php
  2. 11 0
      app/Models/Stamp.php
  3. 17 3
      resources/views/app/patient/dashboard.blade.php

+ 5 - 0
app/Models/ClientMemo.php

@@ -18,4 +18,9 @@ class ClientMemo extends Model
         return $this->hasMany(ClientMemoUpdate::class, 'client_memo_id', 'id')->orderBy('created_at', 'DESC');
     }
 
+    public function stamp(): HasOne
+    {
+        return $this->hasOne(Stamp::class, 'client_memo_id', 'id');
+    }
+
 }

+ 11 - 0
app/Models/Stamp.php

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

+ 17 - 3
resources/views/app/patient/dashboard.blade.php

@@ -536,13 +536,14 @@
                         <table class="table table-striped table-sm table-bordered mb-0">
                             @if($patient->memos && count($patient->memos))
                                 <thead>
-                                <tr>
+                                <tr class="text-nowrap">
                                     <th class="px-2 text-secondary">Category</th>
-                                    <th class="px-2 text-secondary w-75">Summary</th>
+                                    <th class="px-2 text-secondary w-50">Summary</th>
                                     <th class="px-2 text-secondary">Created</th>
                                     @if($performer->pro->pro_type === 'ADMIN')
                                     <th class="px-2 text-secondary">Admins Only</th>
                                     @endif
+                                    <th class="px-2 text-secondary">Ack. by MCP</th>
                                     <th class="px-2 text-secondary delete-column">&nbsp;</th>
                                 </tr>
                                 </thead>
@@ -586,8 +587,21 @@
                                             {{ friendly_date_time($memo->created_at) }}
                                         </td>
                                         @if($performer->pro->pro_type === 'ADMIN' )
-                                        <td class="px-2 text-secondary">{{$memo->is_admin_only?'Yes':'No'}}</td>
+                                        <td class="px-2 text-secondary">
+                                            @if($memo->is_admin_only)
+                                                <span class="text-success"><i class="fas fa-lock"></i> YES</span>
+                                            @else
+                                                <span><i class="fas fa-unlock"></i> NO</span>
+                                            @endif
+                                        </td>
                                         @endif
+                                        <td class="px-2">
+                                            @if($memo->mcp_stamp_id)
+                                            <span class="text-success">YES <i class="fas fa-info-circle c-pointer" data-toggle="tooltip" data-placement="bottom" title="{{ friendly_date_time($memo->stamp->created_at) }}"></i></span>
+                                            @else
+                                            <span class="text-secondary">NO</span>
+                                            @endif
+                                        </td>
                                         <td class="px-2 text-center delete-column">
                                             <div moe wide relative class="mr-2">
                                                 <a class="on-hover-opaque" start show title="Edit">