Add Lab and Blood Bank manager roles with admin UIs.
Deploy Ladill Care / deploy (push) Successful in 46s

Give lab_manager catalog/ops admin access and blood_bank_manager a branch-level stock register plus specialty admin surface, while keeping technicians on clinical queues.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-19 14:18:47 +00:00
co-authored by Cursor
parent 64e3f75159
commit 5d9d333170
26 changed files with 869 additions and 17 deletions
+44
View File
@@ -286,6 +286,50 @@ class CareLabTest extends TestCase
]);
}
public function test_lab_manager_can_access_admin_and_catalog(): void
{
Member::where('user_ref', $this->user->public_id)->update([
'role' => 'lab_manager',
'branch_id' => $this->branch->id,
]);
$this->actingAs($this->user)
->get(route('care.lab.admin.index', ['branch_id' => $this->branch->id]))
->assertOk()
->assertSee('Lab admin')
->assertSee('Manage catalog');
$this->actingAs($this->user)
->get(route('care.lab.catalog.index'))
->assertOk()
->assertSee('Investigation catalog');
$this->actingAs($this->user)
->post(route('care.lab.catalog.store'), [
'name' => 'Manager Panel',
'code' => 'MGR',
'category' => 'blood',
'price_minor' => 2200,
'is_active' => true,
])
->assertRedirect(route('care.lab.catalog.index'));
$this->assertDatabaseHas('care_investigation_types', [
'organization_id' => $this->organization->id,
'name' => 'Manager Panel',
'price_minor' => 2200,
]);
}
public function test_lab_technician_cannot_access_lab_admin(): void
{
Member::where('user_ref', $this->user->public_id)->update(['role' => 'lab_technician']);
$this->actingAs($this->user)
->get(route('care.lab.admin.index'))
->assertForbidden();
}
public function test_api_can_request_investigation(): void
{
Sanctum::actingAs($this->user);