mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Added notes to user consumables tab
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
8de7e9a2ab
commit
acd666fdf5
|
@ -230,7 +230,7 @@ class ConsumablesController extends Controller
|
|||
$rows[] = [
|
||||
'name' => ($consumable_assignment->user) ? $consumable_assignment->user->present()->nameUrl() : 'Deleted User',
|
||||
'created_at' => Helper::getFormattedDateObject($consumable_assignment->created_at, 'datetime'),
|
||||
'note' => ($consumable_assignment->note) ? $consumable_assignment->note : null,
|
||||
'note' => ($consumable_assignment->note) ? e($consumable_assignment->note) : null,
|
||||
'admin' => ($consumable_assignment->admin) ? $consumable_assignment->admin->present()->nameUrl() : null,
|
||||
];
|
||||
}
|
||||
|
|
|
@ -308,7 +308,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
|||
*/
|
||||
public function consumables()
|
||||
{
|
||||
return $this->belongsToMany(\App\Models\Consumable::class, 'consumables_users', 'assigned_to', 'consumable_id')->withPivot('id','created_at')->withTrashed();
|
||||
return $this->belongsToMany(\App\Models\Consumable::class, 'consumables_users', 'assigned_to', 'consumable_id')->withPivot('id','created_at','note')->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -763,9 +763,10 @@
|
|||
}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-6">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-3">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-2" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||
<th class="col-md-4">{{ trans('general.date') }}</th>
|
||||
<th class="col-md-2">{{ trans('general.date') }}</th>
|
||||
<th class="col-md-5">{{ trans('general.notes') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -775,7 +776,8 @@
|
|||
<td>
|
||||
{!! Helper::formatCurrencyOutput($consumable->purchase_cost) !!}
|
||||
</td>
|
||||
<td>{{ $consumable->pivot->created_at }}</td>
|
||||
<td>{{ Helper::getFormattedDateObject($consumable->pivot->created_at, 'datetime', false) }}</td>
|
||||
<td>{{ $consumable->pivot->note }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in a new issue