holdEntryId = $entryId; $this->holdNote = ''; $this->resetErrorBag(); } public function toggleHold(EvidenceArchive $archive): void { $entry = ArchiveEntry::query()->findOrFail((int) $this->holdEntryId); $this->validate( ['holdNote' => ['required', 'string', 'min:5', 'max:1000']], ['holdNote.required' => __('Bitte begründen Sie das Setzen bzw. Aufheben (Pflichtvermerk).')], ); try { $entry->legal_hold ? $archive->releaseLegalHold($entry, auth()->user(), $this->holdNote) : $archive->setLegalHold($entry, auth()->user(), $this->holdNote); } catch (\RuntimeException $exception) { // Eintrag wurde zwischenzeitlich nach Fristablauf gelöscht (N02). $this->holdEntryId = null; Flux::toast(text: $exception->getMessage(), variant: 'danger'); return; } $this->holdEntryId = null; $this->holdNote = ''; Flux::toast(text: $entry->legal_hold ? __('Legal Hold gesetzt.') : __('Legal Hold aufgehoben, Frist läuft neu.'), variant: 'success'); } public function with(): array { $query = ArchiveEntry::query()->orderByDesc('id'); if ($this->event !== '' && ArchiveEvent::tryFrom($this->event) !== null) { $query->where('event', $this->event); } if ($this->subject !== '') { $query->where(function ($q): void { $q->where('press_release_id', (int) $this->subject)->orWhere('subject_id', (int) $this->subject); }); } if ($this->legalRequest !== '') { $query->where('legal_request_id', (int) $this->legalRequest); } return [ 'entries' => $query->paginate(50), 'events' => ArchiveEvent::cases(), 'configured' => app(EvidenceArchive::class)->isConfigured(), 'holdEntry' => $this->holdEntryId ? ArchiveEntry::query()->find($this->holdEntryId) : null, ]; } }; ?>
| # | {{ __('Ereignis') }} | {{ __('Betrifft') }} | {{ __('Grund') }} | {{ __('Angelegt') }} | {{ __('Frist bis') }} | {{ __('Status') }} | |
|---|---|---|---|---|---|---|---|
| {{ $entry->id }} | {{ $entry->event->label() }} | {{ class_basename($entry->subject_type) }} #{{ $entry->subject_id }} @if ($entry->press_release_id) · PM #{{ $entry->press_release_id }} @endif @if ($entry->legal_request_id) · @endif | {{ $entry->reason_category->label() }} | {{ $entry->created_at?->format('d.m.Y H:i') }} | {{ $entry->retain_until->format('d.m.Y') }} |
@if ($entry->isTombstoned())
|
@unless ($entry->isTombstoned())
|
| {{ __('Noch keine Archiveinträge.') }} | |||||||