Mache die Übernahme aus Shinkan auffindbar und zeige den Zustand der Anbindung
CI Feature / test (push) Successful in 2m25s
CI Feature / test (push) Successful in 2m25s
Die Übungsliste verweist mit „Aus Shinkan übernehmen“ auf die Übernahmeseite. Die Seite zeigt Adresse (nur Host) und Schlüssel (nur ob hinterlegt) und prüft die Verbindung, ohne etwas zu übernehmen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
881703ba0e
commit
bc140a0e83
5 files changed
+117
-7
No files matched your search
@@ -24,13 +24,13 @@ class Uebernahme extends Page
|
||||
{
|
||||
protected static string|\UnitEnum|null $navigationGroup = 'Inhalte';
|
||||
|
||||
protected static ?string $navigationLabel = 'Übernahme (Shinkan)';
|
||||
protected static ?string $navigationLabel = 'Übungen aus Shinkan';
|
||||
|
||||
protected static ?int $navigationSort = 6;
|
||||
|
||||
protected static ?string $slug = 'uebernahme';
|
||||
|
||||
protected static ?string $title = 'Übernahme aus Shinkan';
|
||||
protected static ?string $title = 'Übungen aus Shinkan übernehmen';
|
||||
|
||||
protected string $view = 'filament.pages.uebernahme';
|
||||
|
||||
@@ -64,6 +64,15 @@ public function fetch(): void
|
||||
: (string) $run->error;
|
||||
}
|
||||
|
||||
public function check(): void
|
||||
{
|
||||
abort_unless(static::canAccess(), 403);
|
||||
|
||||
$result = app(ShinkanImport::class)->check();
|
||||
$this->feedbackError = ! $result['ok'];
|
||||
$this->feedback = $result['message'];
|
||||
}
|
||||
|
||||
public function adopt(int $snapshotId): void
|
||||
{
|
||||
abort_unless(static::canAccess(), 403);
|
||||
@@ -114,6 +123,7 @@ public function daten(): array
|
||||
return [
|
||||
'zeilen' => $rows,
|
||||
'eingerichtet' => app(ShinkanImport::class)->configured(),
|
||||
'anbindung' => app(ShinkanImport::class)->status(),
|
||||
'letzterLauf' => ExerciseImportRun::query()->orderByDesc('id')->first(),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user