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