Skip to content

Commit

Permalink
passing caseid to mv
Browse files Browse the repository at this point in the history
  • Loading branch information
RiteshHMCTS committed Jul 12, 2024
1 parent e6d2781 commit ffcdb73
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "7.0.46",
"version": "7.0.46-exui-2086-rc1",
"engines": {
"node": ">=18.19.0"
},
Expand Down
2 changes: 1 addition & 1 deletion projects/ccd-case-ui-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "7.0.46",
"version": "7.0.46-exui-2086-rc1",
"engines": {
"node": ">=18.19.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ <h2 class="govuk-heading-l">Case file</h2>
[enableAnnotations]="true"
[enableRedactions]="true"
[height]="'94.5vh'"
[caseId]="caseId"
[enableICP]="isIcpEnabled()">
</mv-media-viewer>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ describe('CaseFileViewFieldComponent', () => {
expect(mockCaseFileViewService.getCategoriesAndDocuments).toHaveBeenCalled();
expect(component.getCategoriesAndDocumentsError).toBe(false);
const nativeElement = fixture.debugElement.nativeElement;
expect(component.caseId).toEqual('1234123412341234');
const errorMessageHeadingElement = nativeElement.querySelector('.govuk-heading-xl');
expect(errorMessageHeadingElement).toBeNull();
const errorMessageBodyElement = nativeElement.querySelector('.govuk-body');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class CaseFileViewFieldComponent implements OnInit, AfterViewInit, OnDest
public caseField: CaseField;
public icp_jurisdictions: string[] = [];
public icpEnabled: boolean = false;
public caseId: string;

constructor(private readonly elementRef: ElementRef,
private readonly route: ActivatedRoute,
Expand All @@ -38,8 +39,8 @@ export class CaseFileViewFieldComponent implements OnInit, AfterViewInit, OnDest
) { }

public ngOnInit(): void {
const cid = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
this.categoriesAndDocuments$ = this.caseFileViewService.getCategoriesAndDocuments(cid);
this.caseId = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
this.categoriesAndDocuments$ = this.caseFileViewService.getCategoriesAndDocuments(this.caseId);
this.categoriesAndDocumentsSubscription = this.categoriesAndDocuments$.subscribe({
next: data => {
this.caseVersion = data.case_version;
Expand Down

0 comments on commit ffcdb73

Please sign in to comment.