浏览代码

Added client header and blocking body.

raman 5 年之前
父节点
当前提交
e7f0909b79
共有 1 个文件被更改,包括 43 次插入2 次删除
  1. 43 2
      resources/views/pro/clients_SINGLE/SUB_dashboard.blade.php

+ 43 - 2
resources/views/pro/clients_SINGLE/SUB_dashboard.blade.php

@@ -2,7 +2,48 @@
 @extends('pro.clients.view')
 @section('content-inner')
 
-<div class="container-fluid p-2">
+<?
+    $client = $record;
+    $isMedicareNotGood = $client->medicareStatus() !== true;
+    $isBlocked = $isMedicareNotGood || !$client->mcp_pro_id || $client->has_mcp_done_onboarding_visit === 'UNKNOWN';
+?>
+
+<section class=z><a href=SUB_detail>
+<? if(!$isBlocked): ?>
+    <main>
+        
+    </main>
+<? else: ?>
+    <main class="blocked">
+        <h5>
+            <span>⚠️</span>
+            <? if($isMedicareNotGood): ?>
+                Need a functional medicare number.
+            <? elseif(!$client->mcp_pro_id): ?>
+                Hasn't been assigned a MCP yet.
+            <? elseif($client->has_mcp_done_onboarding_visit === 'UNKNOWN'): ?>
+                MCP hasn't done a onboarding visit.
+            <? endif ?>
+        </h5>
+    </main>
+<? endif ?>
+</section>
+
+<style>
+    .z main {
+        display: flex;
+        flex-direction: column;
+        min-height: 300px;
+        padding: 20px 0;
+    }
+
+    .z .blocked {
+        align-items: center;
+        justify-content: center;
+    }
+</style>
+
+<!-- <div class="container-fluid p-2">
     <div class="row">
         <div class="col-md-12">
             <p>{{$record->name_display()}}</p>
@@ -189,6 +230,6 @@
                 
         </div>
     </div>
-</div>
+</div> -->
 
 @endsection