瀏覽代碼

Show context (if note_id or care_month_id not null)

Vijayakrishnan 3 年之前
父節點
當前提交
e5343997b2
共有 1 個文件被更改,包括 18 次插入0 次删除
  1. 18 0
      resources/views/app/patient/invoicing/invoices.blade.php

+ 18 - 0
resources/views/app/patient/invoicing/invoices.blade.php

@@ -43,6 +43,7 @@
                 <th class="border-bottom-0">Created</th>
                 <th class="border-bottom-0">Amount</th>
                 <th class="border-bottom-0">Description</th>
+                <th class="border-bottom-0">Context</th>
                 <th class="border-bottom-0">Pay Link</th>
                 <th class="border-bottom-0">Paid</th>
                 <th class="border-bottom-0">Balance</th>
@@ -96,6 +97,23 @@
                             </form>
                         </div>
                     </td>
+                    <td>
+                        @if($record->note_id || $record->care_month_id)
+                            @if($record->note_id)
+                                <?php $note = \App\Models\Note::where('id', $record->note_id)->first(); ?>
+                                <a href="{{ route('patients.view.notes.view.dashboard', ['patient' => $note->client, 'note' => $note]) }}">
+                                    Note
+                                </a>
+                            @else
+                                <?php $careMonth = \App\Models\CareMonth::where('id', $record->care_month_id)->first(); ?>
+                                <a href="{{route('patients.view.care-months.view.dashboard', ['patient' => $careMonth->client, 'careMonth' => $careMonth])}}">
+                                    Care Month
+                                </a>
+                            @endif
+                        @else
+                            -
+                        @endif
+                    </td>
                     <td>
                         <a href="#" data-invoice-uid="{{$record->uid}}" data-uid="{{$record->customer->uid}}" class="generate-and-visit-ic-pay" native target="_blank">Visit</a>
                         <a href="#" data-invoice-uid="{{$record->uid}}" data-uid="{{$record->customer->uid}}" class="generate-and-copy-ic-pay-url ml-1" native target="_blank">Copy</a>