Skip to content

JASPER-402: Dashboard - Court Calendar - Date Box#437

Merged
ronaldo-macapobre merged 7 commits intomasterfrom
feature/JASPER-402
Aug 18, 2025
Merged

JASPER-402: Dashboard - Court Calendar - Date Box#437
ronaldo-macapobre merged 7 commits intomasterfrom
feature/JASPER-402

Conversation

@ronaldo-macapobre
Copy link
Contributor

@ronaldo-macapobre ronaldo-macapobre commented Aug 15, 2025

Pull Request for JIRA Ticket: JASPER-402

Issue ticket number and link

https://jira.justice.gov.bc.ca/browse/JASPER-402

Description

Updates to show Court Calendar details per day. Data has been sorted in the backend to avoid further logic in the frontend.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Local testing

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screen Grabs

JASPER-402.mp4

Ronaldo Macapobre added 4 commits August 12, 2025 01:26
- Adjust backend to return judge id and initials
- add unit test
- CourtCalendarDay implementation to render court calendar details
@ronaldo-macapobre ronaldo-macapobre self-assigned this Aug 15, 2025
@ronaldo-macapobre ronaldo-macapobre added enhancement New feature or request javascript Pull requests that update Javascript code .NET Pull requests that update .net code labels Aug 15, 2025
@ronaldo-macapobre ronaldo-macapobre marked this pull request as ready for review August 15, 2025 00:54
{
Date = c.Key.Date,
IsWeekend = c.Key.IsWeekend,
ShowCourtList = c.Key.ShowCourtList,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just want to confirm that ShowCourtList can be ignored now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, ShowCourtList is not relevant to Court Calendar and can be removed.

a.JudgeInitials = calendar.RotaInitials;
// True when currently logged on judge is away from home location
a.IsJudgeAway = judgeId.HasValue
&& judgeId.GetValueOrDefault() == calendar.Id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: it looks like you've already checked if judgeId has a value, so I don't think getvalueordefault is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a valid point. I will reflect the recommended changes.

var result = KeyDocumentResolver.GetCriminalKeyDocuments(documents);

Assert.Null(result);
Assert.Empty(result);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, I don't see any other changes to document resolution in this PR - why is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was failing when I create my feature branch from master branch. I just fixed it so that it passed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, interesting, is it possible to merge code with test failures into the master branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the backend, yes. This is due to the existing failing unit tests that came with scv code. We haven't prioritized fixing those yet.

return activityClassDescription.trim().replace(/\s+/g, '-').toLowerCase();
};

const groupedData = computed<[string, [string, CalendarDayActivity[]][]][]>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a common pattern in vue to nest tuples in arrays like this? I'm more used to nested objects with embedded arrays.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really a common pattern and just wanted to avoid creating more objects for this particular component only. We are getting a flat list of CalendarDayActivity array and each activity needs to be structured in a way that it would be easier for the template to render.

The idea is to group them by Location and JudgeInitials.

Image

@sonarqubecloud
Copy link

@ronaldo-macapobre ronaldo-macapobre merged commit 83cc6e8 into master Aug 18, 2025
9 checks passed
@ronaldo-macapobre ronaldo-macapobre deleted the feature/JASPER-402 branch August 18, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request javascript Pull requests that update Javascript code .NET Pull requests that update .net code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants