@extends('business.layouts.app')
@section('title', 'Talep #' . $offerRequest->id . ' - İşletme Paneli')
@section('content')
@php
$colorMap = ['new' => 'blue', 'reviewing' => 'yellow', 'quoted' => 'indigo', 'accepted' => 'green', 'rejected' => 'red', 'completed' => 'gray'];
$bgMap = [
'blue' => 'bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400',
'yellow' => 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400',
'indigo' => 'bg-indigo-100 text-indigo-800 dark:bg-indigo-900/30 dark:text-indigo-400',
'green' => 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400',
'red' => 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400',
'gray' => 'bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400',
];
$dotMap = [
'blue' => 'bg-blue-500', 'yellow' => 'bg-yellow-500', 'indigo' => 'bg-indigo-500',
'green' => 'bg-green-500', 'red' => 'bg-red-500', 'gray' => 'bg-gray-400',
];
$currentColor = $colorMap[$offerRequest->status] ?? 'gray';
@endphp
Taleplere dön
Talep #{{ $offerRequest->id }}
{{ $offerRequest->status_label }}
{{ $offerRequest->created_at->format('d.m.Y H:i') }} tarihinde oluşturuldu
@if(session('success'))
@endif
@if(session('info'))
@endif
{{-- Left Column: Details --}}
{{-- Customer Info --}}
Müşteri Bilgileri
Ad Soyad
{{ $offerRequest->customer_name }}
@if($offerRequest->customer_email)
@endif
@if($offerRequest->service_date)
Talep Edilen Tarih
{{ $offerRequest->service_date->format('d.m.Y') }}
@endif
@if($offerRequest->message)
Müşteri Mesajı
{{ $offerRequest->message }}
@endif
{{-- Related Item --}}
İlgili Ürün / Hizmet
@if($offerRequest->requestable)
@if($offerRequest->requestable_type === 'App\\Models\\Product')
@php $img = $offerRequest->requestable->galleryMedia->first(); @endphp
@if($img)
 }})
@else
@endif
@endif
{{ $offerRequest->requestable->name ?? '—' }}
@if($offerRequest->requestable_type === 'App\\Models\\Product')
Ürün
@else
{{ class_basename($offerRequest->requestable_type) }}
@endif
@if($offerRequest->requestable->price_from !== null)
{{ number_format($offerRequest->requestable->price_from, 0, ',', '.') }} TL
@endif
@else
İlgili kayıt silinmiş.
@endif
{{-- Activity Log --}}
İşlem Geçmişi
@if($offerRequest->logs->isEmpty())
Henüz kayıt yok.
@else
@foreach($offerRequest->logs as $log)
@php
$logColor = $colorMap[$log->to_status] ?? 'gray';
$isStatusChange = $log->from_status !== $log->to_status;
@endphp
@if($isStatusChange)
Durum değiştirildi:
@if($log->from_status)
{{ $log->from_status_label }}
@endif
{{ $log->to_status_label }}
@else
Not eklendi
{{ $log->to_status_label }}
@endif
@if($log->note)
{{ $log->note }}
@endif
{{ $log->created_at->format('d.m.Y H:i') }}
@if($log->causer_type === 'business')
· İşletme
@elseif($log->causer_type === 'system')
· Sistem
@endif
@endforeach
@endif
{{-- Right Column: Actions --}}
{{-- Status Change --}}
{{-- Quick Note --}}
{{-- Quick Actions --}}
@endsection