Loheide-eu-mitarbeiterplatt.../resources/views/filament/pages/ask-settings.blade.php
Friederich Loheide 9d8bdc08ce
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Has been skipped
CI / PHP 8.4 / mariadb:10.6 (pull_request) Has been skipped
CI / PHP 8.3 / mariadb:11.4 (pull_request) Has been skipped
CI / PHP 8.4 / mariadb:11.4 (pull_request) Has been skipped
CI / PHP 8.3 / mysql:8.0 (pull_request) Has been skipped
CI / PHP 8.4 / mysql:8.0 (pull_request) Has been skipped
CI / PHP 8.3 / mysql:8.4 (pull_request) Has been skipped
CI / PHP 8.4 / mysql:8.4 (pull_request) Has been skipped
CI / Browser-Tests (pull_request) Failing after 19m38s
CI / PHP 8.3 / mysql:8.4-1 (pull_request) Successful in 24m17s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 9m13s
CI / Build-Artefakte aktuell (pull_request) Successful in 6m4s
Frag das Portal (0.64.0)
Antworten mit Quellen aus Seiten, QM-Dokumenten, Glossar und Neuigkeiten –
nur aus Sichtbarem, über den KI-Assistenten (Anthropic, OpenAI, Ollama).
Wissensquellen als Registry für Plugins, Auswertung ohne Personenbezug.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 18:08:35 +00:00

75 lines
5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<x-filament-panels::page>
<style>
.ih-muted { color: rgb(107 114 128); font-size: .875rem; }
.ih-stats { display: flex; flex-wrap: wrap; gap: 2rem; }
.ih-big { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.ih-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); align-items: start; }
.ih-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid rgb(243 244 246); font-size: .875rem; }
.ih-row:first-child { border-top: 0; }
.ih-count { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.ih-tabs { display: inline-flex; gap: .25rem; }
.ih-tab { padding: .25rem .625rem; border-radius: 999px; font-size: .8125rem; border: 1px solid rgb(229 231 235); background: transparent; cursor: pointer; }
.ih-tab[aria-pressed="true"] { background: var(--primary-600, #0f4c5c); border-color: transparent; color: white; }
.ih-warn { padding: .75rem 1rem; border-radius: .5rem; background: rgb(254 243 199); color: rgb(120 53 15); font-size: .875rem; }
.dark .ih-muted { color: rgb(156 163 175); }
.dark .ih-row { border-color: rgb(55 65 81); }
.dark .ih-tab { border-color: rgb(55 65 81); }
.dark .ih-warn { background: rgb(69 26 3); color: rgb(254 215 170); }
</style>
<x-filament::section heading="Einstellung">
<div style="display: grid; gap: 1rem">
<p class="ih-muted">Mitarbeitende stellen eine Frage in eigenen Worten und bekommen eine kurze Antwort mit Quellen – aus {{ implode(', ', $sources) }}. Gesucht wird nur in Inhalten, die die fragende Person sehen darf. Steht nichts dazu im Portal, sagt die Antwort das. Zu finden unter <a href="/frag-das-portal" target="_blank" style="text-decoration: underline">/frag-das-portal</a>, über die Suche und die Seite „Wissen“ – gern auch als Menüpunkt.</p>
@unless ($aiReady)
<div class="ih-warn">Dafür muss zuerst der <a href="{{ \App\Filament\Pages\AiSettingsPage::getUrl() }}" style="text-decoration: underline">KI-Assistent</a> eingerichtet sein (Anthropic, OpenAI oder Ollama).</div>
@endunless
@if ($aiReady && $external)
<p class="ih-muted">Anbieter: {{ $provider }}. Die Frage und passende Textausschnitte verlassen dabei das Haus – nur mit Vertrag zur Auftragsverarbeitung nutzen. Mit Ollama bleibt alles im eigenen Netz.</p>
@elseif ($aiReady)
<p class="ih-muted">Anbieter: {{ $provider }} – Fragen und Inhalte bleiben im eigenen Netz.</p>
@endif
<div>
<x-filament::button wire:click="toggle" :color="$enabled ? 'gray' : 'primary'" :disabled="! $aiReady && ! $enabled">
{{ $enabled ? 'Ausschalten' : 'Einschalten' }}
</x-filament::button>
<span class="ih-muted" style="margin-left: .75rem">Zurzeit <strong>{{ $enabled && $aiReady ? 'eingeschaltet' : 'ausgeschaltet' }}</strong></span>
</div>
</div>
</x-filament::section>
<x-filament::section heading="Auswertung" description="Fragen werden ohne Namen und ohne Uhrzeit gespeichert – nur Frage, Tag und ob es eine Antwort gab.">
<x-slot name="afterHeader">
<div class="ih-tabs">
@foreach ([7 => '7 Tage', 30 => '30 Tage', 90 => '90 Tage', 365 => 'Jahr'] as $value => $label)
<button type="button" class="ih-tab" aria-pressed="{{ $days === $value ? 'true' : 'false' }}" wire:click="setDays({{ $value }})">{{ $label }}</button>
@endforeach
</div>
</x-slot>
<div class="ih-stats">
<div><div class="ih-big">{{ $total }}</div><div class="ih-muted">Fragen</div></div>
<div><div class="ih-big">{{ $answeredShare === null ? '–' : $answeredShare.' %' }}</div><div class="ih-muted">beantwortet</div></div>
</div>
</x-filament::section>
<div class="ih-grid">
<x-filament::section heading="Ohne Antwort" description="Dazu fehlt etwas im Portal – Kandidaten für neue Seiten oder Glossar-Einträge.">
@forelse ($unanswered as $row)
<div class="ih-row"><span>{{ $row->question }}</span><span class="ih-count">{{ $row->total }}×</span></div>
@empty
<p class="ih-muted">Keine – alles wurde beantwortet.</p>
@endforelse
</x-filament::section>
<x-filament::section heading="Häufig gefragt" description="Diese Themen lohnen sich vielleicht für die Startseite oder „Wissen“.">
@forelse ($frequent as $row)
<div class="ih-row"><span>{{ $row->question }}</span><span class="ih-count">{{ $row->total }}×</span></div>
@empty
<p class="ih-muted">Noch keine Fragen.</p>
@endforelse
</x-filament::section>
</div>
</x-filament-panels::page>