@if ($flight->created_by_email)
Auto created |
{{-- {{ $flight->email_type ? "Auto created" : "Created from Manual Message Entry" }} | --}}
@elseif ($flight->flight_schedule_id)
Flight Created by Schedule Upload |
@else
Flight Created Manually |
@endif
|
{{ $flight->email_type ? $flight->email_type : getUserFullName($flight->created_by) }} |
{{ urlShowOnlyRoute($each->url) }} |
{{ baseUSDateFormat($flight->created_at, true, "-", false, false, "m") }} |
@php $ignoreData = [] @endphp
@php $dataExists = false @endphp
@if (isset($flightsAudit['flight']))
@foreach($flightsAudit["flight"] as $i => $each)
@foreach($each->old_values as $prop => $val)
@if (array_key_exists($prop, $each->new_values) && $val == $each->new_values[$prop])
@php $ignoreData[] = $prop @endphp
@continue
@endif
@if ($prop == "aircraft_id")
AC: {{ getAircraftById($val) }}
@else
{!! getAuditProp($prop, true) !!}{{ getAuditValue($prop, $val) }}
@endif
@php $dataExists = true @endphp
@endforeach
{{ !$dataExists ? "-" : "" }}
|
@php $dataExists = false @endphp
@foreach($each->new_values as $prop => $val)
@if (in_array($prop, $ignoreData))
@continue
@elseif ($prop == "aircraft_id")
AC: {{ $val ? getAircraftById($val) : "Removed" }}
@else
{!! getAuditProp($prop) !!}{{ getAuditValue($prop, $val, true) }}
@endif
@php $dataExists = true @endphp
@endforeach
{{ !$dataExists ? "-" : "" }}
|
{{-- {{ getUserFullName($each->user_id) }} | --}}
{{ getUserName($each->user) }} |
{{-- {{ isset($usersByID[$each->user_id]) ? getUserName($usersByID[$each->user_id]) : "" }} | --}}
{{ baseUSDateFormat($each->created_at, true, "-", false, false, "m") }} |
@endforeach
@endif
@if (isset($flightsAudit['delays']))
@foreach($flightsAudit["delays"] as $i => $each)
@php $dlAdded = false @endphp
@if ($each->dl)
@php $dlAdded = true @endphp
DL {{ $each->dl->code." | ". $each->dl->description }}
@endif
@forelse($each->old_values as $prop => $val)
@if (!in_array($prop, ["position", "duration"]))
@continue
@endif
{!! getAuditProp($prop) !!}{{ $val }}
@empty
Created
@endforelse
|
@if (!$dlAdded && $each->dl)
DL {{ $each->dl->code." | ". $each->dl->description }}
@endif
@forelse($each->new_values as $prop => $val)
@if (!in_array($prop, ["position", "duration"]))
@continue
@endif
{!! getAuditProp($prop) !!}{{ $val }}
@empty
Removed
@endforelse
|
{{ getUserName($each->user) }} |
{{-- {{ isset($usersByID[$each->user_id]) ? getUserName($usersByID[$each->user_id]) : "" }} | --}}
{{ baseUSDateFormat($each->created_at, true, "-", false, false, "m") }} |
@endforeach
@endif