wip
This commit is contained in:
parent
56c6012112
commit
a490d8d0a3
@ -49,6 +49,7 @@ public function dataTable(QueryBuilder $query): EloquentDataTable
|
|||||||
$data_table->addColumn($column, $content);
|
$data_table->addColumn($column, $content);
|
||||||
$rawColumns[] = $column;
|
$rawColumns[] = $column;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data_table
|
$data_table
|
||||||
->orderColumn(WorklistColumn::PatientName->value, sprintf('%s $1', WorklistColumn::PatientName->value))
|
->orderColumn(WorklistColumn::PatientName->value, sprintf('%s $1', WorklistColumn::PatientName->value))
|
||||||
->rawColumns($rawColumns)
|
->rawColumns($rawColumns)
|
||||||
@ -155,7 +156,7 @@ public function getColumns(): array
|
|||||||
break;
|
break;
|
||||||
case WorklistColumn::ActionButtons:
|
case WorklistColumn::ActionButtons:
|
||||||
case WorklistColumn::ViewerButtons:
|
case WorklistColumn::ViewerButtons:
|
||||||
case WorklistColumn::ReportingButtons:
|
case WorklistColumn::ReportButtons:
|
||||||
$columns[] = Column::computed($col->value)
|
$columns[] = Column::computed($col->value)
|
||||||
->searchable(false)
|
->searchable(false)
|
||||||
->orderable(false)
|
->orderable(false)
|
||||||
@ -256,7 +257,7 @@ private function renderCustomColumns(): array
|
|||||||
case WorklistColumn::ViewerButtons:
|
case WorklistColumn::ViewerButtons:
|
||||||
$columns[$col->value] = fn (Study $study) => $this->generateViewerButtons($study);
|
$columns[$col->value] = fn (Study $study) => $this->generateViewerButtons($study);
|
||||||
break;
|
break;
|
||||||
case WorklistColumn::ReportingButtons:
|
case WorklistColumn::ReportButtons:
|
||||||
$columns[$col->value] = fn (Study $study) => $this->generateReportingButtons($study);
|
$columns[$col->value] = fn (Study $study) => $this->generateReportingButtons($study);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -267,7 +268,7 @@ private function renderCustomColumns(): array
|
|||||||
|
|
||||||
private function generateReportingButtons(Study $study): string
|
private function generateReportingButtons(Study $study): string
|
||||||
{
|
{
|
||||||
return $this->renderButton($study->hash, 'fa-circle-info', 'show-reports btn-outline', 'Rep');
|
return $this->renderButton($study->hash, 'fa-eye', 'show-reports btn-outline', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderButton(string $data_id, string $fa_icon, string $data_class, string $text, string $url = '#', bool $blank = false): string
|
private function renderButton(string $data_id, string $fa_icon, string $data_class, string $text, string $url = '#', bool $blank = false): string
|
||||||
@ -319,7 +320,7 @@ private function generateActionButtons(Study $study): string
|
|||||||
$btns[] = $this->renderButton($study->hash, 'fa-user-doctor', 'btn-outline-youtube show-assign', 'Assign');
|
$btns[] = $this->renderButton($study->hash, 'fa-user-doctor', 'btn-outline-youtube show-assign', 'Assign');
|
||||||
break;
|
break;
|
||||||
case WorklistButton::Attachment:
|
case WorklistButton::Attachment:
|
||||||
$btns[] = $this->renderButton($study->hash, 'fa-trash', 'btn-danger archive-study', 'Archive');
|
// $btns[] = $this->renderButton($study->hash, 'fa-trash', 'btn-danger archive-study', 'Archive');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ enum WorklistColumn: string
|
|||||||
case Series = 'series';
|
case Series = 'series';
|
||||||
case CreatedAt = 'created_at';
|
case CreatedAt = 'created_at';
|
||||||
case UpdatedAt = 'updated_at';
|
case UpdatedAt = 'updated_at';
|
||||||
case ActionButtons = 'action';
|
case ActionButtons = 'action_buttons';
|
||||||
case ViewerButtons = 'viewers';
|
case ViewerButtons = 'viewer_buttons';
|
||||||
case ReportingButtons = 'reporting';
|
case ReportButtons = 'report_buttons';
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,8 @@ public static function worklistColumns(?int $user_id = null): Collection
|
|||||||
WorklistColumn::Series,
|
WorklistColumn::Series,
|
||||||
WorklistColumn::ReceiveDate,
|
WorklistColumn::ReceiveDate,
|
||||||
WorklistColumn::ActionButtons,
|
WorklistColumn::ActionButtons,
|
||||||
|
WorklistColumn::ReportButtons,
|
||||||
WorklistColumn::ViewerButtons,
|
WorklistColumn::ViewerButtons,
|
||||||
WorklistColumn::ReportingButtons,
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $columns;
|
return $columns;
|
||||||
|
Loading…
Reference in New Issue
Block a user