@hmcts/ccd-case-ui-toolkit 7.0.11-manual-caseflag-lang → 7.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/shared/components/palette/case-flag/write-case-flag-field.component.mjs +26 -30
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +27 -31
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +25 -29
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -11788,7 +11788,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteComponent {
|
|
|
11788
11788
|
// Extract all flags-related data from the CaseEventTrigger object in the snapshot data
|
|
11789
11789
|
if (this.route.snapshot.data.eventTrigger) {
|
|
11790
11790
|
// Get the HMCTSServiceId from supplementary data, if it exists (required for retrieving the available flag types in
|
|
11791
|
-
// the first instance, only falling back on case type ID or
|
|
11791
|
+
// the first instance, only falling back on case type ID or jurisidiction if it's not present)
|
|
11792
11792
|
if (this.route.snapshot.data.eventTrigger.supplementary_data
|
|
11793
11793
|
&& this.route.snapshot.data.eventTrigger.supplementary_data.HMCTSServiceId) {
|
|
11794
11794
|
this.hmctsServiceId = this.route.snapshot.data.eventTrigger.supplementary_data.HMCTSServiceId;
|
|
@@ -12129,36 +12129,32 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteComponent {
|
|
|
12129
12129
|
this.flagCommentsOptional = true;
|
|
12130
12130
|
}
|
|
12131
12131
|
populateNewFlagDetailInstance() {
|
|
12132
|
-
const langSearchTerm = this.caseFlagParentFormGroup?.value['languageSearchTerm'];
|
|
12133
|
-
const manualLangEntry = this.caseFlagParentFormGroup?.value['manualLanguageEntry'];
|
|
12134
|
-
const flagType = this.caseFlagParentFormGroup?.value['flagType'];
|
|
12135
|
-
const otherDesc = this.caseFlagParentFormGroup?.value['otherDescription'];
|
|
12136
12132
|
const formValues = this.caseFlagParentFormGroup?.value;
|
|
12137
12133
|
return {
|
|
12138
|
-
name:
|
|
12139
|
-
name_cy: flagType?.name_cy,
|
|
12134
|
+
name: formValues?.flagType?.name,
|
|
12135
|
+
name_cy: formValues?.flagType?.name_cy,
|
|
12140
12136
|
// Currently, subTypeValue, subTypeValue_cy and subTypeKey are applicable only to language flag types
|
|
12141
|
-
subTypeValue:
|
|
12142
|
-
?
|
|
12143
|
-
:
|
|
12144
|
-
?
|
|
12137
|
+
subTypeValue: formValues?.languageSearchTerm && this.rpxTranslationService.language === 'en'
|
|
12138
|
+
? formValues?.languageSearchTerm.value
|
|
12139
|
+
: formValues?.manualLanguageEntry && this.rpxTranslationService.language === 'en'
|
|
12140
|
+
? formValues?.manualLanguageEntry
|
|
12145
12141
|
: null,
|
|
12146
|
-
subTypeValue_cy:
|
|
12147
|
-
?
|
|
12148
|
-
:
|
|
12149
|
-
?
|
|
12142
|
+
subTypeValue_cy: formValues?.languageSearchTerm && this.rpxTranslationService.language === 'cy'
|
|
12143
|
+
? formValues?.languageSearchTerm.value_cy
|
|
12144
|
+
: formValues?.manualLanguageEntry && this.rpxTranslationService.language === 'cy'
|
|
12145
|
+
? formValues?.manualLanguageEntry
|
|
12150
12146
|
: null,
|
|
12151
12147
|
// For user-entered (i.e. non-Reference Data) languages, there is no key
|
|
12152
|
-
subTypeKey:
|
|
12153
|
-
?
|
|
12148
|
+
subTypeKey: formValues?.languageSearchTerm
|
|
12149
|
+
? formValues?.languageSearchTerm.key
|
|
12154
12150
|
: null,
|
|
12155
|
-
otherDescription: flagType?.flagCode === this.otherFlagTypeCode &&
|
|
12156
|
-
|
|
12157
|
-
?
|
|
12151
|
+
otherDescription: formValues?.flagType?.flagCode === this.otherFlagTypeCode &&
|
|
12152
|
+
formValues?.otherDescription && this.rpxTranslationService.language === 'en'
|
|
12153
|
+
? formValues?.otherDescription
|
|
12158
12154
|
: null,
|
|
12159
|
-
otherDescription_cy: flagType?.flagCode === this.otherFlagTypeCode &&
|
|
12160
|
-
|
|
12161
|
-
?
|
|
12155
|
+
otherDescription_cy: formValues?.flagType?.flagCode === this.otherFlagTypeCode &&
|
|
12156
|
+
formValues?.otherDescription && this.rpxTranslationService.language === 'cy'
|
|
12157
|
+
? formValues?.otherDescription
|
|
12162
12158
|
: null,
|
|
12163
12159
|
flagComment: this.rpxTranslationService.language === 'en'
|
|
12164
12160
|
? formValues?.flagComments
|
|
@@ -12168,18 +12164,18 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteComponent {
|
|
|
12168
12164
|
: null,
|
|
12169
12165
|
flagUpdateComment: formValues?.statusReason,
|
|
12170
12166
|
dateTimeCreated: new Date().toISOString(),
|
|
12171
|
-
path: flagType?.Path &&
|
|
12172
|
-
flagType?.Path.map(pathValue => Object.assign({ id: null, value: pathValue })),
|
|
12173
|
-
hearingRelevant: flagType?.hearingRelevant ? 'Yes' : 'No',
|
|
12174
|
-
flagCode: flagType?.flagCode,
|
|
12167
|
+
path: formValues?.flagType?.Path &&
|
|
12168
|
+
formValues?.flagType?.Path.map(pathValue => Object.assign({ id: null, value: pathValue })),
|
|
12169
|
+
hearingRelevant: formValues?.flagType?.hearingRelevant ? 'Yes' : 'No',
|
|
12170
|
+
flagCode: formValues?.flagType?.flagCode,
|
|
12175
12171
|
// Status should be set to whatever the default is for this flag type, if flag is being created by an external
|
|
12176
12172
|
// user, otherwise it should be set to "Active" if Case Flags v2.1 is NOT enabled, or the selected status if it is
|
|
12177
12173
|
status: this.isDisplayContextParameterExternal
|
|
12178
|
-
? flagType?.defaultStatus
|
|
12174
|
+
? formValues?.flagType?.defaultStatus
|
|
12179
12175
|
: !this.isDisplayContextParameter2Point1Enabled
|
|
12180
12176
|
? CaseFlagStatus.ACTIVE
|
|
12181
12177
|
: CaseFlagStatus[formValues?.selectedStatus],
|
|
12182
|
-
availableExternally: flagType?.externallyAvailable ? 'Yes' : 'No'
|
|
12178
|
+
availableExternally: formValues?.flagType?.externallyAvailable ? 'Yes' : 'No'
|
|
12183
12179
|
};
|
|
12184
12180
|
}
|
|
12185
12181
|
moveToFinalReviewStage() {
|