Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #374

Merged
merged 12 commits into from
Jan 3, 2025
Merged
15 changes: 12 additions & 3 deletions src/Application/Features/Activities/DTOs/ActivityQueueEntryDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ public class ActivityQueueEntryDto
public DateTime Created { get; set; } = default!;
public string TenantId { get; set; } = default!;
public string TenantName { get; set; } = default!;
public string ParticipantName { get; set; } = default!;

public string ParticipantName { get; set; } = default!;
public string? ParticipantId { get; set; }

public string SupportWorker { get; set; } = default!;

public string? AssignedTo { get; set; }
Expand All @@ -37,6 +38,8 @@ public Mapping()
.ForMember(target => target.ParticipantName, options => {
options.MapFrom(target => target.Participant!.FirstName + " " + target.Participant.LastName);
})
.ForMember(target => target.ParticipantId,
options => options.MapFrom(source => source.ParticipantId))
.ForMember(target => target.SupportWorker, options => options.MapFrom(
source => source.Participant!.Owner!.DisplayName
))
Expand All @@ -58,6 +61,8 @@ public Mapping()
{
options.MapFrom(target => target.Participant!.FirstName + " " + target.Participant.LastName);
})
.ForMember(target => target.ParticipantId,
options => options.MapFrom(source => source.ParticipantId))
.ForMember(target => target.SupportWorker, options => options.MapFrom(
source => source.Participant!.Owner!.DisplayName
))
Expand All @@ -77,6 +82,8 @@ public Mapping()
{
options.MapFrom(target => target.Participant!.FirstName + " " + target.Participant.LastName);
})
.ForMember(target => target.ParticipantId,
options => options.MapFrom(source => source.ParticipantId))
.ForMember(target => target.SupportWorker, options => options.MapFrom(
source => source.Participant!.Owner!.DisplayName
))
Expand All @@ -96,6 +103,8 @@ public Mapping()
{
options.MapFrom(target => target.Participant!.FirstName + " " + target.Participant.LastName);
})
.ForMember(target => target.ParticipantId,
options => options.MapFrom(source => source.ParticipantId))
.ForMember(target => target.SupportWorker, options => options.MapFrom(
source => source.Participant!.Owner!.DisplayName
))
Expand All @@ -104,4 +113,4 @@ public Mapping()
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public async Task Consume(ConsumeContext<ParticipantTransitionedIntegrationEvent
p.TenantId,
SubmissionToPqa = p.Created
})
.SingleAsync();
.FirstAsync();

// do we already have a payment?
var exists = unitOfWork.DbContext.EnrolmentPayments
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire/Aspire.AppHost/Aspire.AppHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Server.Ui\Server.Ui.csproj"></ProjectReference>
<ProjectReference Include="..\..\Server.UI\Server.UI.csproj"></ProjectReference>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Aspire/Aspire.AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
.WithManagementPlugin()
.WithLifetime(ContainerLifetime.Persistent);

builder.AddProject<Projects.Server_Ui>("cats")
builder.AddProject<Projects.Server_UI>("cats")
.WithReference(catsDb)
.WithReference(rabbit)
.WaitFor(sql);
Expand Down
10 changes: 5 additions & 5 deletions src/Domain/Common/Enums/ActivityDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static IEnumerable<ActivityDefinition> GetActivitiesForLocation(LocationT
public static readonly ActivityDefinition VolunteeringWorkExperienceCustody = new("Volunteering / Work Experience Custody", 53, DeliveryLocationType.Custody, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.VolunteeringWorkExperience, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition WellbeingCustody = new("Wellbeing", 54, DeliveryLocationType.Custody, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.Wellbeing, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AccessingHealthSupportWiderCommunity = new("Accessing Health Support Wider Community", 55, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.AccessingHealthSupport, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AddictioWiderCommunity = new("Addiction Wider Community", 56, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.Addiction, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AddictionWiderCommunity = new("Addiction Wider Community", 56, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.Addiction, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AngerManagementSupportWiderCommunity = new("Anger Management Support Wider Community", 57, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.AngerManagementSupport, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition ApplicationsJobsWiderCommunity = new("Applications (Jobs) Wider Community", 58, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.ApplicationsJobs, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AssessmentofLiteracyandNumeracySkillsWiderCommunity = new("Assessment of Literacy and Numeracy Skills Wider Community", 59, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.AssessmentOfLiteracyAndNumeracySkills, ExpectedClaims.One);
Expand Down Expand Up @@ -141,9 +141,9 @@ public static IEnumerable<ActivityDefinition> GetActivitiesForLocation(LocationT
public static readonly ActivityDefinition VictimAwarenessWiderCommunity = new("Victim Awareness Wider Community", 105, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.VictimAwareness, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition VolunteeringWorkExperienceWiderCommunity = new("Volunteering / Work Experience Wider Community", 106, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.VolunteeringWorkExperience, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition WellbeingWiderCommunity = new("Wellbeing Wider Community", 107, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.Wellbeing, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AccessingHealthSupport = new("Accessing Health Support Hub", 108, DeliveryLocationType.Hub, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.AccessingHealthSupport, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition Addiction = new("Addiction Hub", 109, DeliveryLocationType.Hub, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.Addiction, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AngerManagementSupport = new("Anger Management Support Hub", 110, DeliveryLocationType.Hub, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.AngerManagementSupport, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AccessingHealthSupportHub = new("Accessing Health Support Hub", 108, DeliveryLocationType.Hub, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.AccessingHealthSupport, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AddictionHub = new("Addiction Hub", 109, DeliveryLocationType.Hub, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.Addiction, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AngerManagementSupportHub = new("Anger Management Support Hub", 110, DeliveryLocationType.Hub, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.AngerManagementSupport, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition ApplicationsJobsHub = new("Applications (Jobs) Hub", 111, DeliveryLocationType.Hub, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.ApplicationsJobs, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AssessmentofLiteracyandNumeracySkillsHub = new("Assessment of Literacy and Numeracy Skills Hub", 112, DeliveryLocationType.Hub, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.AssessmentOfLiteracyAndNumeracySkills, ExpectedClaims.One);
public static readonly ActivityDefinition AwarenessAndUseOfSocialMediaDigitalPlatformsHub = new("Awareness and use of social media / digital platforms Hub", 113, DeliveryLocationType.Hub, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.AwarenessAndUseOfSocialMediaDigitalPlatforms, ExpectedClaims.MoreThanOne);
Expand Down Expand Up @@ -229,7 +229,7 @@ public static IEnumerable<ActivityDefinition> GetActivitiesForLocation(LocationT
public static readonly ActivityDefinition TherapeuticApproachesforYoungAdultsCustody = new("Therapeutic Approaches for Young Adults Custody", 193, DeliveryLocationType.Custody, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.TherapeuticApproachesForYoungAdults, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition WheretoStartandIntroductiontoEmployabilityCustody = new("Where to Start and Introduction to Employability Custody", 194, DeliveryLocationType.Custody, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.WhereToStartAndIntroductionToEmployability, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition WorkRelatedMentoringInWorkSupportCustody = new("Work-Related Mentoring / In Work Support Custody", 195, DeliveryLocationType.Custody, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.WorkRelatedMentoringInWorkSupport, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AFutureFocuWiderCommunity = new("A Future Focus Wider Community", 196, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.AFutureFocus, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition AFutureFocusWiderCommunity = new("A Future Focus Wider Community", 196, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.AFutureFocus, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition ASenseofaNewandProSocialIdentityWiderCommunity = new("A Sense of a New and Pro-Social Identity Wider Community", 197, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.ASenseOfANewAndProSocialIdentity, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition ArtsandCraftsWiderCommunity = new("Arts and Crafts Wider Community", 198, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.ArtsAndCrafts, ExpectedClaims.MoreThanOne);
public static readonly ActivityDefinition ChangingLivesWiderCommunity = new("Changing Lives Wider Community", 199, DeliveryLocationType.WiderCommunity, ClassificationType.NonISWActivity, ActivityType.SupportWork, ActivityCategory.ChangingLives, ExpectedClaims.MoreThanOne);
Expand Down
22 changes: 17 additions & 5 deletions src/Server.UI/Pages/Payments/Components/ActivityPayments.razor
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
@inherits CatsComponentBase

<MudTable Items="@Payments" Hover="true" Breakpoint="Breakpoint.Sm" Loading="@_loading" LoadingProgressColor="Color.Info">
<MudTable Items="@Payments" Hover="true" Breakpoint="Breakpoint.Sm" Loading="@_loading" LoadingProgressColor="Color.Info"
GroupBy="_groupDefinition"
GroupHeaderStyle="background-color:var(--mud-palette-background-gray)"
GroupFooterClass="mb-4">
<HeaderContent>
<MudTh>Created</MudTh>
<MudTh>Approved</MudTh>
<MudTh>Contract</MudTh>
<MudTh>Participant Id</MudTh>
<MudTh>Location</MudTh>
<MudTh>Type</MudTh>
<MudTh>Category</MudTh>
<MudTh>Activity Type</MudTh>
<MudTh>Payable</MudTh>
</HeaderContent>
<GroupHeaderTemplate>
<MudTh Class="mud-table-cell-custom-group" colspan="8">@context.Key</MudTh>
</GroupHeaderTemplate>
<RowTemplate>
<MudTd DataLabel="Created">@context.CreatedOn</MudTd>
<MudTd DataLabel="Approved">@context.ActivityApproved.ToShortDateString()</MudTd>
<MudTd DataLabel="Contract">@context.Contract</MudTd>
<MudTd DataLabel="Participant Id">@context.ParticipantId</MudTd>
<MudTd DataLabel="Participant Id">@context.Location</MudTd>
<MudTd DataLabel="Participant Id">@context.LocationType</MudTd>
Expand Down Expand Up @@ -52,6 +56,14 @@

private Data[] Payments { get; set; } = [];

private TableGroupDefinition<Data> _groupDefinition = new()
{
GroupName = "Contract",
Indentation = false,
Expandable = true,
Selector = (e) => e.Contract
};

protected override async Task OnInitializedAsync()
{
var unitOfWork = GetNewUnitOfWork();
Expand Down Expand Up @@ -90,8 +102,8 @@
Location = x.Location,
LocationType = x.LocationType,
IneligibilityReason = x.IneligibilityReason
}
)
})
.OrderByDescending(e => e.CreatedOn)
.ToArrayAsync();

_loading = false;
Expand Down
31 changes: 22 additions & 9 deletions src/Server.UI/Pages/Payments/Components/EducationPayments.razor
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
@inherits CatsComponentBase

<MudTable Items="@Payments" Hover="true" Breakpoint="Breakpoint.Sm" Loading="@_loading" LoadingProgressColor="Color.Info">
<MudTable Items="@Payments" Hover="true" Breakpoint="Breakpoint.Sm" Loading="@_loading" LoadingProgressColor="Color.Info"
GroupBy="_groupDefinition"
GroupHeaderStyle="background-color:var(--mud-palette-background-gray)"
GroupFooterClass="mb-4">
<HeaderContent>
<MudTh>Created</MudTh>
<MudTh>Approved</MudTh>
<MudTh>Contract</MudTh>
<MudTh>Participant Id</MudTh>
<MudTh>Location</MudTh>
<MudTh>Type</MudTh>
<MudTh>Payable</MudTh>
</HeaderContent>
<GroupHeaderTemplate>
<MudTh Class="mud-table-cell-custom-group" colspan="6">@context.Key</MudTh>
</GroupHeaderTemplate>
<RowTemplate>
<MudTd DataLabel="Approved">@context.CreatedOn</MudTd>
<MudTd DataLabel="Approved">@context.ActivityApproved.ToShortDateString()</MudTd>
<MudTd DataLabel="Contract">@context.Contract</MudTd>
<MudTd DataLabel="Participant Id">@context.ParticipantId</MudTd>
<MudTd DataLabel="Participant Id">@context.Location</MudTd>
<MudTd DataLabel="Participant Id">@context.LocationType</MudTd>
<MudTd DataLabel="Location">@context.Location</MudTd>
<MudTd DataLabel="Location Type">@context.LocationType</MudTd>
<MudTd DataLabel="Payable">

@if (context.EligibleForPayment)
{
@("Yes")
Expand All @@ -29,7 +34,7 @@
</MudTooltip>
}


</MudTd>
</RowTemplate>
</MudTable>
Expand All @@ -47,6 +52,14 @@

private Data[] Payments { get; set; } = [];

private TableGroupDefinition<Data> _groupDefinition = new()
{
GroupName = "Contract",
Indentation = false,
Expandable = true,
Selector = (e) => e.Contract
};

protected override async Task OnInitializedAsync()
{
var unitOfWork = GetNewUnitOfWork();
Expand Down Expand Up @@ -81,8 +94,8 @@
Location = x.Location,
LocationType = x.LocationType,
IneligibilityReason = x.IneligibilityReason
}
)
})
.OrderByDescending(e => e.CreatedOn)
.ToArrayAsync();

_loading = false;
Expand Down
22 changes: 17 additions & 5 deletions src/Server.UI/Pages/Payments/Components/EmploymentPayments.razor
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
@inherits CatsComponentBase

<MudTable Items="@Payments" Hover="true" Breakpoint="Breakpoint.Sm" Loading="@_loading" LoadingProgressColor="Color.Info">
<MudTable Items="@Payments" Hover="true" Breakpoint="Breakpoint.Sm" Loading="@_loading" LoadingProgressColor="Color.Info"
GroupBy="_groupDefinition"
GroupHeaderStyle="background-color:var(--mud-palette-background-gray)"
GroupFooterClass="mb-4">
<HeaderContent>
<MudTh>Created</MudTh>
<MudTh>Approved</MudTh>
<MudTh>Contract</MudTh>
<MudTh>Participant Id</MudTh>
<MudTh>Payable</MudTh>
</HeaderContent>
<GroupHeaderTemplate>
<MudTh Class="mud-table-cell-custom-group" colspan="4">@context.Key</MudTh>
</GroupHeaderTemplate>
<RowTemplate>
<MudTd DataLabel="Created">@context.CreatedOn</MudTd>
<MudTd DataLabel="Approved">@context.ActivityApproved.ToShortDateString()</MudTd>
<MudTd DataLabel="Contract">@context.Contract</MudTd>
<MudTd DataLabel="Participant Id">@context.ParticipantId</MudTd>
<MudTd DataLabel="Payable">@(context.EligibleForPayment ? "Yes" : "No")</MudTd>
</RowTemplate>
Expand All @@ -30,6 +34,14 @@

private Data[] Payments { get; set; } = [];

private TableGroupDefinition<Data> _groupDefinition = new()
{
GroupName = "Contract",
Indentation = false,
Expandable = true,
Selector = (e) => e.Contract
};

protected override async Task OnInitializedAsync()
{
var unitOfWork = GetNewUnitOfWork();
Expand Down Expand Up @@ -57,8 +69,8 @@
ParticipantId = x.ParticipantId,
EligibleForPayment = x.EligibleForPayment,
Contract = x.Contract
}
)
})
.OrderByDescending(e => e.CreatedOn)
.ToArrayAsync();

_loading = false;
Expand Down
Loading
Loading