Skip to content

Add product granting with comped sales tracking#289

Merged
simonhamp merged 2 commits intomainfrom
grant-products-to-users
Mar 20, 2026
Merged

Add product granting with comped sales tracking#289
simonhamp merged 2 commits intomainfrom
grant-products-to-users

Conversation

@simonhamp
Copy link
Member

@simonhamp simonhamp commented Mar 20, 2026

Summary

  • Add products:grant {product} {user} artisan command to grant products to users (with --dry-run and --no-email options)
  • Add "Grant to User" action to the Products admin panel (matching the existing bundle grant pattern)
  • Add is_comped column to product_licenses table and update the sales_view to read from it
  • Mark all granted licenses as comped: plugin grants now set is_grandfathered = true, product grants set is_comped = true
  • Add ProductGranted notification sent when a product is granted
  • Show Comped column, toggle, and filter in the product Licenses relation manager

Test plan

  • 6 tests for products:grant command (grant, skip duplicate, dry run, no-email, invalid product, invalid user)
  • 8 tests for plugins:grant-to-bundle-owners updated to assert is_grandfathered = true
  • Verify "Grant to User" action works in the Products admin panel
  • Verify comped licenses show correctly in the Sales admin view

🤖 Generated with Claude Code

simonhamp and others added 2 commits March 20, 2026 21:11
- Add `products:grant` artisan command to grant products to users by email
- Add "Grant to User" action to ProductResource admin panel
- Add `is_comped` column to product_licenses table
- Update sales_view to use product_licenses.is_comped instead of hardcoding 0
- Mark granted plugin licenses as comped (is_grandfathered = true)
- Add ProductGranted notification
- Show Comped column/filter in product LicensesRelationManager

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add PluginGranted and BundleGranted notifications with markdown templates
- Add "Grant to User" action to PluginResource index page
- Send email notifications from all Filament grant actions
- Use Blade markdown templates for proper button and link rendering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonhamp simonhamp marked this pull request as ready for review March 20, 2026 22:26
@simonhamp simonhamp merged commit 1f97420 into main Mar 20, 2026
2 checks passed
@simonhamp simonhamp deleted the grant-products-to-users 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