Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,14 @@ private async Task ExecuteContributionsStep(ApplicationFormModel model)
&& model.ContributionDate.Value >= model.CurrentSelection?.ApplicationsEnd.AddMonths(-_options.TimeFrameMonths)
&& model.ContributionDate.Value <= model.CurrentSelection.ApplicationsEnd)
{
if (model.CurrentApplication?.Contributions.Count >= 30)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this value configurable on a Sitecore Item

{
model.NextStep = ApplicationStep.Contributions;
await LoadProducts(model);
ModelState.AddModelError(string.Empty, "You have reached the limit of 30 contributions. Please review your list and select only top 30 contributions.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this text content editable

return;
}

Contribution contribution = new(model.UpdateContributionId ?? Guid.Empty)
{
Date = model.ContributionDate.Value,
Expand Down Expand Up @@ -536,6 +544,13 @@ private async Task ExecuteConfirmationStep(ApplicationFormModel model)
{
if (model.IsNavigation.HasValue && model.IsNavigation.Value)
{
if (model.CurrentApplication?.Contributions.Count < 3)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this value configurable on a Sitecore Item.

{
ModelState.AddModelError(string.Empty, "You must add atleast 3 contributions to submit your application.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this text content editable

model.NextStep = ApplicationStep.Contributions;
return;
}

model.NextStep = ApplicationStep.Confirmation;
}
else if (model.IsNavigation.HasValue && !model.IsNavigation.Value && model.UnderstandsReviewConsent && model is { UnderstandsProgramAgreement: true, IsComplete: true, CurrentApplication: not null })
Expand Down
Loading