Gate Queue to doctors and land specialty modules on list indexes.
Deploy Ladill Care / deploy (push) Successful in 34s
Deploy Ladill Care / deploy (push) Successful in 34s
Hide the patient-flow Queue board from nurses, reception, and other non-doctors; specialty home routes now render the queue board list instead of auto-opening the first open visit. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -55,6 +55,7 @@ class CareAppointmentTest extends TestCase
|
||||
'organization_id' => $this->organization->id,
|
||||
'user_ref' => $this->user->public_id,
|
||||
'role' => 'receptionist',
|
||||
'branch_id' => null,
|
||||
]);
|
||||
|
||||
$this->branch = Branch::create([
|
||||
@@ -64,6 +65,10 @@ class CareAppointmentTest extends TestCase
|
||||
'is_active' => true,
|
||||
]);
|
||||
|
||||
Member::query()->where('user_ref', $this->user->public_id)->update([
|
||||
'branch_id' => $this->branch->id,
|
||||
]);
|
||||
|
||||
Department::create([
|
||||
'owner_ref' => $this->user->public_id,
|
||||
'branch_id' => $this->branch->id,
|
||||
@@ -135,7 +140,7 @@ class CareAppointmentTest extends TestCase
|
||||
|
||||
$this->actingAs($this->user)
|
||||
->post(route('care.appointments.check-in', $appointment))
|
||||
->assertRedirect(route('care.queue.index'));
|
||||
->assertRedirect(route('care.appointments.show', $appointment));
|
||||
|
||||
$appointment->refresh();
|
||||
$this->assertSame(Appointment::STATUS_WAITING, $appointment->status);
|
||||
@@ -201,7 +206,7 @@ class CareAppointmentTest extends TestCase
|
||||
'practitioner_id' => $this->practitioner->id,
|
||||
'reason' => 'Urgent visit',
|
||||
])
|
||||
->assertRedirect(route('care.queue.index'));
|
||||
->assertRedirect(route('care.appointments.show', Appointment::query()->first()));
|
||||
|
||||
$appointment = Appointment::first();
|
||||
$this->assertSame(Appointment::TYPE_WALK_IN, $appointment->type);
|
||||
@@ -211,6 +216,8 @@ class CareAppointmentTest extends TestCase
|
||||
|
||||
public function test_queue_page_loads(): void
|
||||
{
|
||||
Member::query()->where('user_ref', $this->user->public_id)->update(['role' => 'doctor']);
|
||||
|
||||
$this->actingAs($this->user)
|
||||
->get(route('care.queue.index', ['branch_id' => $this->branch->id]))
|
||||
->assertOk()
|
||||
@@ -219,6 +226,8 @@ class CareAppointmentTest extends TestCase
|
||||
|
||||
public function test_queue_repairs_duplicate_positions(): void
|
||||
{
|
||||
Member::query()->where('user_ref', $this->user->public_id)->update(['role' => 'doctor']);
|
||||
|
||||
$second = Patient::create([
|
||||
'uuid' => (string) \Illuminate\Support\Str::uuid(),
|
||||
'owner_ref' => $this->user->public_id,
|
||||
|
||||
Reference in New Issue
Block a user