@extends('web.signup.layout') @section('title', __('web.signup.startup.page_title')) @section('page_title', __('web.signup.startup.page_title')) @section('page_subtitle', __('web.signup.startup.page_subtitle')) @push('styles') @endpush @push('scripts') @endpush @section('content') @php $existingAccount = $existingAccount ?? null; // Existing-company OTP ownership lets the signup form reuse durable // company/contact details while gathering only the next round's facts. $existingCountryCode = null; $existingLocalPhone = null; $storedPhoneDigits = preg_replace('/\D+/', '', (string) ($existingAccount?->phone_number ?? '')) ?: ''; $phoneCountries = $countries; usort($phoneCountries, static fn (array $left, array $right): int => strlen((string) $right['code']) <=> strlen((string) $left['code'])); foreach ($phoneCountries as $country) { $codeDigits = preg_replace('/\D+/', '', (string) $country['code']) ?: ''; if ($codeDigits !== '' && str_starts_with($storedPhoneDigits, $codeDigits)) { $existingCountryCode = $country['code']; $existingLocalPhone = substr($storedPhoneDigits, strlen($codeDigits)); break; } } $existingLocalPhone ??= $storedPhoneDigits !== '' ? $storedPhoneDigits : null; $selectedCountryId = old('country_id', $existingAccount?->country_id); $selectedReferralId = old('heard_about_option_id', $existingAccount?->referral_source_option_id); // Completion tracking — drives the section-state pills only (does // not gate submission). Only LIST fields that are required, so an // optional section like 'round' (every field nullable since // 2026-06-17) has an empty list and instantly reads as "complete". // // 2026-06-17 section refactor (ops spec): // • Contact moved UP — now sits directly under Company so the // founder fills personal/contact info early. // • `applicant_full_name` added to Contact tracking (it's the // first input inside the section per spec). // • Files split out of the old "introduce" block into its OWN // dedicated section (logo / pitch deck / other files only), // to declutter the Founding Team section. // • Founding Team is now a pure team section (the modal-driven // team-block) with no file inputs mixed in. $sections = [ ['id' => 'company', 'fields' => ['name']], ['id' => 'contact', 'fields' => ['applicant_full_name', 'email', 'phone_number']], ['id' => 'files', 'fields' => []], // file inputs are required on the input itself; tracker stays empty ['id' => 'team', 'fields' => []], // member rows tracked client-side ['id' => 'idea', 'fields' => ['company_brief', 'problem', 'solution']], ['id' => 'sector', 'fields' => ['sector_option_id', 'product_stage_option_id', 'traction_option_id', 'revenue_model_option_id']], ['id' => 'round', 'fields' => []], // optional — see Section 5 comment block ['id' => 'extra', 'fields' => ['heard_about_option_id', 'accepted_privacy_policy']], ]; @endphp