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

@ -27,6 +27,7 @@ use App\DataTables\Column\LocaleDateTimeColumn;
use App\DataTables\Column\LogEntryExtraColumn;
use App\DataTables\Column\LogEntryTargetColumn;
use App\DataTables\Column\RevertLogColumn;
use App\DataTables\Column\RowClassColumn;
use App\DataTables\Filters\AttachmentFilter;
use App\DataTables\Filters\LogFilter;
use App\Entity\Base\AbstractDBElement;
@ -106,10 +107,7 @@ class LogDataTable implements DataTableTypeInterface
$options = $resolver->resolve($options);
//This special $$rowClass column is used to set the row class depending on the log level. The class gets set by the frontend controller
$dataTable->add('$$rowClass', TextColumn::class, [
'label' => '',
'className' => 'no-colvis',
'visible' => false,
$dataTable->add('dont_matter', RowClassColumn::class, [
'render' => static function ($value, AbstractLogEntry $context) {
switch ($context->getLevel()) {
case AbstractLogEntry::LEVEL_EMERGENCY: