Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,4 @@ Upgrading to Pro unlocks:
- Premium color schemes
- Streak freezes
- Gamification: XP, levels, and achievements

## The retrospective is yearly-only

The **retrospective** is the one feature that needs the **yearly** Pro plan specifically. A monthly Pro subscription does not include it; the yearly plan does.
- Retrospectives
2 changes: 1 addition & 1 deletion src/Orbit.Application/Common/AnalyticsCapture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void SafeCaptureUserEvent(
{
try
{
analytics.CaptureUserEvent(user.Id, eventName, user.Plan.ToString(), user.IsYearlyPro);
analytics.CaptureUserEvent(user.Id, eventName, user.Plan.ToString());
}
catch (Exception ex)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Orbit.Application/Common/PayGateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ public async Task<Result> CanUseRetrospective(Guid userId, CancellationToken ct
return Result.Failure(ErrorMessages.UserNotFound);

var proOnly = await appConfig.GetAsync(AppConfigKeys.RetrospectiveProOnly, true, ct);
if (proOnly && !user.IsYearlyPro)
return Result.PayGateFailure("Retrospectives are available on the yearly Pro plan. Upgrade to unlock!");
if (proOnly && !user.HasProAccess)
return Result.PayGateFailure("Retrospectives are a Pro feature. Upgrade to unlock!");

return Result.Success();
}
Expand Down
3 changes: 0 additions & 3 deletions src/Orbit.Domain/Entities/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ public partial class User : Entity
[NotMapped]
public bool HasProAccess => IsPro || IsTrialActive;

[NotMapped]
public bool IsYearlyPro => IsPro && (IsLifetimePro || SubscriptionInterval == Enums.SubscriptionInterval.Yearly);

private User() { }

public static Result<User> Create(string name, string email)
Expand Down
2 changes: 1 addition & 1 deletion src/Orbit.Domain/Interfaces/IProductAnalytics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ namespace Orbit.Domain.Interfaces;
/// </summary>
public interface IProductAnalytics
{
void CaptureUserEvent(Guid userId, string eventName, string plan, bool isYearlyPro);
void CaptureUserEvent(Guid userId, string eventName, string plan);
}
Loading
Loading