Split catalog CRUD onto lab.catalog.manage so technicians keep lab.manage for queue and results workflow without setting investigation prices. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -20,7 +20,7 @@ class InvestigationTypeController extends Controller
|
||||
|
||||
public function index(Request $request): View
|
||||
{
|
||||
$this->authorizeAbility($request, 'lab.manage');
|
||||
$this->authorizeAbility($request, 'lab.catalog.manage');
|
||||
$organization = $this->organization($request);
|
||||
|
||||
$types = InvestigationType::query()
|
||||
@@ -38,7 +38,7 @@ class InvestigationTypeController extends Controller
|
||||
|
||||
public function create(Request $request): View
|
||||
{
|
||||
$this->authorizeAbility($request, 'lab.manage');
|
||||
$this->authorizeAbility($request, 'lab.catalog.manage');
|
||||
|
||||
return view('care.lab.catalog.create', [
|
||||
'categories' => config('care.investigation_categories'),
|
||||
@@ -47,7 +47,7 @@ class InvestigationTypeController extends Controller
|
||||
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
$this->authorizeAbility($request, 'lab.manage');
|
||||
$this->authorizeAbility($request, 'lab.catalog.manage');
|
||||
|
||||
$type = $this->investigations->createType(
|
||||
$this->organization($request),
|
||||
@@ -61,7 +61,7 @@ class InvestigationTypeController extends Controller
|
||||
|
||||
public function edit(Request $request, InvestigationType $investigationType): View
|
||||
{
|
||||
$this->authorizeAbility($request, 'lab.manage');
|
||||
$this->authorizeAbility($request, 'lab.catalog.manage');
|
||||
$this->authorizeType($request, $investigationType);
|
||||
|
||||
return view('care.lab.catalog.edit', [
|
||||
@@ -72,7 +72,7 @@ class InvestigationTypeController extends Controller
|
||||
|
||||
public function update(Request $request, InvestigationType $investigationType): RedirectResponse
|
||||
{
|
||||
$this->authorizeAbility($request, 'lab.manage');
|
||||
$this->authorizeAbility($request, 'lab.catalog.manage');
|
||||
$this->authorizeType($request, $investigationType);
|
||||
|
||||
$this->investigations->updateType($investigationType, $this->ownerRef($request), $this->validatedTypeData($request));
|
||||
|
||||
@@ -61,6 +61,7 @@ class SettingsController extends Controller
|
||||
'canViewTeam' => $permissions->can($member, 'admin.members.view'),
|
||||
'canViewDevices' => $permissions->can($member, 'devices.view'),
|
||||
'canViewDisplays' => $permissions->can($member, 'displays.view'),
|
||||
'canManageLabCatalog' => $permissions->can($member, 'lab.catalog.manage'),
|
||||
'hasBranchesFeature' => $plans->hasFeature($organization, 'branches'),
|
||||
'hasClinicalDevicesFeature' => $plans->hasFeature($organization, 'clinical_devices'),
|
||||
'canUseQueueIntegration' => $plans->canUseQueueIntegration($organization),
|
||||
|
||||
Reference in New Issue
Block a user