Skip to content

Commit

Permalink
Chore/update release with master (#1655)
Browse files Browse the repository at this point in the history
* EUI-6645 Restricted case acceess

* EUI-6645 Restricted case acceess

* EUI-6645 Restricted case access

* update version

* install

* Add translation package

* update version

* Update package

* yarn install

* Update package

* Merge from master

* Merge from master

* Merge from master

* Merge from master

* Merge from master

* EUI-8816 Restricted Case Access - Feature toggle for deployment to Production

* EUI-8816 Restricted Case Access - Feature toggle for deployment to Production

* EUI-8816 Restricted Case Access - Feature toggle for deployment to Production

* Update package version

* version update after merge from base branch

* EUI-8816 Restricted case access feature toggle functionality

* Upgrade to Node-18 and NG-15 (#1550)

* kick-off node 18 upgrade

* use pay component at local

* ng update @angular/core@12 @angular/cli@12 --force

* ng update @angular/material@12 --force

* ng update @angular/core@13 @angular/cli@13 --force

* ng update @angular/material@13 --force

* ng update @angular/core@14 @angular/cli@14 --force

* cdk 14

* ts version

* upgraes for fix

* upgrade rpx-xui-translation

* upgrade yargs-parser

* upgrade cli to 15

* fix damn ng breakdown

* ng update @angular/material@14 --force

* ng update @angular/core@15 @angular/cli@15 --force

* ng update @angular/material@15 --force

* correct compilation errors after upgrades

* ignore angular cache

* set new major version

* add yarn release file

* comment out broken lint task

* temporarily use ccpay-component from local

* fix tests

* fix tests

* upgrade to media viewer pre-release

* update version tag

* delete local ccpay dist folder

* use ccpay component prerelease

* skip the tasks (to be fixed later on)

* remove steps to unblock pre-release

* use node 14 for release

* Code tide

* package json update

* fix update package.json file and code tidy

* fix update package.json file

* fix update package.json file and code tidy

* package.json file update

* Using legacy angular material

* package.json version update

* fix: EXUI-787 - Fixed lint srcipt, lint issues, code issue. Code tidy

* updated codebase

* fix: EXUI-790	unit test now working; EXUI-996- Fixed dateTime Picker; Fix issue probate buttons - cancel and continue button

* package.json updated

* Update typography.scss

* Version update

* Update npmpublish.yml

* update polling service inline with sonarcloud - Security Hotspot

* code tidy

* added updated fork version of rx-polling library

* fix - EXUI-996 - fix issue with incorrect date formate

* App version updated and code tidy

* Update RELEASE-NOTES.md

* version update

* Update case-file-view-folder.component.ts

* Vesion update

* update test and karma config

* Update karma.conf.js

* Update case-file-view-folder-selector.component.spec.ts

* ccpay-web-component version updated

* version update

* fix broken functional test and update toolkit version

* version update

* rpx-xui-translation version update - 1.0.1

* @olusegz07 rpx-xui-translation version update - 1.0.2

---------

Co-authored-by: olusegun odunukan <olusegun.odunukan@hmcts.net>
Co-authored-by: Olu <142989683+olusegz07@users.noreply.github.com>

* fix yarn audit issue (#1634)

* fix yarn audit issue

* yarn audit fix

yarn audit fix

* Update RELEASE-NOTES.md

* Fix/ex UI 1151 yarn audit version (#1637)

* fix yarn audit issue

* yarn audit fix

yarn audit fix

* Update RELEASE-NOTES.md

* Version updated

* fix-exui-1175-Complex fields not being unhidden by Show Conditions (#1642)

* fix-exui-1175

* exui-1105-avoid judicial user from hidden

* Defensive coding for HIDDEN_TEMP

* setting display_context as HIDDEN_TEMP

* version updated

* Add util function to check for valid complex types

* version updated

---------

Co-authored-by: Andy Wilkins <andy.wilkins@hmcts.net>

---------

Co-authored-by: John Benjamin <john.benjamin@hmcts.net>
Co-authored-by: David Rajkumar Jayakumar <107850923+DavidJayakumar@users.noreply.github.com>
Co-authored-by: DavidJayakumar <David.Jayakumar@hmcts.net>
Co-authored-by: John Benjamin <90200268+johnbenjamin-hmcts@users.noreply.github.com>
Co-authored-by: codaimaster <55559010+codaimaster@users.noreply.github.com>
Co-authored-by: olusegun odunukan <olusegun.odunukan@hmcts.net>
Co-authored-by: Olu <142989683+olusegz07@users.noreply.github.com>
Co-authored-by: RiteshHMCTS <74713687+RiteshHMCTS@users.noreply.github.com>
Co-authored-by: Andy Wilkins <andy.wilkins@hmcts.net>
  • Loading branch information
10 people authored Jan 16, 2024
1 parent e6f0110 commit e4f6d2e
Show file tree
Hide file tree
Showing 12 changed files with 114 additions and 63 deletions.
5 changes: 4 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## RELEASE NOTES
### Version 7.0.3-case-flags-v2-1-release
**EUI-9048** Re-tag for re-release of Case Flags v2.1, following merge conflict resolution with latest from `master`

### Version 7.0.2-case-flags-v2-1-release-2
**EUI-9061** Fix bug where Welsh description (for flags of type "Other") and Welsh comments fields are shown on the Case Flag Summary (CYA) page when a flag is updated by an external user

Expand Down Expand Up @@ -223,7 +226,7 @@
**EUI-8371** Show details of the selected support being updated when the user is external

### Version 6.10.7-case-flags-v2-hide-event-summary-and-description-on-cya-page-v2
**EUI-8246** Reasonable Adjustments legal rep hide Event Summary and Event Description section on CYA page
**EUI-8286** Reasonable Adjustments legal rep hide Event Summary and Event Description section on CYA page

### Version 6.10.7-case-flags-v2-view-case-flags-ui-amendments-v2
**EUI-8069** Fix Case Flags table display to show selected language for "Language Interpreter" flag types (ported from Case Flags v1)
Expand Down
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.2-case-flags-v2-1-release-2",
"version": "7.0.3-case-flags-v2-1-release",
"engines": {
"node": ">=18.17.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.2-case-flags-v2-1-release-2",
"version": "7.0.3-case-flags-v2-1-release",
"engines": {
"node": ">=18.17.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,6 @@ describe('WizardPageFieldToCaseFieldMapper - nested Collection of Collection typ

expect(timelineEventDate.hidden).toEqual(true);
expect(timelineEventDescription.hidden).toEqual(true);
expect(timelineEventDescription.display_context).toEqual('HIDDEN');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ export class WizardPageFieldToCaseFieldMapper {

if (childrenCaseFields.length > 0 && this.allCaseFieldsHidden(childrenCaseFields)) {
caseField.hidden = true;
caseField.display_context = 'HIDDEN';
// marking display_context as special hidden so field not being deleted in event submission
caseField.display_context = 'HIDDEN_TEMP';
}
}

Expand All @@ -123,6 +124,6 @@ export class WizardPageFieldToCaseFieldMapper {
}

private allCaseFieldsHidden(children: CaseField[]): boolean {
return !children.some(e => e.hidden !== true);
return children.every(e => e.display_context === 'HIDDEN' || e.display_context === 'HIDDEN_TEMP');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ export class ReadComplexFieldComponent extends AbstractFieldReadComponent implem
}
});
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ export class ReadFieldsFilterPipe implements PipeTransform {
})
.map(f => {
if (!f.display_context) {
f.display_context = complexField.display_context;
if (FieldsUtils.isValidDisplayContext(complexField.display_context)) {
f.display_context = complexField.display_context;
}
}
if (setupHidden) {
ReadFieldsFilterPipe.evaluateConditionalShow(f, checkConditionalShowAgainst, path, formGroupAvailable, complexField.id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ export class FieldsFilterPipe implements PipeTransform {
.filter(f => keepEmpty || FieldsFilterPipe.keepField(f))
.map(f => {
if (!f.display_context) {
f.display_context = complexField.display_context;
if (FieldsUtils.isValidDisplayContext(complexField.display_context)) {
f.display_context = complexField.display_context;
}
}
return f;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,4 +850,18 @@ describe('FieldsUtils', () => {
);
});
});

describe('isValidDisplayContext() function test', () => {
it('should return false if display context is not one of the 5 allowed values', () => {
expect(FieldsUtils.isValidDisplayContext('BANANA')).toBe(false);
});

it('should return true for each of the 5 allowed values', () => {
expect(FieldsUtils.isValidDisplayContext('OPTIONAL')).toBe(true);
expect(FieldsUtils.isValidDisplayContext('MANDATORY')).toBe(true);
expect(FieldsUtils.isValidDisplayContext('READONLY')).toBe(true);
expect(FieldsUtils.isValidDisplayContext('COMPLEX')).toBe(true);
expect(FieldsUtils.isValidDisplayContext('HIDDEN')).toBe(true);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export class FieldsUtils {
public static readonly SERVER_RESPONSE_FIELD_TYPE_COMPLEX = 'Complex';
public static readonly SERVER_RESPONSE_FIELD_TYPE_DYNAMIC_LIST_TYPE: FieldTypeEnum[] = ['DynamicList', 'DynamicRadioList'];

public static isValidDisplayContext(ctx: string): boolean {
return (ctx === 'MANDATORY' || ctx === 'READONLY'
|| ctx === 'OPTIONAL' || ctx === 'HIDDEN'
|| ctx === 'COMPLEX');
}

public static convertToCaseField(obj: any): CaseField {
if (!(obj instanceof CaseField)) {
return plainToClassFromExist(new CaseField(), obj);
Expand Down Expand Up @@ -514,12 +520,12 @@ export class FieldsUtils {
// These two fields are date-time fields
case 'dateTimeModified':
case 'dateTimeCreated':
return {[k]: detail.value[k] ? new Date(detail.value[k]) : null, id: detail.id};
return { [k]: detail.value[k] ? new Date(detail.value[k]) : null, id: detail.id };
// This field is a "yes/no" field
case 'hearingRelevant':
return detail.value[k].toUpperCase() === 'YES' ? {[k]: true, id: detail.id} : {[k]: false, id: detail.id};
return detail.value[k].toUpperCase() === 'YES' ? { [k]: true, id: detail.id } : { [k]: false, id: detail.id };
default:
return {[k]: detail.value[k], id: detail.id};
return { [k]: detail.value[k], id: detail.id };
}
}));
}) as FlagDetail[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ export class FormValueService {
// Retain anything that is readonly and not a label.
continue;
}
if (field.hidden === true && field.display_context !== 'HIDDEN' && field.id !== 'caseLinks' && !field.retain_hidden_value) {
if (field.hidden === true && field.display_context !== 'HIDDEN' && field.display_context !== 'HIDDEN_TEMP' && field.id !== 'caseLinks' && !field.retain_hidden_value) {
// Delete anything that is hidden (that is NOT readonly), and that
// hasn't had its display_context overridden to make it hidden.
delete data[field.id];
Expand Down
Loading

0 comments on commit e4f6d2e

Please sign in to comment.