@extends('layouts.dashboard') @section('content') @php // The same form serves first-create and resubmit-after-reject/expire. // `$existingEvent` is only set in resubmit mode; pre-fill helpers below // safely fall back to empty strings via the null-coalescing chain. $isResubmit = $isResubmit ?? false; $existing = $existingEvent ?? null; $existingServices = $existingServices ?? collect(); $formAction = $isResubmit ? url('/rm/resubmit-event') : url('/rm/store-event'); $submitLabel = $isResubmit ? 'Edit and Resend Confirmation' : 'Create Event'; // Resubmit edits take priority over the original RM-request defaults // (RM may have been told to change category/location during chat). $defaultType = $isResubmit ? ($existing->type ?? '') : (optional($rmDetails->categoryDetails)->type === 'corporate' ? 'professional' : (optional($rmDetails->categoryDetails)->type ?? '')); $defaultCategory = $isResubmit ? ($existing->category ?? '') : $rmDetails->category; $defaultStateId = $isResubmit ? ($existing->state_id ?? '') : $rmDetails->state_id; $defaultCityId = $isResubmit ? ($existing->cities_id ?? '') : $rmDetails->city_id; @endphp
{{ Session::get('msg') }}
@endif