@include('admin.partials.header') @include('admin.partials.sidebar') @include('admin.partials.topbar') @include('admin.partials.management-styles') @php $typeMeta = [ 'job' => ['label' => 'Job Listing', 'icon' => 'work'], 'rent' => ['label' => 'Rental Listing', 'icon' => 'apartment'], 'hostel' => ['label' => 'Hostel Listing', 'icon' => 'bed'], 'service' => ['label' => 'Service Listing', 'icon' => 'construction'], ]; $meta = $typeMeta[$type] ?? ['label' => 'Listing', 'icon' => 'inventory_2']; $skills = old('skills_required', is_array($listing->skills_required ?? null) ? implode(', ', $listing->skills_required) : ($listing->skills_required ?? '')); $workingDays = old('working_days', $listing->working_days ?? []); $allMediaItems = ($listing->media ?? collect())->map(function ($media) { $media->image_url = $media->file_path ? asset('storage/'.$media->file_path) : null; return $media; })->filter(fn ($media) => $media->image_url); $mediaItems = $allMediaItems->filter(fn ($media) => ($media->file_type ?? null) === 'image'); $documentItems = $allMediaItems->filter(fn ($media) => ($media->file_type ?? null) === 'document'); $profileMedia = $mediaItems->first(fn ($media) => ($media->media_label ?? null) === 'profile_photo'); $pastWorkMedia = $mediaItems->filter(fn ($media) => in_array(($media->media_label ?? null), ['primary', 'gallery'], true)); $toolsMedia = $mediaItems->filter(fn ($media) => str_starts_with((string) ($media->media_label ?? ''), 'tools_')); $otherMediaItems = $mediaItems ->reject(fn ($media) => ($media->media_label ?? null) === 'profile_photo') ->reject(fn ($media) => str_starts_with((string) ($media->media_label ?? ''), 'tools_')) ->reject(fn ($media) => in_array(($media->media_label ?? null), ['primary', 'gallery'], true)); @endphp Adminchevron_right Listings chevron_rightEdit Edit {{ $meta['label'] }} Update approved listing details and keep marketplace content current. arrow_back Back to listings @if ($errors->any()) Please review the form. @foreach ($errors->all() as $error){{ $error }}@endforeach @endif {{ $meta['icon'] }} {{ $meta['label'] }} LST-{{ strtoupper($type) }}-{{ str_pad((string) $listing->id, 5, '0', STR_PAD_LEFT) }} · {{ ucfirst((string) $listing->status) }} @csrf @method('PUT') @if ($type === 'service') Profile Photo @if ($profileMedia?->image_url) Profile Profile Photo - {{ basename((string) $profileMedia->file_path) }} @else No profile photo uploaded. @endif Past Work Images @if ($pastWorkMedia->isNotEmpty()) @foreach ($pastWorkMedia as $media) @if (($media->media_label ?? null) === 'primary') Primary @endif Past Work - {{ basename((string) $media->file_path) }} @endforeach @else No past work images uploaded. @endif Tools and Equipment Images @if ($toolsMedia->isNotEmpty()) @foreach ($toolsMedia as $media) Tools and Equipment - {{ basename((string) $media->file_path) }} @endforeach @else No tools and equipment images uploaded. @endif @if ($otherMediaItems->isNotEmpty()) Other Images @foreach ($otherMediaItems as $media) {{ $media->media_label ?: 'Image' }} - {{ basename((string) $media->file_path) }} @endforeach @endif @endif @if ($type !== 'service') Listing Images @if ($mediaItems->isNotEmpty()) @foreach ($mediaItems as $media) @if (($media->media_label ?? null) === 'primary') Primary @endif {{ $media->media_label ?: 'Gallery' }} · {{ basename((string) $media->file_path) }} @endforeach @else No images uploaded for this listing. @endif @endif @if ($documentItems->isNotEmpty()) {{ $type === 'service' ? 'Submitted Documents' : 'Listing Documents' }} @foreach ($documentItems as $document) description {{ ucwords(str_replace('_', ' ', $document->media_label ?: 'Document')) }} @endforeach @endif @if ($type === 'job') Company name Job title Category Department Employment type Experience required Education required Post role Gender preference Posted by Designation Application deadline Openings Monthly salary Salary type Minimum salary Job shift Work type Apply channels Apply WhatsApp number Skills required Responsibilities{{ old('responsibilities.0', is_array($listing->responsibilities ?? null) ? implode("\n", $listing->responsibilities) : '') }} Location City State Pincode Description{{ old('job_description', $listing->job_description) }} accuracy_confirmed))> Accuracy confirmed employer_terms_accepted))> Employer terms accepted compliance_check_authorized))> Compliance check authorized @elseif ($type === 'rent') Property kind Property type Furnishing status Address{{ old('address', $listing->address) }} Area / locality Nearest landmark City State Pincode Bedrooms Bathrooms Balconies Floor Current floor Total floors Willing to rent to Rent per month Security deposit Maintenance type Available from Lease duration Area sq ft Parking type Additional spaces Contact number WhatsApp number Description{{ old('description', $listing->description) }} details_confirmed))> Details confirmed platform_terms_accepted))> Platform terms accepted @elseif ($type === 'hostel') Preferred for Owner name Contact number WhatsApp number Address{{ old('address', $listing->address) }} City Area landmark Latitude Longitude Total rooms Bed capacity Bed sharing type Bathroom type Monthly rent Security deposit Electricity charge type Electricity amount Gate open time Gate close time @foreach (['wifi_available' => 'WiFi', 'food_mess' => 'Food / mess', 'power_backup' => 'Power backup', 'security_guard' => 'Security'] as $field => $label) {$field}))>{{ $label }} @endforeach Visitor policy{{ old('visitor_policy', $listing->visitor_policy) }} House rules{{ old('house_rules', $listing->house_rules) }} Description{{ old('description', $listing->description) }} terms_accepted))> Terms accepted @elseif ($type === 'service') Service type Experience years Service area Phone number Service radius Inspection charge Starting price Pricing unit Hourly rate Price type Description{{ old('description', $listing->description) }} @foreach (['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] as $day) {{ $day }} @endforeach terms_accepted))> Terms accepted guidelines_accepted))> Guidelines accepted refund_policy_accepted))> Refund policy accepted @endif @include('admin.partials.footer')
Update approved listing details and keep marketplace content current.
LST-{{ strtoupper($type) }}-{{ str_pad((string) $listing->id, 5, '0', STR_PAD_LEFT) }} · {{ ucfirst((string) $listing->status) }}