瀏覽代碼

UI for mcp request & claim functionality

Vijayakrishnan 4 年之前
父節點
當前提交
169b6762b2
共有 1 個文件被更改,包括 23 次插入19 次删除
  1. 23 19
      resources/views/layouts/patient.blade.php

+ 23 - 19
resources/views/layouts/patient.blade.php

@@ -498,9 +498,9 @@
                             ?>
                         </pre>
                     </div>--}}
-                    <div class="text-container border-bottom d-flex align-items-center mcp-theme-1">
+                    <div class="text-container border-bottom d-flex align-items-center mcp-theme-1 px-3">
 
-                        <div class="mr-auto px-3 py-2">
+                        <div class="mr-auto py-2">
                             @if($pro->isWorkingOnClient($patient))
                                 {{-- stop work on client --}}
                                 <div moe>
@@ -530,10 +530,15 @@
                             @endif
                         </div>
 
+                        @if($patient->active_mcp_request_id)
+                            <b>This patient has an active MCP request</b>
+                        @else
+                            <b>This patient does not have an active MCP request</b>
+                        @endif
+
                         @if($pro->isWorkingOnClient($patient))
-                            <div class="d-flex align-items-center py-2 px-3">
+                            <div class="d-flex align-items-center py-2">
                                 @if($patient->active_mcp_request_id)
-                                    <b>This patient has an active MCP request</b>
                                     {{-- kill mcp request for client --}}
                                     <div moe relative class="ml-3">
                                         <a href="" start show class="btn btn-sm btn-danger text-white font-weight-bold small">Kill MCP Request</a>
@@ -546,23 +551,8 @@
                                             </div>
                                         </form>
                                     </div>
-                                    @if($patient->mcp_pro_id !== $pro->id)
-                                        {{-- claim client --}}
-                                        <div moe relative class="ml-2">
-                                            <a href="" start show class="btn btn-sm btn-success text-white font-weight-bold small">Claim as MCP</a>
-                                            <form url="/api/mcpRequest/claim" class="mcp-theme-1" right>
-                                                <input type="hidden" name="clientUid" value="{{$patient->uid}}">
-                                                <p>Claim this patient?</p>
-                                                <div>
-                                                    <button submit class="btn btn-sm btn-primary mr-2">Yes</button>
-                                                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
-                                                </div>
-                                            </form>
-                                        </div>
-                                    @endif
                                 @else
                                     {{-- create mcp request for client --}}
-                                    <b>This patient does not have an active MCP request</b>
                                     <div moe relative class="ml-3">
                                         <a href="" start show class="btn btn-sm btn-primary text-white font-weight-bold small">Create MCP Request</a>
                                         <form url="/api/mcpRequest/createAsPro" class="mcp-theme-1" right>
@@ -576,6 +566,20 @@
                                 @endif
                             </div>
                         @endif
+                        @if($patient->mcp_pro_id !== $pro->id)
+                            {{-- claim client --}}
+                            <div moe relative class="ml-2">
+                                <a href="" start show class="btn btn-sm btn-success text-white font-weight-bold small">Claim as MCP</a>
+                                <form url="/api/mcpRequest/claim" class="mcp-theme-1" right>
+                                    <input type="hidden" name="clientUid" value="{{$patient->uid}}">
+                                    <p>Claim this patient?</p>
+                                    <div>
+                                        <button submit class="btn btn-sm btn-primary mr-2">Yes</button>
+                                        <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                                    </div>
+                                </form>
+                            </div>
+                        @endif
                     </div>
                     <div class="card-body">
                         {{--<h1 class="h3">@yield('section-title')</h1>--}}