QM: Wiedervorlage und Lesebestätigung, Platzhalter für Profilbilder (0.21.0)
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m49s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m54s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m27s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m29s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 6m38s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 6m40s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m7s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m13s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m24s
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m49s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m54s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m27s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m29s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 6m38s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 6m40s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m7s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m13s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m24s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8701b6d1b8
commit
4d855c8a74
213 changed files with 1729 additions and 515 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Inhaus\Plugins\Qm;
|
||||
|
||||
use App\Dashboard\Widgets;
|
||||
use App\Models\User;
|
||||
use App\Plugins\Plugin;
|
||||
use App\Search\GlobalSearch;
|
||||
|
|
@ -18,13 +19,23 @@ class QmPlugin extends Plugin
|
|||
{
|
||||
$this->app->make(GlobalSearch::class)->add('qm', 'Qualitätsmanagement', 'shield-check', fn (...$args) => app(QmSearch::class)(...$args), sort: 50);
|
||||
|
||||
foreach ([QmTree::class, QmAccess::class, Presenter::class, Search::class, Library::class, Indexer::class, TextExtractor::class, Ocr::class] as $class) {
|
||||
foreach ([QmTree::class, QmAccess::class, Presenter::class, Search::class, Library::class, Reviews::class, Acknowledgements::class, Indexer::class, TextExtractor::class, Ocr::class] as $class) {
|
||||
$this->app->singleton($class);
|
||||
}
|
||||
|
||||
$this->app->make(Navigation::class)->add('qm', 'Qualitätsmanagement', '/qm', active: 'qm.*', sort: 55,
|
||||
visible: fn (User $user) => $this->app->make(QmAccess::class)->allows($user));
|
||||
|
||||
// Startseite: noch zu bestätigende QM-Dokumente (nur wenn es welche gibt)
|
||||
$this->app->make(Widgets::class)->add('qm.acknowledgements', 'qm::Acknowledgements', 'aside', sort: 15, label: 'QM: Lesebestätigungen',
|
||||
props: function (User $user) {
|
||||
$open = $this->app->make(Acknowledgements::class)->outstanding($user);
|
||||
|
||||
return $open->isEmpty() ? null : ['entries' => $open->take(5)->map(fn ($entry) => [
|
||||
'id' => $entry->id, 'title' => $entry->title, 'url' => route('qm.view', $entry),
|
||||
])->values(), 'total' => $open->count(), 'url' => route('qm.index').'#bestaetigen'];
|
||||
});
|
||||
|
||||
$abilities = $this->app->make(Abilities::class);
|
||||
$abilities->define('qm.manage', 'Qualitätsmanagement pflegen (Ordner, Dokumente, Einstellungen)', 'Qualitätsmanagement');
|
||||
$abilities->resourceType('qm_category', 'QM-Kategorie', fn () => QmCategory::query()->orderBy('sort')->pluck('name', 'id')->all());
|
||||
|
|
@ -35,5 +46,9 @@ class QmPlugin extends Plugin
|
|||
// Eingescannte PDFs per Texterkennung durchsuchbar machen (nur wenn eingerichtet).
|
||||
Schedule::call(fn () => $this->app->make(Indexer::class)->processOcr())
|
||||
->everyTenMinutes()->name('qm-ocr')->withoutOverlapping(30);
|
||||
|
||||
// Wiedervorlage: fällige Prüfungen melden
|
||||
Schedule::call(fn () => $this->app->make(Reviews::class)->notifyDue())
|
||||
->dailyAt('07:00')->name('qm-reviews')->withoutOverlapping(30);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue