Color a part row if the part is favorite or needs review.

This commit is contained in:
Jan Böhmer 2022-12-17 01:19:52 +01:00
parent 6be863d356
commit 1135bfcbef
4 changed files with 74 additions and 8 deletions

View file

@ -24,6 +24,7 @@ namespace App\DataTables;
use App\DataTables\Column\LocaleDateTimeColumn;
use App\DataTables\Column\PrettyBoolColumn;
use App\DataTables\Column\RowClassColumn;
use App\DataTables\Filters\AttachmentFilter;
use App\Entity\Attachments\Attachment;
use App\Entity\LogSystem\AbstractLogEntry;
@ -60,10 +61,7 @@ final class AttachmentDataTable implements DataTableTypeInterface
public function configure(DataTable $dataTable, array $options): void
{
$dataTable->add('$$rowClass', TextColumn::class, [
'label' => '',
'className' => 'no-colvis',
'visible' => false,
$dataTable->add('dont_matter', RowClassColumn::class, [
'render' => function ($value, Attachment $context) {
//Mark attachments with missing files yellow
if(!$this->attachmentHelper->isFileExisting($context)){