-
Notifications
You must be signed in to change notification settings - Fork 2
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
CFODEV-506: CATS-DMS Integration (candidate search) #25
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
f493532
Remove Candidate and Candidate Identifier entities
samgibsonmoj edea8a2
Candidate DOB is required, ensure non-null values
samgibsonmoj 249d4da
Candidate Service
samgibsonmoj 5928d9a
Cleanup unused candidate/search pages
samgibsonmoj a44e910
Amend behaviour tests for new DTO configuration
samgibsonmoj ae740cf
Amends to candidate pages to use new candidates service
samgibsonmoj f0020ab
Show 'more information required' when no results are returned
samgibsonmoj 3f3b5aa
Fix case-sensitivity issue with candidate comparison
samgibsonmoj b7a3107
Revert "Show 'more information required' when no results are returned"
samgibsonmoj 87c82ec
More descriptive messages for enrolments.
samgibsonmoj 98c9d8c
Add internal Nuget feed and required packages.
samgibsonmoj 243ec8d
Add NuGet.config as solution item
samgibsonmoj decbc99
Fleshed out Candidates Dto
samgibsonmoj 66c6001
Dummy Candidates service + DI
samgibsonmoj 39e284e
Modifications from peer review.
carlsixsmith-moj 93df364
Merge branch 'main' into CFODEV-506
carlsixsmith-moj 1135e35
Fix floating semi-colon on page and remove unused project folder
samgibsonmoj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> | ||
<add key="co-financing.org" value="https://packages.co-financing.org/nuget" /> | ||
</packageSources> | ||
</configuration> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Cfo.Cats.Application.Features.Candidates.DTOs; | ||
using Cfo.Cats.Application.Features.Candidates.Queries.Search; | ||
|
||
namespace Cfo.Cats.Application.Common.Interfaces; | ||
|
||
public interface ICandidateService | ||
{ | ||
public Task<IEnumerable<SearchResult>?> SearchAsync(CandidateSearchQuery searchQuery); | ||
public Task<CandidateDto?> GetByUpciAsync(string upci); | ||
} | ||
|
||
public record SearchResult(string Upci, int Precedence); |
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
29 changes: 0 additions & 29 deletions
29
src/Application/Features/Candidates/Queries/Search/CandidateSearchQueryHandler.cs
This file was deleted.
Oops, something went wrong.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be improved by using automapper to switch between commands and DTOs |
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
34 changes: 34 additions & 0 deletions
34
src/Application/Features/Participants/Queries/ExistsById.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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Cfo.Cats.Application.Common.Security; | ||
using Cfo.Cats.Application.Features.Participants.Caching; | ||
using Cfo.Cats.Application.SecurityConstants; | ||
|
||
namespace Cfo.Cats.Application.Features.Participants.Queries; | ||
|
||
public static class CheckParticipantExistsById | ||
{ | ||
[RequestAuthorize(Policy = PolicyNames.AllowEnrol)] | ||
public class Query : ICacheableRequest<bool> | ||
{ | ||
public required string Id { get; set; } | ||
public string CacheKey => ParticipantCacheKey.GetCacheKey($"{Id}"); | ||
public MemoryCacheEntryOptions? Options => ParticipantCacheKey.MemoryCacheEntryOptions; | ||
} | ||
|
||
public class Handler : IRequestHandler<Query, bool> | ||
{ | ||
private readonly IApplicationDbContext _context; | ||
|
||
public Handler(IApplicationDbContext context) | ||
{ | ||
_context = context; | ||
} | ||
|
||
public async Task<bool> Handle(Query request, CancellationToken cancellationToken) | ||
{ | ||
return await _context.Participants | ||
.AnyAsync(p => p.Id == request.Id, cancellationToken); | ||
} | ||
} | ||
|
||
} | ||
|
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well remembered. I always forget this bit!