Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
eighty9nine authored and github-actions[bot] committed Jul 27, 2024
1 parent f911a4b commit 569228e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class Report extends Page implements HasActionsPanel, HasBody, HasFooter, HasFor

public int $sort = 0;

public function getSort(): int {
public function getSort(): int
{
return $this->sort;
}

Expand Down
9 changes: 5 additions & 4 deletions src/ReportsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,28 @@ public function boot(Panel $panel): void
{

if (! reports()->getUseReportListPage()) {
// get reports with
// get reports with
$panel->navigationGroups([
NavigationGroup::make()
->label(reports()->getNavigationLabel() ?? __('filament-reports::menu-page.nav.group'))
->icon(reports()->getNavigationIcon()),
]);
$panel->navigationItems(collect(reports()->getReports())->map(function ($report) {
$report = app($report);

return NavigationItem::make($report->getHeading())
->url(function () use ($report) {
return $report->getUrl();
})
->parentItem(get_class($report)::getNavigationParentItem() ?? reports()->getNavigationParentItem())
->label(get_class($report)::getNavigationLabel() ?? $report->getHeading())
->sort(get_class($report)::getNavigationSort() ?? $report->getSort() ?? 0)
->sort(get_class($report)::getNavigationSort() ?? $report->getSort() ?? 0)
->badge(
get_class($report)::getNavigationBadge(),
get_class($report)::getNavigationBadgeColor()
)
)
->icon(get_class($report)::getNavigationIcon() ?? $report->getIcon() ?? 'heroicon-o-document-text')
->group(get_class($report)::getNavigationGroup() ?? reports()->getNavigationGroup() ?? __('filament-reports::menu-page.nav.group'));
->group(get_class($report)::getNavigationGroup() ?? reports()->getNavigationGroup() ?? __('filament-reports::menu-page.nav.group'));
})->toArray());
}
}
Expand Down

0 comments on commit 569228e

Please sign in to comment.