@extends('layouts.master') @section('title', 'Meta Flow List Detail') @section('content-header')
@endsection @section('content')

User Details

Name: {{ $metaFlow->user->name }}

Email: {{ $metaFlow->user->email }}

Flow Details

Flow ID: {{ $metaFlow->flow_id }}

Event Time: {{ $metaFlow->event_time ?? 'N/A' }}



Device Info

@if ($metaFlow->device_finger_print) @php $deviceInfoData = json_decode($metaFlow->device_finger_print, true); @endphp

Device Name:{{ $deviceInfoData['name'] }}

Device Version: {{ $deviceInfoData['version'] ?? 'N/A' }}

@else

N/A

@endif {{--
--}} {{--
--}}

IP Address: {{ $metaFlow->ip ?? 'N/A' }}

Identity Status: {{ ucfirst($metaFlow->identity_status) ?? 'N/A' }}

{{--

Event Data: {{ $metaFlow->event_data ?? 'N/A' }}

--}}

Created At: {{ $metaFlow->created_at->format('d-m-Y h:i A') }}

@if (isset($metaFlow->verification_id))
@csrf {{-- --}}

@if ($metaFlow->identity_status == null) Please Choose @elseif($metaFlow->identity_status == config('constants.meta_flow_status.REVIEW_NEEDED')) Review Needed @else {{ ucwords($metaFlow->identity_status) }} @endif

    @foreach (config('constants.meta_flow_status') as $status)
  • @if ($status == config('constants.meta_flow_status.REVIEW_NEEDED')) Review Needed @else {{ ucwords($status) }} @endif
  • @endforeach
@endif
@foreach ($metaFlow->metaFlowSteps as $index => $step)
@switch($step->step_name) @case(config('constants.meta_flow_steps.ip_validation')) @php $ipData = json_decode($step->data, true); @endphp

Zip Code: {{ $ipData['zip'] }}

City: {{ $ipData['city'] }}

Region: {{ $ipData['region'] }}

Country: {{ $ipData['country'] }}

Platform: {{ ucfirst(str_replace('_', ' ', $ipData['platform'])) }}


{{--
--}}
{{--
--}} @break @case(config('constants.meta_flow_steps.email_check')) @php $emailData = json_decode($step->data, true); @endphp

Email: {{ $emailData['emailAddress'] ?? 'N/A' }}

Status: @if ($metaFlow->identity_status == 'reviewNeeded') Review Needed @else {{ ucfirst(str_replace('_', ' ', $metaFlow->identity_status)) }} @endif

@break @case(config('constants.meta_flow_steps.document_check')) @php $documents = json_decode($step->data, true); @endphp {{--
--}}
@foreach ($documents as $index => $document)

@if (isset($document['fields']))

Fields

@if (isset($document['fields']['fullName']))

Full Name: {{ $document['fields']['fullName']['value'] }}

@endif @if (isset($document['fields']['dateOfBirth']))

Date of Birth: {{ $document['fields']['dateOfBirth']['value'] }}

@endif
@if (isset($document['fields']['documentNumber']))

ID Number: {{ $document['fields']['documentNumber']['value'] }}

@endif @if (isset($document['fields']['expirationDate']))

Expiration Date: {{ $document['fields']['expirationDate']['value'] }}

@endif
@if (isset($document['fields']['address']))

Address: {{ $document['fields']['address']['value'] }}

@endif
@if (isset($document['fields']['emissionDate']))

Emission Date: {{ $document['fields']['emissionDate']['value'] }}

@endif

Photos

@foreach ($document['photos'] as $photo) Document Photo @endforeach

Additional Info

@if (isset($document['region']))

Region: {{ $document['region'] }}

@endif

Country: {{ $document['country'] }}

@endif

Steps

@foreach ($document['steps'] as $stepIndex => $step)

Status: @if ($step['status'] == 200) {{ $step['status'] }} OK @elseif($step['status'] == 404) {{ $step['status'] }} Not Found @endif

Cache Hit: {{ $step['cacheHit'] ? 'Yes' : 'No' }}

Reused: {{ $step['reused'] ? 'Yes' : 'No' }}

@if (isset($step['data']) && count($step['data']) > 0)
@foreach ($step['data'] as $dataKey => $dataValue) @if (isset($dataValue['label']))

{{ $dataValue['label'] }}: {{ $dataValue['value'] }}

@endif @endforeach
@endif @if (isset($step['data']['age']))

Age: {{ $step['data']['age'] }}

@endif {{-- @if (isset($step['id']) == 'age-check') @dd($step['id']) @endif --}} @if (isset($step['error']))

Error: {{ $step['error']['message'] }}

@endif
@endforeach
@endforeach
@break @case(config('constants.meta_flow_steps.selfie')) @php $selfieData = json_decode($step->data, true); @endphp @if (isset($selfieData['selfiePhotoUrl']))

Selfie Photo

@endif @break @default

No Data Found

@endswitch
@endforeach
{{--
--}}
{{-- all statuses in select --}} {{--
--}}

Webhook Logs

@forelse ($webhookLogs as $log) @empty @endforelse
# Event Name Status User Webhook URL Flow ID Created At Last Tried Action
{{ $log->id }} {{ $log->event_name ?? 'N/A' }} @if ($log->status == 'success') Success @elseif($log->status == 'failure' || $log->status == 'failed' || $log->status == 'failed_permanently') Failure @endif {{ $log->user->name ?? 'N/A' }} {{ $log->webhook_url ?? 'N/A' }} {{ $log->flow_id ?? 'N/A' }} {{ $log->created_at->format('d-m-Y h:i A') }} {{ $log->updated_at->format('d-m-Y h:i A') }} {{-- create a modal trigger button called Show --}}
No Logs Found
{{-- Pagination Links --}} {{ $webhookLogs->links() }}
@endsection