-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #880 from cabinetoffice/feature/dp-786-org-name-or…
…-email-change-reapproval-notification DP-786 - Rejected/pending approval flow, and resending support admin approval emails
- Loading branch information
Showing
21 changed files
with
855 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 17 additions & 5 deletions
22
Frontend/CO.CDP.OrganisationApp/Pages/Organisation/OrganisationSelection.cshtml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,36 @@ | ||
using CO.CDP.Tenant.WebApiClient; | ||
using Microsoft.AspNetCore.Mvc; | ||
using CO.CDP.Organisation.WebApiClient; | ||
|
||
namespace CO.CDP.OrganisationApp.Pages.Organisation; | ||
|
||
public class OrganisationSelectionModel( | ||
ITenantClient tenantClient, | ||
IOrganisationClient organisationClient, | ||
ISession session) : LoggedInUserAwareModel(session) | ||
{ | ||
public IList<UserOrganisation> UserOrganisations { get; set; } = []; | ||
public IList<(UserOrganisation Organisation, Review? Review)> UserOrganisations { get; set; } = []; | ||
|
||
public string? Error { get; set; } | ||
|
||
public async Task<IActionResult> OnGet() | ||
{ | ||
var usersTenant = await tenantClient.LookupTenantAsync(); | ||
|
||
usersTenant.Tenants.ToList() | ||
.ForEach(t => t.Organisations.ToList() | ||
.ForEach(o => UserOrganisations.Add(o))); | ||
UserOrganisations = await Task.WhenAll(usersTenant.Tenants | ||
.SelectMany(t => t.Organisations) | ||
.Select(async organisation => | ||
{ | ||
Review? review = null; | ||
if (organisation.PendingRoles.Count > 0) | ||
{ | ||
var reviews = await organisationClient.GetOrganisationReviewsAsync(organisation.Id); | ||
review = reviews?.FirstOrDefault(); | ||
} | ||
|
||
return (organisation, review); | ||
})); | ||
|
||
return Page(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.