Reimplmement service changes going to the service__change table

This commit is contained in:
2023-05-06 13:53:14 +10:00
parent 691180b3f0
commit 013bb632d3
9 changed files with 181 additions and 26 deletions

View File

@@ -89,7 +89,11 @@
</div>
@can('wholesaler')
<div class="tab-pane fade" id="internal" role="tabpanel">
@include('service.widget.internal',['o'=>$o,'p'=>new \App\Models\Product()])
@if(($x=$o->changes()->where('service__change.active',TRUE)->where('complete',FALSE)->get()->pop()))
@include('service.widget.internal',['o'=>$o,'p'=>$x])
@else
@include('service.widget.internal',['o'=>$o,'p'=>new \App\Models\Product()])
@endif
</div>
<div class="tab-pane fade {{ session()->pull('service_update') ? 'active show' : '' }}" id="update" role="tabpanel">