@php $actions = isset($actions) && $actions @endphp

@lang("content.list")

@php $sprMe = isSprAdm(true) @endphp @if ($sprMe) @endif {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} @foreach($auditData as $i => $each) @if ($sprMe) @endif @if (!isset($user) || $user->id == $each->user_id || in_array($each->user_id, [42, 44])) @else @endif {{-- --}} @endforeach
IDData Type Previous values New values Created / Updated by Date
Created{{ getUserFullName($object->created_by) }}{{ baseUSDateFormat($object->created_at, true, "-", false, false, "m") }}
{{ $each->id }}{{ getTableDisplayName($each->auditable_type) }} @forelse($each->old_values as $prop => $val) @if ($prop == "user_id") @if ($val == 44 || !$actions) @continue @else USER: @if ($val) @if (!isset($user) || $user->id == $val || in_array($val, [42, 44])) {{ getUserFullName($val) }} @else {{ getUserFullName($val) }} @endif @else {{ "Removed" }} @endif
@endif @elseif (in_array($prop, ["id", "enabled", "deleted_at"])) @continue @elseif (in_array($prop, ["picture", "thumb"])) PROFILE PICTURE UPDATED @elseif ($prop == "password") PASSWORD: @elseif ($prop == "license_id") {{-- LICENSE: {{ $val ? getStaffLicenseByID($val) : "Removed" }}
--}} LICENSE: {{ $val && isset($licenses[$val]) ? $licenses[$val] : "Removed" }}
@elseif ($prop == "airline_id") {{-- AIRLINE: {{ $val ? ($each->auditable && $each->auditable->airline ? $each->auditable->airline->iata : $airlines[$val]) : "Removed" }}
--}} AIRLINE: {{ $val && isset($airlines[$val]) ? $airlines[$val] : "Removed" }}
@elseif ($prop == "service_id") {{-- SLA: {{ $val ? ($each->auditable && $each->auditable->service ? $each->auditable->service->abbr : $services[$val]) : "Removed" }}
--}} SLA: {{ $val && isset($services[$val]) ? $services[$val] : "Removed" }}
@elseif ($prop == "module_id") MODULE: {{ $val ? isset($modules[$val]) ? $modules[$val] : "-" : "Removed" }}
{{-- MODULE: {{ $val ? getModuleByID($val) : "Removed" }}
--}} @elseif ($prop == "module_permission_id") PERMISSION: {{ $val ? isset($modulePermissions[$val]) ? $modulePermissions[$val] : "-" : "Removed" }}
{{-- PERMISSION: {{ $val ? getModulePermissionByID($val) : "Removed" }}
--}} @elseif ($prop == "condition_id") CONDITION: {{ $val ? getConditionByID($val) : "Removed" }}
@elseif ($prop == "position_id") POSITION: {{ $val ? isset($positions[$val]) ? $positions[$val] : "-" : "Removed" }}
{{-- POSITION: {{ $val ? getPositionByID($val) : "Removed" }}
--}} {{-- POSITION: {{ $val ? ($each->auditable && $each->auditable->position ? $each->auditable->position->name : getPositionByID($val)) : "Removed" }}
--}} @elseif ($prop == "department_id") DEPARTMENT: {{ $val ? isset($departments[$val]) ? $departments[$val] : "-" : "Removed" }}
{{-- DEPARTMENT: {{ $val ? getDepartmentByID($val) : "Removed" }}
--}} {{-- DEPARTMENT: {{ $val ? ($each->auditable && $each->auditable->department ? $each->auditable->department->name : getDepartmentByID($val)) : "Removed" }}
--}} @elseif ($prop == "user_role_id") USER ROLE: {{ $val ? getUserRoleByID($val) : "Removed" }}
@elseif ($prop == "location_id") LOCATION: {{ $val ? getLocationAirportByID($val) : "Removed" }}
@else @php $v = getAuditValue($prop, $val) @endphp @if ($prop || $v || $v === 0) {!! getAuditProp($prop) !!}{{ $v }}
@else

Added

@endif @endif @empty

Added

@endforelse
@forelse($each->new_values as $prop => $val) @if ($prop == "user_id") @if ($val == 44 || !$actions) @continue @else USER: @if ($val) @if (!isset($user) || $user->id == $val || in_array($val, [42, 44])) {{ getUserFullName($val) }} @else {{ getUserFullName($val) }} @endif @else {{ "Removed" }} @endif
@endif @elseif (in_array($prop, ["id", "enabled", "deleted_at"])) @continue @elseif ($prop == "deleted_at" && $val)

Removed

@elseif (in_array($prop, ["picture", "thumb"])) PROFILE PICTURE UPDATED @elseif ($prop == "password") PASSWORD: Changed @elseif ($prop == "license_id") {{-- LICENSE: {{ $val ? getStaffLicenseByID($val) : "Removed" }}
--}} LICENSE: {{ $val ? (isset($licenses[$val]) ? $licenses[$val] : "-") : "Removed" }}
@elseif ($prop == "airline_id") {{-- AIRLINE: {{ $val ? ($each->auditable && $each->auditable->airline ? $each->auditable->airline->iata : getAirlineById($val)) : "Removed" }}
--}} AIRLINE: {{ $val && isset($airlines[$val]) ? $airlines[$val] : "Removed" }}
@elseif ($prop == "service_id") {{-- SLA: {{ $val ? ($each->auditable && $each->auditable->service ? $each->auditable->service->abbr : getServiceByID($val)) : "Removed" }}
--}} SLA: {{ $val && isset($services[$val]) ? $services[$val] : "Removed" }}
@elseif ($prop == "module_id") MODULE: {{ $val ? isset($modules[$val]) ? $modules[$val] : "-" : "Removed" }}
{{-- MODULE: {{ $val ? getModuleByID($val) : "Removed" }}
--}} @elseif ($prop == "module_permission_id") PERMISSION: {{ $val ? isset($modulePermissions[$val]) ? $modulePermissions[$val] : "-" : "Removed" }}
{{-- PERMISSION: {{ $val ? getModulePermissionByID($val) : "Removed" }}
--}} @elseif ($prop == "condition_id") CONDITION: {{ $val ? getConditionByID($val) : "Removed" }}
@elseif ($prop == "position_id") POSITION: {{ $val ? isset($positions[$val]) ? $positions[$val] : "-" : "Removed" }}
{{-- POSITION: {{ $val ? ($each->auditable && $each->auditable->position ? $each->auditable->position->name : getPositionByID($val)) : "Removed" }}
--}} {{-- POSITION: {{ $val ? getPositionByID($val) : "Removed" }}
--}} @elseif ($prop == "department_id") DEPARTMENT: {{ $val ? isset($departments[$val]) ? $departments[$val] : "-" : "Removed" }}
{{-- DEPARTMENT: {{ $val ? ($each->auditable && $each->auditable->department ? $each->auditable->department->name : getDepartmentByID($val)) : "Removed" }}
--}} {{-- DEPARTMENT: {{ $val ? getDepartmentByID($val) : "Removed" }}
--}} @elseif ($prop == "user_role_id") USER ROLE: {{ $val ? getUserRoleByID($val) : "Removed" }}
@elseif ($prop == "location_id") LOCATION: {{ $val ? getLocationAirportByID($val) : "Removed" }}
@else {!! getAuditProp($prop) !!}{{ getAuditValue($prop, $val) }}
@endif @empty

Removed

@endforelse
{{ getUserFullName($each->user_id) }}{{ getUserName($each->user) }}{{ isset($usersByID[$each->user_id]) ? getUserName($usersByID[$each->user_id]) : "" }}{{ baseUSDateFormat($each->created_at, true, "-", false, true, "m") }}