Skip to content

Commit

Permalink
Merge pull request #1395 from DFE-Digital/feature/176343-TTE
Browse files Browse the repository at this point in the history
Feature/176343 tte
  • Loading branch information
elielijah321 authored Oct 22, 2024
2 parents cdf635e + d9def17 commit db87599
Show file tree
Hide file tree
Showing 80 changed files with 9,059 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public abstract record CaseSummaryResponse
public IEnumerable<ActionOrDecision> NtisUnderConsideration { get; set; }
public IEnumerable<ActionOrDecision> SrmaCases { get; set; }
public IEnumerable<ActionOrDecision> TrustFinancialForecasts { get; set; }
public IEnumerable<ActionOrDecision> TargetedTrustEngagements { get; set; }

public Division? Division { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;

namespace ConcernsCaseWork.API.Contracts.TargetedTrustEngagement;

public class CloseTargetedTrustEngagementRequest
{
public DateTimeOffset? EngagementEndDate { get; set; }

public TargetedTrustEngagementOutcome OutcomeId { get; set; }

[StringLength(TargetedTrustEngagementConstants.MaxSupportingNotesLength, ErrorMessage = "Notes must be 2000 characters or less", MinimumLength = 0)]
public string Notes { get; set; }

public bool IsValid()
{
return (Notes?.Length ?? 0) <= TargetedTrustEngagementConstants.MaxSupportingNotesLength;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace ConcernsCaseWork.API.Contracts.TargetedTrustEngagement;

public class CloseTargetedTrustEngagementResponse
{
public CloseTargetedTrustEngagementResponse()
{

}
public CloseTargetedTrustEngagementResponse(int caseUrn, int targetedTrustEngagementId)
{
CaseUrn = caseUrn >= 0 ? caseUrn : throw new ArgumentOutOfRangeException(nameof(caseUrn), "value must be greater than zero");
TargetedTrustEngagementId = targetedTrustEngagementId >= 0 ? targetedTrustEngagementId : throw new ArgumentOutOfRangeException(nameof(targetedTrustEngagementId), "value must be greater than zero");
}

public int CaseUrn { get; set; }
public int TargetedTrustEngagementId { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System.ComponentModel.DataAnnotations;

namespace ConcernsCaseWork.API.Contracts.TargetedTrustEngagement
{
public class CreateTargetedTrustEngagementRequest
{
public CreateTargetedTrustEngagementRequest()
{
}

[Range(1, int.MaxValue, ErrorMessage = "The CaseUrn must be greater than zero")]
public int CaseUrn { get; set; }

public DateTimeOffset? EngagementStartDate { get; set; }

public TargetedTrustEngagementActivity? ActivityId { get; set; }
public TargetedTrustEngagementActivityType[] ActivityTypes { get; set; }

[StringLength(TargetedTrustEngagementConstants.MaxSupportingNotesLength, ErrorMessage = "Notes must be 2000 characters or less", MinimumLength = 0)]
public string Notes { get; set; }

public string CreatedBy { get; set; }

public bool IsValid()
{
return (Notes?.Length ?? 0) <= TargetedTrustEngagementConstants.MaxSupportingNotesLength;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace ConcernsCaseWork.API.Contracts.TargetedTrustEngagement
{
public class CreateTargetedTrustEngagementResponse
{
public CreateTargetedTrustEngagementResponse()
{
}

public CreateTargetedTrustEngagementResponse(int concernsCaseUrn, int targetedTrustEngagementId)
{
ConcernsCaseUrn = concernsCaseUrn >= 0 ? concernsCaseUrn : throw new ArgumentOutOfRangeException(nameof(concernsCaseUrn), "value must be greater than zero");
TargetedTrustEngagementId = targetedTrustEngagementId >= 0 ? targetedTrustEngagementId : throw new ArgumentOutOfRangeException(nameof(targetedTrustEngagementId), "value must be greater than zero");
}
public int ConcernsCaseUrn { get; set; }
public int TargetedTrustEngagementId { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

namespace ConcernsCaseWork.API.Contracts.TargetedTrustEngagement
{
public class GetTargetedTrustEngagementResponse
{
public int Id { get; set; }
public int CaseUrn { get; set; }
public DateTimeOffset? EngagementStartDate { get; set; }
public TargetedTrustEngagementActivity? ActivityId { get; set; }
public TargetedTrustEngagementActivityType[] ActivityTypes { get; set; }
public string Notes { get; set; }
public DateTimeOffset? EngagementEndDate { get; set; }
public TargetedTrustEngagementOutcome? EngagementOutcomeId { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
public DateTime? ClosedAt { get; set; }
public string CreatedBy { get; set; }
public DateTime? DeletedAt { get; set; }
public string Title { get; set; }
public bool IsEditable { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System.ComponentModel;

namespace ConcernsCaseWork.API.Contracts.TargetedTrustEngagement
{
public enum TargetedTrustEngagementActivity
{
[Description("Budget Forecast Return/Accounts Return driven")]
BudgetForecastReturnAccountsReturnDriven = 1,

[Description("Executive pay engagement")]
ExecutivePayEngagement = 2,

[Description("Financial returns assurance")]
FinancialReturnsAssurance = 3,

[Description("Reserves Oversight and Assurance Project")]
ReservesOversightAndAssuranceProject = 4,

[Description("Local proactive engagament")]
LocalProactiveEngagament = 5,

[Description("Other national processes")]
OtherNationalProcesses = 6,

[Description("No engagement activities were taken forward")]
NoEngagementActivitiesWereTakenForward = 7
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System.ComponentModel;

namespace ConcernsCaseWork.API.Contracts.TargetedTrustEngagement
{
public enum TargetedTrustEngagementActivityType
{
[Description("Category 1")]
Category1 = 1,
[Description("Category 2")]
Category2 = 2,
[Description("Category 3")]
Category3 = 3,
[Description("Category 4")]
Category4 = 4,
[Description("CEOs")]
CEOs = 5,
[Description("Leadership")]
Leadership = 6,
[Description("CEOs and Leadership")]
CEOsAndLeadership = 7,
[Description("Annual summary internal scrutiny reports")]
AnnualSummaryInternalScrutinyReports = 8,
[Description("Audit issues")]
AuditIssues = 9,
[Description("Management letter issues")]
ManagementLetterIssues = 10,
[Description("Regularity issues")]
RegularityIssues = 11,
[Description("Priority 1 ")]
Priority1 = 12,
[Description("Priority 2")]
Priority2 = 13,
[Description("Priority 3")]
Priority3 = 14,
[Description("Priority 4")]
Priority4 = 15,
[Description("Budget Forecast Return/Accounts Return driven")]
BudgetForecastReturnAccountsReturnDriven = 16,
[Description("Executive pay engagement")]
ExecutivePayEngagement = 17,
[Description("Financial returns assurance")]
FinancialReturnsAssurance = 18,
[Description("Reserves Oversight Assurance Project")]
ReservesOversightAssuranceProject = 19,
[Description("Local proactive engagament")]
LocalProactiveEngagament = 20,
[Description("Other national processes")]
OtherNationalProcesses = 21
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace ConcernsCaseWork.API.Contracts.TargetedTrustEngagement
{
public static class TargetedTrustEngagementConstants
{
public const int MaxSupportingNotesLength = 2000;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System.ComponentModel;

namespace ConcernsCaseWork.API.Contracts.TargetedTrustEngagement
{
public enum TargetedTrustEngagementOutcome
{
[Description("Adequate response received")]
AdequateResponseReceived = 1,

[Description("Inadequate response received")]
InadequateResponseReceived = 2,

[Description("No engagement took place")]
NoEngagementTookPlace = 3,

[Description("No response required")]
NoResponseRequired = 4
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace ConcernsCaseWork.API.Contracts.TargetedTrustEngagement;

public class TargetedTrustEngagementSummaryResponse
{
public int CaseUrn { get; set; }
public int TargetedTrustEngagementId { get; set; }
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset UpdatedAt { get; set; }
public string Title { get; set; }
public int? Outcome { get; set; }
public DateTimeOffset? ClosedAt { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System.ComponentModel.DataAnnotations;

namespace ConcernsCaseWork.API.Contracts.TargetedTrustEngagement
{
public class UpdateTargetedTrustEngagementRequest
{
[Range(1, int.MaxValue, ErrorMessage = "The CaseUrn must be greater than zero")]
public int CaseUrn { get; set; }

public DateTimeOffset? EngagementStartDate { get; set; }


public TargetedTrustEngagementActivity? ActivityId { get; set; }
public TargetedTrustEngagementActivityType[] ActivityTypes { get; set; }


[StringLength(TargetedTrustEngagementConstants.MaxSupportingNotesLength, ErrorMessage = "Notes must be 2000 characters or less", MinimumLength = 0)]
public string Notes { get; set; }

public string CreatedBy { get; set; }

public bool IsValid()
{
return (Notes?.Length ?? 0) <= TargetedTrustEngagementConstants.MaxSupportingNotesLength;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace ConcernsCaseWork.API.Contracts.TargetedTrustEngagement
{
public class UpdateTargetedTrustEngagementResponse
{
public UpdateTargetedTrustEngagementResponse()
{
}

public UpdateTargetedTrustEngagementResponse(int concernsCaseUrn, int targetedTrustEngagementId)
{
ConcernsCaseUrn = concernsCaseUrn >= 0 ? concernsCaseUrn : throw new ArgumentOutOfRangeException(nameof(concernsCaseUrn), "value must be greater than zero");
TargetedTrustEngagementId = targetedTrustEngagementId >= 0 ? targetedTrustEngagementId : throw new ArgumentOutOfRangeException(nameof(targetedTrustEngagementId), "value must be greater than zero");
}
public int ConcernsCaseUrn { get; set; }
public int TargetedTrustEngagementId { get; set; }
}
}
Loading

0 comments on commit db87599

Please sign in to comment.