fix(superadmin): stabilize knowledge base nav and docs grouping
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-02-07 14:06:49 +01:00
parent d2808ffa4f
commit 3ba4d11d92
18 changed files with 81 additions and 17 deletions

View File

@@ -22,12 +22,14 @@ class SuperAdminKbPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
$knowledgeBasePath = $this->knowledgeBasePath();
return $panel
->id('superadmin-kb')
->path('super-admin/docs')
->viteTheme('resources/css/filament/superadmin-kb/theme.css')
->plugins([
KnowledgeBasePlugin::make(base_path('docs/superadmin-kb')),
KnowledgeBasePlugin::make($knowledgeBasePath),
])
->login(Login::class)
->profile(EditProfile::class, isSimple: false)
@@ -47,4 +49,11 @@ class SuperAdminKbPanelProvider extends PanelProvider
])
->authGuard('super_admin');
}
protected function knowledgeBasePath(): string
{
$path = realpath(base_path('docs/superadmin-kb')) ?: base_path('docs/superadmin-kb');
return str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $path);
}
}