Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3b1a204
JASPER 526: Expose new document generation endpoint (#436)
JTraill Aug 14, 2025
83cc6e8
JASPER-402: Dashboard - Court Calendar - Date Box (#437)
ronaldo-macapobre Aug 18, 2025
af1ffca
Updates to Openshift Jobs/Scripts (#439)
ronaldo-macapobre Aug 18, 2025
dd65caa
Update CourtCalendarDay to prioritize sorting by location name rather…
ronaldo-macapobre Aug 20, 2025
708719b
build(deps-dev): bump unplugin-vue-components in /web
dependabot[bot] Aug 25, 2025
dfde7d6
build(deps-dev): bump eslint from 9.31.0 to 9.34.0 in /web
dependabot[bot] Aug 25, 2025
3f9bf83
build(deps): bump actions/checkout from 4 to 5 in the all-actions gro…
dependabot[bot] Aug 25, 2025
5219a50
Merge pull request #445 from bcgov/dependabot/npm_and_yarn/web/eslint…
JTraill Aug 25, 2025
f618d40
Merge pull request #443 from bcgov/dependabot/npm_and_yarn/web/unplug…
JTraill Aug 25, 2025
84534a4
Bump Hangfire from 1.8.20 to 1.8.21 (#447)
dependabot[bot] Aug 25, 2025
dc781f9
Bump GdPicture.API from 14.3.10 to 14.3.13
dependabot[bot] Aug 25, 2025
f242825
JASPER-551: Implement a mapping field in JASPER that can be used to d…
ronaldo-macapobre Aug 25, 2025
00124db
feat: ability to view multiple judicial docs in nutrient
JTraill Aug 25, 2025
955ca26
fix: remove duplicate case-details call
JTraill Aug 25, 2025
b284517
build(deps): bump @nutrient-sdk/viewer from 1.5.0 to 1.6.0 in /web
dependabot[bot] Aug 26, 2025
773547e
fix: remove duplicate criminal case-detail call
JTraill Aug 26, 2025
65df19d
Merge pull request #450 from bcgov/open-judicial-docs-in-nutrient
JTraill Aug 26, 2025
ff06b09
Handle Case Detail Error Due to Judicial Binder (#441)
ronaldo-macapobre Aug 26, 2025
e831c7e
Fix missing env variable when syncing updating AWS credentials (#452)
ronaldo-macapobre Aug 26, 2025
f0c3fcd
Remove UserGuid Checking (#454)
ronaldo-macapobre Aug 26, 2025
5336b62
Merge pull request #451 from bcgov/dependabot/npm_and_yarn/web/nutrie…
JTraill Aug 26, 2025
b4b697e
Refactor JudgeSelector to load judges in App component rather inside …
ronaldo-macapobre Aug 27, 2025
3983194
Bump xunit.runner.visualstudio from 3.1.1 to 3.1.4 (#456)
dependabot[bot] Aug 27, 2025
a9b8fc9
Merge pull request #448 from bcgov/dependabot/nuget/api/GdPicture.API…
JTraill Aug 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Building Web codebase
uses: ./.github/workflows/actions/build-api
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-lambdas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Building Lambdas codebase
uses: ./.github/workflows/actions/build-lambdas
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
node-version: [22]
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Building Web codebase
uses: ./.github/workflows/actions/build-web
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
fi

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: tfsec
uses: aquasecurity/tfsec-sarif-action@v0.1.4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Build API codebase
uses: ./.github/workflows/actions/build-api
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Deploy to ${{ env.ENVIRONMENT }}
uses: ./.github/workflows/actions/deploy-app
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Deploy to ${{ env.ENVIRONMENT }}
uses: ./.github/workflows/actions/deploy-app
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Deploy to ${{ env.ENVIRONMENT }}
uses: ./.github/workflows/actions/deploy-app
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
fi

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: tfsec
uses: aquasecurity/tfsec-sarif-action@v0.1.4
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish-lambdas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Get Lambda directories
id: lambdas
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Build Lambdas codebase
uses: ./.github/workflows/actions/build-lambdas
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Deploy to ${{ env.ENVIRONMENT }}
uses: ./.github/workflows/actions/deploy-lambda
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Deploy to ${{ env.ENVIRONMENT }}
uses: ./.github/workflows/actions/deploy-lambda
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Deploy to ${{ env.ENVIRONMENT }}
uses: ./.github/workflows/actions/deploy-lambda
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-openshift-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Log in to the GHCR
uses: docker/login-action@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Building Web codebase
uses: ./.github/workflows/actions/build-web
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Deploy to ${{ env.ENVIRONMENT }}
uses: ./.github/workflows/actions/deploy-app
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Deploy to ${{ env.ENVIRONMENT }}
uses: ./.github/workflows/actions/deploy-app
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Deploy to ${{ env.ENVIRONMENT }}
uses: ./.github/workflows/actions/deploy-app
Expand Down
5 changes: 3 additions & 2 deletions api/Controllers/DashboardController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ public async Task<IActionResult> GetMySchedule(string startDate, string endDate,
/// <param name="startDate">The start date of the schedule.</param>
/// <param name="endDate">The end date of the schedule.</param>
/// <param name="locationIds">List location ids.</param>
/// <param name="judgeId">The override judgeId.</param>
/// <returns>Court calendar</returns>
[HttpGet]
[Route("court-calendar")]
public async Task<IActionResult> GetCourtCalendar(string startDate, string endDate, string locationIds = "")
public async Task<IActionResult> GetCourtCalendar(string startDate, string endDate, string locationIds = "", int? judgeId = null)
{
var ids = string.IsNullOrWhiteSpace(locationIds) ? this.User.JudgeHomeLocationId().ToString() : locationIds;

var result = await _dashboardService.GetCourtCalendarScheduleAsync(ids, startDate, endDate);
var result = await _dashboardService.GetCourtCalendarScheduleAsync(this.User.JudgeId(judgeId), ids, startDate, endDate);

if (!result.Succeeded)
{
Expand Down
27 changes: 27 additions & 0 deletions api/Controllers/FilesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
using Scv.Api.Models.Civil.Detail;
using Scv.Api.Models.Criminal.Detail;
using Scv.Api.Models.Search;
using Scv.Api.Models.Document;
using Scv.Api.Services.Files;
using CivilAppearanceDetail = Scv.Api.Models.Civil.AppearanceDetail.CivilAppearanceDetail;
using CriminalAppearanceDetail = Scv.Api.Models.Criminal.AppearanceDetail.CriminalAppearanceDetail;
using Scv.Api.Documents;

namespace Scv.Api.Controllers
{
Expand All @@ -34,6 +36,7 @@ namespace Scv.Api.Controllers
public class FilesController(
IConfiguration configuration,
ILogger<FilesController> logger,
IDocumentMerger documentMerger,
FilesService filesService,
VcCivilFileAccessHandler vcCivilFileAccessHandler,
IHttpContextAccessor httpContextAccessor) : ControllerBase
Expand All @@ -42,6 +45,7 @@ public class FilesController(

private readonly IConfiguration _configuration = configuration;
private readonly ILogger<FilesController> _logger = logger;
private readonly IDocumentMerger _documentMerger = documentMerger;
private readonly FilesService _filesService = filesService;
private readonly CivilFilesService _civilFilesService = filesService.Civil;
private readonly CriminalFilesService _criminalFilesService = filesService.Criminal;
Expand Down Expand Up @@ -343,6 +347,29 @@ public async Task<IActionResult> GetDocument(string documentId, string fileNameA
return File(documentResponse.Stream, "application/pdf");
}

/// <summary>
/// Generates a singular PDF document based off the relevant request data.
/// </summary>
/// <param name="documentRequests">An array of <see cref="PdfDocumentRequest"/> objects representing the documents to display in a single PDF.</param>
/// <returns>
/// An <see cref="IActionResult"/> containing the result of the merge operation.
/// </returns>
/// <remarks>
/// This endpoint accepts a POST request to "document/generate-pdf" and returns the a singular PDF document.
/// </remarks>
[HttpPost]
[Route("document/generate-pdf")]
public async Task<IActionResult> GeneratePdf(PdfDocumentRequest[] documentRequests)
{
if (documentRequests.Length == 0)
{
return BadRequest("No documents were provided for generation.");
}
var result = await _documentMerger.MergeDocuments(documentRequests);
return Ok(result);
}


[HttpPost]
[Route("archive")]
public async Task<IActionResult> GetArchive(ArchiveRequest archiveRequest)
Expand Down
2 changes: 1 addition & 1 deletion api/Documents/Strategies/FileStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public async Task<MemoryStream> Invoke(PdfDocumentRequestDetails documentRequest
{
var documentResponseStreamCopy = new MemoryStream();
var documentId = Encoding.UTF8.GetString(WebEncoders.Base64UrlDecode(documentRequest.DocumentId));
var documentResponse = await _filesService.DocumentAsync(documentId, true, documentRequest.FileId, documentRequest.CorrelationId);
var documentResponse = await _filesService.DocumentAsync(documentId, documentRequest.IsCriminal, documentRequest.FileId, documentRequest.CorrelationId);
await documentResponse.Stream.CopyToAsync(documentResponseStreamCopy);

return documentResponseStreamCopy;
Expand Down
4 changes: 3 additions & 1 deletion api/Helpers/ClaimsTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class CustomClaimTypes
public const string UserId = nameof(CustomClaimTypes) + nameof(UserId);
public const string JudgeId = nameof(CustomClaimTypes) + nameof(JudgeId);
public const string JudgeHomeLocationId = nameof(CustomClaimTypes) + nameof(JudgeHomeLocationId);
public const string UserGuid = "idir_user_guid";

public static readonly List<string> UsedKeycloakClaimTypes =
[
Expand All @@ -27,7 +28,8 @@ public class CustomClaimTypes
"name",
"preferred_username",
"groups",
ClaimTypes.Email
ClaimTypes.Email,
UserGuid
];
}
}
3 changes: 3 additions & 0 deletions api/Helpers/Extensions/ClaimsPrincipalExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,8 @@ public static int JudgeHomeLocationId(this ClaimsPrincipal claimsPrincipal)

public static bool CanViewOthersSchedule(this ClaimsPrincipal claimsPrincipal)
=> claimsPrincipal.HasClaim(c => c.Type == CustomClaimTypes.Groups && c.Value == "jasper-view-others-schedule");

public static string UserGuid(this ClaimsPrincipal claimsPrincipal) =>
claimsPrincipal.FindFirstValue(CustomClaimTypes.UserGuid);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ await cookieCtx.HttpContext.SignOutAsync(CookieAuthenticationDefaults
options.SaveTokens = true;
options.CallbackPath = "/api/auth/signin-oidc";
options.Scope.Add("groups");
options.Scope.Add("vc_authn");
options.Events = new OpenIdConnectEvents
{
OnTicketReceived = context =>
Expand Down Expand Up @@ -190,6 +189,7 @@ await cookieCtx.HttpContext.SignOutAsync(CookieAuthenticationDefaults
var userDto = await userService.GetWithPermissionsAsync(context.Principal.Email());
if (userDto != null)
{
// UserId's value refers to the id in the User collection from MongoDb.
claims.Add(new Claim(CustomClaimTypes.UserId, userDto.Id));

var permissionsClaims = userDto.Permissions.Select(p => new Claim(CustomClaimTypes.Permission, p));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ protected override Task HandleRequirementAsync(AuthorizationHandlerContext conte
return Task.CompletedTask;
}

if (user.IsIdirUser() && (user.Groups().Contains("court-viewer-supreme") || user.Groups().Contains("court-viewer-provincial")))
// Authenticated user must belong to specific groups
if (user.Groups().Contains("court-viewer-supreme") || user.Groups().Contains("court-viewer-provincial"))
{
context.Succeed(requirement);
return Task.CompletedTask;
Expand Down Expand Up @@ -57,7 +58,7 @@ protected override Task HandleRequirementAsync(AuthorizationHandlerContext conte
return Task.CompletedTask;
}
if (isAuthController && actionDescriptor.ActionName == nameof(AuthController.UserInfo))
{
{
context.Succeed(requirement);
return Task.CompletedTask;
}
Expand Down
3 changes: 3 additions & 0 deletions api/Models/Calendar/CalendarDayActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@ public class CalendarDayActivity
public int FilesCount { get; set; }
public int ContinuationsCount { get; set; }
public int JudgeId { get; set; }
public string JudgeInitials { get; set; }
public bool IsJudgeAway { get; set; }
public bool IsJudgeBorrowed { get; set; }
public List<AdjudicatorRestriction> Restrictions { get; set; } = [];
}
6 changes: 1 addition & 5 deletions api/Models/Document/PdfDocumentDetailsRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ public class PdfDocumentRequestDetails
public string ProfSeqNo { get; set; }
public string CourtLevelCd { get; set; }
public string CourtClassCd { get; set; }
public string RequestAgencyIdentifierId { get; set; }
public string RequestPartId { get; set; }
public string ApplicationCd { get; set; }
public string AppearanceId { get; set; }
public string ReportName { get; set; }
public string DocumentId { get; set; }
public string CourtDivisionCd { get; set; }
public string FileId { get; set; }
public bool Flatten { get; set; }
public bool IsCriminal { get; set; }
public string CorrelationId { get; set; }
public DateTime? Date { get; set; }
public int? LocationId { get; set; }
Expand Down
Loading
Loading