datatable
This commit is contained in:
parent
8853528b0a
commit
7f5e916d80
@ -47,7 +47,7 @@ public function dataTable(QueryBuilder $query): EloquentDataTable
|
||||
$dataTable = new EloquentDataTable($query);
|
||||
$rawColumns = [
|
||||
'priority_icon',
|
||||
'report_status_led',
|
||||
'workflow_level_led',
|
||||
];
|
||||
foreach ($this->renderCustomColumns() as $column => $content) {
|
||||
$dataTable->addColumn($column, $content);
|
||||
@ -148,11 +148,11 @@ public function getColumns(): array
|
||||
->title('');
|
||||
break;
|
||||
|
||||
case WorklistColumn::ReportStatus:
|
||||
case WorklistColumn::WorkflowLevel:
|
||||
$columns[] = Column::make($col->value)
|
||||
->searchable(false)
|
||||
->hidden();
|
||||
$columns[] = Column::make('report_status_led')
|
||||
$columns[] = Column::make('workflow_level_led')
|
||||
->searchable(false)
|
||||
->orderable(false)
|
||||
->addClass('text-center p-0 ps-2')
|
||||
|
@ -175,7 +175,7 @@ public function isArchived(): bool
|
||||
return $this->archived_at !== null;
|
||||
}
|
||||
|
||||
public function getReportStatusLedAttribute(): string
|
||||
public function getWorkflowLevelLedAttribute(): string
|
||||
{
|
||||
// todo: implement
|
||||
$color = match ($this->workflow_level) {
|
||||
@ -316,7 +316,7 @@ public function toArray(): array
|
||||
'reader_name' => $this->readingPhysician?->display_name,
|
||||
// 'assigned_physician_name' => $this->assignedPhysician?->display_name,
|
||||
'reader_photo' => $this->readingPhysician?->profile_photo_url,
|
||||
'report_status_led' => $this->getReportStatusLedAttribute(),
|
||||
'workflow_level_led' => $this->getWorkflowLevelLedAttribute(),
|
||||
'priority_icon' => $this->getPriorityIcon(),
|
||||
'sex_age' => $this->sexAge(),
|
||||
'num_instances' => $this->numInstances(),
|
||||
|
@ -5,7 +5,6 @@
|
||||
enum WorklistColumn: string
|
||||
{
|
||||
case WorkflowLevel = 'workflow_level';
|
||||
case ReportStatus = 'report_status';
|
||||
case StudyHash = 'hash';
|
||||
case PatientName = 'patient_name';
|
||||
case PatientId = 'patient_id';
|
||||
|
@ -14,7 +14,7 @@ public static function worklistColumns(User|int|null $usr = null): Collection
|
||||
$user = me($usr);
|
||||
$columns = collect([
|
||||
WorklistColumn::Priority,
|
||||
WorklistColumn::ReportStatus,
|
||||
WorklistColumn::WorkflowLevel,
|
||||
WorklistColumn::ActionButtons,
|
||||
// WorklistColumn::AssignedPhysician,
|
||||
WorklistColumn::PatientId,
|
||||
|
Loading…
Reference in New Issue
Block a user