Skip to content

Add product purchases relation manager to user admin page#290

Merged
simonhamp merged 1 commit intomainfrom
user-purchases-relation
Mar 20, 2026
Merged

Add product purchases relation manager to user admin page#290
simonhamp merged 1 commit intomainfrom
user-purchases-relation

Conversation

@simonhamp
Copy link
Member

@simonhamp simonhamp commented Mar 20, 2026

Summary

  • Adds a Products relation manager tab on the user edit page showing all products a user has purchased or been comped
  • Supports searching, sorting, filtering by comped status, creating comped licenses, and deleting licenses
  • Adds a migration for the is_comped column on product_licenses (existed in DB but had no migration)
  • Updates the sales_view to reference the actual is_comped column instead of hardcoding 0
  • Adds is_comped boolean cast to the ProductLicense model

Test plan

  • 6 new tests covering listing, user scoping, comped status, create, delete, and filtering
  • Verify the Products tab appears on the user edit page in the admin
  • Verify creating a comped product license works
  • Verify the sales view still works correctly after the migration change

🤖 Generated with Claude Code

Shows all products a user has purchased or been comped, with filtering,
creation (for comping), and deletion support. Also adds the missing
is_comped migration for product_licenses and updates the sales view
to reference the actual column.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonhamp simonhamp marked this pull request as ready for review March 20, 2026 22:10
@simonhamp simonhamp merged commit 38ccd32 into main Mar 20, 2026
2 checks passed
@simonhamp simonhamp deleted the user-purchases-relation branch March 20, 2026 22:26
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