Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ testem.log
# System Files
.DS_Store
Thumbs.db

./Claude
CLAUDE.md
16 changes: 10 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cpp.ui.core",
"version": "19.0.5",
"version": "19.0.4-LPT2062.1",
"repository": {
"type": "git",
"url": "https://github.com/hmcts/cpp-ui-core"
Expand Down Expand Up @@ -63,6 +63,7 @@
"@types/ws": "^8.5.4",
"@typescript-eslint/eslint-plugin": "^8.38.0",
"@typescript-eslint/parser": "^8.38.0",
"baseline-browser-mapping": "^2.10.0",
"chalk": "^3.0.0",
"core-js": "^2.5.4",
"eslint": "^8.57.0",
Expand All @@ -77,11 +78,11 @@
"jest-jasmine2": "^29.5.0",
"jest-preset-angular": "^14.5.4",
"lodash-es": "^4.17.21",
"mkdirp": "^3.0.1",
"ng-packagr": "^19.2.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.4",
"pretty-quick": "^3.1.3",
"mkdirp": "^3.0.1",
"request": "^2.88.0",
"rxjs": "^7.8.2",
"rxjs-marbles": "^7.0.1",
Expand Down
19 changes: 10 additions & 9 deletions projects/core/src/http/http-backend.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Inject, Injectable, InjectionToken } from '@angular/core';
import { HttpClient, HttpEvent, HttpHeaders, HttpParams } from '@angular/common/http';
import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { GENERATE_UNIQUE_KEY, GenerateUniqueKeyFn } from './util';

Expand All @@ -21,9 +21,9 @@ export interface GetRequestOptions {

export interface PostRequestOptions {
headers?: HttpHeaders;
observe?: 'body';
observe?: 'response' | 'events' | 'body';
params?: HttpParams;
responseType?: 'events';
responseType?: 'json' | 'text' | 'blob' | 'arraybuffer';
reportProgress?: boolean;
withCredentials?: boolean;
}
Expand Down Expand Up @@ -54,23 +54,24 @@ export class CppHttpBackend {
}

// note that an empty object as the body is required else the content-type will be stripped
post(

post<T extends PostRequestOptions = PostRequestOptions>(
url: string,
requestType?: string,
body: FormData | any | null = {},
options: PostRequestOptions = {}
): Observable<HttpEvent<any>> {
options: T = {} as T
): Observable<any | HttpResponse<any> | HttpEvent<any>> {
let headers = options.headers || new HttpHeaders();
headers = headers.set('Accept', '*/*');

if (requestType) {
headers = headers.set('Content-Type', requestType);
}
return this.http.post(`${this.config.baseUrl}${url}`, body, {
...options,
headers,
observe: 'response',
responseType: 'text'
responseType: 'text',
...options,
headers
});
}
}
8 changes: 8 additions & 0 deletions projects/reference-data/src/reference-data.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,13 @@ export interface SelectedJudiciaryOptions {
withSpecialism?: boolean;
}

export enum Specialism {
MURDER = 'MURDER',
ATTEMPTEDMURDER = 'ATTEMPTED_MURDER',
SEXUALOFFENCE = 'SEXUAL_OFFENCE',
TERRORISM = 'TERRORISM'
}

export interface JudicialMember {
id: string;
cpUserId?: string;
Expand All @@ -444,6 +451,7 @@ export interface JudicialMember {
validFrom?: string;
validTo?: string;
ljaShortName?: string;
specialisms?: Specialism[];
}

export interface SpecialRequirement {
Expand Down
Loading