@extends('layouts.dashboard') @section('title', 'Edit Proposal') @section('header-title', 'Edit Proposal') @section('content') @php $client = $proposal->client; $isSuperAdmin = auth()->user()->role?->slug === 'sp'; $group = fn(string $key) => $upgradations->get($key, collect()); $luxePackages = $group('luxe_package')->isNotEmpty() ? $group('luxe_package') : $group('luxury_package'); $selectedLuxePackageId = collect($proposal->selected_upgradations ?? []) ->first(fn($item) => abs((float) ($item['amount'] ?? 0) - (float) ($proposal->luxe_package_price ?? 0)) < 0.01)['id'] ?? null; @endphp