Skip to content

Dashboard: checked-out card with Create child and Done - #203

Merged
olsonjp merged 5 commits into
mainfrom
dashboard-checked-out-card
Nov 11, 2026
Merged

olsonjp merged 5 commits into
mainfrom
dashboard-checked-out-card

Conversation

@olsonjp

@olsonjp olsonjp commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Stacked on #202 (base is that PR's branch; it needs #202's checked_out_by fields). It should retarget to main when #202 is merged. Please check that it did.

Part of #192 and #193: the lab said checking out is a frequent activity, so the list of what you have checked out belongs on the Dashboard, with one step to record what was made from it.

What it does

  • Dashboard card "Checked out by you (N)" under Quick Actions and above Freezers. It shows your 5 newest checkouts, newest first, in the same row style as "In progress". Each row: link "Sample #id · Type · Passage", and "out 2 days ago · 1 child". The title has the total. All checked out links to the Aliquots list with the "Checked out by me" filter. With nothing checked out it collapses to one line with a Find an aliquot link.
  • Create child (per row) opens the create form with parent, sample, type and passage prefilled (passage is editable, since the lab says it is sometimes the same and sometimes not). The form has a Parent aliquot is exhausted toggle, on by default, styled like the existing "Assign to storage box" toggle. After saving, it returns to the Dashboard.
  • Done (per row, with a confirmation) marks the aliquot Exhausted with no child, for one that was used for an assay only. It returns to the Dashboard.

Behaviour I chose

  • The exhausted toggle only appears, and only acts, when the parent is In Use. A stored parent is never marked Exhausted silently.
  • Both Done and the toggle use the existing Exhausted status (the first disposition of type exhausted; one is created only if none exists), free any box slot, and write an aliquot_updated audit entry. The Done action works on any aliquot that is In Use.
  • next is only honoured for addresses on this site; anything else falls back to the Aliquots list (or the aliquot page for Done).
  • Create child on the aliquot pages is unchanged and still returns to the Aliquots list.

Not in this PR

The Check out button on Find Aliquot results and the manager tile (agreed as a separate PR). Row order is newest first, chosen over oldest first.

Verification

  • 23 new tests in sample/tests/test_dashboard_checkout_card.py: the card's contents, order, 5-row limit and empty state; placement above Freezers; prefill; the toggle's presence, default and the markup that draws it; marking the parent exhausted with an audit entry; stored parents untouched; return addresses (valid and foreign); Done; mark_exhausted. Full suite: 619 tests, OK. No migrations.
  • Not checked by me: how it looks in a browser. The author has looked at the card, the buttons and the create form locally and the formatting was adjusted from their feedback.

🤖 Generated with Claude Code

olsonjp and others added 4 commits November 10, 2026 21:33
… report

Closes #192.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Replace the boxed checkbox and the filter chips for the two yes/no filters
with pills that are links toggling their query parameter. The checked-out
pill shows the user's In Use count. Singular count text; aria-label on Search.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…sposed

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Card above Freezers lists the user's five newest checkouts. Create child
opens the form prefilled (sample, type, passage) with a default-on
'Parent aliquot is exhausted' toggle and returns to the dashboard. Done
marks the aliquot Exhausted without a child.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Base automatically changed from checked-out-by-and-no-owner-report to main November 11, 2026 04:55
#202 was squash-merged, so take main's version of its files.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@olsonjp
olsonjp merged commit 109cb2e into main Nov 11, 2026
1 check passed
@olsonjp
olsonjp deleted the dashboard-checked-out-card branch November 11, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant