소스 검색

Added domain in account

Samson Mutunga 1 년 전
부모
커밋
bc55b88f2f

+ 5 - 0
app/Http/Controllers/Controller.php

@@ -24,6 +24,7 @@ class Controller extends BaseController
     protected $pro = null;
 
     protected $pros = null;
+    protected $domains = [];
 
     public function __construct()
     {
@@ -60,6 +61,10 @@ class Controller extends BaseController
         $rmCodes = ['RMB','RM20', 'RM40','RM60'];
 
         view()->share('rmCodes', $rmCodes);
+
+        $this->domains = config('constants.domains');
+
+        view()->share('domains', $this->domains);
     }
 
     public function performer(){

+ 5 - 0
config/constants.php

@@ -68,6 +68,11 @@
         'NO_LONGER_INTERESTED' => 'rgba(255, 3, 61, 0.5)',
         'BAD_RECORD' => 'rgba(102, 16, 242, 0.5)',
         'NO_LONGER_ELIGIBLE' => 'rgba(253, 126, 20, 0.5)',
+      ],
+      'domains' => [
+        ['key' => 'leadershiphealth.org', 'title' => 'Leadership Health'],
+        ['key' => 'sleepcareamerica.com', 'title' => 'Sleep Care America'],
+        ['key' => 'glucoseinsight.com', 'title' => 'Glucose Insight'],
       ]
   ];
 

+ 8 - 0
resources/views/app/admin/patients-table-extended.blade.php

@@ -19,6 +19,11 @@ $patientEngagementColorCodes = @Config::get('constants.client_engagement_status_
                     'label' => 'Name',
                     'key' => 'name_first',
                 ])</th>
+                {{-- <th class="border-0">@include('app.practice-management._sort_header', [
+                    'route' => route('admin.patients'),
+                    'label' => 'Domain',
+                    'key' => 'domain',
+                ])</th> --}}
                 @if ($pro->pro_type == 'ADMIN')
                     <th class="border-0 text-secondary">MCP</th>
                     {{-- <th class="border-0">NA</th> --}}
@@ -119,6 +124,9 @@ $patientEngagementColorCodes = @Config::get('constants.client_engagement_status_
                             </div>
                         </div>
                     </td>
+                    {{-- <td>
+                        {{ $patient->domain }}
+                    </td> --}}
                     @if ($pro->pro_type == 'ADMIN')
                         <td>{{ @$patient->mcp ? $patient->mcp->displayName() : '--' }}</td>
                         {{-- <td>{{@$patient->defaultNaPro ? $patient->defaultNaPro->displayName() : '--'}}</td> --}}

+ 13 - 0
resources/views/app/admin/patients_filters.blade.php

@@ -33,6 +33,18 @@ use App\Models\Company;
 	@if(@$filters['mapView'] == 1)
 		<input name="mapView" class="form-control input-sm" v-model="filters.mapView">
 	@endif
+	{{-- <div class="sm-section">
+		<div class="">
+			<label>Domain:</label>
+			<select name="domain" class="form-control input-sm" v-model="filters.domain">
+				<option value="">All</option>
+				@foreach($domains as $domain)
+					<option value="{{ $domain['key'] }}">{{ $domain['title'] }}</option>
+				@endforeach
+			</select>
+		</div>
+	</div> --}}
+
 	<div class="sm-section">
 		<div class="">
 			<label>Name:</label>
@@ -524,6 +536,7 @@ use App\Models\Company;
 <?php
 $loadedFilters = $filters;
 $allFilterKeys = [
+	'domain',
 	'name',
 	'age_category',
 	'age_value_1',

+ 11 - 0
resources/views/app/dna/patients_filters.blade.php

@@ -26,6 +26,17 @@
 	}
 </style>
 <form id="dna-patients-filters" method="GET" action="{{ route('dna.patients') }}" class="filter-container" v-cloak>
+	{{-- <div class="sm-section">
+		<div class="">
+			<label>Domain:</label>
+			<select name="domain" class="form-control input-sm" v-model="filters.domain">
+				<option value="">All</option>
+				@foreach($domains as $domain)
+					<option value="{{ $domain['key'] }}">{{ $domain['title'] }}</option>
+				@endforeach
+			</select>
+		</div>
+	</div> --}}
 	<div class="sm-section">
 		<div class="form-group">
 			<label>Name:</label>

+ 11 - 0
resources/views/app/mcp/patients-accounts-invites-filters.blade.php

@@ -19,6 +19,16 @@
 	}
 </style>
 <form id="patients-accounts-invites-filters" method="GET" action="{{ route('practice-management.patientsAccountsInvites') }}" class="filter-container" v-cloak>
+	{{-- DOMAIN --}}
+	<div class="form-group">
+		<label>Domain:</label>
+		<select name="domain" class="form-control input-sm" v-model="filters.domain">
+			<option value="">All</option>
+			@foreach($domains as $domain)
+				<option value="{{ $domain['key'] }}">{{ $domain['title'] }}</option>
+			@endforeach
+		</select>
+	</div>
 	<!-- DATE	 -->
 	<div>
 		<div class="form-group">
@@ -68,6 +78,7 @@
 <?php
 $loadedFilters = $filters;
 $allFilterKeys = [
+	'domain',
 	'date_category',
 	'date_value_1',
 	'date_value_2',

+ 3 - 2
resources/views/app/mcp/patients-accounts-invites.blade.php

@@ -20,6 +20,7 @@
                     <tr>
                         <th class="border-0">Created At</th>
                         <th class="border-0">Client</th>
+                        <th class="border-0">Domain</th>
                         <th class="border-0">Name</th>
                         <th class="border-0">Email</th>
                         <th class="border-0">Cell Number</th>
@@ -37,8 +38,8 @@
                             @endif
                         </td>
                         <td>{{ $accountInvite->client->displayName() }}</td>
-                        <td>{{ $accountInvite->first_name }} {{ $accountInvite->last_name }}</pre>
-                        </td>
+                        <td>{{ $accountInvite->domain }}</td>
+                        <td>{{ $accountInvite->first_name }} {{ $accountInvite->last_name }}</td>
                         <td>{{ $accountInvite->to_email_address }}</td>
                         <td>{{ $accountInvite->cell_number }}</td>
                         <td>{{ $accountInvite->status }} <span class="text-sm text-secondary">(Updated: {{friendlier_date_time($accountInvite->status_updated_at)}})</span>

+ 12 - 0
resources/views/app/mcp/patients_filters.blade.php

@@ -22,6 +22,17 @@
 	}
 </style>
 <form id="mcp-patients-filters" method="GET" action="{{ route('mcp.patients') }}" class="filter-container" v-cloak>
+	{{-- <div class="sm-section">
+		<div class="">
+			<label>Domain:</label>
+			<select name="domain" class="form-control input-sm" v-model="filters.domain">
+				<option value="">All</option>
+				@foreach($domains as $domain)
+					<option value="{{ $domain['key'] }}">{{ $domain['title'] }}</option>
+				@endforeach
+			</select>
+		</div>
+	</div> --}}
 	<div class="sm-section">
 		<div class="form-group mb-0">
 			<label>Name:</label>
@@ -277,6 +288,7 @@
 <?php
 $loadedFilters = $filters;
 $allFilterKeys = [
+	'domain',
 	'name',
 	'age_category',
 	'age_value_1',

+ 11 - 0
resources/views/app/patient/accounts.blade.php

@@ -13,6 +13,15 @@
                 </a>
                 <form url="/api/accountInvite/create" class="mcp-theme-1">
                     <input type="hidden" name="forClientUid" value="{{$patient->uid}}">
+                    <div class="mb-2">
+                        <label>Domain:</label>
+                        <select name="domain" class="form-control input-sm" required>
+                            <option value=""></option>
+                            @foreach($domains as $domain)
+                                <option value="{{ $domain['key'] }}">{{ $domain['title'] }}</option>
+                            @endforeach
+                        </select>
+                    </div>
                     <div class="mb-2">
                         <label class="text-secondary text-sm">Email Address</label>
                         <input type="email" name="toEmailAddress" value="{{ $patient->email_address }}"
@@ -140,6 +149,7 @@
                 <tr class="bg-light">
                     <th class="px-2 text-secondary border-bottom-0">Created At</th>
                     <th class="px-2 text-secondary border-bottom-0">Name</th>
+                    <th class="px-2 text-secondary border-bottom-0">Domain</th>
                     <th class="px-2 text-secondary border-bottom-0">Email</th>
                     <th class="px-2 text-secondary border-bottom-0">Cell Number</th>
                     <th class="px-2 text-secondary border-bottom-0">Status</th>
@@ -156,6 +166,7 @@
                             @endif
                         </td>
                         <td class="px-2">{{ $accountInvite->first_name }} {{ $accountInvite->last_name }}</pre></td>
+                        <td class="px-2">{{ $accountInvite->domain }}</pre></td>
                         <td class="px-2">{{ $accountInvite->to_email_address }}</td>
                         <td class="px-2">{{ $accountInvite->cell_number }}</td>
                         <td class="px-2">{{ $accountInvite->status }} <span class="text-sm text-secondary">(Updated: {{friendlier_date_time($accountInvite->status_updated_at)}})</span>

+ 3 - 2
resources/views/app/practice-management/patients-accounts-invites.blade.php

@@ -21,6 +21,7 @@
                         <th class="text-secondary border-0">Created At</th>
                         <th class="text-secondary border-0">Client</th>
                         <th class="text-secondary border-0">Name</th>
+                        <th class="text-secondary border-0">Domain</th>
                         <th class="text-secondary border-0">Email</th>
                         <th class="text-secondary border-0">Cell Number</th>
                         <th class="text-secondary border-0">Status</th>
@@ -37,8 +38,8 @@
                             @endif
                         </td>
                         <td>{{ $accountInvite->client->displayName() }}</td>
-                        <td>{{ $accountInvite->first_name }} {{ $accountInvite->last_name }}</pre>
-                        </td>
+                        <td>{{ $accountInvite->first_name }} {{ $accountInvite->last_name }}</td>
+                        <td>{{ $accountInvite->domain }}</td>
                         <td>{{ $accountInvite->to_email_address }}</td>
                         <td>{{ $accountInvite->cell_number }}</td>
                         <td>{{ $accountInvite->status }} <span class="text-sm text-secondary">(Updated: {{friendlier_date_time($accountInvite->status_updated_at)}})</span>