Lock nursing note shift from duty roster or clock.
Deploy Ladill Care / deploy (push) Successful in 46s

Nurses can no longer pick a shift on the form; the server sets it from today's unit roster, falling back to the current clock window.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-20 18:36:52 +00:00
co-authored by Cursor
parent e539438071
commit 9443465c5c
4 changed files with 106 additions and 11 deletions
+10 -1
View File
@@ -195,11 +195,19 @@ class CareMarAndNursingTest extends TestCase
public function test_nursing_note_and_handover(): void
{
$this->travelTo(now()->setTime(16, 30));
$this->actingAs($this->owner)
->get(route('care.care-units.notes', $this->unit))
->assertOk()
->assertSee('Evening shift')
->assertDontSee('name="shift_code"', false);
$this->actingAs($this->owner)
->post(route('care.care-units.notes.store', $this->unit), [
'visit_id' => $this->visit->id,
'note_type' => 'progress',
'shift_code' => 'day',
'shift_code' => 'night', // ignored — duty/clock sets shift
'body' => 'Vitals stable; pain controlled.',
])
->assertRedirect(route('care.care-units.notes', [$this->unit, 'visit' => $this->visit->id]));
@@ -207,6 +215,7 @@ class CareMarAndNursingTest extends TestCase
$this->assertDatabaseHas('care_nursing_notes', [
'visit_id' => $this->visit->id,
'body' => 'Vitals stable; pain controlled.',
'shift_code' => 'evening',
]);
$this->actingAs($this->owner)