wip
This commit is contained in:
parent
ebda878e1f
commit
a4cf3015dd
@ -13,7 +13,7 @@ enum Permission: string
|
|||||||
case StudyDownload = 'study_download';
|
case StudyDownload = 'study_download';
|
||||||
case StudyDelete = 'study_delete';
|
case StudyDelete = 'study_delete';
|
||||||
case StudyArchive = 'study_archive';
|
case StudyArchive = 'study_archive';
|
||||||
case ReportCreate = 'report_create';
|
case ReportEdit = 'report_edit';
|
||||||
case ReportDictate = 'report_dictate';
|
case ReportDictate = 'report_dictate';
|
||||||
case ReportDownload = 'report_download';
|
case ReportDownload = 'report_download';
|
||||||
case StudyNotesCreate = 'study_notes_create';
|
case StudyNotesCreate = 'study_notes_create';
|
||||||
|
@ -82,5 +82,13 @@ public function canReportDownload(): bool
|
|||||||
return $this->activeStudy(fn () => $this->study->report_status >= ReportStatus::Finalized);
|
return $this->activeStudy(fn () => $this->study->report_status >= ReportStatus::Finalized);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canReportEdit(): bool
|
||||||
|
{
|
||||||
|
return $this->activeStudy(fn () => $this->study->is_locked === false &&
|
||||||
|
$this->study->report_status <= ReportStatus::Preliminary &&
|
||||||
|
$this->study->assigned_physician_id === $this->user->id
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function __construct(private readonly Study $study) {}
|
public function __construct(private readonly Study $study) {}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ public function run(): void
|
|||||||
}
|
}
|
||||||
|
|
||||||
$rad->givePermissionTo([
|
$rad->givePermissionTo([
|
||||||
Permission::ReportCreate,
|
Permission::ReportEdit,
|
||||||
Permission::ReportDownload,
|
Permission::ReportDownload,
|
||||||
Permission::StudyDownload,
|
Permission::StudyDownload,
|
||||||
Permission::StudyMetadataView,
|
Permission::StudyMetadataView,
|
||||||
|
@ -144,7 +144,7 @@ class="d-flex justify-content-between align-items-start border-end pb-4 pb-sm-0
|
|||||||
|
|
||||||
<span class="badge bg-success">Reported</span>
|
<span class="badge bg-success">Reported</span>
|
||||||
|
|
||||||
@can(\App\Domain\ACL\Permission::ReportCreate)
|
@can(\App\Domain\ACL\Permission::ReportEdit)
|
||||||
<a target="_blank" class="btn"
|
<a target="_blank" class="btn"
|
||||||
href="{{ route('radiologist.report-write', $study->id) }}">TXT</a>
|
href="{{ route('radiologist.report-write', $study->id) }}">TXT</a>
|
||||||
@endcan
|
@endcan
|
||||||
|
Loading…
Reference in New Issue
Block a user