Skip to content

Commit

Permalink
RDM-3144 added CaseTypeLite object for cyclic dependency resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarsmango committed Oct 18, 2018
1 parent 85411f2 commit c218717
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 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": "1.2.16",
"version": "1.2.17",
"description": "Case UI Toolkit",
"main": "./dist/index.umd.js",
"module": "./dist/index.js",
Expand Down
12 changes: 12 additions & 0 deletions src/shared/domain/definition/case-type-lite.model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { CaseEvent } from './case-event.model';
import { CaseState } from './case-state.model';

// Light clone of CaseType to be used in Jurisdiction class
// to avoid cyclic dependency
export class CaseTypeLite {
id: string;
name: string;
events: CaseEvent[];
states: CaseState[];
description: string;
}
4 changes: 2 additions & 2 deletions src/shared/domain/definition/jurisdiction.model.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { CaseType } from './case-type.model';
import { CaseTypeLite } from './case-type-lite.model';

export class Jurisdiction {
id: string;
name: string;
description: string;
caseTypes: CaseType[];
caseTypes: CaseTypeLite[];
}

0 comments on commit c218717

Please sign in to comment.