Immobilien site 11-05-2026
This commit is contained in:
parent
e198d842ce
commit
6799325f71
28 changed files with 16189 additions and 809 deletions
|
|
@ -26,6 +26,6 @@ class PriceHelper
|
|||
|
||||
$prefixStr = $prefix !== '' ? "{$prefix} " : '';
|
||||
|
||||
return "{$prefixStr}{$fmtAed} AED (ca. {$fmtEur} EUR / {$fmtUsd} USD)";
|
||||
return "<span class=\"whitespace-nowrap\">{$prefixStr}{$fmtAed} AED</span> <span class=\"whitespace-nowrap\">(ca. {$fmtEur} EUR</span> / <span class=\"whitespace-nowrap\">{$fmtUsd} USD)</span>";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,14 @@ if (! function_exists('theme_image_url')) {
|
|||
return $trimmed;
|
||||
}
|
||||
|
||||
if (str_starts_with($trimmed, 'storage/')) {
|
||||
return asset($trimmed);
|
||||
}
|
||||
|
||||
if (str_starts_with($trimmed, 'immobile/')) {
|
||||
return asset('storage/'.$trimmed);
|
||||
}
|
||||
|
||||
$candidates = array_values(array_unique(array_filter([$trimmed, basename($trimmed)])));
|
||||
foreach ($candidates as $candidate) {
|
||||
if (CmsMedia::query()->where('filename', $candidate)->exists()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue