@extends('layouts.app') @section('title', __('New submission')) @section('content') @php $grouped = collect($types ?? [])->groupBy(fn ($t) => $t['group'] ?? 'general', true); $valuationMethods = $methodCatalog['valuation_methods'] ?? []; $forecastMethods = $methodCatalog['forecast_methods'] ?? []; $families = $methodCatalog['families'] ?? []; $rules = $methodCatalog['rules'] ?? ['min_methods' => 2, 'max_methods' => 6, 'weights_must_sum_to' => 100]; // Default selected methods + weights per type, derived from catalog default_weight values. $defaults = function ($methods) { $picked = []; foreach ($methods as $code => $m) if (($m['default_weight'] ?? 0) > 0) $picked[$code] = (float) $m['default_weight']; return $picked; }; $forecastDefaults = $defaults($forecastMethods); $valuationDefaults = $defaults($valuationMethods); $initialType = old('analysis_type', $gates['analysis'] ? 'analysis' : ($gates['forecast'] ? 'forecast' : ($gates['valuation'] ? 'valuation' : 'analysis'))); // Start with a clean slate — user picks methods explicitly. Only repopulate from old() after a failed submit. $initialMethods = old('methods', []); $initialWeights = old('method_weights', []); @endphp
{{ __('Allowed:') }} {{ implode(', ', $allowed) }} · {{ __('max') }} {{ number_format($maxKb / 1024, 0) }} MB