|
@@ -1,12 +1,87 @@
|
|
-<h4 class="d-flex my-3 px-3 stag-heading stag-heading-info">
|
|
|
|
|
|
+<?
|
|
|
|
+ $client = $record;
|
|
|
|
+ $thumbnail = $client->profile_picture_base64;
|
|
|
|
+ $initials = !$thumbnail ? substr($client->name_first, 0, 1).substr($client->name_last, 0, 1) : '';
|
|
|
|
+ $fullName = zImplode(', ', [
|
|
|
|
+ zImplode(' ', [$client->name_prefix, $client->name_first, $client->name_middle, $client->name_last, $client->name_suffix]),
|
|
|
|
+ $client->name_credential
|
|
|
|
+ ]);
|
|
|
|
+
|
|
|
|
+ $sex = str_replace(['F', 'M'], ['Female', 'Male'], $client->sex);
|
|
|
|
+ $gender = $sex
|
|
|
|
+ ? $sex.($client->gender_identity ? " ($client->gender_identity)" : '')
|
|
|
|
+ : $client->gender_identity;
|
|
|
|
+ $age = date_diff(date_create($client->dob), date_create('today'))->y ?: $client->age_in_years;
|
|
|
|
+ $birthplace = zImplode(', ', [$client->birth_city, $client->birth_state, $client->birth_country]);
|
|
|
|
+
|
|
|
|
+ $confirmedCell = $client->is_cell_number_confirmed ? $client->cell_number : null;
|
|
|
|
+ $confirmedEmail = $client->is_email_address_confirmed ? $client->email_address : null;
|
|
|
|
+ $location = zImplode(', ', [$client->home_address_city, $client->home_address_state])
|
|
|
|
+ ?: zImplode(', ', [$client->mailing_address_city, $client->mailing_address_state])
|
|
|
|
+ ?: zImplode(', ', [$client->secondary_home_address_city, $client->secondary_home_address_state])
|
|
|
|
+ ?: zImplode(', ', [$client->secondary_mailing_address_city, $client->secondary_mailing_address_state])
|
|
|
|
+ ?: $birthplace
|
|
|
|
+ ?: null;
|
|
|
|
+
|
|
|
|
+ $memberSince = date_diff(date_create($client->created_at), date_create('now'))->days;
|
|
|
|
+ if ($memberSince > 30) $memberSince = date('F, Y', strtotime($client->created_at));
|
|
|
|
+ else if ($memberSince > 1) $memberSince .= ' days ago';
|
|
|
|
+ else if ($memberSince === 1) $memberSince = 'yesterday';
|
|
|
|
+ else if ($memberSince === 0) $memberSince = 'today';
|
|
|
|
+
|
|
|
|
+ $medicareStatus = [
|
|
|
|
+ 'true' => 'medicare-valid',
|
|
|
|
+ 'false' => 'medicare-invalid',
|
|
|
|
+ 'NULL' => null
|
|
|
|
+ ][var_export($client->medicareStatus(), true)];
|
|
|
|
+
|
|
|
|
+ // print_r($client); exit;
|
|
|
|
+?>
|
|
|
|
+
|
|
|
|
+<section class=z><a href=SUB_detail>
|
|
|
|
+<header class=hbox>
|
|
|
|
+ <div class="dp <?=$medicareStatus?>" style="background-image:<?=$thumbnail?>"><?=$initials?></div>
|
|
<div>
|
|
<div>
|
|
- Clients: [<?= $record->name_display() ?>]
|
|
|
|
- @if($record->is_duplicate)
|
|
|
|
|
|
+ <div class=name title="<?=$fullName?>"><?=zFormalName($client)?></div>
|
|
|
|
+ <div class=separators title="<?=date('jS F Y', strtotime($client->dob))?>">
|
|
|
|
+ <span><?=$gender?></span>
|
|
|
|
+ <span><?=$age ? ($gender ? $age : "$age years old") : null?></span>
|
|
|
|
+ <span><?=$birthplace ? "Hails from $birthplace" : null?></span>
|
|
|
|
+ </div>
|
|
|
|
+ <ul class=hbox>
|
|
|
|
+ <li>
|
|
|
|
+ <i class="fa fa-phone-alt" aria-hidden="true"></i>
|
|
|
|
+ <span class=contact><?=$confirmedCell ?? 'Edit'?></span>
|
|
|
|
+ </li>
|
|
|
|
+ <li>
|
|
|
|
+ <i class="fa fa-envelope" aria-hidden="true"></i>
|
|
|
|
+ <span class=contact><?=$confirmedEmail ?? 'Edit'?></span>
|
|
|
|
+ </li>
|
|
|
|
+ <li>
|
|
|
|
+ <i class="fa fa-map-marker-alt" aria-hidden="true"></i>
|
|
|
|
+ <?=$location ?? 'Add location'?>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ <div class=separators>
|
|
|
|
+ <span>
|
|
|
|
+ <span>Joined <?=$memberSince?></span>
|
|
|
|
+ <span title="<?=$client->source_memo?>"><?=$client->source ? " via $client->source" : null?></span>
|
|
|
|
+ </span>
|
|
|
|
+ <span><?=$client->mcp_pro_id ? 'Currently under c/o '.zFormalName($client->mcpPro) : null?></span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</header>
|
|
|
|
+</a></section>
|
|
|
|
+
|
|
|
|
+<!-- <h4 class="d-flex my-3 px-3 stag-heading stag-heading-info">
|
|
|
|
+ <div>
|
|
|
|
+ Clients: [<?= $client->name_display() ?>]
|
|
|
|
+ @if($client->is_duplicate)
|
|
<div>
|
|
<div>
|
|
<p> This client is a duplicate of
|
|
<p> This client is a duplicate of
|
|
- <a href="{{route('clients_SINGLE-SUB_dashboard', $record->duplicateOfClient->uid)}}">{{$record->duplicateOfClient->name_display()}}</a>.
|
|
|
|
- <a up-modal=".form-contents" up-width="800" up-history="false" href="{{route('clients_SINGLE-ACTION_setIsDuplicateToFalse', $record->uid)}}" title="Set as not duplicate">✏️ </a></p>
|
|
|
|
|
|
+ <a href="{{route('clients_SINGLE-SUB_dashboard', $client->duplicateOfClient->uid)}}">{{$client->duplicateOfClient->name_display()}}</a>.
|
|
|
|
+ <a up-modal=".form-contents" up-width="800" up-history="false" href="{{route('clients_SINGLE-ACTION_setIsDuplicateToFalse', $client->uid)}}" title="Set as not duplicate">✏️ </a></p>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@endif
|
|
</div>
|
|
</div>
|
|
-</h4>
|
|
|
|
|
|
+</h4> -->
|