JASPER-402: Dashboard - Court Calendar - Date Box#437
JASPER-402: Dashboard - Court Calendar - Date Box#437ronaldo-macapobre merged 7 commits intomasterfrom
Conversation
- Adjust backend to return judge id and initials
- add unit test
- CourtCalendarDay implementation to render court calendar details
| { | ||
| Date = c.Key.Date, | ||
| IsWeekend = c.Key.IsWeekend, | ||
| ShowCourtList = c.Key.ShowCourtList, |
There was a problem hiding this comment.
just want to confirm that ShowCourtList can be ignored now.
There was a problem hiding this comment.
Yes, ShowCourtList is not relevant to Court Calendar and can be removed.
api/Services/DashboardService.cs
Outdated
| a.JudgeInitials = calendar.RotaInitials; | ||
| // True when currently logged on judge is away from home location | ||
| a.IsJudgeAway = judgeId.HasValue | ||
| && judgeId.GetValueOrDefault() == calendar.Id |
There was a problem hiding this comment.
nitpick: it looks like you've already checked if judgeId has a value, so I don't think getvalueordefault is necessary.
There was a problem hiding this comment.
That is a valid point. I will reflect the recommended changes.
| var result = KeyDocumentResolver.GetCriminalKeyDocuments(documents); | ||
|
|
||
| Assert.Null(result); | ||
| Assert.Empty(result); |
There was a problem hiding this comment.
Curious, I don't see any other changes to document resolution in this PR - why is this necessary?
There was a problem hiding this comment.
This test was failing when I create my feature branch from master branch. I just fixed it so that it passed
There was a problem hiding this comment.
oh, interesting, is it possible to merge code with test failures into the master branch?
There was a problem hiding this comment.
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[]][]][]>( |
There was a problem hiding this comment.
is this a common pattern in vue to nest tuples in arrays like this? I'm more used to nested objects with embedded arrays.
There was a problem hiding this comment.
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.
|



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
How Has This Been Tested?
Checklist:
Screen Grabs
JASPER-402.mp4