Parcourir la source

Payment rates list page

Vijayakrishnan Krishnan il y a 4 ans
Parent
commit
8828b2cbfa

+ 4 - 1
app/Http/Controllers/PracticeManagementController.php

@@ -6,6 +6,7 @@ use App\Models\AppSession;
 use App\Models\Bill;
 use App\Models\Client;
 use App\Models\Note;
+use App\Models\ProRate;
 use App\Models\ProTransaction;
 use Illuminate\Http\Request;
 
@@ -18,7 +19,9 @@ class PracticeManagementController extends Controller
 
     public function rates(Request $request)
     {
-        return view('app.practice-management.rates');
+        $proID = $this->performer()->pro->id;
+        $rates = ProRate::where('pro_id', $proID)->where('is_active', true)->orderBy('created_at', 'desc')->get();
+        return view('app.practice-management.rates', compact('rates'));
     }
 
     public function previousBills(Request $request)

+ 41 - 6
resources/views/app/practice-management/rates.blade.php

@@ -1,9 +1,44 @@
-@extends ('layouts.practice-management')
+@extends ('layouts/template')
 
-@section('section-title')
-    Rates
-@endsection
+@section('content')
+
+    <div class="p-3 mcp-theme-1">
+        <div class="card">
+
+            <div class="card-header p-3 d-flex align-items-center">
+                <strong class="mr-4">
+                    <i class="fas fa-user-injured"></i>
+                    Payment Rates
+                </strong>
+            </div>
+            <div class="card-body p-0">
+
+                <table class="table table-sm table-condensed p-0 m-0">
+                    <thead class="bg-light">
+                    <tr>
+                        <th class="px-3 border-0">Responsibility</th>
+                        <th class="border-0">Code</th>
+                        <th class="border-0">Amount</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    @foreach ($rates as $rate)
+                        <tr>
+                            <td class="px-3">
+                                {{ $rate->responsibility }}
+                            </td>
+                            <td class="font-weight-bold">
+                                {{ $rate->code }}
+                            </td>
+                            <td class="font-weight-bold">
+                                ${{ $rate->amount }}
+                            </td>
+                        </tr>
+                    @endforeach
+                    </tbody>
+                </table>
+            </div>
+        </div>
+    </div>
 
-@section('inner-content')
-    Code | Description | Amount | Career Earnings
 @endsection