This commit is contained in:
Masroor Ehsan 2025-01-06 21:27:41 +06:00
parent 0870b54855
commit a317f1dbc1
3 changed files with 6 additions and 8 deletions

View File

@ -4,10 +4,10 @@
use App\DAL\Studies\WorklistFactory; use App\DAL\Studies\WorklistFactory;
use App\Models\Study; use App\Models\Study;
use Illuminate\Support\Facades\Blade;
use Carbon\Carbon; use Carbon\Carbon;
use Carbon\CarbonImmutable; use Carbon\CarbonImmutable;
use Illuminate\Database\Eloquent\Builder as QueryBuilder; use Illuminate\Database\Eloquent\Builder as QueryBuilder;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Yajra\DataTables\EloquentDataTable; use Yajra\DataTables\EloquentDataTable;
use Yajra\DataTables\Html\Builder as HtmlBuilder; use Yajra\DataTables\Html\Builder as HtmlBuilder;
@ -28,14 +28,14 @@ public function dataTable(QueryBuilder $query): EloquentDataTable
{ {
return (new EloquentDataTable($query)) return (new EloquentDataTable($query))
->addColumn('action', 'worklist.action') ->addColumn('action', 'worklist.action')
->editColumn('patient_name', fn(Study $study) => $study->sanitizedPatientName()) ->editColumn('patient_name', fn (Study $study) => $study->sanitizedPatientName())
->editColumn('study_description', fn(Study $study) => $study->sanitizedStudyDescription()) ->editColumn('study_description', fn (Study $study) => $study->sanitizedStudyDescription())
->editColumn('reader', function (Study $study) { ->editColumn('reader', function (Study $study) {
if ($study->readingPhysician == null) { if ($study->readingPhysician == null) {
return ''; return '';
} }
return Blade::render('staff.worklist.partials._radiologist-listing', return Blade::render('staff.worklist.partials._radiologist-listing',
[ [
'avatar_url' => $study->readingPhysician->avatar(), 'avatar_url' => $study->readingPhysician->avatar(),
'name' => $study->readingPhysician->display_name, 'name' => $study->readingPhysician->display_name,
@ -49,7 +49,7 @@ public function dataTable(QueryBuilder $query): EloquentDataTable
return ''; return '';
} }
return Blade::render('staff.worklist.partials._radiologist-listing', return Blade::render('staff.worklist.partials._radiologist-listing',
[ [
'avatar_url' => $study->assignedPhysician->avatar(), 'avatar_url' => $study->assignedPhysician->avatar(),
'name' => $study->assignedPhysician->display_name, 'name' => $study->assignedPhysician->display_name,

View File

@ -10,7 +10,6 @@
use App\Models\User; use App\Models\User;
use App\Services\AuditTrail\Activity; use App\Services\AuditTrail\Activity;
use Carbon\Carbon; use Carbon\Carbon;
use Carbon\CarbonInterface;
class StudyAssignmentController extends HashidControllerBase class StudyAssignmentController extends HashidControllerBase
{ {
@ -24,7 +23,7 @@ public function show()
$found = $rads->where('id', $rad->id)->first(); $found = $rads->where('id', $rad->id)->first();
if ($found) { if ($found) {
$found->info['workload'] = $rad->workload; $found->info['workload'] = $rad->workload;
$found->info['last_seen'] = 'Seen: '. ($rad->last_seen ?? Carbon::now()->addHours(-10))->diffForHumans(); $found->info['last_seen'] = 'Seen: ' . ($rad->last_seen ?? Carbon::now()->addHours(-10))->diffForHumans();
} }
} }

View File

@ -32,7 +32,6 @@ class User extends Authenticatable
use Notifiable; use Notifiable;
use TwoFactorAuthenticatable; use TwoFactorAuthenticatable;
public array $info = []; public array $info = [];
/** /**