Hide finance and admin KPIs from roles that lack them.
Deploy Ladill Care / deploy (push) Successful in 33s

Doctors no longer see revenue, open bills, or org admin cards on the Care dashboard.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-14 22:32:41 +00:00
co-authored by Cursor
parent c425aa12ac
commit 50f515cf6a
4 changed files with 213 additions and 111 deletions
+18 -1
View File
@@ -81,7 +81,24 @@ class CareWebTest extends TestCase
$this->actingAs($this->user)
->get(route('care.dashboard'))
->assertOk()
->assertSee('Test Clinic');
->assertSee('Test Clinic')
->assertSee('Revenue today')
->assertSee('Open bills');
}
public function test_doctor_dashboard_hides_finance_metrics(): void
{
Member::where('user_ref', $this->user->public_id)->update(['role' => 'doctor']);
$this->actingAs($this->user)
->get(route('care.dashboard'))
->assertOk()
->assertSee('Patients today')
->assertSee('Appointments today')
->assertDontSee('Revenue today')
->assertDontSee('Open bills')
->assertDontSee('Team members')
->assertDontSee('Active branches');
}
public function test_onboarding_creates_organization(): void