Skip to content

WIP: payments, gateways, subscription plans and host dashboard improvements - #273

Merged
afonsoft merged 4 commits into
mainfrom
devin/2026-07-31-payment-plan
Jul 31, 2026
Merged

WIP: payments, gateways, subscription plans and host dashboard improvements#273
afonsoft merged 4 commits into
mainfrom
devin/2026-07-31-payment-plan

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Component Type

  • EAF Module (e.g., Eaf.Castle.Serilog, Eaf.KeyVault, Eaf.OpenTelemetry, etc.)
  • UI Template (Angular - Templates/Angular/)
  • API Template (ASP.NET Core - Templates/Api/)

Description

What

  • Completes the Angular admin screens for the approved payment/gateway/subscription plan improvements:
    • Edition create/edit modal with new price fields (monthly, quarterly, biannual, annual, permanent) and default payment period.
    • Edition features modal reusing the existing feature-tree component.
    • Payment list with gateway badge, status badge and a gateway-settings modal for Stripe, PayPal, Mercado Pago and PagSeguro.
    • Tenant subscription modal to assign/extend editions and view remaining days.
  • Fixes PaymentAppService.CreatePaymentAsync so the SubscriptionPayment is inserted only once, with the gateway-generated ExternalPaymentId already set.
  • Corrects manual Angular service proxy routes for Edition, Payment and Dashboard (AppService suffix removed from dynamic API paths).
  • Reorganizes navigation: Dashboard/Metrics stay in the left sidebar; all administrative items (Tenants, Roles, Users, Editions, Payments, Organization Units, Mass Notifications, User Delegations, etc.) move to the right header dropdown.
  • Adds missing localization keys for payments, gateways, subscriptions and edition management in EafCore.xml and EafCore-pt-BR.xml.
  • Keeps the previously merged EF Core migration that resolves the Docker Invalid column name 'SubscriptionEndDateUtc' error.

Why

  • The template Angular UI still used wrong AppService-suffixed URLs and plain text gateway inputs, making the new payment and edition backend features unreachable.
  • Host admins need a single place to configure all payment gateways and to assign/extend subscription plans per tenant.

Impact

  • docker-compose -f docker-compose.all.yml up -d --build completes, the migrator applies the new migration successfully and eaf-api reports healthy.
  • Full .NET test suite and template test suite pass.
  • Angular production build and TypeScript checks pass.

New Feature Submissions

  1. Does your submission pass tests?
  2. Have you lint your code locally prior to submission?
  3. Have you updated the documentation for this feature? (plan already in docs/plans)
  4. Have you added tests for the new feature? (existing BDD tests for PaymentAppService and EditionAppService cover the backend logic)

Changes to Core Features

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?
  • Have you updated the relevant documentation?

Breaking Changes

  • Does this PR introduce any breaking changes?
  • If yes, have you documented them in the description or in a migration guide?

Verification

  • dotnet build Eaf.sln --configuration Release
  • dotnet test Eaf.sln --configuration Release ✅ 0 failures
  • dotnet build Templates/Api/Eaf.ProjectName.sln --configuration Release
  • dotnet test Templates/Api/Eaf.ProjectName.sln --configuration Release ✅ 211 passed, 1 skipped
  • npx tsc -p Templates/Angular/Eaf.ProjectName.UI/src/tsconfig.app.json --noEmit
  • npx ng build --configuration=production (from Templates/Angular/Eaf.ProjectName.UI) ✅
  • docker-compose -f docker-compose.all.yml up -d --build ✅ (migrator completed, API healthy)

Angular unit tests (ng test) could not be executed because ChromeHeadless is not installed in this environment; the production build and TypeScript checks pass as a substitute.

Link to Devin session: https://app.devin.ai/sessions/f93753b867284fe79f75deeeb8d50c52
Requested by: @afonsoft

docs(plan): add payments/gateways/subscription plan

Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
@afonsoft afonsoft self-assigned this Jul 31, 2026
@afonsoft
afonsoft self-requested a review July 31, 2026 17:12
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

…rDelegation and SubscribableEdition

- Adds DbSet<T> entries to ProjectNameDbContext
- Generates AddSubscriptionPaymentMassNotificationUserDelegationAndSubscribableEdition migration
- Fixes pre-existing template test compilation errors (ContentSecurityPolicyMiddleware, SkipMigrate)
- Adjusts FeatureProvider tests for PlanFeatures children
- Ensures Docker compose starts successfully with SQL Server

Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
return;
}

var editionIds = dtos.Where(d => d.EditionId.HasValue).Select(d => d.EditionId.Value).Distinct().ToList();

foreach (var dto in dtos.Where(d => d.EditionId.HasValue))
{
if (editionNames.TryGetValue(dto.EditionId.Value, out var name))
var url = $"https://ws.sandbox.pagseguro.uol.com.br/v2/checkout?email={email}&token={token}";

using var httpClient = new HttpClient();
var content = new FormUrlEncodedContent(formData);
Comment on lines +251 to +257
foreach (var dto in dtos.Where(d => d.EditionId.HasValue))
{
if (editionNames.TryGetValue(dto.EditionId.Value, out var name))
{
dto.EditionDisplayName = name;
}
}
…teway settings

- Fix PaymentAppService.CreatePaymentAsync to insert once with ExternalPaymentId
- Correct Angular service proxy routes (Edition/Payment/Dashboard)
- Add create/edit and feature modals for Editions
- Add gateway settings and gateway list to Payments
- Add tenant subscription assignment/extend modal
- Reorganize admin menus: left dashboard/metrics, right header admin
- Add missing localization keys for payments/subscriptions/gateways
- Validate EF Core migration and Docker compose health

Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
- Remove unused IEditionDto and IGetEditionFeaturesEditOutput imports from edition modals
- Extract dashboard 'success' style literal into SuccessStyle constant

Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review July 31, 2026 19:29
@sonarqubecloud

Copy link
Copy Markdown

@afonsoft
afonsoft merged commit ed1d874 into main Jul 31, 2026
32 checks passed
@afonsoft
afonsoft deleted the devin/2026-07-31-payment-plan branch July 31, 2026 19:42
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.

2 participants