Skip to content
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

Hearings Post Go Live 1.2 v3 #3201

Merged
merged 371 commits into from
Nov 29, 2023
Merged

Conversation

johnbenjamin-hmcts and others added 30 commits March 6, 2023 10:43
…ing-error-when-participants-are-not-confirmed

EUI-7916 Hearing Actuals getting error when participants are not confirmed
…own-error-when-confirming-time-and-participants

EUI-7922 Hearing Actuals unknown error when confirming time and participants
…6-Hearings-CIVIL-Integration-initial-request
…6-Hearings-CIVIL-Integration-initial-request
…play-by-case-type-basis

EUI-6798 Hearings tab display by case type basis
…ntegration-initial-request

EUI-7896 Hearings Civil integration initial request
@udaydenduluri33 udaydenduluri33 dismissed stale reviews from andywilkinshmcts and themself via 0873d27 November 28, 2023 10:23
* Update labels for future hearings to "FUTURE HEARING DAY" and hide all change/update links for future hearing days

* Fix minor styling issue

* Add units test for hearingIsInFuture

* Fix linting errors
@udaydenduluri33 udaydenduluri33 merged commit 36ac810 into master Nov 29, 2023
3 checks passed
@udaydenduluri33 udaydenduluri33 deleted the feature/Hearings-Post-Go-Live-1.2-v3 branch November 29, 2023 11:41
Copy link
Contributor

@Daniel-Lam Daniel-Lam left a comment

Choose a reason for hiding this comment

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

@johnbenjamin-hmcts - some comments to address, thanks

}

Copy link
Contributor

Choose a reason for hiding this comment

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

@johnbenjamin-hmcts - really minor one, extra whitespace here...?

@@ -26,14 +26,15 @@ import { LovRefDataModel } from '../../../hearings/models/lovRefData.model';
import { LovRefDataService } from '../../../hearings/services/lov-ref-data.service';
import * as fromHearingStore from '../../../hearings/store';
import { CaseHearingsComponent } from './case-hearings.component';
import { SessionStorageService } from '../../../app/services';
Copy link
Contributor

Choose a reason for hiding this comment

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

@johnbenjamin-hmcts - please check ordering of imports

@@ -22,6 +21,7 @@ import {
import { LovRefDataModel } from '../../../hearings/models/lovRefData.model';
import { LovRefDataService } from '../../../hearings/services/lov-ref-data.service';
import * as fromHearingStore from '../../../hearings/store';
import { SessionStorageService } from '../../../app/services';
Copy link
Contributor

Choose a reason for hiding this comment

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

@johnbenjamin-hmcts - please check ordering of imports

const detailsStr = this.sessionSvc.getItem('userDetails');
if (detailsStr) {
const details = JSON.parse(detailsStr) as object;
if (details && details.hasOwnProperty('roles')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@johnbenjamin-hmcts - can be rewritten with optional chaining, i.e. details?.hasOwnProperty('roles')

return featureVariation.roles ? userRoles.some((userRole) =>
featureVariation.roles.some((role) => role === userRole)) : false;
public static hasMatchedJurisdictionAndCaseType(featureVariation: FeatureVariation, jurisdictionId: string, caseType: string): boolean {
if (featureVariation.jurisdiction === jurisdictionId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@johnbenjamin-hmcts - given the function returns either true or false, I think you could rewrite this using a ternary statement. Also, the optional check (i.e. ?) on Line 62 is somewhat redundant because Line 61 assumes featureVariation is truthy

} else {
this.mutablePartyRoles.push(role);
}
this.mutablePartyRoles.push(role);
Copy link
Contributor

Choose a reason for hiding this comment

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

@johnbenjamin-hmcts - is mutablePartyRoles guaranteed to be truthy at this point?

@@ -0,0 +1,114 @@
import { cold } from 'jasmine-marbles';
Copy link
Contributor

Choose a reason for hiding this comment

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

@johnbenjamin-hmcts - please check import ordering

@@ -0,0 +1,28 @@
import * as _ from 'lodash';
Copy link
Contributor

Choose a reason for hiding this comment

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

@johnbenjamin-hmcts - please check import ordering

}
};

it('should update hearing request', inject([HttpTestingController, HearingsService], (httpMock: HttpTestingController, service: HearingsService) => {
service.updateHearingRequest(payload).subscribe((response) => {
console.log('RESPONSE', JSON.stringify(response));
Copy link
Contributor

Choose a reason for hiding this comment

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

@johnbenjamin-hmcts - can remove console.log statements

@@ -220,4 +222,52 @@ describe('ValidatorsUtils', () => {
const result = service.validateDuplicateEntries(1, 'Duplicate entry')(evaluatedForm);
expect(result.hasOwnProperty('duplicateEntries')).toBeTruthy();
}));

it('should return HearingWindowModel NULL when hearingWidnow is an empty object', inject([ValidatorsUtils], (service: ValidatorsUtils) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

@johnbenjamin-hmcts - typo on "hearingWidnow"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.