Przeglądaj źródła

Inline include for generic-bills framework

Vijayakrishnan 4 lat temu
rodzic
commit
e72be5487b

+ 7 - 1
resources/views/app/generic-bills/create_generic-bill.blade.php

@@ -1,6 +1,6 @@
 <span class="mx-2 text-secondary">|</span>
 <span class="mx-2 text-secondary">|</span>
 <div moe wide relative class="">
 <div moe wide relative class="">
-    <a class="" href="" show start>Create Generic Bill</a>
+    <a class="" href="" show start>Create {{@$label ? $label : 'Generic'}} Bill</a>
     <form url="/api/bill/createForGeneric">
     <form url="/api/bill/createForGeneric">
         <div class="mb-2">
         <div class="mb-2">
             <label for="" class="text-secondary text-sm">Pro</label>
             <label for="" class="text-secondary text-sm">Pro</label>
@@ -13,6 +13,12 @@
         @if(@$patient)
         @if(@$patient)
             <input type="hidden" name="optionalClientUid" value="{{$patient->uid}}">
             <input type="hidden" name="optionalClientUid" value="{{$patient->uid}}">
         @endif
         @endif
+        @if(@$entityType)
+            <input type="hidden" name="genericTargetEntityType" value="{{$entityType}}">
+        @endif
+        @if(@$entityUid)
+            <input type="hidden" name="genericTargetEntityUid" value="{{$entityUid}}">
+        @endif
         <div class="mb-2">
         <div class="mb-2">
             <label for="" class="text-secondary text-sm">Service</label>
             <label for="" class="text-secondary text-sm">Service</label>
 <!--            <input type="text" name="code" class="form-control form-control-sm" value="" autofocus required>-->
 <!--            <input type="text" name="code" class="form-control form-control-sm" value="" autofocus required>-->

+ 5 - 5
resources/views/app/generic-bills/index.blade.php → resources/views/app/generic-bills/inline.blade.php

@@ -24,14 +24,14 @@ $genericBills = $genericBills->orderBy('created_at', 'DESC')->get();
 ?>
 ?>
 
 
 @if(!count($genericBills))
 @if(!count($genericBills))
-    <div class="p-3 d-flex align-items-center">
-        <p class="font-weight-bold mb-0 text-secondary">No generic bills</p>
+    <div class="{{@$class ? $class : ''}} d-flex align-items-center">
+        <p class="font-weight-bold mb-0 text-secondary">No {{@$label ? $label : 'Generic'}} bills</p>
         @include('app.generic-bills.create_generic-bill')
         @include('app.generic-bills.create_generic-bill')
     </div>
     </div>
 @else
 @else
-    <div class="p-3">
+    <div class="{{@$class ? $class : ''}}">
         <div class="d-flex align-items-center mb-2">
         <div class="d-flex align-items-center mb-2">
-            <p class="font-weight-bold text-secondary font-size-13 m-0">Generic Bills</p>
+            <p class="font-weight-bold text-secondary font-size-13 m-0">{{@$label ? $label : 'Generic'}} Bills</p>
             @include('app.generic-bills.create_generic-bill')
             @include('app.generic-bills.create_generic-bill')
         </div>
         </div>
             <table class="table table-sm tabe-striped mb-0 table-bordered">
             <table class="table table-sm tabe-striped mb-0 table-bordered">
@@ -213,7 +213,7 @@ $genericBills = $genericBills->orderBy('created_at', 'DESC')->get();
                                 </div>
                                 </div>
                             @endif
                             @endif
 
 
-                            @if($bill->is_cancellation_acknowledged && !@$note->is_billing_marked_done)
+                            @if($bill->is_cancellation_acknowledged)
                                 <div class="mt-2 text-secondary">
                                 <div class="mt-2 text-secondary">
                                     <i class="fa fa-check"></i>
                                     <i class="fa fa-check"></i>
                                     Acknowledged
                                     Acknowledged

+ 6 - 0
resources/views/app/patient/care-month/dashboard.blade.php

@@ -2010,6 +2010,12 @@
 
 
         @endif
         @endif
 
 
+        <hr class="m-negator my-3">
+
+        {{-- generic bills --}}
+        <div class="row">
+            @include('app.generic-bills.inline', ['patient' => $patient, 'class' => 'col-12', 'entityType' => 'CareMonth', 'entityUid' => $careMonth->uid])
+        </div>
 
 
     </div>
     </div>
 
 

+ 1 - 1
resources/views/app/patient/generic-bills.blade.php

@@ -2,6 +2,6 @@
 
 
 @section('inner-content')
 @section('inner-content')
 
 
-    @include('app.generic-bills.index', ['patient' => $patient])
+    @include('app.generic-bills.inline', ['patient' => $patient, 'entityType' => 'Client', 'entityUid' => $patient->uid])
 
 
 @endsection
 @endsection

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

@@ -1991,7 +1991,7 @@
                 @endif
                 @endif
 
 
                 {{-- generic bills --}}
                 {{-- generic bills --}}
-                @include('app.generic-bills.index', ['note' => $note, 'patient' => $patient])
+                @include('app.generic-bills.inline', ['patient' => $patient, 'note' => $note, 'class' => 'p-3 border-top', 'label' => 'NA', 'entityType' => 'Note', 'entityUid' => $note->uid])
 
 
                 <div class="border-top p-3 screen-only">
                 <div class="border-top p-3 screen-only">
                     @if($note->addendums->count())
                     @if($note->addendums->count())