Change supplier resources to use components
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
<!-- $o = Supplier::class -->
|
||||
<!-- $spo=Supplier::class -->
|
||||
@use(App\Models\Supplier)
|
||||
@use(Carbon\Carbon)
|
||||
|
||||
<div class="row">
|
||||
<div class="col-9">
|
||||
<table class="table table-sm">
|
||||
@@ -14,14 +17,14 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach (\App\Models\Supplier::offeringTypes($o) as $key => $offering)
|
||||
@foreach (Supplier::offeringTypes($spo) as $key => $offering)
|
||||
<tr>
|
||||
<th>{{ $offering->type }}</th>
|
||||
@if(Arr::get($o->detail->connections,$key))
|
||||
<td>{{ Arr::get($o->detail->connections,$key.'.user') }}</td>
|
||||
<td>{{ Arr::get($o->detail->connections,$key.'.pass') }}</td>
|
||||
<td>{{ Arr::get($o->detail->connections,$key.'.url') }}</td>
|
||||
<td>{{ \Carbon\Carbon::createFromFormat('Y-m-d',Arr::get($o->detail->connections,$key.'.last'))->format('Y-m-d') }}</td>
|
||||
@if(Arr::get($spo->detail->connections,$key))
|
||||
<td>{{ Arr::get($spo->detail->connections,$key.'.user') }}</td>
|
||||
<td>{{ Arr::get($spo->detail->connections,$key.'.pass') }}</td>
|
||||
<td>{{ Arr::get($spo->detail->connections,$key.'.url') }}</td>
|
||||
<td>{{ Carbon::createFromFormat('Y-m-d',Arr::get($spo->detail->connections,$key.'.last'))->format('Y-m-d') }}</td>
|
||||
<td class="text-right">{{ number_format($offering->items->count()) }}</td>
|
||||
@else
|
||||
<td colspan="5"> </td>
|
||||
|
Reference in New Issue
Block a user