diff --git a/components/EventManager.php b/components/EventManager.php index 6e3dc82..1e39e60 100644 --- a/components/EventManager.php +++ b/components/EventManager.php @@ -32,33 +32,6 @@ abstract class EventManager extends ComponentBase $this->loadSingleEvent(); } - protected function addAssets(): void - { - // $this->addJs('assets/vendor/adrema-form/dist/main.js'); - $this->addJs('http://localhost:5174/src/main.js', ['type' => 'module']); - } - - protected function loadSettings(): void - { - $this->settings = [ - 'primary_color' => Settings::get('primary_color'), - ...$this->resolvePageUrls(), - ]; - } - - protected function loadSingleEvent(): void - { - $eventSlug = $this->property('eventSlug'); - - if (!$eventSlug) { - return; - } - - $this->event = app(FetchSingleEvent::class)->run($eventSlug); - $this->page->title = $this->event['name']; - $this->currentUrl = url()->current(); - } - public function defineProperties() { return [ @@ -135,4 +108,31 @@ abstract class EventManager extends ComponentBase 'registerUrl' => $registerPage->url, ]; } + + private function loadSingleEvent(): void + { + $eventSlug = $this->property('eventSlug'); + + if (!$eventSlug) { + return; + } + + $this->event = app(FetchSingleEvent::class)->run($eventSlug); + $this->page->title = $this->event['name']; + $this->currentUrl = url()->current(); + } + + private function addAssets(): void + { + // $this->addJs('assets/vendor/adrema-form/dist/main.js'); + $this->addJs('http://localhost:5174/src/main.js', ['type' => 'module']); + } + + private function loadSettings(): void + { + $this->settings = [ + 'primary_color' => Settings::get('primary_color'), + ...$this->resolvePageUrls(), + ]; + } }