| {{ $i + 1 }} |
@php $dataExists = $deleted = false @endphp
@php $userExists = $slaExists = false @endphp
@foreach($each->old_values as $prop => $val)
@if (in_array($prop, $ignoreFields))
@continue
@endif
{{-- @if (array_key_exists($prop, $each->new_values) && $val == $each->new_values[$prop])--}}
{{-- @php $ignoreData[] = $prop @endphp --}}
{{-- @continue--}}
{{-- @endif--}}
@if ($prop == "deleted_at" && !$val)
@php $deleted = true @endphp
@continue
@elseif ($prop == "user_id")
@php $userExists = true @endphp
Staff: {{ isset($users[$val]) ? $users[$val] : "ID: {$val}" }}
@elseif ($prop == "service_id")
@php $slaExists = true @endphp
SLA: {{ isset($services[$val]) ? $services[$val] : "ID: {$val}" }}
@else
{!! getAuditProp($prop, true) !!}{{ getAuditValue($prop, $val) }}
@endif
@php $dataExists = true @endphp
@endforeach
@if($deleted || $each->event == "deleted")
@if (!$dataExists)
Staff: {{ isset($users[$each->auditable->user_id]) ? $users[$each->auditable->user_id] : "ID: {$each->auditable->user_id}" }}
SLA: {{ isset($services[$each->auditable->service_id]) ? $services[$each->auditable->service_id] : "ID: {$each->auditable->service_id}" }}
@foreach($deletedFields as $itm)
@if ($each->auditable->{$itm})
{{ getAuditProp($itm, true) }}: {{ $each->auditable->{$itm} }}
@endif
@endforeach
@endif
DELETED
@elseif($each->event == "created")
CREATED
@else
@if (!$userExists)
Staff: {{ isset($users[$each->auditable->user_id]) ? $users[$each->auditable->user_id] : "ID: {$each->auditable->user_id}" }}
@endif
@if (!$slaExists)
SLA: {{ isset($services[$each->auditable->service_id]) ? $services[$each->auditable->service_id] : "ID: {$each->auditable->service_id}" }}
@endif
MODIFIED
@endif
{{-- {{ !$dataExists ? strtoupper($each->event) : "" }}--}}
|
@php $dataExists = false @endphp
@foreach($each->new_values as $prop => $val)
@if (in_array($prop, $ignoreFields))
@continue
@endif
{{-- @if (in_array($prop, $ignoreData))--}}
{{-- @continue--}}
@if ($prop == "deleted_at" && !$val)
@elseif ($prop == "user_id")
Staff: {{ isset($users[$val]) ? $users[$val] : "ID: {$val}" }}
@elseif ($prop == "service_id")
SLA: {{ isset($services[$val]) ? $services[$val] : "ID: {$val}" }}
@else
{!! getAuditProp($prop) !!}{{ getAuditValue($prop, $val, true) }}
@endif
@php $dataExists = true @endphp
@endforeach
{{-- {{ !$dataExists ? strtoupper($each->event) : "" }}--}}
|
{{ isset($users[$each->user_id]) ? $users[$each->user_id] : "ID: {$each->user_id}" }} |
{{-- {{ isset($usersByID[$each->user_id]) ? getUserName($usersByID[$each->user_id]) : "" }} | --}}
{{ urlShowOnlyRoute($each->url) }} |
{{ baseUSDateFormat($each->created_at, true, "-", false, false, "m") }} |
@endforeach