fix(subscription): plan comparison + checkout read the live plan catalog
CI/CD / CI · API (dotnet build + test) (push) Successful in 42s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 30s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m10s
CI/CD / CI · Admin Web (tsc) (push) Successful in 38s
CI/CD / CI · Website (tsc) (push) Successful in 47s
CI/CD / CI · Koja (tsc) (push) Successful in 50s
CI/CD / Deploy · all services (push) Successful in 3m27s

The merchant plan page hard-coded 4 tiers, prices and a feature matrix
that drifted from the admin-editable platform catalog (Starter tier
missing, stale prices/features). PlanComparison and CheckoutScreen now
consume /platform/plans + new /platform/features-catalog:

- columns = active plans by SortOrder (incl. Starter), names from
  DisplayNameFa/En, prices from MonthlyPriceToman
- limit rows from PlanLimitsData (int.MaxValue → "نامحدود")
- feature rows from the feature catalog, ticked via FeatureKeys
- checkout validates the ?plan= param against isBillableOnline and
  prices from the catalog — no more client-side price constants

fa/en/ar limit-row labels added.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-12 08:16:29 +03:30
parent 74f46a4781
commit 615d5348de
7 changed files with 328 additions and 255 deletions
@@ -36,4 +36,13 @@ public class CafePlatformController : CafeApiControllerBase
var plans = await _catalog.GetPlansAsync(cancellationToken);
return Ok(new ApiResponse<object>(true, plans));
}
/// <summary>Feature catalog (key → display name / module group) so clients can
/// label the FeatureKeys returned by the plans endpoint.</summary>
[HttpGet("features-catalog")]
public async Task<IActionResult> GetFeaturesCatalog(CancellationToken cancellationToken)
{
var features = await _catalog.GetFeaturesAsync(cancellationToken);
return Ok(new ApiResponse<object>(true, features));
}
}