diff --git a/app/Models/Actionlog.php b/app/Models/Actionlog.php index 6e77ae3ac0..65698561bd 100755 --- a/app/Models/Actionlog.php +++ b/app/Models/Actionlog.php @@ -50,6 +50,13 @@ class Actionlog extends Model implements ICompanyableChild ->withTrashed(); } + public function componentlog() + { + + return $this->belongsTo('\App\Models\Component', 'component_id') + ->withTrashed(); + } + public function accessorylog() { diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 19f773716c..a9599f68bf 100755 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -88,7 +88,7 @@
{{ trans('general.date') }} | +{{ trans('general.date') }} | {{ trans('general.admin') }} | {{ trans('table.item') }} | {{ trans('table.actions') }} | @@ -99,7 +99,7 @@ @if (count($recent_activity) > 0) @foreach ($recent_activity as $activity)
---|---|---|---|---|
{{ date("M d", strtotime($activity->created_at)) }} | +{{ date("M d, Y H:iA", strtotime($activity->created_at)) }} | @if ($activity->action_type!='requested') {{ $activity->adminlog->fullName() }} @@ -116,8 +116,10 @@ {{ $activity->consumablelog->name }} @elseif (($activity->accessorylog) && ($activity->asset_type=="accessory")) {{ $activity->accessorylog->name }} - @else - {{ trans('general.bad_data') }} + @elseif (($activity->componentlog) && ($activity->asset_type=="component")) + {{ $activity->componentlog->name }} + @else + {{ trans('general.bad_data') }} @endif |