@extends('layouts.member-login') @section('title', 'My Saved Items') @section('page_title', 'SavedItems') @section('page_level_css') @endsection @section('content') @php $textLength = 250; @endphp
@include('member.include.user-info-box')
@include('member.include.2026-pn')

@if(isset($search) && !empty($search)) Saved Items: Search Results @else Saved Items @endif  ( {{count($posts)}} )

@php $index=0; @endphp @foreach ($posts as $savedItems) @if($savedItems->type == 'Save' && !empty($savedItems->new_post_id)&& !empty($savedItems->post_user_id) ) @php $index++; @endphp @php $wlp = $savedItems->post; @endphp @php $allPosts = $savedItems->post; @endphp @isset($wlp->id)
Profile Image
@if($wlp->user->role == 'General' && !empty($wlp->user->investigator->last_name))

{{$wlp->user->investigator->last_name}} Laboratory

@endif

{{$wlp->user->research_name}}

{{\Carbon\Carbon::parse($wlp->approved_time)->format('F j, Y g:i A')}}
@if($wlp->type=="Wishlist") @elseif($wlp->post_type == "Data") @elseif($wlp->post_type == "Sample") @elseif($wlp->post_type == "Skills") @endif

{{$wlp->title}}

@if($wlp->type == "Wishlist") @if(count($wlp->want) > 0) @endif @endif @if($wlp->type == "Post") @if(count($wlp->PostKeywords) > 0) @endif @endif
Wants: @foreach($wlp->want as $key => $keyword) {{$keyword->type}} @isset($wlp->want[($key + 1)]) {{', '}} @endisset @endforeach
Offering: {{($wlp->post_type == 'Sample') ? 'Samples' : $wlp->post_type}}
Origin: {{config("const.post_type.".$wlp['post_origin'])}}
Species: {{$mainPostSpecies}}
Keywords: @foreach($wlp->PostKeywords as $key => $keyword) {{$keyword->keyword}} @isset($wlp->PostKeywords[($key + 1)]) {{', '}} @endisset @endforeach
@php $stringLength = strlen($wlp->description); @endphp

{!!nl2br(substr($wlp->description, 0, $textLength))!!}@if($stringLength >= $textLength) See More{!!nl2br(substr($wlp->description, $textLength))!!} See Less@endif

@php $postImg = App\Models\PostDocument::select('name')->where(['type'=>'Thumbnail','post_id'=>$wlp->id])->first(); @endphp @if(!empty($postImg->name) && Storage::disk('public')->exists($postImg->name))
@endif
@foreach($allPosts->message as $key => $message)

{{$message->message}}

@foreach($message->reply as $reply)

{{$reply->message}}

@endforeach
@endforeach
@endisset @elseif($savedItems->type == 'UserSave' && !empty($savedItems->profile_id)) @php $index++; @endphp @php $profile = $savedItems->other_profile; @endphp @isset($profile->id)
Profile Image
Profile Image

{{ $profile->full_name }}

{{ $profile->short_bio }}

scientist
@if ($profile->role == 'General' && isset($profile->investigator->name)) @endif

{{ $profile->other_info->research_division ?? '' }}

Fields : {{getResearchFields($profile->id)}}

@php $stringLength = strlen($profile->other_info->research_description ?? ""); @endphp

{!!nl2br(substr($profile->other_info->research_description??"", 0, $textLength))!!}@if($stringLength >= $textLength) Read More{!!nl2br(substr($profile->other_info->research_description, $textLength))!!} Read Less@endif

@endisset @endif @endforeach
@include('member.include.tooltip-modal-box') @endsection @section('page_level_js') @endsection @push('footerscript') @endpush