Immobilien site 11-05-2026

This commit is contained in:
Kevin Adametz 2026-05-11 10:29:37 +02:00
parent e198d842ce
commit 6799325f71
28 changed files with 16189 additions and 809 deletions

View file

@ -4,6 +4,7 @@ namespace App\Livewire\Web\Components\Sections;
use Acme\ContactForm\ContactFormService;
use Acme\ContactForm\SpamDetector;
use Livewire\Attributes\On;
use Livewire\Component;
class ImmobilienContactForm extends Component
@ -17,6 +18,12 @@ class ImmobilienContactForm extends Component
public string $interest = '';
public bool $showInterest = true;
public string $submitLabel = '';
public bool $syncFromAlpineProject = false;
public string $firstName = '';
public string $lastName = '';
@ -39,11 +46,28 @@ class ImmobilienContactForm extends Component
/**
* @param array<string, string> $interestOptions
*/
public function mount(string $projectSlug = '', string $projectTitle = '', array $interestOptions = []): void
public function mount(string $projectSlug = '', string $projectTitle = '', array $interestOptions = [], bool $showInterest = true, string $submitLabel = '', bool $syncFromAlpineProject = false): void
{
$this->projectSlug = $projectSlug;
$this->projectTitle = $projectTitle;
$this->interestOptions = $interestOptions;
$this->showInterest = $showInterest;
$this->submitLabel = $submitLabel;
$this->syncFromAlpineProject = $syncFromAlpineProject;
$this->formLoadedAt = time();
}
#[On('azizi-project-selected')]
public function setProject(string $slug = '', string $title = ''): void
{
if ($this->projectSlug === $slug && $this->projectTitle === $title) {
return;
}
$this->projectSlug = $slug;
$this->projectTitle = $title;
$this->success = false;
$this->interest = '';
$this->formLoadedAt = time();
}