geocrop-platform./apps/nextgen/.harness/changelogs/2026-07-17-p1-4-library.md

33 lines
994 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2026-07-17 — P1-4 modal migration: admin/Library.tsx (3 of 3)
Branch: `feat/p1-4-modals-library`
Worktree: `.worktrees/feat-p1-4-modals-library`
## Why
P1-4 from the readiness audit asks for every inline modal to use the
shared `<Modal>` component. Continues the sweep with
`admin/Library.tsx`.
## Changes
### `client/src/pages/admin/Library.tsx`
Migrated 3 of 3 modals to `<Modal>` + `<ModalBody>`:
- **Register / Update Book** — multi-section form (title, author,
ISBN, publisher, year, category, shelf location, total copies,
image URL, status)
- **Circulate Asset** (issue) — borrower dropdown, due-date,
notes
- **Finalize Circulation** (return) — condition, return notes
Each modal's inline `bg-card rounded-[2.5rem]` shell + custom header
+ × close button are removed; `<Modal>` injects its own header /
close. Body content is wrapped in `<ModalBody>`.
## Verification
- `node scripts/lint-no-inline-modals.js``admin/Library.tsx` count
dropped 3 → 0.