feat(assets): edit asset with change history and edited marker (PMS-185) #109
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/mapps-185-asset-edit-history"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Implements PMS-185: a user can open an asset's full detail, edit it, and see a change history with an "edited" marker (who / when).
Changes
PUT /api/v1/assets/{id}and restarts the asset + history resources so the page reflects the change without a reload./auth/users(no more bare UUIDs), and timestamps show date + time.updated_atstrictly aftercreated_at), sourced from the most recent audit entry.Backend
None required.
update_assetalready writes anasset_audit_logrow in the same transaction as the mutation, andGET /assets/{id}/audit-logalready exposes the history.Acceptance criteria
asset_audit_logentry.🤖 Generated with Claude Code
Add an Edit affordance to the asset detail page so a user can open an asset's full detail and update its fields (name, tag, type, status, manufacturer, model, serial, purchase/warranty dates) via PUT /assets/{id}. The backend already writes an asset_audit_log row on every update, so the existing detail audit feed now renders as a "Change History" card with humanized action labels, resolved actor names (via /auth/users instead of bare UUIDs), and full timestamps. An "Edited {when} by {who}" marker appears on the Asset Information card whenever the asset has changed since creation, sourced from the most recent audit entry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>