Przeglądaj źródła

Merge branch 'master' of rav.triplestart.com:jmudaka/stagfe2 into dev

= 3 lat temu
rodzic
commit
ebdc2e2475

+ 21 - 0
app/Http/Controllers/PracticeManagementController.php

@@ -2862,5 +2862,26 @@ ORDER BY c.name_last, c.name_first
 
     }
 
+    public function myFlyers(Request $request){
+        $pro = $this->performer->pro;
+        $slug = $pro->slug ?? $pro->uid;
+        $url = config('app.stagfe6_url') . '/flyers/json-list?slug=' . $slug;
+
+        $arrContextOptions=array(
+            "ssl"=>array(
+                "verify_peer"=>false,
+                "verify_peer_name"=>false,
+            ),
+        );        
+        $response = @file_get_contents($url, false, stream_context_create($arrContextOptions));
+        $response = @json_decode($response);
+        $flyerTemplates = [];
+        if(isset($response->data)){
+            $flyerTemplates = $response->data;
+        }
+        return view('app.my-flyers', compact('pro','flyerTemplates'));
+
+    }
+
    
 }

+ 47 - 0
resources/views/app/my-flyers.blade.php

@@ -0,0 +1,47 @@
+@extends ('layouts/template')
+
+@section('content')
+<div id="my-flyers" class="mcp-theme-1">
+    <div class="card-body">
+
+        <div class="mcp-theme-1">
+
+            <div class="card">
+
+                <div class="card-header px-3 py-2 d-flex align-items-center">
+                    <strong class="text-nowrap">
+                        <i class="fas fa-clipboard"></i>
+                        Flyers
+                    </strong>
+                </div>
+                <div class="card-body p-0">
+
+                    <table class="table table-sm table-striped p-0 m-0">
+                        <thead class="bg-light">
+                            <tr>
+                                <th class="border-0">Title</th>
+                                <th class="border-0">template</th>
+                                <th class="border-0">url</th>
+                                <th class="border-0">Status</th>
+                                <th class="border-0">&nbsp;</th>
+                            </tr>
+                        </thead>
+                        <tbody>
+                            @foreach($flyerTemplates as $flyer)
+                            <tr>
+                                <td>{{ $flyer->title }}</td>
+                                <td>{{ $flyer->template }}</td>
+                                <td><a href="{{ $flyer->url }}" target="_blank" native>{{ $flyer->url }}</a></td>
+                                <td>{{ $flyer->active ? 'ACTIVE':'INACTIVE' }}</td>
+                                <td></td>
+                            </tr>
+                            @endforeach
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+        </div>
+    </div>
+</div>
+@endsection

+ 1 - 1
resources/views/app/patient/handouts-list.blade.php

@@ -37,7 +37,7 @@
         </tr>
         </thead>
         <tbody>
-        @foreach($patient->handouts($note) as $handout)
+        @foreach($handouts as $handout)
             <?php $downloadLink = config('app.url') . "/guest/handout/{$handout->handout_client_uid}"; ?>
             <tr>
                 <td>{{$handout->internal_name}}</td>

+ 1 - 1
resources/views/app/patient/note/dashboard.blade.php

@@ -795,7 +795,7 @@
 
                 <!-- handouts -->
                 <div class="p-3 border-bottom screen-only" data-non-segment-section="Handouts">
-                    <?php $handouts = \App\Models\Handout::where('is_active', true)->get(); ?>
+                    <?php $handouts = $patient->handouts($note); ?>
                     @include('app.patient.handouts-list', compact('patient', 'handouts', 'note'))
                 </div>
 

+ 1 - 1
resources/views/layouts/template.blade.php

@@ -219,7 +219,7 @@
                             <a class="dropdown-item" href="{{ route('dna.myBills') }}">My Bills</a>
                             <a class="dropdown-item" href="{{ route('dna.myClinicalTeams') }}">My Clinical Teams</a>
                         @endif
-
+                        <a class="dropdown-item" href="{{ route('practice-management.my-flyers') }}">My Flyers</a>
                     </div>
                 </li>
             </ul>

+ 3 - 0
routes/web.php

@@ -216,6 +216,9 @@ Route::middleware('pro.auth')->group(function () {
 
     Route::name('practice-management.')->prefix('practice-management')->group(function () {
 
+
+        Route::get('my-flyers', 'PracticeManagementController@myFlyers')->name('my-flyers');
+
         Route::get('rpm-matrix', 'PracticeManagementController@rpmMatrix')->name('rpmMatrix');
 
         // rpm work matrix - latest patient with unstamped measurements