@extends('layout.mainlayout') @section('content')
@component('components.breadcrumb') @slot('title') Complete Onboarding/Update Profile @endslot @endcomponent
Complete Onboarding/Update Profile
@if (session('success'))
{{ session('success') }}
@elseif(session('error'))
{{ session('error') }}
@endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if ($resource && $resource->changed_fields) @php $changes = json_decode($resource->changed_fields, true); $skipFields = ['resource_id', 'status', 'updated_by', 'created_at', 'updated_at']; function pretty($field, $value) { if ($value === null || $value === '') { return '-'; } $dateFields = [ 'dob', 'doj', 'nominee_dob', 'passport_validity', 'spousedob', 'ced', 'dol', 'visa_expiry_date', 'nominee_dob' ]; if (in_array($field, $dateFields) && strtotime($value)) { return date('d M Y', strtotime($value)); } // Convert dropdown IDs to names if ($field == 'region') { return \App\Models\RegionName::find($value)->name ?? $value; } if ($field == 'department') { return \App\Models\Department::find($value)->name ?? $value; } if ($field == 'designation') { return \App\Models\Designation::find($value)->name ?? $value; } if ($field == 'employee_status') { return \App\Models\ResourceStatus::find($value)->name ?? $value; } if($field=='project_name'){ return \App\Models\ProjectName::find($value)->name ?? $value; } if($field == 'team_name') { return \App\Models\TeamName::find($value)->name ?? $value; } if($field == 'reporting_manager') { return \App\Models\ManagerName::find($value)->name ?? $value; } // Show files nicely if (str_contains($value, 'uploads/')) { return 'View File'; } // Pretty print child JSON if ($field == 'child_details') { return '
' .
                                                json_encode(json_decode($value, true), JSON_PRETTY_PRINT) .
                                                '
'; } return e($value); } @endphp
🔄 Pending Profile Changes
@foreach ($changes as $field => $value) @continue(in_array($field, $skipFields)) @endforeach
Field Previous Requested
{{ ucfirst(str_replace('_', ' ', $field)) }} {!! pretty($field, $value['old'] ?? '-') !!} {!! pretty($field, $value['new'] ?? '-') !!}
@endif
@csrf
@include('resource.form-sections.manage-resource.basicinfoform')
@include('resource.form-sections.manage-resource.personalinfoform')
@include('resource.form-sections.manage-resource.employmentinfoform')
@include('resource.form-sections.manage-resource.attachementinfoform')
@push('scripts') {{-- --}} @endpush @endsection