Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio committed Dec 22, 2023
1 parent 94cd797 commit 08e6179
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 11 additions & 3 deletions app/Filament/Organizations/Resources/CommunityResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,27 @@ public static function infolist(Infolist $infolist): Infolist
TextEntry::make('website')
->icon('heroicon-o-link')
->hiddenLabel()
->url(fn (string $state) => $state)
->url(fn (?string $state) => $state)
->openUrlInNewTab(),

TextEntry::make('email')
->icon('heroicon-o-envelope')
->hiddenLabel()
->url(fn (string $state) => "mailto:{$state}")
->url(
fn (?string $state) => $state !== null
? "mailto:{$state}"
: null
)
->openUrlInNewTab(),

TextEntry::make('phone')
->icon('heroicon-o-phone')
->hiddenLabel()
->url(fn (string $state) => "tel:{$state}")
->url(
fn (?string $state) => $state !== null
? "tel:{$state}"
: null
)
->openUrlInNewTab(),
]),
]),
Expand Down
3 changes: 1 addition & 2 deletions app/Tables/Columns/ServiceChipsColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function getSize(mixed $state): string | null
public function getServices(): Collection
{
return collect($this->getState())
->filter(fn ($service) => $service->is_visible)
->dump();
->filter(fn ($service) => $service->is_visible);
}
}

0 comments on commit 08e6179

Please sign in to comment.