@hmcts/ccd-case-ui-toolkit 7.4.21 → 7.4.22-exui-5310-sonar-fixes
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/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +500 -530
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/index.d.ts +17 -17
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -188,13 +188,13 @@ class Profile {
|
|
|
188
188
|
default;
|
|
189
189
|
isSolicitor() {
|
|
190
190
|
if (hasRoles(this)) {
|
|
191
|
-
return this.user.idam.roles.
|
|
191
|
+
return this.user.idam.roles.some(r => r.endsWith('-solicitor'));
|
|
192
192
|
}
|
|
193
193
|
return false;
|
|
194
194
|
}
|
|
195
195
|
isCourtAdmin() {
|
|
196
196
|
if (hasRoles(this)) {
|
|
197
|
-
return this.user.idam.roles.
|
|
197
|
+
return this.user.idam.roles.some(r => r.endsWith('-courtadmin'));
|
|
198
198
|
}
|
|
199
199
|
return false;
|
|
200
200
|
}
|
|
@@ -610,7 +610,7 @@ class HttpErrorService {
|
|
|
610
610
|
}
|
|
611
611
|
let httpError = new HttpError();
|
|
612
612
|
if (error instanceof HttpErrorResponse) {
|
|
613
|
-
if (error.headers?.get(HttpErrorService.CONTENT_TYPE).
|
|
613
|
+
if (error.headers?.get(HttpErrorService.CONTENT_TYPE).includes(HttpErrorService.JSON)) {
|
|
614
614
|
try {
|
|
615
615
|
httpError = HttpError.from(error);
|
|
616
616
|
}
|
|
@@ -1698,7 +1698,7 @@ class TabsComponent {
|
|
|
1698
1698
|
const panels = this.panels.toArray();
|
|
1699
1699
|
id = id || panels[0].id;
|
|
1700
1700
|
/* istanbul ignore else */
|
|
1701
|
-
if (
|
|
1701
|
+
if (!this.panelIds.includes(id)) {
|
|
1702
1702
|
id = panels[0].id;
|
|
1703
1703
|
}
|
|
1704
1704
|
panels.forEach((panel) => panel.selected = id === panel.id);
|
|
@@ -2043,7 +2043,7 @@ class ActivityService {
|
|
|
2043
2043
|
verifyUserIsAuthorized() {
|
|
2044
2044
|
if (this.sessionStorageService.getItem(USER_DETAILS) && this.activityUrl() && this.userAuthorised === undefined) {
|
|
2045
2045
|
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(() => this.userAuthorised = true, error => {
|
|
2046
|
-
this.userAuthorised = [401, 403].
|
|
2046
|
+
this.userAuthorised = ![401, 403].includes(error.status);
|
|
2047
2047
|
});
|
|
2048
2048
|
}
|
|
2049
2049
|
}
|
|
@@ -2689,7 +2689,7 @@ class GreyBarService {
|
|
|
2689
2689
|
this.fieldsToggledToShow = this.fieldsToggledToShow.filter(id => id !== fieldId);
|
|
2690
2690
|
}
|
|
2691
2691
|
wasToggledToShow(fieldId) {
|
|
2692
|
-
return this.fieldsToggledToShow.
|
|
2692
|
+
return this.fieldsToggledToShow.some(id => id === fieldId);
|
|
2693
2693
|
}
|
|
2694
2694
|
reset() {
|
|
2695
2695
|
this.fieldsToggledToShow = [];
|
|
@@ -3119,31 +3119,31 @@ class FormatTranslatorService {
|
|
|
3119
3119
|
}
|
|
3120
3120
|
hasDate(value) {
|
|
3121
3121
|
return this.translate(value).length &&
|
|
3122
|
-
value.toLowerCase().
|
|
3123
|
-
value.
|
|
3122
|
+
value.toLowerCase().includes('d') &&
|
|
3123
|
+
value.includes('M') && value.toLowerCase().includes('y');
|
|
3124
3124
|
}
|
|
3125
3125
|
is24Hour(value) {
|
|
3126
3126
|
return this.translate(value).length &&
|
|
3127
|
-
value.
|
|
3127
|
+
value.includes('H');
|
|
3128
3128
|
}
|
|
3129
3129
|
hasNoDay(value) {
|
|
3130
|
-
return this.translate(value).length && value.toLowerCase().
|
|
3131
|
-
value.
|
|
3130
|
+
return this.translate(value).length && !value.toLowerCase().includes('d') &&
|
|
3131
|
+
value.includes('M') && value.toLowerCase().includes('y');
|
|
3132
3132
|
}
|
|
3133
3133
|
hasNoDayAndMonth(value) {
|
|
3134
3134
|
return this.translate(value).length &&
|
|
3135
|
-
value.toLowerCase().
|
|
3136
|
-
value.
|
|
3137
|
-
value.toLowerCase().
|
|
3135
|
+
!value.toLowerCase().includes('d') &&
|
|
3136
|
+
!value.includes('M') &&
|
|
3137
|
+
value.toLowerCase().includes('y');
|
|
3138
3138
|
}
|
|
3139
3139
|
hasHours(value) {
|
|
3140
|
-
return this.translate(value).length && value.toLowerCase().
|
|
3140
|
+
return this.translate(value).length && value.toLowerCase().includes('h') && !value.includes('m');
|
|
3141
3141
|
}
|
|
3142
3142
|
hasMinutes(value) {
|
|
3143
|
-
return this.translate(value).length && value.
|
|
3143
|
+
return this.translate(value).length && value.includes('m') && value.toLowerCase().includes('h');
|
|
3144
3144
|
}
|
|
3145
3145
|
hasSeconds(value) {
|
|
3146
|
-
return this.translate(value).length && value.toLowerCase().
|
|
3146
|
+
return this.translate(value).length && value.toLowerCase().includes('s');
|
|
3147
3147
|
}
|
|
3148
3148
|
static ɵfac = function FormatTranslatorService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FormatTranslatorService)(); };
|
|
3149
3149
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FormatTranslatorService, factory: FormatTranslatorService.ɵfac });
|
|
@@ -3209,10 +3209,10 @@ class DatePipe {
|
|
|
3209
3209
|
// we could attempt to do something with.
|
|
3210
3210
|
const parsedDate = Date.parse(value);
|
|
3211
3211
|
// We successfully parsed it so let's use it.
|
|
3212
|
-
if (!isNaN(parsedDate)) {
|
|
3212
|
+
if (!Number.isNaN(parsedDate)) {
|
|
3213
3213
|
const d = new Date(parsedDate);
|
|
3214
3214
|
// If what we received didn't include time, don't include it here either.
|
|
3215
|
-
if (value.
|
|
3215
|
+
if (!value.includes(':')) {
|
|
3216
3216
|
const shortDate = d.toLocaleDateString('en-GB');
|
|
3217
3217
|
const shortISO = shortDate.split('/').reverse().join('-');
|
|
3218
3218
|
return this.transform(shortISO, zone, format);
|
|
@@ -3264,7 +3264,7 @@ class DatePipe {
|
|
|
3264
3264
|
return hourNum;
|
|
3265
3265
|
}
|
|
3266
3266
|
toInt(str) {
|
|
3267
|
-
return parseInt(str, 10);
|
|
3267
|
+
return Number.parseInt(str, 10);
|
|
3268
3268
|
}
|
|
3269
3269
|
pad(num, padNum = 2) {
|
|
3270
3270
|
const val = num !== undefined ? num.toString() : '';
|
|
@@ -3406,8 +3406,8 @@ class IsCompoundPipe {
|
|
|
3406
3406
|
if (!field || !field.field_type || !field.field_type.type) {
|
|
3407
3407
|
return false;
|
|
3408
3408
|
}
|
|
3409
|
-
if (IsCompoundPipe.COMPOUND_TYPES.
|
|
3410
|
-
if (IsCompoundPipe.EXCLUDE.
|
|
3409
|
+
if (IsCompoundPipe.COMPOUND_TYPES.includes(field.field_type.type)) {
|
|
3410
|
+
if (IsCompoundPipe.EXCLUDE.includes(field.field_type.id)) {
|
|
3411
3411
|
return false;
|
|
3412
3412
|
}
|
|
3413
3413
|
return true;
|
|
@@ -3950,10 +3950,10 @@ class CaseEventTrigger {
|
|
|
3950
3950
|
end_button_label;
|
|
3951
3951
|
can_save_draft;
|
|
3952
3952
|
hasFields() {
|
|
3953
|
-
return this.case_fields
|
|
3953
|
+
return !!this.case_fields?.length;
|
|
3954
3954
|
}
|
|
3955
3955
|
hasPages() {
|
|
3956
|
-
return this.wizard_pages
|
|
3956
|
+
return !!this.wizard_pages?.length;
|
|
3957
3957
|
}
|
|
3958
3958
|
}
|
|
3959
3959
|
__decorate([
|
|
@@ -4518,7 +4518,7 @@ class FieldsUtils {
|
|
|
4518
4518
|
case 'Complex': {
|
|
4519
4519
|
if (result[field.id] && field.field_type.complex_fields) {
|
|
4520
4520
|
field.field_type.complex_fields.forEach((f) => {
|
|
4521
|
-
if (['Collection', 'Complex', 'MultiSelectList'].
|
|
4521
|
+
if (['Collection', 'Complex', 'MultiSelectList'].includes(f.field_type.type)) {
|
|
4522
4522
|
FieldsUtils.LABEL_MERGE_FUNCTION(f, result[field.id]);
|
|
4523
4523
|
}
|
|
4524
4524
|
});
|
|
@@ -4542,7 +4542,7 @@ class FieldsUtils {
|
|
|
4542
4542
|
case 'Complex': {
|
|
4543
4543
|
if (field.field_type.collection_field_type.complex_fields) {
|
|
4544
4544
|
field.field_type.collection_field_type.complex_fields.forEach((f) => {
|
|
4545
|
-
if (['Collection', 'Complex', 'MultiSelectList'].
|
|
4545
|
+
if (['Collection', 'Complex', 'MultiSelectList'].includes(f.field_type.type)) {
|
|
4546
4546
|
FieldsUtils.LABEL_MERGE_FUNCTION(f, elem.value);
|
|
4547
4547
|
}
|
|
4548
4548
|
});
|
|
@@ -4591,7 +4591,7 @@ class FieldsUtils {
|
|
|
4591
4591
|
if (caseFieldType.type === FieldsUtils.SERVER_RESPONSE_FIELD_TYPE_COMPLEX) {
|
|
4592
4592
|
caseFieldType.complex_fields.forEach(field => {
|
|
4593
4593
|
try {
|
|
4594
|
-
const isDynamicField = FieldsUtils.SERVER_RESPONSE_FIELD_TYPE_DYNAMIC_LIST_TYPE.
|
|
4594
|
+
const isDynamicField = FieldsUtils.SERVER_RESPONSE_FIELD_TYPE_DYNAMIC_LIST_TYPE.includes(field.field_type.type);
|
|
4595
4595
|
if (isDynamicField) {
|
|
4596
4596
|
const dynamicListValue = this.getDynamicListValue(rootCaseField.value, field.id);
|
|
4597
4597
|
if (dynamicListValue) {
|
|
@@ -5930,7 +5930,7 @@ class ConditionParser {
|
|
|
5930
5930
|
}
|
|
5931
5931
|
const validJoinComparators = ['AND', 'OR'];
|
|
5932
5932
|
return conditions.reduce((accumulator, condition, index) => {
|
|
5933
|
-
const isJoinComparator = (comparator) => (typeof comparator === 'string' && validJoinComparators.
|
|
5933
|
+
const isJoinComparator = (comparator) => (typeof comparator === 'string' && validJoinComparators.includes(comparator));
|
|
5934
5934
|
if (isJoinComparator(condition)) {
|
|
5935
5935
|
return accumulator;
|
|
5936
5936
|
}
|
|
@@ -5984,9 +5984,9 @@ class ConditionParser {
|
|
|
5984
5984
|
}
|
|
5985
5985
|
static getField(condition) {
|
|
5986
5986
|
let separator = ShowCondition.CONTAINS;
|
|
5987
|
-
if (condition.
|
|
5987
|
+
if (!condition.includes(ShowCondition.CONTAINS)) {
|
|
5988
5988
|
separator = ShowCondition.CONDITION_EQUALS;
|
|
5989
|
-
if (condition.
|
|
5989
|
+
if (condition.includes(ShowCondition.CONDITION_NOT_EQUALS)) {
|
|
5990
5990
|
separator = ShowCondition.CONDITION_NOT_EQUALS;
|
|
5991
5991
|
}
|
|
5992
5992
|
}
|
|
@@ -6051,13 +6051,11 @@ class ConditionParser {
|
|
|
6051
6051
|
if (tail.length === 0) {
|
|
6052
6052
|
return this.getValue(fields, head);
|
|
6053
6053
|
}
|
|
6054
|
+
else if (FieldsUtils.isArray(fields[head])) {
|
|
6055
|
+
return this.findValueForComplexConditionInArray(fields, head, tail, path);
|
|
6056
|
+
}
|
|
6054
6057
|
else {
|
|
6055
|
-
|
|
6056
|
-
return this.findValueForComplexConditionInArray(fields, head, tail, path);
|
|
6057
|
-
}
|
|
6058
|
-
else {
|
|
6059
|
-
return this.findValueForComplexConditionForPathIfAny(fields, head, tail, path);
|
|
6060
|
-
}
|
|
6058
|
+
return this.findValueForComplexConditionForPathIfAny(fields, head, tail, path);
|
|
6061
6059
|
}
|
|
6062
6060
|
}
|
|
6063
6061
|
static findValueForComplexConditionForPathIfAny(fields, head, tail, path) {
|
|
@@ -6094,7 +6092,7 @@ class ConditionParser {
|
|
|
6094
6092
|
}
|
|
6095
6093
|
}
|
|
6096
6094
|
static removeStarChar(str) {
|
|
6097
|
-
if (str && str.
|
|
6095
|
+
if (str && str.includes('*')) {
|
|
6098
6096
|
return str.substring(0, str.indexOf('*'));
|
|
6099
6097
|
}
|
|
6100
6098
|
return str;
|
|
@@ -6133,16 +6131,14 @@ class ShowCondition {
|
|
|
6133
6131
|
let finalCondition = originalCondition;
|
|
6134
6132
|
if (Array.isArray(formula)) {
|
|
6135
6133
|
formula.forEach(condition => {
|
|
6136
|
-
if (typeof condition === 'string' && this.validJoinComparators.
|
|
6134
|
+
if (typeof condition === 'string' && this.validJoinComparators.includes(condition)) {
|
|
6137
6135
|
// do nothing
|
|
6138
6136
|
}
|
|
6137
|
+
else if (Array.isArray(condition)) {
|
|
6138
|
+
finalCondition = this.processAddPathPrefixToCondition(condition, pathPrefix, finalCondition);
|
|
6139
|
+
}
|
|
6139
6140
|
else {
|
|
6140
|
-
|
|
6141
|
-
finalCondition = this.processAddPathPrefixToCondition(condition, pathPrefix, finalCondition);
|
|
6142
|
-
}
|
|
6143
|
-
else {
|
|
6144
|
-
finalCondition = this.extractConditions(condition, pathPrefix, finalCondition);
|
|
6145
|
-
}
|
|
6141
|
+
finalCondition = this.extractConditions(condition, pathPrefix, finalCondition);
|
|
6146
6142
|
}
|
|
6147
6143
|
});
|
|
6148
6144
|
}
|
|
@@ -6155,16 +6151,14 @@ class ShowCondition {
|
|
|
6155
6151
|
if (condition.fieldReference.startsWith(pathPrefix)) {
|
|
6156
6152
|
return originalCondition;
|
|
6157
6153
|
}
|
|
6158
|
-
else {
|
|
6159
|
-
if (
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
return originalCondition;
|
|
6167
|
-
}
|
|
6154
|
+
else if (originalCondition.includes(condition.fieldReference)) {
|
|
6155
|
+
if (this.processedList && !this.processedList.includes(condition.fieldReference)) {
|
|
6156
|
+
this.processedList.push(condition.fieldReference);
|
|
6157
|
+
const regularExp = new RegExp(`(\\b)${condition.fieldReference}(?=[^"]*(?:"[^"]*"[^"]*)*$)(\\b)`, 'g');
|
|
6158
|
+
return originalCondition.replace(regularExp, `${pathPrefix}.${condition.fieldReference}`);
|
|
6159
|
+
}
|
|
6160
|
+
else {
|
|
6161
|
+
return originalCondition;
|
|
6168
6162
|
}
|
|
6169
6163
|
}
|
|
6170
6164
|
}
|
|
@@ -6179,9 +6173,9 @@ class ShowCondition {
|
|
|
6179
6173
|
}
|
|
6180
6174
|
static getField(condition) {
|
|
6181
6175
|
let separator = ShowCondition.CONTAINS;
|
|
6182
|
-
if (condition.
|
|
6176
|
+
if (!condition.includes(ShowCondition.CONTAINS)) {
|
|
6183
6177
|
separator = ShowCondition.CONDITION_EQUALS;
|
|
6184
|
-
if (condition.
|
|
6178
|
+
if (condition.includes(ShowCondition.CONDITION_NOT_EQUALS)) {
|
|
6185
6179
|
separator = ShowCondition.CONDITION_NOT_EQUALS;
|
|
6186
6180
|
}
|
|
6187
6181
|
}
|
|
@@ -6193,7 +6187,7 @@ class ShowCondition {
|
|
|
6193
6187
|
const newFormula = typeof formula === 'string' ? JSON.parse(formula) : formula;
|
|
6194
6188
|
if (Array.isArray(newFormula)) {
|
|
6195
6189
|
newFormula.forEach(condition => {
|
|
6196
|
-
if (!(typeof condition === 'string' && this.validJoinComparators.
|
|
6190
|
+
if (!(typeof condition === 'string' && this.validJoinComparators.includes(condition))) {
|
|
6197
6191
|
if (Array.isArray(condition)) {
|
|
6198
6192
|
conditionList.push(ShowCondition.getConditions(condition).toString());
|
|
6199
6193
|
}
|
|
@@ -6232,7 +6226,7 @@ class ShowCondition {
|
|
|
6232
6226
|
if (caseField) {
|
|
6233
6227
|
// Jump out if this is HIDDEN or READONLY, regardless of whether or not it's
|
|
6234
6228
|
// complex or a collection - nested fields will "inherit" the display_context.
|
|
6235
|
-
if (['HIDDEN', 'READONLY'].
|
|
6229
|
+
if (['HIDDEN', 'READONLY'].includes(caseField.display_context)) {
|
|
6236
6230
|
break;
|
|
6237
6231
|
}
|
|
6238
6232
|
// Consider what type of field this is.
|
|
@@ -6253,7 +6247,7 @@ class ShowCondition {
|
|
|
6253
6247
|
}
|
|
6254
6248
|
}
|
|
6255
6249
|
if (caseField) {
|
|
6256
|
-
allUnchangeable = allUnchangeable && ['HIDDEN', 'READONLY'].
|
|
6250
|
+
allUnchangeable = allUnchangeable && ['HIDDEN', 'READONLY'].includes(caseField.display_context);
|
|
6257
6251
|
}
|
|
6258
6252
|
}
|
|
6259
6253
|
return allUnchangeable;
|
|
@@ -6519,8 +6513,8 @@ class AbstractFormFieldComponent {
|
|
|
6519
6513
|
return this.addControlToFormGroup(control, parent, replace);
|
|
6520
6514
|
}
|
|
6521
6515
|
addControlToFormArray(control, parent, replace) {
|
|
6522
|
-
const index = parseInt(this.caseField.id, 10);
|
|
6523
|
-
if (replace && !isNaN(index)) {
|
|
6516
|
+
const index = Number.parseInt(this.caseField.id, 10);
|
|
6517
|
+
if (replace && !Number.isNaN(index)) {
|
|
6524
6518
|
parent.setControl(index, control);
|
|
6525
6519
|
}
|
|
6526
6520
|
else {
|
|
@@ -6828,7 +6822,7 @@ class FieldsPurger {
|
|
|
6828
6822
|
retainHiddenValueByFieldType(field, form) {
|
|
6829
6823
|
// so far only applies to the new field type OrganisationPolicy which needs to retain the default case role value
|
|
6830
6824
|
// for other case fields there should be no side effects
|
|
6831
|
-
if (field
|
|
6825
|
+
if (field?.field_type?.id === 'OrganisationPolicy') {
|
|
6832
6826
|
// <bubble_wrap>
|
|
6833
6827
|
// Doing some null checking to stop it from falling over.
|
|
6834
6828
|
const data = form.get('data');
|
|
@@ -7173,13 +7167,13 @@ class FieldTypeSanitiser {
|
|
|
7173
7167
|
});
|
|
7174
7168
|
}
|
|
7175
7169
|
isDynamicList(fieldType) {
|
|
7176
|
-
return FieldTypeSanitiser.DYNAMIC_LIST_TYPE.
|
|
7170
|
+
return FieldTypeSanitiser.DYNAMIC_LIST_TYPE.includes(fieldType);
|
|
7177
7171
|
}
|
|
7178
7172
|
convertArrayToDynamicListOutput(field, data) {
|
|
7179
7173
|
const values = data[field.id];
|
|
7180
7174
|
if (Array.isArray(values)) {
|
|
7181
7175
|
const listItems = this.getListItems(field);
|
|
7182
|
-
const matches = listItems.filter(item => values.map(v => v.code).
|
|
7176
|
+
const matches = listItems.filter(item => values.map(v => v.code).includes(item.code));
|
|
7183
7177
|
data[field.id] = {
|
|
7184
7178
|
value: matches,
|
|
7185
7179
|
list_items: listItems
|
|
@@ -7204,7 +7198,7 @@ class FieldTypeSanitiser {
|
|
|
7204
7198
|
if (field.list_items) {
|
|
7205
7199
|
return field.list_items;
|
|
7206
7200
|
}
|
|
7207
|
-
if (field.formatted_value
|
|
7201
|
+
if (field.formatted_value?.list_items) {
|
|
7208
7202
|
return field.formatted_value.list_items;
|
|
7209
7203
|
}
|
|
7210
7204
|
}
|
|
@@ -7322,7 +7316,7 @@ class FormValueService {
|
|
|
7322
7316
|
filterCurrentPageFields(caseFields, editForm) {
|
|
7323
7317
|
const cloneForm = {
|
|
7324
7318
|
...(editForm || {}),
|
|
7325
|
-
data: { ...(
|
|
7319
|
+
data: { ...(editForm?.data || {}) }
|
|
7326
7320
|
};
|
|
7327
7321
|
Object.keys(cloneForm.data).forEach((key) => {
|
|
7328
7322
|
if (caseFields.findIndex((element) => element.id === key) < 0) {
|
|
@@ -7343,7 +7337,7 @@ class FormValueService {
|
|
|
7343
7337
|
for (const key in rawObject) {
|
|
7344
7338
|
// If the key is one of documentFieldKeys, it means the field is of Document type. If the value of any of these
|
|
7345
7339
|
// properties is null, the entire sanitised object to be returned should be null
|
|
7346
|
-
if (documentFieldKeys.
|
|
7340
|
+
if (documentFieldKeys.includes(key) && rawObject[key] === null) {
|
|
7347
7341
|
sanitisedObject = null;
|
|
7348
7342
|
break;
|
|
7349
7343
|
}
|
|
@@ -7371,7 +7365,7 @@ class FormValueService {
|
|
|
7371
7365
|
return rawArray;
|
|
7372
7366
|
}
|
|
7373
7367
|
rawArray.forEach((item) => {
|
|
7374
|
-
if (item
|
|
7368
|
+
if (item?.hasOwnProperty('value')) {
|
|
7375
7369
|
item.value = this.sanitiseValue(item.value, isCaseFlagJourney);
|
|
7376
7370
|
}
|
|
7377
7371
|
});
|
|
@@ -7399,14 +7393,14 @@ class FormValueService {
|
|
|
7399
7393
|
}
|
|
7400
7394
|
clearNonCaseFields(data, caseFields) {
|
|
7401
7395
|
for (const dataKey in data) {
|
|
7402
|
-
if (!caseFields.
|
|
7396
|
+
if (!caseFields.some((cf) => cf.id === dataKey)) {
|
|
7403
7397
|
delete data[dataKey];
|
|
7404
7398
|
}
|
|
7405
7399
|
}
|
|
7406
7400
|
}
|
|
7407
7401
|
// TODO refactor so that this and remove unnecessary fields have a common iterator that applies functions to each node visited
|
|
7408
7402
|
removeNullLabels(data, caseFields) {
|
|
7409
|
-
if (data && caseFields
|
|
7403
|
+
if (data && caseFields?.length > 0) {
|
|
7410
7404
|
// check if there is any data at the top level of the form that's not in the caseFields
|
|
7411
7405
|
for (const field of caseFields) {
|
|
7412
7406
|
if (field.field_type) {
|
|
@@ -7446,7 +7440,7 @@ class FormValueService {
|
|
|
7446
7440
|
}
|
|
7447
7441
|
// TODO refactor so that this and remove unnecessary fields have a common iterator that applies functions to each node visited
|
|
7448
7442
|
removeEmptyDocuments(data, caseFields) {
|
|
7449
|
-
if (data && caseFields
|
|
7443
|
+
if (data && caseFields?.length > 0) {
|
|
7450
7444
|
// check if there is any data at the top level of the form that's not in the caseFields
|
|
7451
7445
|
for (const field of caseFields) {
|
|
7452
7446
|
if (field.field_type) {
|
|
@@ -7495,7 +7489,7 @@ class FormValueService {
|
|
|
7495
7489
|
* @param clearNonCase Whether or not we should clear out non-case fields at the top level.
|
|
7496
7490
|
*/
|
|
7497
7491
|
removeUnnecessaryFields(data, caseFields, clearEmpty = false, clearNonCase = false, fromPreviousPage = false, currentPageCaseFields = []) {
|
|
7498
|
-
if (data && caseFields
|
|
7492
|
+
if (data && caseFields?.length > 0) {
|
|
7499
7493
|
// check if there is any data at the top level of the form that's not in the caseFields
|
|
7500
7494
|
if (clearNonCase) {
|
|
7501
7495
|
this.clearNonCaseFields(data, caseFields);
|
|
@@ -7563,7 +7557,7 @@ class FormValueService {
|
|
|
7563
7557
|
removeInvalidCollectionData(data, field) {
|
|
7564
7558
|
if (data[field.id] && data[field.id].length > 0) {
|
|
7565
7559
|
for (const objCollection of data[field.id]) {
|
|
7566
|
-
if (Object.keys(objCollection).length === 1 && Object.keys(objCollection).
|
|
7560
|
+
if (Object.keys(objCollection).length === 1 && Object.keys(objCollection).includes('id')) {
|
|
7567
7561
|
data[field.id] = [];
|
|
7568
7562
|
}
|
|
7569
7563
|
}
|
|
@@ -7577,7 +7571,7 @@ class FormValueService {
|
|
|
7577
7571
|
* @param caseFields The list of underlying {@link CaseField} domain model objects for each field
|
|
7578
7572
|
*/
|
|
7579
7573
|
removeEmptyCollectionsWithMinValidation(data, caseFields) {
|
|
7580
|
-
if (data && caseFields
|
|
7574
|
+
if (data && caseFields?.length > 0) {
|
|
7581
7575
|
for (const field of caseFields) {
|
|
7582
7576
|
if (field.field_type.type === 'Collection' && typeof field.field_type.min === 'number' && field.field_type.min > 0 &&
|
|
7583
7577
|
data[field.id] && Array.isArray(data[field.id]) && data[field.id].length === 0) {
|
|
@@ -7596,7 +7590,7 @@ class FormValueService {
|
|
|
7596
7590
|
* @param types An array of one or more field types
|
|
7597
7591
|
*/
|
|
7598
7592
|
removeCaseFieldsOfType(data, caseFields, types) {
|
|
7599
|
-
if (data && caseFields
|
|
7593
|
+
if (data && caseFields?.length > 0 && types.length > 0) {
|
|
7600
7594
|
const caseFieldsToRemove = caseFields.filter((caseField) => FieldsUtils.isCaseFieldOfType(caseField, types));
|
|
7601
7595
|
for (const caseField of caseFieldsToRemove) {
|
|
7602
7596
|
delete data[caseField.id];
|
|
@@ -7615,7 +7609,7 @@ class FormValueService {
|
|
|
7615
7609
|
* @param caseFields The list of underlying {@link CaseField} domain model objects for each field
|
|
7616
7610
|
*/
|
|
7617
7611
|
repopulateFormDataFromCaseFieldValues(data, caseFields) {
|
|
7618
|
-
if (data && caseFields
|
|
7612
|
+
if (data && caseFields?.length > 0 &&
|
|
7619
7613
|
caseFields.findIndex((caseField) => FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher'])) > -1) {
|
|
7620
7614
|
// Ignore the FlagLauncher CaseField because it does not hold any values
|
|
7621
7615
|
caseFields.filter((caseField) => !FieldsUtils.isCaseFieldOfType(caseField, ['FlagLauncher']))
|
|
@@ -7650,7 +7644,7 @@ class FormValueService {
|
|
|
7650
7644
|
* @param caseFields The list of underlying {@link CaseField} domain model objects for each field
|
|
7651
7645
|
*/
|
|
7652
7646
|
populateLinkedCasesDetailsFromCaseFields(data, caseFields) {
|
|
7653
|
-
if (data && caseFields
|
|
7647
|
+
if (data && caseFields?.length > 0) {
|
|
7654
7648
|
caseFields.filter((caseField) => !FieldsUtils.isCaseFieldOfType(caseField, ['ComponentLauncher']))
|
|
7655
7649
|
.forEach((caseField) => {
|
|
7656
7650
|
if (data.hasOwnProperty('caseLinks') && caseField.value) {
|
|
@@ -8024,7 +8018,7 @@ class LabelSubstitutorDirective {
|
|
|
8024
8018
|
}
|
|
8025
8019
|
}
|
|
8026
8020
|
shouldSubstitute(element) {
|
|
8027
|
-
return this.elementsToSubstitute.
|
|
8021
|
+
return this.elementsToSubstitute.some(e => e === element);
|
|
8028
8022
|
}
|
|
8029
8023
|
getReadOnlyAndFormFields() {
|
|
8030
8024
|
const formFields = this.getFormFieldsValuesIncludingDisabled();
|
|
@@ -8687,16 +8681,16 @@ class DocumentManagementService {
|
|
|
8687
8681
|
}
|
|
8688
8682
|
}
|
|
8689
8683
|
isImage(imageType) {
|
|
8690
|
-
return DocumentManagementService.imagesList.
|
|
8684
|
+
return DocumentManagementService.imagesList.some(e => e === imageType);
|
|
8691
8685
|
}
|
|
8692
8686
|
isWord(wordType) {
|
|
8693
|
-
return DocumentManagementService.wordList.
|
|
8687
|
+
return DocumentManagementService.wordList.some(e => e === wordType);
|
|
8694
8688
|
}
|
|
8695
8689
|
isExcel(excelType) {
|
|
8696
|
-
return DocumentManagementService.excelList.
|
|
8690
|
+
return DocumentManagementService.excelList.some(e => e === excelType);
|
|
8697
8691
|
}
|
|
8698
8692
|
isPowerpoint(powerpointType) {
|
|
8699
|
-
return DocumentManagementService.powerpointList.
|
|
8693
|
+
return DocumentManagementService.powerpointList.some(e => e === powerpointType);
|
|
8700
8694
|
}
|
|
8701
8695
|
parseCaseInfo(caseInfo) {
|
|
8702
8696
|
if (!caseInfo) {
|
|
@@ -9288,7 +9282,7 @@ class SearchService {
|
|
|
9288
9282
|
class RouterHelperService {
|
|
9289
9283
|
getUrlSegmentsFromRoot(route) {
|
|
9290
9284
|
return route.pathFromRoot
|
|
9291
|
-
.filter(r => r.url
|
|
9285
|
+
.filter(r => r.url?.length)
|
|
9292
9286
|
.reduce((acc, r) => {
|
|
9293
9287
|
r.url.forEach(url => {
|
|
9294
9288
|
acc.push(url.path);
|
|
@@ -9705,11 +9699,11 @@ class OrganisationService {
|
|
|
9705
9699
|
|
|
9706
9700
|
class BrowserService {
|
|
9707
9701
|
isFirefox() {
|
|
9708
|
-
return window.navigator.userAgent.
|
|
9702
|
+
return window.navigator.userAgent.includes('Firefox');
|
|
9709
9703
|
}
|
|
9710
9704
|
isSafari() {
|
|
9711
|
-
const isSafariAgent = window.navigator.userAgent.
|
|
9712
|
-
const isChromeAgent = window.navigator.userAgent.
|
|
9705
|
+
const isSafariAgent = window.navigator.userAgent.includes('Safari');
|
|
9706
|
+
const isChromeAgent = window.navigator.userAgent.includes('Chrome');
|
|
9713
9707
|
if ((isChromeAgent) && (isSafariAgent)) {
|
|
9714
9708
|
return false;
|
|
9715
9709
|
}
|
|
@@ -10127,7 +10121,7 @@ class CaseEditWizardGuard {
|
|
|
10127
10121
|
}
|
|
10128
10122
|
processEventTrigger(route, eventTrigger) {
|
|
10129
10123
|
if (!eventTrigger.hasFields() || !eventTrigger.hasPages()) {
|
|
10130
|
-
this.goToSubmit(route);
|
|
10124
|
+
void this.goToSubmit(route);
|
|
10131
10125
|
return Promise.resolve(false);
|
|
10132
10126
|
}
|
|
10133
10127
|
const wizard = this.wizardFactory.create(eventTrigger);
|
|
@@ -10137,15 +10131,17 @@ class CaseEditWizardGuard {
|
|
|
10137
10131
|
return ShowCondition.getInstance(page.show_condition).match(currentState);
|
|
10138
10132
|
};
|
|
10139
10133
|
if (!route.params['page']) {
|
|
10140
|
-
this.goToFirst(wizard, canShowPredicate, route);
|
|
10134
|
+
void this.goToFirst(wizard, canShowPredicate, route);
|
|
10141
10135
|
return Promise.resolve(false);
|
|
10142
10136
|
}
|
|
10143
10137
|
const pageId = route.params['page'];
|
|
10144
10138
|
if (!wizard.hasPage(pageId)) {
|
|
10145
|
-
this.goToFirst(wizard, canShowPredicate, route)
|
|
10139
|
+
void this.goToFirst(wizard, canShowPredicate, route)
|
|
10146
10140
|
.then(() => {
|
|
10147
10141
|
const replacements = { PAGEID: pageId };
|
|
10148
10142
|
this.alertService.error({ phrase: 'No page could be found for %PAGEID%', replacements });
|
|
10143
|
+
}, () => {
|
|
10144
|
+
this.alertService.error({ phrase: 'Unable to navigate to the first page' });
|
|
10149
10145
|
});
|
|
10150
10146
|
return Promise.resolve(false);
|
|
10151
10147
|
}
|
|
@@ -10529,7 +10525,7 @@ class PageValidationService {
|
|
|
10529
10525
|
isHidden(caseField, editForm, path) {
|
|
10530
10526
|
const formFields = editForm.getRawValue();
|
|
10531
10527
|
const condition = ShowCondition.getInstance(caseField.show_condition);
|
|
10532
|
-
if (path && path.
|
|
10528
|
+
if (path && !path.includes(`_${caseField.id}_`)) {
|
|
10533
10529
|
path = `${path}${caseField.id}`;
|
|
10534
10530
|
}
|
|
10535
10531
|
return !condition.match(formFields.data, path);
|
|
@@ -10632,7 +10628,7 @@ class WorkAllocationService {
|
|
|
10632
10628
|
return false;
|
|
10633
10629
|
}
|
|
10634
10630
|
this.features.configurations.forEach(serviceConfig => {
|
|
10635
|
-
if (serviceConfig.serviceName === jurisdiction &&
|
|
10631
|
+
if (serviceConfig.serviceName === jurisdiction && serviceConfig.caseTypes.includes(caseType)) {
|
|
10636
10632
|
enabled = true;
|
|
10637
10633
|
}
|
|
10638
10634
|
});
|
|
@@ -10736,7 +10732,7 @@ class WorkAllocationService {
|
|
|
10736
10732
|
return this.searchTasks(taskSearchParameter)
|
|
10737
10733
|
.pipe(map((response) => {
|
|
10738
10734
|
const tasks = response.tasks;
|
|
10739
|
-
if (tasks
|
|
10735
|
+
if (tasks?.length > 0) {
|
|
10740
10736
|
if (tasks.length === 1) {
|
|
10741
10737
|
this.completeTask(tasks[0].id, eventId).subscribe();
|
|
10742
10738
|
}
|
|
@@ -10933,7 +10929,7 @@ class CaseEditComponent {
|
|
|
10933
10929
|
if (this.isPageRefreshed && this.initialUrl) {
|
|
10934
10930
|
this.sessionStorageService.removeItem('eventUrl');
|
|
10935
10931
|
this.isRefreshModalVisible = true;
|
|
10936
|
-
this.router.navigate([this.initialUrl], { relativeTo: this.route });
|
|
10932
|
+
void this.router.navigate([this.initialUrl], { relativeTo: this.route });
|
|
10937
10933
|
return true;
|
|
10938
10934
|
}
|
|
10939
10935
|
// if the url contains /submit there is the potential that the user has gone straight to the submit page
|
|
@@ -10944,7 +10940,7 @@ class CaseEditComponent {
|
|
|
10944
10940
|
if (this.eventTrigger.wizard_pages && this.eventTrigger.wizard_pages.length > 0) {
|
|
10945
10941
|
const firstPage = this.eventTrigger.wizard_pages.reduce((min, page) => page.order < min.order ? page : min, this.eventTrigger.wizard_pages[0]);
|
|
10946
10942
|
this.isRefreshModalVisible = true;
|
|
10947
|
-
this.router.navigate([firstPage ? firstPage.id : 'submit'], { relativeTo: this.route });
|
|
10943
|
+
void this.router.navigate([firstPage ? firstPage.id : 'submit'], { relativeTo: this.route });
|
|
10948
10944
|
}
|
|
10949
10945
|
}
|
|
10950
10946
|
return false;
|
|
@@ -11193,13 +11189,11 @@ class CaseEditComponent {
|
|
|
11193
11189
|
// Use the CaseField's existing *formatted_value* from the parent, if available. (This is necessary for
|
|
11194
11190
|
// Complex fields, whose sub-fields do not hold any values in the model.) Otherwise, use formatted_value
|
|
11195
11191
|
// from the CaseField itself.
|
|
11196
|
-
if (parentField
|
|
11192
|
+
if (parentField?.formatted_value) {
|
|
11197
11193
|
rawFormValueData[key] = parentField.formatted_value[caseField.id];
|
|
11198
11194
|
}
|
|
11199
|
-
else {
|
|
11200
|
-
|
|
11201
|
-
rawFormValueData[key] = caseField.formatted_value;
|
|
11202
|
-
}
|
|
11195
|
+
else if (!(caseField.hidden && caseField.retain_hidden_value)) {
|
|
11196
|
+
rawFormValueData[key] = caseField.formatted_value;
|
|
11203
11197
|
}
|
|
11204
11198
|
}
|
|
11205
11199
|
handleComplexField(caseField, formGroup, key, rawFormValueData) {
|
|
@@ -11314,31 +11308,27 @@ class CaseEditComponent {
|
|
|
11314
11308
|
if (this.taskIsForEvent(taskInSessionStorage, eventDetails)) {
|
|
11315
11309
|
return true;
|
|
11316
11310
|
}
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
return false;
|
|
11321
|
-
}
|
|
11311
|
+
// client context still needed for language
|
|
11312
|
+
removeTaskFromClientContext(this.sessionStorageService);
|
|
11313
|
+
return false;
|
|
11322
11314
|
}
|
|
11323
|
-
|
|
11324
|
-
if (taskEventCompletionInfo.taskId !== taskInSessionStorage.id) {
|
|
11325
|
-
return true;
|
|
11326
|
-
}
|
|
11327
|
-
else if ((taskEventCompletionInfo.taskId === taskInSessionStorage.id &&
|
|
11328
|
-
this.eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails))
|
|
11329
|
-
|| this.eventMoreThanDayAgo(taskEventCompletionInfo.createdTimestamp)) {
|
|
11330
|
-
// if the session storage not related to event, ignore it and remove
|
|
11331
|
-
removeTaskFromClientContext(this.sessionStorageService);
|
|
11332
|
-
this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
|
|
11333
|
-
return false;
|
|
11334
|
-
}
|
|
11335
|
-
if (eventDetails.assignNeeded === 'false' && eventDetails.userId !== taskInSessionStorage.assignee) {
|
|
11336
|
-
// if the user does not match task assignee, assign is now needed
|
|
11337
|
-
// data cannot be deleted and ignored as it matches understanding
|
|
11338
|
-
this.sessionStorageService.setItem('assignNeeded', 'true');
|
|
11339
|
-
}
|
|
11315
|
+
if (taskEventCompletionInfo.taskId !== taskInSessionStorage.id) {
|
|
11340
11316
|
return true;
|
|
11341
11317
|
}
|
|
11318
|
+
else if ((taskEventCompletionInfo.taskId === taskInSessionStorage.id &&
|
|
11319
|
+
this.eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails))
|
|
11320
|
+
|| this.eventMoreThanDayAgo(taskEventCompletionInfo.createdTimestamp)) {
|
|
11321
|
+
// if the session storage not related to event, ignore it and remove
|
|
11322
|
+
removeTaskFromClientContext(this.sessionStorageService);
|
|
11323
|
+
this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
|
|
11324
|
+
return false;
|
|
11325
|
+
}
|
|
11326
|
+
if (eventDetails.assignNeeded === 'false' && eventDetails.userId !== taskInSessionStorage.assignee) {
|
|
11327
|
+
// if the user does not match task assignee, assign is now needed
|
|
11328
|
+
// data cannot be deleted and ignored as it matches understanding
|
|
11329
|
+
this.sessionStorageService.setItem('assignNeeded', 'true');
|
|
11330
|
+
}
|
|
11331
|
+
return true;
|
|
11342
11332
|
}
|
|
11343
11333
|
onEventCanBeCompleted({ eventTrigger, eventCanBeCompleted, caseDetails, form, submit }) {
|
|
11344
11334
|
if (eventCanBeCompleted) {
|
|
@@ -11348,7 +11338,7 @@ class CaseEditComponent {
|
|
|
11348
11338
|
}
|
|
11349
11339
|
else {
|
|
11350
11340
|
// Navigate to tasks tab on case details page
|
|
11351
|
-
this.router.navigate([`/cases/case-details/${this.caseDetails.case_type.jurisdiction.id}/${this.caseDetails.case_type.id}/${this.getCaseId(caseDetails)}`], { fragment: 'Tasks' });
|
|
11341
|
+
void this.router.navigate([`/cases/case-details/${this.caseDetails.case_type.jurisdiction.id}/${this.caseDetails.case_type.id}/${this.getCaseId(caseDetails)}`], { fragment: 'Tasks' });
|
|
11352
11342
|
}
|
|
11353
11343
|
}
|
|
11354
11344
|
getStatus(response) {
|
|
@@ -11519,7 +11509,7 @@ class CasesService {
|
|
|
11519
11509
|
let http$ = this.http.get(url, { headers, observe: 'body' });
|
|
11520
11510
|
const artificialDelay = this.appConfig.getTimeoutsCaseRetrievalArtificialDelay();
|
|
11521
11511
|
const timeoutPeriods = this.appConfig.getTimeoutsForCaseRetrieval();
|
|
11522
|
-
if (timeoutPeriods
|
|
11512
|
+
if (timeoutPeriods?.length > 0 && timeoutPeriods[0] > 0) {
|
|
11523
11513
|
http$ = this.retryUtil.pipeTimeoutMechanismOn(http$, artificialDelay, timeoutPeriods);
|
|
11524
11514
|
}
|
|
11525
11515
|
else {
|
|
@@ -12369,7 +12359,7 @@ class LinkedCasesService {
|
|
|
12369
12359
|
caseService: item.service,
|
|
12370
12360
|
caseType: item.caseType,
|
|
12371
12361
|
unlink: false,
|
|
12372
|
-
reasons: item.reasons
|
|
12362
|
+
reasons: item.reasons?.map(reason => {
|
|
12373
12363
|
return {
|
|
12374
12364
|
Reason: reason
|
|
12375
12365
|
};
|
|
@@ -12392,15 +12382,15 @@ class LinkedCasesService {
|
|
|
12392
12382
|
const state = selectedCaseType && selectedCaseType.states.find(item => item.id === fieldValue);
|
|
12393
12383
|
switch (fieldName) {
|
|
12394
12384
|
case 'JURISDICTION':
|
|
12395
|
-
return selectedJurisdiction
|
|
12385
|
+
return selectedJurisdiction?.description;
|
|
12396
12386
|
case 'CASE_TYPE':
|
|
12397
|
-
return selectedCaseType
|
|
12387
|
+
return selectedCaseType?.name;
|
|
12398
12388
|
case 'CASE_TYPE_DESCRIPTION':
|
|
12399
|
-
return selectedCaseType
|
|
12389
|
+
return selectedCaseType?.description;
|
|
12400
12390
|
case 'STATE':
|
|
12401
|
-
return state
|
|
12391
|
+
return state?.name || fieldValue;
|
|
12402
12392
|
case 'STATE_DESCRIPTION':
|
|
12403
|
-
return state
|
|
12393
|
+
return state?.description || fieldValue;
|
|
12404
12394
|
default:
|
|
12405
12395
|
break;
|
|
12406
12396
|
}
|
|
@@ -12741,13 +12731,11 @@ class CaseEditPageComponent {
|
|
|
12741
12731
|
if (page) {
|
|
12742
12732
|
this.currentPage = page;
|
|
12743
12733
|
}
|
|
12734
|
+
else if (this.currentPage) {
|
|
12735
|
+
return this.next();
|
|
12736
|
+
}
|
|
12744
12737
|
else {
|
|
12745
|
-
|
|
12746
|
-
return this.next();
|
|
12747
|
-
}
|
|
12748
|
-
else {
|
|
12749
|
-
return this.first();
|
|
12750
|
-
}
|
|
12738
|
+
return this.first();
|
|
12751
12739
|
}
|
|
12752
12740
|
this.hasPreviousPage$.next(this.caseEdit.hasPrevious(this.currentPage?.id));
|
|
12753
12741
|
}
|
|
@@ -12840,7 +12828,7 @@ class CaseEditPageComponent {
|
|
|
12840
12828
|
const label = this.getInterpolatedFieldLabel(casefield);
|
|
12841
12829
|
let id = casefield.id;
|
|
12842
12830
|
if (fieldElement['component'] && (fieldElement['component'].parent || sourceFromComplexField)) {
|
|
12843
|
-
if (fieldElement['component'].idPrefix.
|
|
12831
|
+
if (!fieldElement['component'].idPrefix.includes(`_${id}_`)) {
|
|
12844
12832
|
id = `${fieldElement['component'].idPrefix}${id}`;
|
|
12845
12833
|
}
|
|
12846
12834
|
else {
|
|
@@ -13966,13 +13954,13 @@ class FieldsFilterPipe {
|
|
|
13966
13954
|
values = values || {};
|
|
13967
13955
|
const type = field.field_type;
|
|
13968
13956
|
const value = FieldsFilterPipe.getValue(field, values);
|
|
13969
|
-
const hasChildrenWithValue = type.complex_fields.
|
|
13957
|
+
const hasChildrenWithValue = type.complex_fields.some(f => {
|
|
13970
13958
|
return FieldsFilterPipe.keepField(f, value);
|
|
13971
13959
|
});
|
|
13972
|
-
return
|
|
13960
|
+
return hasChildrenWithValue;
|
|
13973
13961
|
}
|
|
13974
13962
|
static isEmpty(value) {
|
|
13975
|
-
return FieldsFilterPipe.EMPTY_VALUES.
|
|
13963
|
+
return FieldsFilterPipe.EMPTY_VALUES.includes(value)
|
|
13976
13964
|
|| value.length === 0;
|
|
13977
13965
|
}
|
|
13978
13966
|
static isCompound(field) {
|
|
@@ -14168,7 +14156,7 @@ class WriteComplexFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14168
14156
|
return (Constants.MANDATORY === caseField.display_context || !this.ignoreMandatory);
|
|
14169
14157
|
}
|
|
14170
14158
|
isAddressUK() {
|
|
14171
|
-
return ADDRESS_FIELD_TYPES.
|
|
14159
|
+
return ADDRESS_FIELD_TYPES.includes(this.caseField.field_type.id);
|
|
14172
14160
|
}
|
|
14173
14161
|
isTopLevelWithinCollection() {
|
|
14174
14162
|
if (this.parent) {
|
|
@@ -15119,7 +15107,7 @@ function ReadCaseFlagFieldComponent_ng_container_1_ng_container_2_Template(rf, c
|
|
|
15119
15107
|
i0.ɵɵproperty("ngForOf", ctx_r1.partyLevelCaseFlagData);
|
|
15120
15108
|
} }
|
|
15121
15109
|
function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_ccd_case_flag_table_1_Template(rf, ctx) { if (rf & 1) {
|
|
15122
|
-
i0.ɵɵelement(0, "ccd-case-flag-table",
|
|
15110
|
+
i0.ɵɵelement(0, "ccd-case-flag-table", 11);
|
|
15123
15111
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
15124
15112
|
} if (rf & 2) {
|
|
15125
15113
|
const flagData_r4 = i0.ɵɵnextContext().$implicit;
|
|
@@ -15127,7 +15115,7 @@ function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_ccd_case
|
|
|
15127
15115
|
} }
|
|
15128
15116
|
function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
15129
15117
|
i0.ɵɵelementStart(0, "div");
|
|
15130
|
-
i0.ɵɵtemplate(1, ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_ccd_case_flag_table_1_Template, 2, 5, "ccd-case-flag-table",
|
|
15118
|
+
i0.ɵɵtemplate(1, ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_ccd_case_flag_table_1_Template, 2, 5, "ccd-case-flag-table", 10);
|
|
15131
15119
|
i0.ɵɵelementEnd();
|
|
15132
15120
|
} if (rf & 2) {
|
|
15133
15121
|
const flagData_r4 = ctx.$implicit;
|
|
@@ -15136,7 +15124,7 @@ function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_Template
|
|
|
15136
15124
|
} }
|
|
15137
15125
|
function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
15138
15126
|
i0.ɵɵelementStart(0, "div");
|
|
15139
|
-
i0.ɵɵelement(1, "ccd-case-flag-table",
|
|
15127
|
+
i0.ɵɵelement(1, "ccd-case-flag-table", 11);
|
|
15140
15128
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
15141
15129
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
15142
15130
|
i0.ɵɵelementEnd();
|
|
@@ -15147,7 +15135,7 @@ function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_5_Template
|
|
|
15147
15135
|
} }
|
|
15148
15136
|
function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
15149
15137
|
i0.ɵɵelementContainerStart(0);
|
|
15150
|
-
i0.ɵɵelementStart(1, "h2",
|
|
15138
|
+
i0.ɵɵelementStart(1, "h2", 9);
|
|
15151
15139
|
i0.ɵɵtext(2);
|
|
15152
15140
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
15153
15141
|
i0.ɵɵelementEnd();
|
|
@@ -15316,7 +15304,7 @@ class ReadCaseFlagFieldComponent extends AbstractFieldReadComponent {
|
|
|
15316
15304
|
let flagsCaseFieldValue = selectedFlagsLocation.caseField?.value;
|
|
15317
15305
|
const path = selectedFlagsLocation.pathToFlagsFormGroup;
|
|
15318
15306
|
// Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
|
|
15319
|
-
if (path.
|
|
15307
|
+
if (path.includes('.')) {
|
|
15320
15308
|
path.slice(path.indexOf('.') + 1).split('.').forEach(part => flagsCaseFieldValue = flagsCaseFieldValue[part]);
|
|
15321
15309
|
}
|
|
15322
15310
|
if (flagsCaseFieldValue) {
|
|
@@ -15333,7 +15321,7 @@ class ReadCaseFlagFieldComponent extends AbstractFieldReadComponent {
|
|
|
15333
15321
|
this.router.navigate([`../${this.caseFlagStateService.pageLocation}`], { relativeTo: this.route });
|
|
15334
15322
|
}
|
|
15335
15323
|
static ɵfac = function ReadCaseFlagFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadCaseFlagFieldComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(i1$2.Router), i0.ɵɵdirectiveInject(CaseFlagStateService)); };
|
|
15336
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadCaseFlagFieldComponent, selectors: [["ccd-read-case-flag-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "changeButtonEmitter", "flagForSummaryDisplay", "displayContextParameter"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], ["id", "read-case-flag-title", 1, "govuk-heading-l"], [4, "ngFor", "ngForOf"], [3, "tableCaption", "flagData", "firstColumnHeader", "caseFlagsExternalUser", 4, "ngIf"], [3, "tableCaption", "flagData", "firstColumnHeader", "caseFlagsExternalUser"], [3, "tableCaption", "flagData", "firstColumnHeader", 4, "ngIf"], [3, "tableCaption", "flagData", "firstColumnHeader"]], template: function ReadCaseFlagFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
15324
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadCaseFlagFieldComponent, selectors: [["ccd-read-case-flag-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "changeButtonEmitter", "flagForSummaryDisplay", "displayContextParameter"], [3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], ["id", "read-external-case-flag-title", 1, "govuk-heading-l"], [4, "ngFor", "ngForOf"], [3, "tableCaption", "flagData", "firstColumnHeader", "caseFlagsExternalUser", 4, "ngIf"], [3, "tableCaption", "flagData", "firstColumnHeader", "caseFlagsExternalUser"], ["id", "read-case-flag-title", 1, "govuk-heading-l"], [3, "tableCaption", "flagData", "firstColumnHeader", 4, "ngIf"], [3, "tableCaption", "flagData", "firstColumnHeader"]], template: function ReadCaseFlagFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
15337
15325
|
i0.ɵɵtemplate(0, ReadCaseFlagFieldComponent_ng_container_0_Template, 2, 2, "ng-container", 0)(1, ReadCaseFlagFieldComponent_ng_container_1_Template, 4, 2, "ng-container", 0);
|
|
15338
15326
|
} if (rf & 2) {
|
|
15339
15327
|
i0.ɵɵproperty("ngIf", ctx.context === ctx.paletteContext.CHECK_YOUR_ANSWER);
|
|
@@ -15343,7 +15331,7 @@ class ReadCaseFlagFieldComponent extends AbstractFieldReadComponent {
|
|
|
15343
15331
|
}
|
|
15344
15332
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCaseFlagFieldComponent, [{
|
|
15345
15333
|
type: Component,
|
|
15346
|
-
args: [{ selector: 'ccd-read-case-flag-field', standalone: false, template: "<ng-container *ngIf=\"context === paletteContext.CHECK_YOUR_ANSWER\">\n <ccd-case-flag-summary-list\n [flagForSummaryDisplay]=\"flagForSummaryDisplay\"\n [displayContextParameter]=\"displayContextParameter\"\n (changeButtonEmitter)=\"navigateBackToForm($event)\">\n </ccd-case-flag-summary-list>\n</ng-container>\n\n<ng-container *ngIf=\"context !== paletteContext.CHECK_YOUR_ANSWER\">\n <ng-container [ngSwitch]=\"displayContextParameter\">\n <ng-container *ngSwitchCase=\"caseFlagDisplayContextParameter.READ_EXTERNAL\">\n <h2 id=\"read-case-flag-title\" class=\"govuk-heading-l\">\n {{ 'Support requested' | rpxTranslate }}\n </h2>\n\n <div *ngFor=\"let flagData of partyLevelCaseFlagData\">\n <ccd-case-flag-table *ngIf=\"flagData.flags.partyName\"\n [tableCaption]=\"''\"\n [flagData]=\"flagData\"\n [firstColumnHeader]=\"flagData.flags.partyName\"\n [caseFlagsExternalUser]=\"caseFlagsExternalUser\"\n ></ccd-case-flag-table>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <h2 id=\"read-case-flag-title\" class=\"govuk-heading-l\">\n {{ 'Case flags' | rpxTranslate }}\n </h2>\n\n <div *ngFor=\"let flagData of partyLevelCaseFlagData\">\n <ccd-case-flag-table *ngIf=\"flagData.flags.partyName\"\n [tableCaption]=\"flagData.flags.partyName\"\n [flagData]=\"flagData\"\n [firstColumnHeader]=\"'Party level flags' | rpxTranslate\"\n ></ccd-case-flag-table>\n </div>\n <div *ngIf=\"caseLevelCaseFlagData\">\n <ccd-case-flag-table\n [tableCaption]=\"'Case level flags' | rpxTranslate\"\n [flagData]=\"caseLevelCaseFlagData\"\n [firstColumnHeader]=\"'Case flags' | rpxTranslate\"\n ></ccd-case-flag-table>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".govuk-heading-l{margin-top:30px}\n"] }]
|
|
15334
|
+
args: [{ selector: 'ccd-read-case-flag-field', standalone: false, template: "<ng-container *ngIf=\"context === paletteContext.CHECK_YOUR_ANSWER\">\n <ccd-case-flag-summary-list\n [flagForSummaryDisplay]=\"flagForSummaryDisplay\"\n [displayContextParameter]=\"displayContextParameter\"\n (changeButtonEmitter)=\"navigateBackToForm($event)\">\n </ccd-case-flag-summary-list>\n</ng-container>\n\n<ng-container *ngIf=\"context !== paletteContext.CHECK_YOUR_ANSWER\">\n <ng-container [ngSwitch]=\"displayContextParameter\">\n <ng-container *ngSwitchCase=\"caseFlagDisplayContextParameter.READ_EXTERNAL\">\n <h2 id=\"read-external-case-flag-title\" class=\"govuk-heading-l\">\n {{ 'Support requested' | rpxTranslate }}\n </h2>\n\n <div *ngFor=\"let flagData of partyLevelCaseFlagData\">\n <ccd-case-flag-table *ngIf=\"flagData.flags.partyName\"\n [tableCaption]=\"''\"\n [flagData]=\"flagData\"\n [firstColumnHeader]=\"flagData.flags.partyName\"\n [caseFlagsExternalUser]=\"caseFlagsExternalUser\"\n ></ccd-case-flag-table>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <h2 id=\"read-case-flag-title\" class=\"govuk-heading-l\">\n {{ 'Case flags' | rpxTranslate }}\n </h2>\n\n <div *ngFor=\"let flagData of partyLevelCaseFlagData\">\n <ccd-case-flag-table *ngIf=\"flagData.flags.partyName\"\n [tableCaption]=\"flagData.flags.partyName\"\n [flagData]=\"flagData\"\n [firstColumnHeader]=\"'Party level flags' | rpxTranslate\"\n ></ccd-case-flag-table>\n </div>\n <div *ngIf=\"caseLevelCaseFlagData\">\n <ccd-case-flag-table\n [tableCaption]=\"'Case level flags' | rpxTranslate\"\n [flagData]=\"caseLevelCaseFlagData\"\n [firstColumnHeader]=\"'Case flags' | rpxTranslate\"\n ></ccd-case-flag-table>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".govuk-heading-l{margin-top:30px}\n"] }]
|
|
15347
15335
|
}], () => [{ type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: CaseFlagStateService }], null); })();
|
|
15348
15336
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadCaseFlagFieldComponent, { className: "ReadCaseFlagFieldComponent", filePath: "lib/shared/components/palette/case-flag/read-case-flag-field.component.ts", lineNumber: 18 }); })();
|
|
15349
15337
|
|
|
@@ -15596,7 +15584,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
15596
15584
|
}), true);
|
|
15597
15585
|
// Get the case type ID from the CaseView object in the snapshot data (required for retrieving the available flag
|
|
15598
15586
|
// types for a case)
|
|
15599
|
-
if (this.route.snapshot.data.case
|
|
15587
|
+
if (this.route.snapshot.data.case?.case_type) {
|
|
15600
15588
|
this.caseTypeId = this.route.snapshot.data.case.case_type.id;
|
|
15601
15589
|
// Get the jurisdiction (required for retrieving the available flag types if unable to determine using case type ID)
|
|
15602
15590
|
if (this.route.snapshot.data.case.case_type.jurisdiction) {
|
|
@@ -15819,7 +15807,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
15819
15807
|
let value = instance.caseField?.value;
|
|
15820
15808
|
const pathToValue = instance.pathToFlagsFormGroup;
|
|
15821
15809
|
// Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
|
|
15822
|
-
if (pathToValue.
|
|
15810
|
+
if (pathToValue.includes('.')) {
|
|
15823
15811
|
pathToValue.slice(pathToValue.indexOf('.') + 1).split('.').forEach(part => value = value[part]);
|
|
15824
15812
|
}
|
|
15825
15813
|
if (value?.details?.length > 0) {
|
|
@@ -15844,7 +15832,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
15844
15832
|
// Use the pathToFlagsFormGroup property from the selected flag location to drill down to the correct part of the
|
|
15845
15833
|
// CaseField value to apply changes to
|
|
15846
15834
|
// Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
|
|
15847
|
-
if (path.
|
|
15835
|
+
if (path.includes('.')) {
|
|
15848
15836
|
path.slice(path.indexOf('.') + 1).split('.').forEach(part => flagsCaseFieldValue = flagsCaseFieldValue[part]);
|
|
15849
15837
|
}
|
|
15850
15838
|
// If the CaseField for the selected flags location has no value, set it to an empty object so it can be populated
|
|
@@ -15946,7 +15934,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
15946
15934
|
let formattedValue = instance.caseField?.formatted_value;
|
|
15947
15935
|
const pathToValue = instance.pathToFlagsFormGroup;
|
|
15948
15936
|
// Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
|
|
15949
|
-
if (pathToValue.
|
|
15937
|
+
if (pathToValue.includes('.')) {
|
|
15950
15938
|
pathToValue.slice(pathToValue.indexOf('.') + 1).split('.').forEach(part => {
|
|
15951
15939
|
value = value[part];
|
|
15952
15940
|
if (formattedValue && FieldsUtils.isNonEmptyObject(formattedValue)) {
|
|
@@ -15977,7 +15965,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
15977
15965
|
// CaseField value to apply changes to
|
|
15978
15966
|
const path = this.selectedFlag.pathToFlagsFormGroup;
|
|
15979
15967
|
// Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
|
|
15980
|
-
if (path.
|
|
15968
|
+
if (path.includes('.')) {
|
|
15981
15969
|
path.slice(path.indexOf('.') + 1).split('.').forEach(part => flagsCaseFieldValue = flagsCaseFieldValue[part]);
|
|
15982
15970
|
}
|
|
15983
15971
|
if (flagsCaseFieldValue) {
|
|
@@ -16186,7 +16174,7 @@ function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
16186
16174
|
} }
|
|
16187
16175
|
class ReadCaseLinkFieldComponent extends AbstractFieldReadComponent {
|
|
16188
16176
|
hasReference() {
|
|
16189
|
-
return this.caseField.value
|
|
16177
|
+
return this.caseField.value?.CaseReference;
|
|
16190
16178
|
}
|
|
16191
16179
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadCaseLinkFieldComponent_BaseFactory; return function ReadCaseLinkFieldComponent_Factory(__ngFactoryType__) { return (ɵReadCaseLinkFieldComponent_BaseFactory || (ɵReadCaseLinkFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent)))(__ngFactoryType__ || ReadCaseLinkFieldComponent); }; })();
|
|
16192
16180
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["target", "_blank", 3, "href", 4, "ngIf"], ["target", "_blank", 3, "href"], [1, "text-16"]], template: function ReadCaseLinkFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -16266,10 +16254,8 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
|
16266
16254
|
}
|
|
16267
16255
|
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
16268
16256
|
}
|
|
16269
|
-
else {
|
|
16270
|
-
|
|
16271
|
-
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
16272
|
-
}
|
|
16257
|
+
else if (control.touched) {
|
|
16258
|
+
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
16273
16259
|
}
|
|
16274
16260
|
return null;
|
|
16275
16261
|
};
|
|
@@ -16383,12 +16369,12 @@ class ReadCollectionFieldComponent extends AbstractFieldReadComponent {
|
|
|
16383
16369
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadCollectionFieldComponent, selectors: [["ccd-read-collection-field"]], inputs: { caseFields: "caseFields" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "collection-field-table", "aria-label", "collection table", 4, "ngIf"], ["aria-label", "collection table", 1, "collection-field-table"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["id", "hiddenHeader", 2, "display", "none"], [3, "caseField", "context", "caseFields", "topLevelFormGroup"], [4, "ngFor", "ngForOf"], [3, "caseField", "context", "caseFields", "topLevelFormGroup", "idPrefix"]], template: function ReadCollectionFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
16384
16370
|
i0.ɵɵtemplate(0, ReadCollectionFieldComponent_table_0_Template, 4, 3, "table", 0);
|
|
16385
16371
|
} if (rf & 2) {
|
|
16386
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.value
|
|
16372
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.value == null ? null : ctx.caseField.value.length);
|
|
16387
16373
|
} }, styles: [".govuk-js-link[_ngcontent-%COMP%]{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link[_ngcontent-%COMP%]:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link[_ngcontent-%COMP%]:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link[_ngcontent-%COMP%]:visited{color:#4c2c92}.collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:first-child > td[_ngcontent-%COMP%]{padding-top:0}.collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.collection-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}.error-spacing[_ngcontent-%COMP%]{margin-top:10px}.collection-title[_ngcontent-%COMP%]{height:51px}.float-left[_ngcontent-%COMP%]{float:left;padding-top:8px}.float-right[_ngcontent-%COMP%]{float:right}.complex-panel[_ngcontent-%COMP%]{margin:13px 0;border:1px solid #bfc1c3}.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media(min-width:641px){.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}@media print{.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{font-size:14pt}}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{vertical-align:top}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > th[_ngcontent-%COMP%], .complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.complex-panel[_ngcontent-%COMP%] .complex-panel-simple-field[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding-left:5px;width:295px}.complex-panel[_ngcontent-%COMP%] .complex-panel-compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px}.collection-indicator[_ngcontent-%COMP%]{border-left:solid 5px #b1b4b6}"] });
|
|
16388
16374
|
}
|
|
16389
16375
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCollectionFieldComponent, [{
|
|
16390
16376
|
type: Component,
|
|
16391
|
-
args: [{ selector: 'ccd-read-collection-field', standalone: false, template: "<table *ngIf=\"caseField.value
|
|
16377
|
+
args: [{ selector: 'ccd-read-collection-field', standalone: false, template: "<table *ngIf=\"caseField.value?.length\" class=\"collection-field-table\" aria-label=\"collection table\">\n <ng-container [ngSwitch]=\"isDisplayContextParameterAvailable\">\n <tbody *ngSwitchCase=\"true\">\n <tr>\n <th id=\"hiddenHeader\" style=\"display: none;\"></th>\n <td>\n <ccd-field-read\n [caseField]=\"{\n id: caseField.label,\n label: caseField.label,\n field_type: caseField.field_type.collection_field_type,\n display_context_parameter: caseField.display_context_parameter,\n value: caseField.value,\n hidden: caseField.hidden,\n parent: caseField\n }\"\n [context]=\"context\"\n [caseFields]=\"caseFields\"\n [topLevelFormGroup]=\"topLevelFormGroup\">\n </ccd-field-read>\n </td>\n </tr>\n </tbody>\n <tbody *ngSwitchCase=\"false\">\n <tr *ngFor=\"let item of caseField.value; let i = index\">\n <td>\n <ccd-field-read\n [caseField]=\"{\n id: i + '',\n label: caseField.label + ' ' + (i + 1),\n field_type: caseField.field_type.collection_field_type,\n value: item.value,\n hidden: caseField.hidden,\n parent: caseField\n }\"\n [context]=\"context\"\n [caseFields]=\"caseFields\"\n [topLevelFormGroup]=\"topLevelFormGroup\"\n [idPrefix]=\"buildIdPrefix(i)\">\n </ccd-field-read>\n </td>\n </tr>\n </tbody>\n </ng-container>\n</table>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}.collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media(min-width:641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}@media print{.complex-panel .complex-panel-title{font-size:14pt}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
|
|
16392
16378
|
}], null, { caseFields: [{
|
|
16393
16379
|
type: Input
|
|
16394
16380
|
}] }); })();
|
|
@@ -16493,37 +16479,35 @@ function WriteCollectionFieldComponent_h2_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
16493
16479
|
} }
|
|
16494
16480
|
function WriteCollectionFieldComponent_div_7_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
16495
16481
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
16496
|
-
i0.ɵɵelementStart(0, "div", 1, 0)(2, "div", 16)(3, "div", 17)(4, "legend", 18)(5, "
|
|
16497
|
-
i0.ɵɵtext(
|
|
16498
|
-
i0.ɵɵpipe(
|
|
16499
|
-
i0.ɵɵelementEnd()()()
|
|
16500
|
-
i0.ɵɵelementStart(
|
|
16501
|
-
i0.ɵɵlistener("click", function
|
|
16502
|
-
i0.ɵɵtext(
|
|
16503
|
-
i0.ɵɵpipe(
|
|
16482
|
+
i0.ɵɵelementStart(0, "div", 1, 0)(2, "div", 16)(3, "div", 17)(4, "legend", 18)(5, "h3", 19);
|
|
16483
|
+
i0.ɵɵtext(6);
|
|
16484
|
+
i0.ɵɵpipe(7, "rpxTranslate");
|
|
16485
|
+
i0.ɵɵelementEnd()()();
|
|
16486
|
+
i0.ɵɵelementStart(8, "div", 20)(9, "button", 21);
|
|
16487
|
+
i0.ɵɵlistener("click", function WriteCollectionFieldComponent_div_7_div_2_Template_button_click_9_listener() { const i_r3 = i0.ɵɵrestoreView(_r2).index; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.openModal(i_r3)); });
|
|
16488
|
+
i0.ɵɵtext(10);
|
|
16489
|
+
i0.ɵɵpipe(11, "rpxTranslate");
|
|
16504
16490
|
i0.ɵɵelementEnd()()();
|
|
16505
|
-
i0.ɵɵelement(
|
|
16491
|
+
i0.ɵɵelement(12, "ccd-field-write", 22);
|
|
16506
16492
|
i0.ɵɵelementEnd();
|
|
16507
16493
|
} if (rf & 2) {
|
|
16508
16494
|
const item_r4 = ctx.$implicit;
|
|
16509
16495
|
const i_r3 = ctx.index;
|
|
16510
16496
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
16511
16497
|
i0.ɵɵproperty("id", ctx_r0.buildIdPrefix(i_r3) + i_r3);
|
|
16512
|
-
i0.ɵɵadvance(
|
|
16513
|
-
i0.ɵɵ
|
|
16514
|
-
i0.ɵɵadvance(2);
|
|
16515
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(8, 15, ctx_r0.itemLabel(i_r3)));
|
|
16498
|
+
i0.ɵɵadvance(6);
|
|
16499
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 14, ctx_r0.itemLabel(i_r3)));
|
|
16516
16500
|
i0.ɵɵadvance(3);
|
|
16517
16501
|
i0.ɵɵattribute("aria-label", i0.ɵɵinterpolate1("Remove ", ctx_r0.itemLabel(i_r3)));
|
|
16518
16502
|
i0.ɵɵproperty("disabled", ctx_r0.isNotAuthorisedToDelete(i_r3));
|
|
16519
16503
|
i0.ɵɵadvance();
|
|
16520
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
16504
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(11, 16, "Remove"));
|
|
16521
16505
|
i0.ɵɵadvance(2);
|
|
16522
16506
|
i0.ɵɵproperty("caseField", item_r4.caseField)("caseFields", ctx_r0.caseFields)("formGroup", ctx_r0.formGroup)("parent", item_r4.container)("idPrefix", item_r4.prefix)("hidden", item_r4.caseField.hidden)("isExpanded", ctx_r0.isExpanded)("isInSearchBlock", ctx_r0.isInSearchBlock);
|
|
16523
16507
|
} }
|
|
16524
16508
|
function WriteCollectionFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
16525
16509
|
i0.ɵɵelementStart(0, "div", 13)(1, "fieldset", 14);
|
|
16526
|
-
i0.ɵɵtemplate(2, WriteCollectionFieldComponent_div_7_div_2_Template,
|
|
16510
|
+
i0.ɵɵtemplate(2, WriteCollectionFieldComponent_div_7_div_2_Template, 13, 18, "div", 15);
|
|
16527
16511
|
i0.ɵɵelementEnd()();
|
|
16528
16512
|
} if (rf & 2) {
|
|
16529
16513
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
@@ -16533,7 +16517,7 @@ function WriteCollectionFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
16533
16517
|
} }
|
|
16534
16518
|
function WriteCollectionFieldComponent_button_8_Template(rf, ctx) { if (rf & 1) {
|
|
16535
16519
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
16536
|
-
i0.ɵɵelementStart(0, "button",
|
|
16520
|
+
i0.ɵɵelementStart(0, "button", 23);
|
|
16537
16521
|
i0.ɵɵlistener("click", function WriteCollectionFieldComponent_button_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.addItem(false)); });
|
|
16538
16522
|
i0.ɵɵtext(1);
|
|
16539
16523
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
@@ -16825,7 +16809,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
16825
16809
|
return false;
|
|
16826
16810
|
}
|
|
16827
16811
|
hasUpdateAccess(role) {
|
|
16828
|
-
return
|
|
16812
|
+
return this.caseField.acls.some(acl => acl.role === role && acl.update === true);
|
|
16829
16813
|
}
|
|
16830
16814
|
isNotAuthorisedToDelete(index) {
|
|
16831
16815
|
if (this.isExpanded) {
|
|
@@ -16866,7 +16850,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
16866
16850
|
}
|
|
16867
16851
|
isCollectionOfSimpleType(caseField) {
|
|
16868
16852
|
const notSimple = ['Collection', 'Complex'];
|
|
16869
|
-
return notSimple.
|
|
16853
|
+
return !notSimple.includes(caseField.field_type.collection_field_type.type);
|
|
16870
16854
|
}
|
|
16871
16855
|
static ɵfac = function WriteCollectionFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WriteCollectionFieldComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(ProfileNotifier), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
16872
16856
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
@@ -16874,7 +16858,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
16874
16858
|
} if (rf & 2) {
|
|
16875
16859
|
let _t;
|
|
16876
16860
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
|
|
16877
|
-
} }, inputs: { caseFields: "caseFields" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 9, consts: [["collectionItem", ""], [1, "form-group", 3, "id"], [1, "panel", "collection-indicator"], ["class", "heading-h2 error-spacing", 4, "ngIf"], ["type", "button", 1, "button", "write-collection-add-item__top", 3, "click", "disabled"], ["class", "form-group", 3, "hidden", 4, "ngIf"], ["class", "button write-collection-add-item__bottom", "type", "button", 3, "disabled", "click", 4, "ngIf"], [1, "heading-h2", "error-spacing"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-hint"], [3, "content"], [1, "error-message"], [1, "form-group", 3, "hidden"], [1, "govuk-fieldset"], ["class", "form-group", 3, "id", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "collection-title"], [1, "float-left"], [1, "govuk-fieldset__legend"], [
|
|
16861
|
+
} }, inputs: { caseFields: "caseFields" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 9, consts: [["collectionItem", ""], [1, "form-group", 3, "id"], [1, "panel", "collection-indicator"], ["class", "heading-h2 error-spacing", 4, "ngIf"], ["type", "button", 1, "button", "write-collection-add-item__top", 3, "click", "disabled"], ["class", "form-group", 3, "hidden", 4, "ngIf"], ["class", "button write-collection-add-item__bottom", "type", "button", 3, "disabled", "click", 4, "ngIf"], [1, "heading-h2", "error-spacing"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-hint"], [3, "content"], [1, "error-message"], [1, "form-group", 3, "hidden"], [1, "govuk-fieldset"], ["class", "form-group", 3, "id", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "collection-title"], [1, "float-left"], [1, "govuk-fieldset__legend"], [1, "heading-h3"], [1, "float-right"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"], [3, "caseField", "caseFields", "formGroup", "parent", "idPrefix", "hidden", "isExpanded", "isInSearchBlock"], ["type", "button", 1, "button", "write-collection-add-item__bottom", 3, "click", "disabled"]], template: function WriteCollectionFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
16878
16862
|
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
|
|
16879
16863
|
i0.ɵɵtemplate(2, WriteCollectionFieldComponent_h2_2_Template, 3, 3, "h2", 3);
|
|
16880
16864
|
i0.ɵɵelementStart(3, "button", 4);
|
|
@@ -16895,14 +16879,14 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
16895
16879
|
i0.ɵɵadvance(2);
|
|
16896
16880
|
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text || ctx.formArray.errors);
|
|
16897
16881
|
i0.ɵɵadvance();
|
|
16898
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.value
|
|
16882
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.value == null ? null : ctx.caseField.value.length);
|
|
16899
16883
|
i0.ɵɵadvance();
|
|
16900
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.value
|
|
16884
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.value == null ? null : ctx.caseField.value.length);
|
|
16901
16885
|
} }, styles: [".govuk-js-link[_ngcontent-%COMP%]{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link[_ngcontent-%COMP%]:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link[_ngcontent-%COMP%]:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link[_ngcontent-%COMP%]:visited{color:#4c2c92}.collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:first-child > td[_ngcontent-%COMP%]{padding-top:0}.collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.collection-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}.error-spacing[_ngcontent-%COMP%]{margin-top:10px}.collection-title[_ngcontent-%COMP%]{height:51px}.float-left[_ngcontent-%COMP%]{float:left;padding-top:8px}.float-right[_ngcontent-%COMP%]{float:right}.complex-panel[_ngcontent-%COMP%]{margin:13px 0;border:1px solid #bfc1c3}.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media(min-width:641px){.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}@media print{.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{font-size:14pt}}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{vertical-align:top}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > th[_ngcontent-%COMP%], .complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.complex-panel[_ngcontent-%COMP%] .complex-panel-simple-field[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding-left:5px;width:295px}.complex-panel[_ngcontent-%COMP%] .complex-panel-compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px}.collection-indicator[_ngcontent-%COMP%]{border-left:solid 5px #b1b4b6}"] });
|
|
16902
16886
|
}
|
|
16903
16887
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCollectionFieldComponent, [{
|
|
16904
16888
|
type: Component,
|
|
16905
|
-
args: [{ selector: 'ccd-write-collection-field', standalone: false, template: "<div class=\"form-group\" [id]=\"id()\">\n\n <div class=\"panel collection-indicator\">\n\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"!caseField.hidden\">\n {{(caseField | ccdFieldLabel)}}\n </h2>\n <button class=\"button write-collection-add-item__top\" type=\"button\" (click)=\"addItem(true)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\">{{'Add new' | rpxTranslate}}</button>\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"caseField.hint_text || formArray.errors\">\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">\n <ccd-markdown [content]=\"caseField.hint_text | rpxTranslate\"></ccd-markdown>\n </span>\n <span *ngIf=\"formArray.errors\" class=\"error-message\">\n {{(formArray.errors | ccdFirstError:caseField.label)}}\n </span>\n </h2>\n\n <div class=\"form-group\" [hidden]=\"caseField.hidden\" *ngIf=\"caseField.value
|
|
16889
|
+
args: [{ selector: 'ccd-write-collection-field', standalone: false, template: "<div class=\"form-group\" [id]=\"id()\">\n\n <div class=\"panel collection-indicator\">\n\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"!caseField.hidden\">\n {{(caseField | ccdFieldLabel)}}\n </h2>\n <button class=\"button write-collection-add-item__top\" type=\"button\" (click)=\"addItem(true)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\">{{'Add new' | rpxTranslate}}</button>\n <h2 class=\"heading-h2 error-spacing\" *ngIf=\"caseField.hint_text || formArray.errors\">\n <span *ngIf=\"caseField.hint_text\" class=\"form-hint\">\n <ccd-markdown [content]=\"caseField.hint_text | rpxTranslate\"></ccd-markdown>\n </span>\n <span *ngIf=\"formArray.errors\" class=\"error-message\">\n {{(formArray.errors | ccdFirstError:caseField.label)}}\n </span>\n </h2>\n\n <div class=\"form-group\" [hidden]=\"caseField.hidden\" *ngIf=\"caseField.value?.length\">\n <fieldset class=\"govuk-fieldset\">\n <div *ngFor=\"let item of collItems; let i = index; trackBy: trackByCollectionItem\" #collectionItem\n [id]=\"this.buildIdPrefix(i) + i\" class=\"form-group\">\n <div class=\"collection-title\">\n <div class=\"float-left\">\n <legend class=\"govuk-fieldset__legend\">\n <h3 class=\"heading-h3\">{{itemLabel(i) | rpxTranslate}}</h3>\n </legend>\n </div>\n <div class=\"float-right\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"openModal(i)\"\n [disabled]=\"isNotAuthorisedToDelete(i)\"\n attr.aria-label=\"Remove {{ itemLabel(i) }}\">{{'Remove' | rpxTranslate}}</button>\n </div>\n </div>\n <ccd-field-write [caseField]=\"item.caseField\"\n [caseFields]=\"caseFields\"\n [formGroup]=\"formGroup\"\n [parent]=\"item.container\"\n [idPrefix]=\"item.prefix\"\n [hidden]=\"item.caseField.hidden\"\n [isExpanded]=\"isExpanded\"\n [isInSearchBlock]=\"isInSearchBlock\">\n </ccd-field-write>\n </div>\n </fieldset>\n </div>\n\n <button class=\"button write-collection-add-item__bottom\" type=\"button\" (click)=\"addItem(false)\" [disabled]=\"isNotAuthorisedToCreate() || isSearchFilter()\" *ngIf=\"caseField.value?.length\">{{'Add new' | rpxTranslate }}</button>\n\n </div>\n\n</div>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}.collection-field-table tr:first-child>td{padding-top:0}.collection-field-table tr:last-child>td{border-bottom:none}.collection-field-table td.collection-actions{width:1px;white-space:nowrap}.error-spacing{margin-top:10px}.collection-title{height:51px}.float-left{float:left;padding-top:8px}.float-right{float:right}.complex-panel{margin:13px 0;border:1px solid #bfc1c3}.complex-panel .complex-panel-title{background-color:#dee0e2;padding:5px 5px 2px;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media(min-width:641px){.complex-panel .complex-panel-title{font-size:19px;line-height:1.3157894737}}@media print{.complex-panel .complex-panel-title{font-size:14pt}}.complex-panel .complex-panel-table>tbody>tr>th{vertical-align:top}.complex-panel .complex-panel-table>tbody>tr:last-child>th,.complex-panel .complex-panel-table>tbody>tr:last-child>td{border-bottom:none}.complex-panel .complex-panel-simple-field th{padding-left:5px;width:295px}.complex-panel .complex-panel-compound-field td{padding:5px}.collection-indicator{border-left:solid 5px #b1b4b6}\n"] }]
|
|
16906
16890
|
}], () => [{ type: i1$3.MatDialog }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }], { caseFields: [{
|
|
16907
16891
|
type: Input
|
|
16908
16892
|
}], items: [{
|
|
@@ -17074,10 +17058,8 @@ class ReadDocumentFieldComponent extends AbstractFieldReadComponent {
|
|
|
17074
17058
|
}
|
|
17075
17059
|
});
|
|
17076
17060
|
}
|
|
17077
|
-
else {
|
|
17078
|
-
|
|
17079
|
-
this.openMediaViewer(this.caseField.value);
|
|
17080
|
-
}
|
|
17061
|
+
else if (this.caseField && this.caseField.value) {
|
|
17062
|
+
this.openMediaViewer(this.caseField.value);
|
|
17081
17063
|
}
|
|
17082
17064
|
}
|
|
17083
17065
|
openMediaViewer(documentFieldValue) {
|
|
@@ -17264,12 +17246,10 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
17264
17246
|
this.jurisdictionId = caseInfo.jurisdiction;
|
|
17265
17247
|
this.caseId = caseInfo.caseId;
|
|
17266
17248
|
}
|
|
17267
|
-
else {
|
|
17268
|
-
|
|
17269
|
-
|
|
17270
|
-
|
|
17271
|
-
this.caseId = currUrl.split('/')[5];
|
|
17272
|
-
}
|
|
17249
|
+
else if (currUrl.includes('/case-details/')) {
|
|
17250
|
+
this.jurisdictionId = currUrl.split('/')[3];
|
|
17251
|
+
this.caseTypeId = currUrl.split('/')[4];
|
|
17252
|
+
this.caseId = currUrl.split('/')[5];
|
|
17273
17253
|
}
|
|
17274
17254
|
}
|
|
17275
17255
|
else {
|
|
@@ -17351,7 +17331,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
17351
17331
|
this.fileInput.nativeElement.click();
|
|
17352
17332
|
}
|
|
17353
17333
|
fileSelectEvent() {
|
|
17354
|
-
if ((this.caseField.value
|
|
17334
|
+
if ((this.caseField.value?.document_filename) ||
|
|
17355
17335
|
(this.selectedFile && this.selectedFile.name)) {
|
|
17356
17336
|
this.openDialog(this.dialogConfig);
|
|
17357
17337
|
}
|
|
@@ -18093,7 +18073,7 @@ class DynamicRadioListPipe {
|
|
|
18093
18073
|
*
|
|
18094
18074
|
* If value is object with element `value.code`, use code instead.
|
|
18095
18075
|
*/
|
|
18096
|
-
if (value
|
|
18076
|
+
if (value?.value?.code) {
|
|
18097
18077
|
value = value.value.code;
|
|
18098
18078
|
}
|
|
18099
18079
|
const item = items.find(i => i.code === value);
|
|
@@ -18151,8 +18131,8 @@ class ReadDynamicRadioListFieldComponent extends AbstractFieldReadComponent {
|
|
|
18151
18131
|
|
|
18152
18132
|
const _c0$S = a0 => ({ "form-group-error": a0 });
|
|
18153
18133
|
const _c1$m = a0 => ({ selected: a0 });
|
|
18154
|
-
function
|
|
18155
|
-
i0.ɵɵelementStart(0, "span",
|
|
18134
|
+
function WriteDynamicRadioListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
18135
|
+
i0.ɵɵelementStart(0, "span", 5);
|
|
18156
18136
|
i0.ɵɵtext(1);
|
|
18157
18137
|
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
18158
18138
|
i0.ɵɵelementEnd();
|
|
@@ -18161,8 +18141,8 @@ function WriteDynamicRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf &
|
|
|
18161
18141
|
i0.ɵɵadvance();
|
|
18162
18142
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
18163
18143
|
} }
|
|
18164
|
-
function
|
|
18165
|
-
i0.ɵɵelementStart(0, "span",
|
|
18144
|
+
function WriteDynamicRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
18145
|
+
i0.ɵɵelementStart(0, "span", 6);
|
|
18166
18146
|
i0.ɵɵtext(1);
|
|
18167
18147
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
18168
18148
|
i0.ɵɵelementEnd();
|
|
@@ -18171,8 +18151,8 @@ function WriteDynamicRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf &
|
|
|
18171
18151
|
i0.ɵɵadvance();
|
|
18172
18152
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
|
|
18173
18153
|
} }
|
|
18174
|
-
function
|
|
18175
|
-
i0.ɵɵelementStart(0, "span",
|
|
18154
|
+
function WriteDynamicRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
18155
|
+
i0.ɵɵelementStart(0, "span", 5);
|
|
18176
18156
|
i0.ɵɵtext(1);
|
|
18177
18157
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
18178
18158
|
i0.ɵɵelementEnd();
|
|
@@ -18180,8 +18160,8 @@ function WriteDynamicRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf &
|
|
|
18180
18160
|
i0.ɵɵadvance();
|
|
18181
18161
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Select an option below"));
|
|
18182
18162
|
} }
|
|
18183
|
-
function
|
|
18184
|
-
i0.ɵɵelementStart(0, "span",
|
|
18163
|
+
function WriteDynamicRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
|
|
18164
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
18185
18165
|
i0.ɵɵtext(1);
|
|
18186
18166
|
i0.ɵɵpipe(2, "ccdFirstError");
|
|
18187
18167
|
i0.ɵɵelementEnd();
|
|
@@ -18190,10 +18170,10 @@ function WriteDynamicRadioListFieldComponent_span_7_Template(rf, ctx) { if (rf &
|
|
|
18190
18170
|
i0.ɵɵadvance();
|
|
18191
18171
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.dynamicRadioListControl.errors));
|
|
18192
18172
|
} }
|
|
18193
|
-
function
|
|
18194
|
-
i0.ɵɵelementStart(0, "div",
|
|
18195
|
-
i0.ɵɵelement(1, "input",
|
|
18196
|
-
i0.ɵɵelementStart(2, "label",
|
|
18173
|
+
function WriteDynamicRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
18174
|
+
i0.ɵɵelementStart(0, "div", 8);
|
|
18175
|
+
i0.ɵɵelement(1, "input", 9);
|
|
18176
|
+
i0.ɵɵelementStart(2, "label", 10);
|
|
18197
18177
|
i0.ɵɵtext(3);
|
|
18198
18178
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
18199
18179
|
i0.ɵɵelementEnd()();
|
|
@@ -18233,21 +18213,17 @@ class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
|
18233
18213
|
return this.parent?.value?.id ? this.parent.value.id + this.parent.value.value : super.createElementId(name);
|
|
18234
18214
|
}
|
|
18235
18215
|
static ɵfac = /*@__PURE__*/ (() => { let ɵWriteDynamicRadioListFieldComponent_BaseFactory; return function WriteDynamicRadioListFieldComponent_Factory(__ngFactoryType__) { return (ɵWriteDynamicRadioListFieldComponent_BaseFactory || (ɵWriteDynamicRadioListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicRadioListFieldComponent)))(__ngFactoryType__ || WriteDynamicRadioListFieldComponent); }; })();
|
|
18236
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicRadioListFieldComponent, selectors: [["ccd-write-dynamic-radio-list-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
18237
|
-
i0.ɵɵelementStart(0, "div", 0)(1, "fieldset");
|
|
18238
|
-
i0.ɵɵ
|
|
18239
|
-
i0.ɵɵelementStart(3, "label", 2);
|
|
18240
|
-
i0.ɵɵtemplate(4, WriteDynamicRadioListFieldComponent_span_4_Template, 3, 3, "span", 3)(5, WriteDynamicRadioListFieldComponent_span_5_Template, 3, 3, "span", 4)(6, WriteDynamicRadioListFieldComponent_span_6_Template, 3, 3, "span", 3)(7, WriteDynamicRadioListFieldComponent_span_7_Template, 3, 3, "span", 5);
|
|
18216
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicRadioListFieldComponent, selectors: [["ccd-write-dynamic-radio-list-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 9, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["class", "multiple-choice", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice", 3, "ngClass"], ["type", "radio", 1, "form-control", 3, "id", "name", "formControl", "value"], [1, "form-label", 3, "for"]], template: function WriteDynamicRadioListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
18217
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
|
|
18218
|
+
i0.ɵɵtemplate(3, WriteDynamicRadioListFieldComponent_span_3_Template, 3, 3, "span", 1)(4, WriteDynamicRadioListFieldComponent_span_4_Template, 3, 3, "span", 2)(5, WriteDynamicRadioListFieldComponent_span_5_Template, 3, 3, "span", 1)(6, WriteDynamicRadioListFieldComponent_span_6_Template, 3, 3, "span", 3);
|
|
18241
18219
|
i0.ɵɵelementEnd();
|
|
18242
|
-
i0.ɵɵelementContainerStart(
|
|
18243
|
-
i0.ɵɵtemplate(
|
|
18220
|
+
i0.ɵɵelementContainerStart(7);
|
|
18221
|
+
i0.ɵɵtemplate(8, WriteDynamicRadioListFieldComponent_div_8_Template, 5, 11, "div", 4);
|
|
18244
18222
|
i0.ɵɵelementContainerEnd();
|
|
18245
18223
|
i0.ɵɵelementEnd()();
|
|
18246
18224
|
} if (rf & 2) {
|
|
18247
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
18225
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$S, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
|
|
18248
18226
|
i0.ɵɵadvance(3);
|
|
18249
|
-
i0.ɵɵproperty("for", ctx.id());
|
|
18250
|
-
i0.ɵɵadvance();
|
|
18251
18227
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
18252
18228
|
i0.ɵɵadvance();
|
|
18253
18229
|
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
@@ -18261,7 +18237,7 @@ class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
|
18261
18237
|
}
|
|
18262
18238
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicRadioListFieldComponent, [{
|
|
18263
18239
|
type: Component,
|
|
18264
|
-
args: [{ selector: 'ccd-write-dynamic-radio-list-field', standalone: false, template: "<div class=\"form-group bottom-30\"\n [ngClass]=\"{'form-group-error': !dynamicRadioListControl.valid && dynamicRadioListControl.dirty}\" [id]=\"id()\">\n <fieldset>\n <legend
|
|
18240
|
+
args: [{ selector: 'ccd-write-dynamic-radio-list-field', standalone: false, template: "<div class=\"form-group bottom-30\"\n [ngClass]=\"{'form-group-error': !dynamicRadioListControl.valid && dynamicRadioListControl.dirty}\" [id]=\"id()\">\n <fieldset>\n <legend>\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{(caseField | ccdFieldLabel)}}</span>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"form-label\" *ngIf=\"!caseField.label && !caseField.hint_text\">{{'Select an option below' | rpxTranslate}}</span>\n <span class=\"error-message\"\n *ngIf=\"dynamicRadioListControl.errors && dynamicRadioListControl.dirty\">{{(dynamicRadioListControl.errors |\n ccdFirstError)}}</span>\n </legend>\n\n <ng-container>\n <div class=\"multiple-choice\" *ngFor=\"let radioButton of caseField.list_items\" [ngClass]=\"{selected: dynamicRadioListControl.value === radioButton.code}\">\n <input class=\"form-control\" [id]=\"createElementId(radioButton.code)\" [name]=\"id()\" type=\"radio\" [formControl]=\"dynamicRadioListControl\" [value]=\"radioButton.code\">\n <label class=\"form-label\" [for]=\"createElementId(radioButton.code)\">{{radioButton.label | rpxTranslate}}</label>\n </div>\n </ng-container>\n </fieldset>\n</div>\n" }]
|
|
18265
18241
|
}], null, null); })();
|
|
18266
18242
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteDynamicRadioListFieldComponent, { className: "WriteDynamicRadioListFieldComponent", filePath: "lib/shared/components/palette/dynamic-radio-list/write-dynamic-radio-list-field.component.ts", lineNumber: 10 }); })();
|
|
18267
18243
|
|
|
@@ -18526,8 +18502,8 @@ class ReadFixedRadioListFieldComponent extends AbstractFieldReadComponent {
|
|
|
18526
18502
|
|
|
18527
18503
|
const _c0$P = a0 => ({ "form-group-error": a0 });
|
|
18528
18504
|
const _c1$k = a0 => ({ selected: a0 });
|
|
18529
|
-
function
|
|
18530
|
-
i0.ɵɵelementStart(0, "span",
|
|
18505
|
+
function WriteFixedRadioListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
18506
|
+
i0.ɵɵelementStart(0, "span", 5);
|
|
18531
18507
|
i0.ɵɵtext(1);
|
|
18532
18508
|
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
18533
18509
|
i0.ɵɵelementEnd();
|
|
@@ -18536,8 +18512,8 @@ function WriteFixedRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1
|
|
|
18536
18512
|
i0.ɵɵadvance();
|
|
18537
18513
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
18538
18514
|
} }
|
|
18539
|
-
function
|
|
18540
|
-
i0.ɵɵelementStart(0, "span",
|
|
18515
|
+
function WriteFixedRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
18516
|
+
i0.ɵɵelementStart(0, "span", 6);
|
|
18541
18517
|
i0.ɵɵtext(1);
|
|
18542
18518
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
18543
18519
|
i0.ɵɵelementEnd();
|
|
@@ -18546,8 +18522,8 @@ function WriteFixedRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1
|
|
|
18546
18522
|
i0.ɵɵadvance();
|
|
18547
18523
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
|
|
18548
18524
|
} }
|
|
18549
|
-
function
|
|
18550
|
-
i0.ɵɵelementStart(0, "span",
|
|
18525
|
+
function WriteFixedRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
18526
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
18551
18527
|
i0.ɵɵtext(1);
|
|
18552
18528
|
i0.ɵɵpipe(2, "ccdFirstError");
|
|
18553
18529
|
i0.ɵɵelementEnd();
|
|
@@ -18556,10 +18532,10 @@ function WriteFixedRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1
|
|
|
18556
18532
|
i0.ɵɵadvance();
|
|
18557
18533
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r0.fixedRadioListControl.errors, ctx_r0.caseField.label));
|
|
18558
18534
|
} }
|
|
18559
|
-
function
|
|
18560
|
-
i0.ɵɵelementStart(0, "div",
|
|
18561
|
-
i0.ɵɵelement(1, "input",
|
|
18562
|
-
i0.ɵɵelementStart(2, "label",
|
|
18535
|
+
function WriteFixedRadioListFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
18536
|
+
i0.ɵɵelementStart(0, "div", 8);
|
|
18537
|
+
i0.ɵɵelement(1, "input", 9);
|
|
18538
|
+
i0.ɵɵelementStart(2, "label", 10);
|
|
18563
18539
|
i0.ɵɵtext(3);
|
|
18564
18540
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
18565
18541
|
i0.ɵɵelementEnd()();
|
|
@@ -18581,21 +18557,17 @@ class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
|
18581
18557
|
this.fixedRadioListControl = this.registerControl(new FormControl(notEmpty ? this.caseField.value : null));
|
|
18582
18558
|
}
|
|
18583
18559
|
static ɵfac = /*@__PURE__*/ (() => { let ɵWriteFixedRadioListFieldComponent_BaseFactory; return function WriteFixedRadioListFieldComponent_Factory(__ngFactoryType__) { return (ɵWriteFixedRadioListFieldComponent_BaseFactory || (ɵWriteFixedRadioListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteFixedRadioListFieldComponent)))(__ngFactoryType__ || WriteFixedRadioListFieldComponent); }; })();
|
|
18584
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteFixedRadioListFieldComponent, selectors: [["ccd-write-fixed-radio-list-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
18585
|
-
i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend")
|
|
18586
|
-
i0.ɵɵtemplate(4, WriteFixedRadioListFieldComponent_span_4_Template, 3, 3, "span", 2);
|
|
18587
|
-
i0.ɵɵelementEnd();
|
|
18588
|
-
i0.ɵɵtemplate(5, WriteFixedRadioListFieldComponent_span_5_Template, 3, 3, "span", 3)(6, WriteFixedRadioListFieldComponent_span_6_Template, 3, 4, "span", 4);
|
|
18560
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteFixedRadioListFieldComponent, selectors: [["ccd-write-fixed-radio-list-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["class", "multiple-choice", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice", 3, "ngClass"], ["type", "radio", 1, "form-control", 3, "id", "name", "formControl", "value"], [1, "form-label", 3, "for"]], template: function WriteFixedRadioListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
18561
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend");
|
|
18562
|
+
i0.ɵɵtemplate(3, WriteFixedRadioListFieldComponent_span_3_Template, 3, 3, "span", 1)(4, WriteFixedRadioListFieldComponent_span_4_Template, 3, 3, "span", 2)(5, WriteFixedRadioListFieldComponent_span_5_Template, 3, 4, "span", 3);
|
|
18589
18563
|
i0.ɵɵelementEnd();
|
|
18590
|
-
i0.ɵɵelementContainerStart(
|
|
18591
|
-
i0.ɵɵtemplate(
|
|
18564
|
+
i0.ɵɵelementContainerStart(6);
|
|
18565
|
+
i0.ɵɵtemplate(7, WriteFixedRadioListFieldComponent_div_7_Template, 5, 11, "div", 4);
|
|
18592
18566
|
i0.ɵɵelementContainerEnd();
|
|
18593
18567
|
i0.ɵɵelementEnd()();
|
|
18594
18568
|
} if (rf & 2) {
|
|
18595
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
18569
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$P, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
|
|
18596
18570
|
i0.ɵɵadvance(3);
|
|
18597
|
-
i0.ɵɵproperty("for", ctx.id());
|
|
18598
|
-
i0.ɵɵadvance();
|
|
18599
18571
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
18600
18572
|
i0.ɵɵadvance();
|
|
18601
18573
|
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
@@ -18607,7 +18579,7 @@ class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
|
18607
18579
|
}
|
|
18608
18580
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteFixedRadioListFieldComponent, [{
|
|
18609
18581
|
type: Component,
|
|
18610
|
-
args: [{ selector: 'ccd-write-fixed-radio-list-field', standalone: false, template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'form-group-error': !fixedRadioListControl.valid && (fixedRadioListControl.dirty || fixedRadioListControl.touched)}\" [id]=\"id()\">\n <fieldset>\n <legend>\n <
|
|
18582
|
+
args: [{ selector: 'ccd-write-fixed-radio-list-field', standalone: false, template: "<div class=\"form-group bottom-30\" [ngClass]=\"{'form-group-error': !fixedRadioListControl.valid && (fixedRadioListControl.dirty || fixedRadioListControl.touched)}\" [id]=\"id()\">\n <fieldset>\n <legend>\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{(caseField | ccdFieldLabel)}}</span>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate }}</span>\n <span class=\"error-message\" *ngIf=\"fixedRadioListControl.errors && (fixedRadioListControl.dirty || fixedRadioListControl.touched)\">{{(fixedRadioListControl.errors | ccdFirstError:caseField.label)}}</span>\n </legend>\n <ng-container>\n <div class=\"multiple-choice\" *ngFor=\"let radioButton of caseField.field_type.fixed_list_items\" [ngClass]=\"{selected: fixedRadioListControl.value === radioButton.code}\">\n <input class=\"form-control\" [id]=\"id()+'-'+radioButton.code\" [name]=\"id()\" type=\"radio\" [formControl]=\"fixedRadioListControl\" [value]=\"radioButton.code\">\n <label class=\"form-label\" [for]=\"id()+'-'+radioButton.code\">{{radioButton.label | rpxTranslate}}</label>\n </div>\n </ng-container>\n </fieldset>\n</div>\n" }]
|
|
18611
18583
|
}], null, null); })();
|
|
18612
18584
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteFixedRadioListFieldComponent, { className: "WriteFixedRadioListFieldComponent", filePath: "lib/shared/components/palette/fixed-radio-list/write-fixed-radio-list-field.component.ts", lineNumber: 10 }); })();
|
|
18613
18585
|
|
|
@@ -19404,7 +19376,7 @@ class BeforeYouStartComponent extends AbstractJourneyComponent {
|
|
|
19404
19376
|
this.serverLinkedApiError = this.linkedCasesService.serverLinkedApiError;
|
|
19405
19377
|
const linkedCaseReferenceIds = this.linkedCasesService.caseFieldValue.filter((item) => item).map((item) => item.id);
|
|
19406
19378
|
if (this.linkedCasesService.initialCaseLinks.length !== (this.linkedCasesService.caseFieldValue.length + this.linkedCasesService.casesToUnlink.length)) {
|
|
19407
|
-
this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter((item) => linkedCaseReferenceIds.
|
|
19379
|
+
this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter((item) => linkedCaseReferenceIds.includes(item.caseReference));
|
|
19408
19380
|
}
|
|
19409
19381
|
if (this.linkedCasesService.linkedCases.length === 0 && this.linkedCasesService.caseFieldValue.length !== 0 && !this.linkedCasesService.hasContinuedFromStart) {
|
|
19410
19382
|
this.linkedCasesService.caseFieldValue.forEach((item) => {
|
|
@@ -19691,7 +19663,7 @@ class ValidatorsUtils {
|
|
|
19691
19663
|
const _c0$M = a0 => ({ "govuk-form-group--error": a0 });
|
|
19692
19664
|
const _c1$h = a0 => ({ "table-group-error": a0 });
|
|
19693
19665
|
function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
19694
|
-
i0.ɵɵelementStart(0, "span",
|
|
19666
|
+
i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
|
|
19695
19667
|
i0.ɵɵtext(2, "Error:");
|
|
19696
19668
|
i0.ɵɵelementEnd();
|
|
19697
19669
|
i0.ɵɵtext(3);
|
|
@@ -19701,8 +19673,8 @@ function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
19701
19673
|
i0.ɵɵadvance(3);
|
|
19702
19674
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.caseNumberError, " ");
|
|
19703
19675
|
} }
|
|
19704
|
-
function
|
|
19705
|
-
i0.ɵɵelementStart(0, "span",
|
|
19676
|
+
function LinkCasesComponent_div_8_span_13_Template(rf, ctx) { if (rf & 1) {
|
|
19677
|
+
i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
|
|
19706
19678
|
i0.ɵɵtext(2, "Error:");
|
|
19707
19679
|
i0.ɵɵelementEnd();
|
|
19708
19680
|
i0.ɵɵtext(3);
|
|
@@ -19712,12 +19684,12 @@ function LinkCasesComponent_div_8_span_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
19712
19684
|
i0.ɵɵadvance(3);
|
|
19713
19685
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.caseReasonError, " ");
|
|
19714
19686
|
} }
|
|
19715
|
-
function
|
|
19687
|
+
function LinkCasesComponent_div_8_div_15_Template(rf, ctx) { if (rf & 1) {
|
|
19716
19688
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
19717
|
-
i0.ɵɵelementStart(0, "div",
|
|
19718
|
-
i0.ɵɵlistener("change", function
|
|
19689
|
+
i0.ɵɵelementStart(0, "div", 32)(1, "input", 33);
|
|
19690
|
+
i0.ɵɵlistener("change", function LinkCasesComponent_div_8_div_15_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.toggleLinkCaseReasonOtherComments($event)); });
|
|
19719
19691
|
i0.ɵɵelementEnd();
|
|
19720
|
-
i0.ɵɵelementStart(2, "label",
|
|
19692
|
+
i0.ɵɵelementStart(2, "label", 34);
|
|
19721
19693
|
i0.ɵɵtext(3);
|
|
19722
19694
|
i0.ɵɵelementEnd()();
|
|
19723
19695
|
} if (rf & 2) {
|
|
@@ -19731,8 +19703,8 @@ function LinkCasesComponent_div_8_div_13_Template(rf, ctx) { if (rf & 1) {
|
|
|
19731
19703
|
i0.ɵɵadvance();
|
|
19732
19704
|
i0.ɵɵtextInterpolate(reason_r4.value_en);
|
|
19733
19705
|
} }
|
|
19734
|
-
function
|
|
19735
|
-
i0.ɵɵelementStart(0, "span",
|
|
19706
|
+
function LinkCasesComponent_div_8_div_16_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
19707
|
+
i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
|
|
19736
19708
|
i0.ɵɵtext(2, "Error:");
|
|
19737
19709
|
i0.ɵɵelementEnd();
|
|
19738
19710
|
i0.ɵɵtext(3);
|
|
@@ -19742,25 +19714,30 @@ function LinkCasesComponent_div_8_div_14_span_3_Template(rf, ctx) { if (rf & 1)
|
|
|
19742
19714
|
i0.ɵɵadvance(3);
|
|
19743
19715
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.caseReasonCommentsError, " ");
|
|
19744
19716
|
} }
|
|
19745
|
-
function
|
|
19746
|
-
i0.ɵɵelementStart(0, "div",
|
|
19717
|
+
function LinkCasesComponent_div_8_div_16_Template(rf, ctx) { if (rf & 1) {
|
|
19718
|
+
i0.ɵɵelementStart(0, "div", 35)(1, "h3", 21);
|
|
19747
19719
|
i0.ɵɵtext(2, "Comments");
|
|
19748
19720
|
i0.ɵɵelementEnd();
|
|
19749
|
-
i0.ɵɵtemplate(3,
|
|
19750
|
-
i0.ɵɵelementStart(4, "
|
|
19751
|
-
i0.ɵɵtext(5
|
|
19721
|
+
i0.ɵɵtemplate(3, LinkCasesComponent_div_8_div_16_span_3_Template, 4, 1, "span", 6);
|
|
19722
|
+
i0.ɵɵelementStart(4, "label", 36);
|
|
19723
|
+
i0.ɵɵtext(5);
|
|
19752
19724
|
i0.ɵɵelementEnd();
|
|
19753
|
-
i0.ɵɵelementStart(6, "
|
|
19754
|
-
i0.ɵɵtext(7, "
|
|
19725
|
+
i0.ɵɵelementStart(6, "textarea", 37);
|
|
19726
|
+
i0.ɵɵtext(7, " ");
|
|
19727
|
+
i0.ɵɵelementEnd();
|
|
19728
|
+
i0.ɵɵelementStart(8, "div", 38);
|
|
19729
|
+
i0.ɵɵtext(9, " You can enter up to 100 characters ");
|
|
19755
19730
|
i0.ɵɵelementEnd()();
|
|
19756
19731
|
} if (rf & 2) {
|
|
19757
19732
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
19758
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
19733
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c0$M, !!ctx_r1.caseReasonCommentsError));
|
|
19759
19734
|
i0.ɵɵadvance(3);
|
|
19760
19735
|
i0.ɵɵproperty("ngIf", ctx_r1.caseReasonCommentsError);
|
|
19736
|
+
i0.ɵɵadvance(2);
|
|
19737
|
+
i0.ɵɵtextInterpolate1(" ", "Other description", " ");
|
|
19761
19738
|
} }
|
|
19762
|
-
function
|
|
19763
|
-
i0.ɵɵelementStart(0, "span",
|
|
19739
|
+
function LinkCasesComponent_div_8_span_19_Template(rf, ctx) { if (rf & 1) {
|
|
19740
|
+
i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
|
|
19764
19741
|
i0.ɵɵtext(2, "Error:");
|
|
19765
19742
|
i0.ɵɵelementEnd();
|
|
19766
19743
|
i0.ɵɵtext(3);
|
|
@@ -19772,38 +19749,43 @@ function LinkCasesComponent_div_8_span_17_Template(rf, ctx) { if (rf & 1) {
|
|
|
19772
19749
|
} }
|
|
19773
19750
|
function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
19774
19751
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
19775
|
-
i0.ɵɵelementStart(0, "div", 19)(1, "div",
|
|
19752
|
+
i0.ɵɵelementStart(0, "div", 19)(1, "div", 20)(2, "h3", 21);
|
|
19776
19753
|
i0.ɵɵtext(3, "Enter case reference");
|
|
19777
19754
|
i0.ɵɵelementEnd();
|
|
19778
19755
|
i0.ɵɵtemplate(4, LinkCasesComponent_div_8_span_4_Template, 4, 1, "span", 6);
|
|
19779
|
-
i0.ɵɵ
|
|
19756
|
+
i0.ɵɵelementStart(5, "label", 22);
|
|
19757
|
+
i0.ɵɵtext(6);
|
|
19780
19758
|
i0.ɵɵelementEnd();
|
|
19781
|
-
i0.ɵɵ
|
|
19782
|
-
i0.ɵɵtext(8, "Why should these cases be linked?");
|
|
19759
|
+
i0.ɵɵelement(7, "input", 23);
|
|
19783
19760
|
i0.ɵɵelementEnd();
|
|
19784
|
-
i0.ɵɵelementStart(
|
|
19785
|
-
i0.ɵɵtext(10, "
|
|
19761
|
+
i0.ɵɵelementStart(8, "div", 24)(9, "h3", 21);
|
|
19762
|
+
i0.ɵɵtext(10, "Why should these cases be linked?");
|
|
19786
19763
|
i0.ɵɵelementEnd();
|
|
19787
|
-
i0.ɵɵ
|
|
19788
|
-
i0.ɵɵ
|
|
19789
|
-
i0.ɵɵ
|
|
19764
|
+
i0.ɵɵelementStart(11, "div", 25);
|
|
19765
|
+
i0.ɵɵtext(12, " Select all that apply. ");
|
|
19766
|
+
i0.ɵɵelementEnd();
|
|
19767
|
+
i0.ɵɵtemplate(13, LinkCasesComponent_div_8_span_13_Template, 4, 1, "span", 6);
|
|
19768
|
+
i0.ɵɵelementStart(14, "div", 26);
|
|
19769
|
+
i0.ɵɵtemplate(15, LinkCasesComponent_div_8_div_15_Template, 4, 7, "div", 27);
|
|
19790
19770
|
i0.ɵɵelementEnd()();
|
|
19791
|
-
i0.ɵɵtemplate(
|
|
19792
|
-
i0.ɵɵelement(
|
|
19793
|
-
i0.ɵɵtemplate(
|
|
19794
|
-
i0.ɵɵelementStart(
|
|
19795
|
-
i0.ɵɵlistener("click", function
|
|
19796
|
-
i0.ɵɵtext(
|
|
19771
|
+
i0.ɵɵtemplate(16, LinkCasesComponent_div_8_div_16_Template, 10, 5, "div", 28);
|
|
19772
|
+
i0.ɵɵelement(17, "br")(18, "br");
|
|
19773
|
+
i0.ɵɵtemplate(19, LinkCasesComponent_div_8_span_19_Template, 4, 1, "span", 6);
|
|
19774
|
+
i0.ɵɵelementStart(20, "button", 29);
|
|
19775
|
+
i0.ɵɵlistener("click", function LinkCasesComponent_div_8_Template_button_click_20_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.submitCaseInfo()); });
|
|
19776
|
+
i0.ɵɵtext(21, "Propose case link");
|
|
19797
19777
|
i0.ɵɵelementEnd()();
|
|
19798
19778
|
} if (rf & 2) {
|
|
19799
19779
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
19800
19780
|
i0.ɵɵproperty("formGroup", ctx_r1.linkCaseForm);
|
|
19801
19781
|
i0.ɵɵadvance();
|
|
19802
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
19782
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$M, !!ctx_r1.caseNumberError));
|
|
19803
19783
|
i0.ɵɵadvance(3);
|
|
19804
19784
|
i0.ɵɵproperty("ngIf", ctx_r1.caseNumberError);
|
|
19805
19785
|
i0.ɵɵadvance(2);
|
|
19806
|
-
i0.ɵɵ
|
|
19786
|
+
i0.ɵɵtextInterpolate1(" ", "Enter case reference", " ");
|
|
19787
|
+
i0.ɵɵadvance(2);
|
|
19788
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$M, !!ctx_r1.caseReasonError));
|
|
19807
19789
|
i0.ɵɵadvance(5);
|
|
19808
19790
|
i0.ɵɵproperty("ngIf", ctx_r1.caseReasonError);
|
|
19809
19791
|
i0.ɵɵadvance(2);
|
|
@@ -19814,7 +19796,7 @@ function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
19814
19796
|
i0.ɵɵproperty("ngIf", ctx_r1.caseSelectionError);
|
|
19815
19797
|
} }
|
|
19816
19798
|
function LinkCasesComponent_span_13_Template(rf, ctx) { if (rf & 1) {
|
|
19817
|
-
i0.ɵɵelementStart(0, "span",
|
|
19799
|
+
i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
|
|
19818
19800
|
i0.ɵɵtext(2, "Error:");
|
|
19819
19801
|
i0.ɵɵelementEnd();
|
|
19820
19802
|
i0.ɵɵtext(3);
|
|
@@ -19837,27 +19819,27 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) { if (rf & 1) {
|
|
|
19837
19819
|
} }
|
|
19838
19820
|
function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
|
|
19839
19821
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
19840
|
-
i0.ɵɵelementStart(0, "tr", 10)(1, "td",
|
|
19841
|
-
i0.ɵɵelement(2, "div",
|
|
19822
|
+
i0.ɵɵelementStart(0, "tr", 10)(1, "td", 39);
|
|
19823
|
+
i0.ɵɵelement(2, "div", 40);
|
|
19842
19824
|
i0.ɵɵelementStart(3, "span");
|
|
19843
19825
|
i0.ɵɵtext(4);
|
|
19844
19826
|
i0.ɵɵelement(5, "br");
|
|
19845
19827
|
i0.ɵɵtext(6);
|
|
19846
19828
|
i0.ɵɵpipe(7, "ccdCaseReference");
|
|
19847
19829
|
i0.ɵɵelementEnd()();
|
|
19848
|
-
i0.ɵɵelementStart(8, "td",
|
|
19830
|
+
i0.ɵɵelementStart(8, "td", 41);
|
|
19849
19831
|
i0.ɵɵtext(9);
|
|
19850
19832
|
i0.ɵɵelementEnd();
|
|
19851
|
-
i0.ɵɵelementStart(10, "td",
|
|
19833
|
+
i0.ɵɵelementStart(10, "td", 39);
|
|
19852
19834
|
i0.ɵɵtext(11);
|
|
19853
19835
|
i0.ɵɵelementEnd();
|
|
19854
|
-
i0.ɵɵelementStart(12, "td",
|
|
19836
|
+
i0.ɵɵelementStart(12, "td", 41);
|
|
19855
19837
|
i0.ɵɵtext(13);
|
|
19856
19838
|
i0.ɵɵelementEnd();
|
|
19857
|
-
i0.ɵɵelementStart(14, "td",
|
|
19858
|
-
i0.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span",
|
|
19839
|
+
i0.ɵɵelementStart(14, "td", 39);
|
|
19840
|
+
i0.ɵɵtemplate(15, LinkCasesComponent_tr_31_span_15_Template, 4, 3, "span", 42);
|
|
19859
19841
|
i0.ɵɵelementEnd();
|
|
19860
|
-
i0.ɵɵelementStart(16, "td",
|
|
19842
|
+
i0.ɵɵelementStart(16, "td", 39)(17, "a", 43);
|
|
19861
19843
|
i0.ɵɵlistener("click", function LinkCasesComponent_tr_31_Template_a_click_17_listener() { const ctx_r7 = i0.ɵɵrestoreView(_r6); const case_r9 = ctx_r7.$implicit; const pos_r10 = ctx_r7.index; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectedLinkedCaseRemove(pos_r10, case_r9.caseReference)); });
|
|
19862
19844
|
i0.ɵɵtext(18, "Remove");
|
|
19863
19845
|
i0.ɵɵelementEnd()()();
|
|
@@ -19886,7 +19868,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
|
|
|
19886
19868
|
i0.ɵɵattribute("id", case_r9.caseReference);
|
|
19887
19869
|
} }
|
|
19888
19870
|
function LinkCasesComponent_tr_32_Template(rf, ctx) { if (rf & 1) {
|
|
19889
|
-
i0.ɵɵelementStart(0, "tr", 10)(1, "td",
|
|
19871
|
+
i0.ɵɵelementStart(0, "tr", 10)(1, "td", 44);
|
|
19890
19872
|
i0.ɵɵtext(2, " None ");
|
|
19891
19873
|
i0.ɵɵelementEnd()();
|
|
19892
19874
|
} }
|
|
@@ -19954,7 +19936,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
|
|
|
19954
19936
|
}
|
|
19955
19937
|
toggleLinkCaseReasonOtherComments(event) {
|
|
19956
19938
|
this.linkCaseReasons.find((reason) => reason.value_en === event.target.value).selected = event.target.checked;
|
|
19957
|
-
this.showComments = this.linkCaseReasons.
|
|
19939
|
+
this.showComments = this.linkCaseReasons.some((reason) => reason.value_en === 'Other' && reason.selected);
|
|
19958
19940
|
}
|
|
19959
19941
|
submitCaseInfo() {
|
|
19960
19942
|
this.errorMessages = [];
|
|
@@ -19982,7 +19964,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
|
|
|
19982
19964
|
return false;
|
|
19983
19965
|
}
|
|
19984
19966
|
const caseNumber = this.linkCaseForm.value.caseNumber;
|
|
19985
|
-
return
|
|
19967
|
+
return linkedCases.some((caseLink) => caseLink.caseReference.split('-').join('').trim() === caseNumber.split('-').join('').trim());
|
|
19986
19968
|
}
|
|
19987
19969
|
isCaseInInitial(proposedCaseLink) {
|
|
19988
19970
|
if (proposedCaseLink) {
|
|
@@ -20017,7 +19999,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
|
|
|
20017
19999
|
});
|
|
20018
20000
|
}
|
|
20019
20001
|
if (this.linkCaseForm.controls.reasonType.valid
|
|
20020
|
-
&& this.linkCaseReasons.
|
|
20002
|
+
&& this.linkCaseReasons.some((reason) => reason.value_en === 'Other' && reason.selected)) {
|
|
20021
20003
|
if (this.linkCaseForm.controls.otherDescription.value.trim().length === 0) {
|
|
20022
20004
|
this.caseReasonCommentsError = LinkedCasesErrorMessages.otherDescriptionError;
|
|
20023
20005
|
this.errorMessages.push({
|
|
@@ -20190,7 +20172,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
|
|
|
20190
20172
|
}
|
|
20191
20173
|
}
|
|
20192
20174
|
static ɵfac = function LinkCasesComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LinkCasesComponent)(i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(ValidatorsUtils), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
|
|
20193
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkCasesComponent, selectors: [["ccd-link-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 33, vars: 11, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-caption-l"], [1, "govuk-heading-xl"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["id", "
|
|
20175
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkCasesComponent, selectors: [["ccd-link-cases"]], outputs: { linkedCasesStateEmitter: "linkedCasesStateEmitter" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 33, vars: 11, consts: [[1, "govuk-grid-row"], [1, "govuk-grid-column-full"], [1, "govuk-caption-l"], [1, "govuk-heading-xl"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["id", "proposedCaseLinks", 1, "govuk-form-group", 3, "ngClass"], ["class", "govuk-error-message", 4, "ngIf"], [1, "govuk-table"], [1, "govuk-table__caption", "govuk-table__caption--m"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header", "case-table-column-300"], ["scope", "col", 1, "govuk-table__header", "case-table-column-150"], ["scope", "col", 1, "govuk-table__header", "case-table-column-200"], ["scope", "col", 1, "govuk-table__header", "case-table-column-400"], ["scope", "col", 1, "govuk-table__header", "case-table-column-50"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "form-group", 3, "formGroup"], ["id", "caseNumber", 1, "govuk-form-group", 3, "ngClass"], [1, "govuk-heading-s"], ["for", "width-20", 1, "govuk-label", "govuk-visually-hidden"], ["formControlName", "caseNumber", "id", "width-20", "name", "width-20", "type", "text", 1, "govuk-input", "govuk-input--width-20"], [1, "govuk-!-margin-top-3", 3, "ngClass"], ["id", "waste-hint", 1, "govuk-hint"], ["data-module", "govuk-checkboxes", "formArrayName", "reasonType", "id", "caseReason", 1, "govuk-checkboxes"], ["class", "govuk-checkboxes__item", 3, "formGroupName", 4, "ngFor", "ngForOf"], ["id", "other-description-char-limit-error", "class", "govuk-!-margin-top-3", 3, "ngClass", 4, "ngIf"], ["id", "propose", "type", "button", "data-module", "govuk-button", 1, "govuk-button", "govuk-button--secondary", 3, "click"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-checkboxes__item", 3, "formGroupName"], ["formControlName", "selected", "name", "pos", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "id", "value"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["id", "other-description-char-limit-error", 1, "govuk-!-margin-top-3", 3, "ngClass"], ["for", "otherDescription", 1, "govuk-label", "govuk-visually-hidden"], ["id", "otherDescription", "name", "otherDescription", "formControlName", "otherDescription", "rows", "5", "aria-describedby", "other-description-char-limit-info other-description-char-limit-error", 1, "govuk-textarea", "govuk-input--width-30"], ["id", "other-description-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-table__cell"], [1, "govuk-form-group--error", 3, "ngClass"], [1, "govuk-table__cell", 3, "title"], [4, "ngFor", "ngForOf"], [1, "govuk-link", "no-visited-state", 3, "click"], ["colspan", "6", 1, "govuk-table__cell"]], template: function LinkCasesComponent_Template(rf, ctx) { if (rf & 1) {
|
|
20194
20176
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div")(3, "span", 2);
|
|
20195
20177
|
i0.ɵɵtext(4);
|
|
20196
20178
|
i0.ɵɵpipe(5, "ccdCaseReference");
|
|
@@ -20198,7 +20180,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
|
|
|
20198
20180
|
i0.ɵɵelementStart(6, "h1", 3);
|
|
20199
20181
|
i0.ɵɵtext(7, "Select a\u00A0case you want to link to this case");
|
|
20200
20182
|
i0.ɵɵelementEnd();
|
|
20201
|
-
i0.ɵɵtemplate(8, LinkCasesComponent_div_8_Template,
|
|
20183
|
+
i0.ɵɵtemplate(8, LinkCasesComponent_div_8_Template, 22, 13, "div", 4);
|
|
20202
20184
|
i0.ɵɵelement(9, "hr")(10, "br")(11, "br");
|
|
20203
20185
|
i0.ɵɵelementStart(12, "div", 5);
|
|
20204
20186
|
i0.ɵɵtemplate(13, LinkCasesComponent_span_13_Template, 4, 1, "span", 6);
|
|
@@ -20238,11 +20220,11 @@ class LinkCasesComponent extends AbstractJourneyComponent {
|
|
|
20238
20220
|
i0.ɵɵproperty("ngForOf", ctx.selectedCases);
|
|
20239
20221
|
i0.ɵɵadvance();
|
|
20240
20222
|
i0.ɵɵproperty("ngIf", !ctx.selectedCases.length);
|
|
20241
|
-
} }, styles: [".no-visited-state[_ngcontent-%COMP%]{color:#1d70b8;cursor:pointer}.no-visited-state[_ngcontent-%COMP%]:hover{color:#003078}.govuk-checkboxes[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;max-height:500px;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:5px}.govuk-checkboxes[_ngcontent-%COMP%] .govuk-checkboxes__item[_ngcontent-%COMP%]{display:flex} .govuk-width-container .screen-990 .width-50{width:100%}.govuk-table__row[_ngcontent-%COMP%]{position:relative}.govuk-table__row[_ngcontent-%COMP%] .table-group-error[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 20px);margin-left:-15px}"] });
|
|
20223
|
+
} }, styles: [".no-visited-state[_ngcontent-%COMP%]{color:#1d70b8;cursor:pointer}.no-visited-state[_ngcontent-%COMP%]:hover{color:#003078}.govuk-checkboxes[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;max-height:500px;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:5px}.govuk-checkboxes[_ngcontent-%COMP%] .govuk-checkboxes__item[_ngcontent-%COMP%]{display:flex} .govuk-width-container .screen-990 .width-50{width:100%}.govuk-table__row[_ngcontent-%COMP%]{position:relative}.govuk-table__row[_ngcontent-%COMP%] .table-group-error[_ngcontent-%COMP%]{position:absolute;height:calc(100% - 20px);margin-left:-15px}.case-table-column-300[_ngcontent-%COMP%]{width:300px}.case-table-column-150[_ngcontent-%COMP%]{width:150px}.case-table-column-200[_ngcontent-%COMP%]{width:200px}.case-table-column-400[_ngcontent-%COMP%]{width:400px}.case-table-column-50[_ngcontent-%COMP%]{width:50px}"] });
|
|
20242
20224
|
}
|
|
20243
20225
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkCasesComponent, [{
|
|
20244
20226
|
type: Component,
|
|
20245
|
-
args: [{ selector: 'ccd-link-cases', standalone: false, template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <div>\n <span class=\"govuk-caption-l\">Link cases to {{caseName}} {{caseId | ccdCaseReference}}</span>\n <h1 class=\"govuk-heading-xl\">Select a case you want to link to this case</h1>\n <div class=\"form-group\" [formGroup]=\"linkCaseForm\" *ngIf=\"linkCaseForm\">\n <div class=\"govuk-form-group\" id=\"caseNumber\" [ngClass]=\"{'govuk-form-group--error': !!caseNumberError}\">\n <h3 class=\"govuk-heading-s\">Enter case reference</h3>\n <span class=\"govuk-error-message\" *ngIf=\"caseNumberError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseNumberError}}\n </span>\n <input class=\"govuk-input govuk-input--width-20\" formControlName=\"caseNumber\" id=\"width-20\" name=\"width-20\"\n type=\"text\">\n </div>\n <div [ngClass]=\"{'govuk-form-group--error': !!caseReasonError}\" class=\"govuk-!-margin-top-3\">\n <h3 class=\"govuk-heading-s\">Why should these cases be linked?</h3>\n <div id=\"waste-hint\" class=\"govuk-hint\">\n Select all that apply.\n </div>\n <span class=\"govuk-error-message\" *ngIf=\"caseReasonError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseReasonError}}\n </span>\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\" formArrayName=\"reasonType\" id=\"caseReason\">\n <div class=\"govuk-checkboxes__item\" *ngFor=\"let reason of linkCaseReasons;index as pos\" [formGroupName]=\"pos\">\n <input class=\"govuk-checkboxes__input\" id=\"{{reason.key}}\" formControlName=\"selected\" name=\"pos\"\n type=\"checkbox\" [value]=\"reason.value_en\" (change)=\"toggleLinkCaseReasonOtherComments($event)\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"{{reason.key}}\">{{reason.value_en}}</label>\n </div>\n </div>\n </div>\n <div id=\"other-description-char-limit-error\" [ngClass]=\"{'govuk-form-group--error': !!caseReasonCommentsError}\" class=\"govuk-!-margin-top-3\" *ngIf=\"showComments\">\n <h3 class=\"govuk-heading-s\">Comments</h3>\n <span class=\"govuk-error-message\" *ngIf=\"caseReasonCommentsError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseReasonCommentsError}}\n </span>\n <textarea class=\"govuk-textarea govuk-input--width-30\" id=\"otherDescription\"\n name=\"otherDescription\" formControlName=\"otherDescription\" rows=\"5\"\n aria-describedby=\"other-description-
|
|
20227
|
+
args: [{ selector: 'ccd-link-cases', standalone: false, template: "<div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <div>\n <span class=\"govuk-caption-l\">Link cases to {{caseName}} {{caseId | ccdCaseReference}}</span>\n <h1 class=\"govuk-heading-xl\">Select a case you want to link to this case</h1>\n <div class=\"form-group\" [formGroup]=\"linkCaseForm\" *ngIf=\"linkCaseForm\">\n <div class=\"govuk-form-group\" id=\"caseNumber\" [ngClass]=\"{'govuk-form-group--error': !!caseNumberError}\">\n <h3 class=\"govuk-heading-s\">Enter case reference</h3>\n <span class=\"govuk-error-message\" *ngIf=\"caseNumberError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseNumberError}}\n </span>\n <label class=\"govuk-label govuk-visually-hidden\" for=\"width-20\">\n {{ 'Enter case reference' }}\n </label>\n <input class=\"govuk-input govuk-input--width-20\" formControlName=\"caseNumber\" id=\"width-20\" name=\"width-20\"\n type=\"text\">\n </div>\n <div [ngClass]=\"{'govuk-form-group--error': !!caseReasonError}\" class=\"govuk-!-margin-top-3\">\n <h3 class=\"govuk-heading-s\">Why should these cases be linked?</h3>\n <div id=\"waste-hint\" class=\"govuk-hint\">\n Select all that apply.\n </div>\n <span class=\"govuk-error-message\" *ngIf=\"caseReasonError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseReasonError}}\n </span>\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\" formArrayName=\"reasonType\" id=\"caseReason\">\n <div class=\"govuk-checkboxes__item\" *ngFor=\"let reason of linkCaseReasons;index as pos\" [formGroupName]=\"pos\">\n <input class=\"govuk-checkboxes__input\" id=\"{{reason.key}}\" formControlName=\"selected\" name=\"pos\"\n type=\"checkbox\" [value]=\"reason.value_en\" (change)=\"toggleLinkCaseReasonOtherComments($event)\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"{{reason.key}}\">{{reason.value_en}}</label>\n </div>\n </div>\n </div>\n <div id=\"other-description-char-limit-error\" [ngClass]=\"{'govuk-form-group--error': !!caseReasonCommentsError}\" class=\"govuk-!-margin-top-3\" *ngIf=\"showComments\">\n <h3 class=\"govuk-heading-s\">Comments</h3>\n <span class=\"govuk-error-message\" *ngIf=\"caseReasonCommentsError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseReasonCommentsError}}\n </span>\n <label class=\"govuk-label govuk-visually-hidden\" for=\"otherDescription\">\n {{ 'Other description' }}\n </label>\n <textarea class=\"govuk-textarea govuk-input--width-30\" id=\"otherDescription\"\n name=\"otherDescription\" formControlName=\"otherDescription\" rows=\"5\"\n aria-describedby=\"other-description-char-limit-info other-description-char-limit-error\">\n </textarea>\n <div id=\"other-description-char-limit-info\" aria-live=\"polite\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 100 characters\n </div>\n </div>\n <br><br>\n <span class=\"govuk-error-message\" *ngIf=\"caseSelectionError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{caseSelectionError}}\n </span>\n <button id=\"propose\" type=\"button\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\"\n (click)=\"submitCaseInfo()\">Propose case link</button>\n </div>\n <hr>\n <br><br>\n <div class=\"govuk-form-group\" id=\"proposedCaseLinks\" [ngClass]=\"{'govuk-form-group--error': !!noSelectedCaseError}\">\n <span class=\"govuk-error-message\" *ngIf=\"noSelectedCaseError\">\n <span class=\"govuk-visually-hidden\">Error:</span> {{noSelectedCaseError}}\n </span>\n <table class=\"govuk-table\">\n <caption class=\"govuk-table__caption govuk-table__caption--m\">Proposed case links </caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header case-table-column-300\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column-150\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column-200\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column-200\">State</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column-400\">Reasons for case link</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column-50\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of selectedCases; let pos = index\">\n <td class=\"govuk-table__cell\">\n <div class=\"govuk-form-group--error\"\n [ngClass]=\"{'table-group-error':caseSelectionError && case.caseReference === linkCaseForm.value.caseNumber}\">\n </div>\n <span>{{case.caseName}} <br> {{case.caseReference | ccdCaseReference}}</span>\n </td>\n <td class=\"govuk-table__cell\" [title]=\"case.caseTypeDescription\">{{case.caseType}}</td>\n <td class=\"govuk-table__cell\">{{case.caseService}}</td>\n <td class=\"govuk-table__cell\" [title]=\"case.caseStateDescription\">{{case.caseState}}</td>\n <td class=\"govuk-table__cell\"><span\n *ngFor=\"let reason of case.reasons\">{{reason | ccdLinkCasesReasonValue}}<br></span></td>\n <td class=\"govuk-table__cell\"><a [attr.id]=\"case.caseReference\" (click)=\"onSelectedLinkedCaseRemove(pos, case.caseReference);\"\n class=\"govuk-link no-visited-state\">Remove</a></td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!selectedCases.length\">\n <td class=\"govuk-table__cell\" colspan=\"6\">\n None\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n</div>\n", styles: [".no-visited-state{color:#1d70b8;cursor:pointer}.no-visited-state:hover{color:#003078}.govuk-checkboxes{display:flex;flex-direction:column;flex-wrap:wrap;max-height:500px;width:100%;overflow-x:auto;overflow-y:hidden;padding-top:5px}.govuk-checkboxes .govuk-checkboxes__item{display:flex}::ng-deep .govuk-width-container .screen-990 .width-50{width:100%}.govuk-table__row{position:relative}.govuk-table__row .table-group-error{position:absolute;height:calc(100% - 20px);margin-left:-15px}.case-table-column-300{width:300px}.case-table-column-150{width:150px}.case-table-column-200{width:200px}.case-table-column-400{width:400px}.case-table-column-50{width:50px}\n"] }]
|
|
20246
20228
|
}], () => [{ type: CasesService }, { type: i4.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }, { type: MultipageComponentStateService }], { linkedCasesStateEmitter: [{
|
|
20247
20229
|
type: Output
|
|
20248
20230
|
}] }); })();
|
|
@@ -20406,7 +20388,7 @@ class LinkedCasesFromTableComponent {
|
|
|
20406
20388
|
}
|
|
20407
20389
|
ngAfterViewInit() {
|
|
20408
20390
|
const labelField = document.getElementsByClassName('case-viewer-label');
|
|
20409
|
-
if (labelField
|
|
20391
|
+
if (labelField?.length) {
|
|
20410
20392
|
labelField[0].replaceWith('');
|
|
20411
20393
|
}
|
|
20412
20394
|
}
|
|
@@ -20466,7 +20448,7 @@ class LinkedCasesFromTableComponent {
|
|
|
20466
20448
|
: 'Show';
|
|
20467
20449
|
}
|
|
20468
20450
|
static ɵfac = function LinkedCasesFromTableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LinkedCasesFromTableComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
20469
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkedCasesFromTableComponent, selectors: [["ccd-linked-cases-from-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, standalone: false, decls: 2, vars: 2, consts: [["type", "button", "id", "show-hide-link", "class", "govuk-js-link", 3, "click", 4, "ngIf"], ["aria-label", "table to display cases linked from", 4, "ngIf"], ["type", "button", "id", "show-hide-link", 1, "govuk-js-link", 3, "click"], ["aria-label", "table to display cases linked from"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col",
|
|
20451
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkedCasesFromTableComponent, selectors: [["ccd-linked-cases-from-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, standalone: false, decls: 2, vars: 2, consts: [["type", "button", "id", "show-hide-link", "class", "govuk-js-link", 3, "click", 4, "ngIf"], ["aria-label", "table to display cases linked from", 4, "ngIf"], ["type", "button", "id", "show-hide-link", 1, "govuk-js-link", 3, "click"], ["aria-label", "table to display cases linked from"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header", "case-table-column"], ["class", "govuk-table__body", 4, "ngIf"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-table__header", "case-table-column", "width-20"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 1, "govuk-link", 3, "href"], [1, "case-table-column"], [3, "title"], ["class", "case-table-column", 4, "ngFor", "ngForOf"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-padding-left-1", 3, "href", 4, "ngIf"], [4, "ngIf"], [1, "govuk-!-padding-left-1", 3, "href"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesFromTableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
20470
20452
|
i0.ɵɵtemplate(0, LinkedCasesFromTableComponent_button_0_Template, 2, 1, "button", 0)(1, LinkedCasesFromTableComponent_table_1_Template, 14, 1, "table", 1);
|
|
20471
20453
|
} if (rf & 2) {
|
|
20472
20454
|
i0.ɵɵproperty("ngIf", !ctx.noLinkedCases && !ctx.isServerError);
|
|
@@ -20476,7 +20458,7 @@ class LinkedCasesFromTableComponent {
|
|
|
20476
20458
|
}
|
|
20477
20459
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesFromTableComponent, [{
|
|
20478
20460
|
type: Component,
|
|
20479
|
-
args: [{ selector: 'ccd-linked-cases-from-table', standalone: false, template: "<button type=\"button\" *ngIf=\"!noLinkedCases && !isServerError\" id=\"show-hide-link\" class=\"govuk-js-link\"\n (click)=\"onClick()\">{{showHideLinkText}}</button>\n<table *ngIf=\"(getLinkedCasesResponse && showHideLinkText === 'Hide') || noLinkedCases\"\n aria-label=\"table to display cases linked from\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header case-table-column\"
|
|
20461
|
+
args: [{ selector: 'ccd-linked-cases-from-table', standalone: false, template: "<button type=\"button\" *ngIf=\"!noLinkedCases && !isServerError\" id=\"show-hide-link\" class=\"govuk-js-link\"\n (click)=\"onClick()\">{{showHideLinkText}}</button>\n<table *ngIf=\"(getLinkedCasesResponse && showHideLinkText === 'Hide') || noLinkedCases\"\n aria-label=\"table to display cases linked from\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">State</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Reasons for case link</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"getLinkedCasesResponse && (!isServerError && !isServerReasonCodeError)\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of getLinkedCasesResponse\">\n <td class=\"govuk-table__header case-table-column width-20\">\n <p class=\"govuk-body\"><a target=\"_blank\" class=\"govuk-link\" href=\"cases/case-details/{{ case.ccdJurisdiction }}/{{ case.ccdCaseType }}/{{case.caseReference}}\"\n rel=\"noopener\"><span>{{case.caseNameHmctsInternal}} <br>\n {{case.caseReference | ccdCaseReference}}</span></a></p>\n </td>\n <td class=\"case-table-column\"><span [title]=\"case.ccdCaseTypeDescription\">{{case.ccdCaseType}}</span></td>\n <td class=\"case-table-column\"><span>{{case.ccdJurisdiction}}</span></td>\n <td class=\"case-table-column\"><span [title]=\"case.stateDescription\">{{case.state}}</span></td>\n <td class=\"case-table-column\" *ngFor=\"let details of case.linkDetails\">\n <span *ngFor=\"let reason of details.reasons; let i = index; let isLast = last\">\n {{reason | ccdLinkCasesFromReasonValue}}<span><a class=\"govuk-!-padding-left-1\"\n href=\"cases/case-details/{{ case.ccdJurisdiction }}/{{ case.ccdCaseType }}/{{ case.caseReference }}\"\n *ngIf=\"hasLeadCaseOrConsolidated(reason.reasonCode)\">{{getCaseReferenceLink(case.caseReference)}}</a></span>\n <br *ngIf=\"!isLast\" />\n </span>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"noLinkedCases\">\n <td class=\"govuk-table__cell\" colspan=\"5\">\n None\n </td>\n </tr>\n </tbody>\n</table>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}.case-table-column{min-width:20%;max-width:20%}.heading-h2{margin-bottom:0}\n"] }]
|
|
20480
20462
|
}], () => [{ type: i1$2.ActivatedRoute }, { type: CasesService }, { type: LinkedCasesService }], { caseField: [{
|
|
20481
20463
|
type: Input
|
|
20482
20464
|
}], notifyAPIFailure: [{
|
|
@@ -20619,11 +20601,11 @@ class LinkedCasesToTableComponent {
|
|
|
20619
20601
|
}
|
|
20620
20602
|
ngAfterViewInit() {
|
|
20621
20603
|
let labelField = document.getElementsByClassName('govuk-heading-l');
|
|
20622
|
-
if (labelField
|
|
20604
|
+
if (labelField?.length) {
|
|
20623
20605
|
labelField[0].replaceWith('');
|
|
20624
20606
|
}
|
|
20625
20607
|
labelField = document.getElementsByClassName('heading-h2');
|
|
20626
|
-
if (labelField
|
|
20608
|
+
if (labelField?.length) {
|
|
20627
20609
|
labelField[0].replaceWith('');
|
|
20628
20610
|
}
|
|
20629
20611
|
}
|
|
@@ -20742,7 +20724,7 @@ class LinkedCasesToTableComponent {
|
|
|
20742
20724
|
};
|
|
20743
20725
|
}
|
|
20744
20726
|
static ɵfac = function LinkedCasesToTableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LinkedCasesToTableComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CasesService)); };
|
|
20745
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkedCasesToTableComponent, selectors: [["ccd-linked-cases-to-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, standalone: false, decls: 3, vars: 1, consts: [[1, "govuk-grid-row", "govuk-!-margin-bottom-2"], [1, "govuk-grid-column-full"], ["aria-label", "table to display cases linked TO", 4, "ngIf"], ["aria-label", "table to display cases linked TO"], [1, "govuk-table__row"], ["scope", "col",
|
|
20727
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LinkedCasesToTableComponent, selectors: [["ccd-linked-cases-to-table"]], inputs: { caseField: "caseField" }, outputs: { notifyAPIFailure: "notifyAPIFailure" }, standalone: false, decls: 3, vars: 1, consts: [[1, "govuk-grid-row", "govuk-!-margin-bottom-2"], [1, "govuk-grid-column-full"], ["aria-label", "table to display cases linked TO", 4, "ngIf"], ["aria-label", "table to display cases linked TO"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header", "case-table-column"], [1, "govuk-table__body"], ["class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["class", "govuk-table__row", 4, "ngIf"], [1, "govuk-body"], ["target", "_blank", "rel", "noopener", 3, "href"], [1, "govuk-link"], [3, "title"], [4, "ngIf"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-padding-left-1", 3, "href", 4, "ngIf"], [1, "govuk-!-padding-left-1", 3, "href"], ["colspan", "5", 1, "govuk-table__cell"]], template: function LinkedCasesToTableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
20746
20728
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
20747
20729
|
i0.ɵɵtemplate(2, LinkedCasesToTableComponent_table_2_Template, 16, 2, "table", 2);
|
|
20748
20730
|
i0.ɵɵelementEnd()();
|
|
@@ -20753,7 +20735,7 @@ class LinkedCasesToTableComponent {
|
|
|
20753
20735
|
}
|
|
20754
20736
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesToTableComponent, [{
|
|
20755
20737
|
type: Component,
|
|
20756
|
-
args: [{ selector: 'ccd-linked-cases-to-table', standalone: false, template: "<div class=\"govuk-grid-row govuk-!-margin-bottom-2\">\n <div class=\"govuk-grid-column-full\">\n <table *ngIf=\"linkedCasesFromResponse\" aria-label=\"table to display cases linked TO\">\n <thead>\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header case-table-column\"
|
|
20738
|
+
args: [{ selector: 'ccd-linked-cases-to-table', standalone: false, template: "<div class=\"govuk-grid-row govuk-!-margin-bottom-2\">\n <div class=\"govuk-grid-column-full\">\n <table *ngIf=\"linkedCasesFromResponse\" aria-label=\"table to display cases linked TO\">\n <thead>\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Case name and number</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Case type </th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Service</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">State</th>\n <th scope=\"col\" class=\"govuk-table__header case-table-column\">Reasons for case link</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let case of linkedCasesFromResponse\">\n <td>\n <p class=\"govuk-body\"><a target=\"_blank\" href=\"cases/case-details/{{ case.service }}/{{ case.caseType }}/{{case.caseReference}}\"\n rel=\"noopener\"><span class=\"govuk-link\">{{case.caseName}} <br>\n {{case.caseReference | ccdCaseReference}}</span></a></p>\n </td>\n <td><span [title]=\"case.caseTypeDescription\">{{case.caseType}}</span></td>\n <td><span>{{case.service}}</span></td>\n <td><span [title]=\"case.stateDescription\">{{case.state}}</span>\n </td>\n <td *ngIf=\"case && case.reasons\">\n <span *ngFor=\"let reason of case.reasons; let i = index; let isLast = last\">\n {{reason.value | ccdLinkCasesReasonValue}}<span><a class=\"govuk-!-padding-left-1\"\n href=\"cases/case-details/{{ case.service }}/{{ case.caseType }}/{{ case.caseReference }}\"\n *ngIf=\"hasLeadCaseOrConsolidated(reason.value.Reason)\">{{getCaseRefereneLink(case.caseReference)}}</a></span>\n <br *ngIf=\"!isLast\" />\n </span>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"linkedCasesFromResponse.length === 0 && (!isServerError && !isServerReasonCodeError)\">\n <td class=\"govuk-table__cell\" colspan=\"5\">\n None\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n", styles: [".case-table-column{min-width:20%;max-width:20%}\n"] }]
|
|
20757
20739
|
}], () => [{ type: i1$2.ActivatedRoute }, { type: LinkedCasesService }, { type: CasesService }], { caseField: [{
|
|
20758
20740
|
type: Input
|
|
20759
20741
|
}], notifyAPIFailure: [{
|
|
@@ -20951,7 +20933,7 @@ class UnLinkCasesComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
20951
20933
|
searchCases.forEach((response) => {
|
|
20952
20934
|
const linkedCaseFromList = this.linkedCases.find((linkedCase) => {
|
|
20953
20935
|
const caseRefToUse = this.getLinkedCaseId(linkedCase);
|
|
20954
|
-
if (this.linkedCasesService.casesToUnlink.
|
|
20936
|
+
if (this.linkedCasesService.casesToUnlink.includes(caseRefToUse)) {
|
|
20955
20937
|
linkedCase.unlink = true;
|
|
20956
20938
|
}
|
|
20957
20939
|
return caseRefToUse === response.case_id;
|
|
@@ -21009,7 +20991,7 @@ class UnLinkCasesComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
21009
20991
|
onNext() {
|
|
21010
20992
|
this.resetErrorMessages();
|
|
21011
20993
|
let navigateToNextPage = true;
|
|
21012
|
-
const casesMarkedToUnlink = this.linkedCases.
|
|
20994
|
+
const casesMarkedToUnlink = this.linkedCases.some((linkedCase) => linkedCase.unlink && linkedCase.unlink === true);
|
|
21013
20995
|
if (!casesMarkedToUnlink) {
|
|
21014
20996
|
this.errorMessages.push({
|
|
21015
20997
|
title: 'case-selection',
|
|
@@ -21179,7 +21161,7 @@ function ReadLinkedCasesFieldComponent_ng_template_18_Template(rf, ctx) { if (rf
|
|
|
21179
21161
|
i0.ɵɵelementStart(0, "div", 8)(1, "p", 9);
|
|
21180
21162
|
i0.ɵɵtext(2);
|
|
21181
21163
|
i0.ɵɵelementEnd();
|
|
21182
|
-
i0.ɵɵelementStart(3, "span", 10)(4, "a",
|
|
21164
|
+
i0.ɵɵelementStart(3, "span", 10)(4, "a", 12);
|
|
21183
21165
|
i0.ɵɵlistener("click", function ReadLinkedCasesFieldComponent_ng_template_18_Template_a_click_4_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); ctx_r2.reloadCurrentRoute(); return i0.ɵɵresetView($event.preventDefault()); });
|
|
21184
21166
|
i0.ɵɵtext(5, "Reload the Linked cases tab");
|
|
21185
21167
|
i0.ɵɵelementEnd()()();
|
|
@@ -21211,7 +21193,7 @@ class ReadLinkedCasesFieldComponent {
|
|
|
21211
21193
|
this.commonDataService = commonDataService;
|
|
21212
21194
|
}
|
|
21213
21195
|
ngOnInit() {
|
|
21214
|
-
if (this.route.snapshot.data.case
|
|
21196
|
+
if (this.route.snapshot.data.case?.tabs) {
|
|
21215
21197
|
const tabs = this.route.snapshot.data.case.tabs;
|
|
21216
21198
|
const tab = tabs?.filter(tabItem => tabItem.fields?.some(field => field.id === 'caseLinks'))[0];
|
|
21217
21199
|
this.caseField = tab?.fields?.find(field => field.id === 'caseLinks');
|
|
@@ -21238,15 +21220,15 @@ class ReadLinkedCasesFieldComponent {
|
|
|
21238
21220
|
ngAfterViewInit() {
|
|
21239
21221
|
this.linkedCasesService.caseFieldValue = this.caseField?.value ?? [];
|
|
21240
21222
|
let labelField = document.getElementsByClassName('govuk-heading-l');
|
|
21241
|
-
if (labelField
|
|
21223
|
+
if (labelField?.length) {
|
|
21242
21224
|
labelField[0].replaceWith('');
|
|
21243
21225
|
}
|
|
21244
21226
|
labelField = document.getElementsByClassName('heading-h2');
|
|
21245
|
-
if (labelField
|
|
21227
|
+
if (labelField?.length) {
|
|
21246
21228
|
labelField[0].replaceWith('');
|
|
21247
21229
|
}
|
|
21248
21230
|
labelField = document.getElementsByClassName('case-viewer-label');
|
|
21249
|
-
if (labelField
|
|
21231
|
+
if (labelField?.length) {
|
|
21250
21232
|
labelField[0].replaceWith('');
|
|
21251
21233
|
}
|
|
21252
21234
|
}
|
|
@@ -21260,12 +21242,12 @@ class ReadLinkedCasesFieldComponent {
|
|
|
21260
21242
|
this.isServerLinkedFromError = true;
|
|
21261
21243
|
}
|
|
21262
21244
|
static ɵfac = function ReadLinkedCasesFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadLinkedCasesFieldComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(i1$2.Router), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CommonDataService)); };
|
|
21263
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadLinkedCasesFieldComponent, selectors: [["ccd-read-linked-cases-field"]], standalone: false, decls: 20, vars: 10, consts: [["singleApiError", ""], ["multiApisError", ""], [1, "govuk-!-margin-bottom-2"], [1, "heading-h1"], [1, "table-sub-heading"], ["reloadPage", "reload", 3, "notifyAPIFailure", "caseField"], [4, "ngIf", "ngIfThen"], [1, "govuk-!-margin-top-8"], [1, "govuk-main-wrapper"], [1, "govuk-body"], [1, "govuk-body", "align-left"], ["href", "#", "id", "reload-linked-cases-tab", 1, "govuk-link", 3, "click"]], template: function ReadLinkedCasesFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21245
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadLinkedCasesFieldComponent, selectors: [["ccd-read-linked-cases-field"]], standalone: false, decls: 20, vars: 10, consts: [["singleApiError", ""], ["multiApisError", ""], [1, "govuk-!-margin-bottom-2"], [1, "heading-h1"], [1, "table-sub-heading"], ["reloadPage", "reload", 3, "notifyAPIFailure", "caseField"], [4, "ngIf", "ngIfThen"], [1, "govuk-!-margin-top-8"], [1, "govuk-main-wrapper"], [1, "govuk-body"], [1, "govuk-body", "align-left"], ["href", "#", "id", "reload-linked-cases-single-error-tab", 1, "govuk-link", 3, "click"], ["href", "#", "id", "reload-linked-cases-multi-error-tab", 1, "govuk-link", 3, "click"]], template: function ReadLinkedCasesFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
21264
21246
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
21265
21247
|
i0.ɵɵelementStart(0, "div")(1, "div", 2)(2, "h1", 3);
|
|
21266
21248
|
i0.ɵɵtext(3, "Linked cases");
|
|
21267
21249
|
i0.ɵɵelementEnd();
|
|
21268
|
-
i0.ɵɵelementStart(4, "
|
|
21250
|
+
i0.ɵɵelementStart(4, "span", 4);
|
|
21269
21251
|
i0.ɵɵtext(5, "This case is linked to");
|
|
21270
21252
|
i0.ɵɵelementEnd();
|
|
21271
21253
|
i0.ɵɵelementStart(6, "ccd-linked-cases-to-table", 5);
|
|
@@ -21273,7 +21255,7 @@ class ReadLinkedCasesFieldComponent {
|
|
|
21273
21255
|
i0.ɵɵelementEnd();
|
|
21274
21256
|
i0.ɵɵtemplate(7, ReadLinkedCasesFieldComponent_ng_container_7_Template, 1, 0, "ng-container", 6)(8, ReadLinkedCasesFieldComponent_ng_container_8_Template, 1, 0, "ng-container", 6);
|
|
21275
21257
|
i0.ɵɵelementEnd();
|
|
21276
|
-
i0.ɵɵelementStart(9, "div", 7)(10, "
|
|
21258
|
+
i0.ɵɵelementStart(9, "div", 7)(10, "span", 4);
|
|
21277
21259
|
i0.ɵɵtext(11, "This case is linked from");
|
|
21278
21260
|
i0.ɵɵelementEnd();
|
|
21279
21261
|
i0.ɵɵelement(12, "br");
|
|
@@ -21302,7 +21284,7 @@ class ReadLinkedCasesFieldComponent {
|
|
|
21302
21284
|
}
|
|
21303
21285
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadLinkedCasesFieldComponent, [{
|
|
21304
21286
|
type: Component,
|
|
21305
|
-
args: [{ selector: 'ccd-read-linked-cases-field', standalone: false, template: "<div>\n <div class=\"govuk-!-margin-bottom-2\">\n <h1 class=\"heading-h1\">Linked cases</h1>\n <
|
|
21287
|
+
args: [{ selector: 'ccd-read-linked-cases-field', standalone: false, template: "<div>\n <div class=\"govuk-!-margin-bottom-2\">\n <h1 class=\"heading-h1\">Linked cases</h1>\n <span class=\"table-sub-heading\">This case is linked to</span>\n <ccd-linked-cases-to-table [caseField]=\"caseField\" (notifyAPIFailure)=\"getFailureLinkedToNotification($event)\"\n reloadPage=\"reload\"></ccd-linked-cases-to-table>\n <ng-container\n *ngIf=\"(isServerLinkedToError && isServerJurisdictionError && isServerReasonCodeError); then multiApisError;\">\n </ng-container>\n <ng-container\n *ngIf=\"!(isServerLinkedToError && isServerJurisdictionError && isServerReasonCodeError) && (isServerLinkedToError || isServerJurisdictionError || isServerReasonCodeError); then singleApiError;\">\n </ng-container>\n </div>\n <div class=\"govuk-!-margin-top-8\">\n <span class=\"table-sub-heading\">This case is linked from</span>\n <br>\n <ccd-linked-cases-from-table [caseField]=\"caseField\" (notifyAPIFailure)=\"getFailureLinkedFromNotification($event)\"\n reloadPage=\"reload\"></ccd-linked-cases-from-table>\n <ng-container\n *ngIf=\"(isServerLinkedFromError && isServerJurisdictionError && isServerReasonCodeError); then multiApisError;\">\n </ng-container>\n <ng-container\n *ngIf=\"!(isServerLinkedFromError && isServerJurisdictionError && isServerReasonCodeError) && (isServerLinkedFromError || isServerJurisdictionError || isServerReasonCodeError); then singleApiError;\">\n </ng-container>\n </div>\n</div>\n\n<ng-template #singleApiError>\n <div class=\"govuk-main-wrapper\">\n <p class=\"govuk-body\">{{serverLinkedApiError.message}}</p>\n <span class=\"govuk-body align-left\">\n <a href=\"#\" (click)=\"reloadCurrentRoute(); $event.preventDefault()\" id=\"reload-linked-cases-single-error-tab\" class=\"govuk-link\">Reload\n the Linked cases tab</a>\n </span>\n </div>\n</ng-template>\n<ng-template #multiApisError>\n <div class=\"govuk-main-wrapper\">\n <p class=\"govuk-body\">{{serverError.message}}</p>\n <span class=\"govuk-body align-left\">\n <a href=\"#\" (click)=\"reloadCurrentRoute(); $event.preventDefault()\" id=\"reload-linked-cases-multi-error-tab\" class=\"govuk-link\">Reload\n the Linked cases tab</a>\n </span>\n </div>\n</ng-template>\n", styles: [".table-sub-heading{font-size:24px;font-weight:700}\n"] }]
|
|
21306
21288
|
}], () => [{ type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }], null); })();
|
|
21307
21289
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadLinkedCasesFieldComponent, { className: "ReadLinkedCasesFieldComponent", filePath: "lib/shared/components/palette/linked-cases/read-linked-cases-field.component.ts", lineNumber: 14 }); })();
|
|
21308
21290
|
|
|
@@ -21451,12 +21433,10 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteJourneyComponent
|
|
|
21451
21433
|
this.addState(this.linkedCasesPage);
|
|
21452
21434
|
this.proceedToNextPage();
|
|
21453
21435
|
}
|
|
21454
|
-
else {
|
|
21455
|
-
|
|
21456
|
-
|
|
21457
|
-
|
|
21458
|
-
});
|
|
21459
|
-
}
|
|
21436
|
+
else if (linkedCasesState.errorMessages?.length) {
|
|
21437
|
+
linkedCasesState.errorMessages.forEach((errorMessage, index) => {
|
|
21438
|
+
this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
|
|
21439
|
+
});
|
|
21460
21440
|
}
|
|
21461
21441
|
}
|
|
21462
21442
|
getLinkedCaseReasons(serviceId) {
|
|
@@ -21508,7 +21488,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteJourneyComponent
|
|
|
21508
21488
|
}
|
|
21509
21489
|
const unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(item => item.unlink).map(item => item.caseReference);
|
|
21510
21490
|
const caseFieldValue = this.linkedCasesService.caseFieldValue;
|
|
21511
|
-
this.linkedCasesService.caseFieldValue = caseFieldValue.filter(item => unlinkedCaseRefereneIds.
|
|
21491
|
+
this.linkedCasesService.caseFieldValue = caseFieldValue.filter(item => !unlinkedCaseRefereneIds.includes(item.id));
|
|
21512
21492
|
}
|
|
21513
21493
|
this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue;
|
|
21514
21494
|
this.caseEditForm.controls['data'] = new FormGroup({ caseLinks: new FormControl(this.linkedCasesService.caseFieldValue || []) });
|
|
@@ -21548,7 +21528,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteJourneyComponent
|
|
|
21548
21528
|
getLinkedCases() {
|
|
21549
21529
|
this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe((caseView) => {
|
|
21550
21530
|
const caseViewFiltered = caseView.tabs.filter((tab) => {
|
|
21551
|
-
return tab.fields.some(({ field_type }) => field_type
|
|
21531
|
+
return tab.fields.some(({ field_type }) => field_type?.collection_field_type?.id === 'CaseLink');
|
|
21552
21532
|
});
|
|
21553
21533
|
if (caseViewFiltered) {
|
|
21554
21534
|
const caseLinkFieldValue = caseViewFiltered.map((filtered) => filtered.fields?.length > 0 && filtered.fields.filter((field) => field.id === 'caseLinks')[0].value);
|
|
@@ -21646,7 +21626,7 @@ class ReadMoneyGbpFieldComponent extends AbstractFieldReadComponent {
|
|
|
21646
21626
|
}
|
|
21647
21627
|
}
|
|
21648
21628
|
isNumber() {
|
|
21649
|
-
return null !== this.value && !isNaN(this.value);
|
|
21629
|
+
return null !== this.value && !Number.isNaN(Number(this.value));
|
|
21650
21630
|
}
|
|
21651
21631
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadMoneyGbpFieldComponent_BaseFactory; return function ReadMoneyGbpFieldComponent_Factory(__ngFactoryType__) { return (ɵReadMoneyGbpFieldComponent_BaseFactory || (ɵReadMoneyGbpFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadMoneyGbpFieldComponent)))(__ngFactoryType__ || ReadMoneyGbpFieldComponent); }; })();
|
|
21652
21632
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadMoneyGbpFieldComponent, selectors: [["ccd-read-money-gbp-field"]], inputs: { amount: "amount" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "text-16"]], template: function ReadMoneyGbpFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -22495,13 +22475,11 @@ class WriteOrganisationFieldComponent extends AbstractFieldWriteComponent {
|
|
|
22495
22475
|
}
|
|
22496
22476
|
this.preSelectDefaultOrg();
|
|
22497
22477
|
}
|
|
22478
|
+
else if (this.caseField && this.caseField.value && this.caseField.value.OrganisationID) {
|
|
22479
|
+
this.preSelectDefaultOrg();
|
|
22480
|
+
}
|
|
22498
22481
|
else {
|
|
22499
|
-
|
|
22500
|
-
this.preSelectDefaultOrg();
|
|
22501
|
-
}
|
|
22502
|
-
else {
|
|
22503
|
-
this.preSelectEmptyOrg();
|
|
22504
|
-
}
|
|
22482
|
+
this.preSelectEmptyOrg();
|
|
22505
22483
|
}
|
|
22506
22484
|
// Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although an
|
|
22507
22485
|
// Organisation field uses the Complex type, it is meant to be treated as one field
|
|
@@ -22535,7 +22513,7 @@ class WriteOrganisationFieldComponent extends AbstractFieldWriteComponent {
|
|
|
22535
22513
|
});
|
|
22536
22514
|
organisations.forEach((org) => {
|
|
22537
22515
|
const resultSet = [...partMatchingResultSet, ...withSpaceMatchingResultSet];
|
|
22538
|
-
const hasMatchingOrganisation = resultSet.
|
|
22516
|
+
const hasMatchingOrganisation = resultSet.some(item => item.organisationIdentifier === org.organisationIdentifier);
|
|
22539
22517
|
const searchHasSpace = this.searchWithSpace(org, lowerOrgSearchText);
|
|
22540
22518
|
const hasResultSetBelowMaxCount = resultSet.length < MAX_RESULT_COUNT;
|
|
22541
22519
|
if (!hasMatchingOrganisation && partMatchingResultSet.length === 0 && hasResultSetBelowMaxCount && searchHasSpace) {
|
|
@@ -24347,19 +24325,17 @@ class QueryCheckYourAnswersComponent {
|
|
|
24347
24325
|
this.error = null;
|
|
24348
24326
|
this.callbackErrorsSubject.next(error);
|
|
24349
24327
|
}
|
|
24328
|
+
else if (error && error.status !== 401 && error.status !== 403) {
|
|
24329
|
+
this.error = error;
|
|
24330
|
+
}
|
|
24350
24331
|
else {
|
|
24351
|
-
|
|
24352
|
-
this.error = error;
|
|
24353
|
-
}
|
|
24354
|
-
else {
|
|
24355
|
-
this.router.navigate(['/', 'service-down']);
|
|
24356
|
-
}
|
|
24332
|
+
this.router.navigate(['/', 'service-down']);
|
|
24357
24333
|
}
|
|
24358
24334
|
window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
|
|
24359
24335
|
}
|
|
24360
24336
|
getDocumentAttachments() {
|
|
24361
24337
|
const attachmentsValue = this.formGroup.get('attachments').value;
|
|
24362
|
-
if (attachmentsValue
|
|
24338
|
+
if (attachmentsValue?.length > 0) {
|
|
24363
24339
|
const documents = attachmentsValue;
|
|
24364
24340
|
this.attachments = documents.map(QueryManagementUtils.documentToCollectionFormDocument);
|
|
24365
24341
|
}
|
|
@@ -25173,7 +25149,7 @@ class QueryWriteDateInputComponent {
|
|
|
25173
25149
|
onChange;
|
|
25174
25150
|
onTouched;
|
|
25175
25151
|
writeValue(date) {
|
|
25176
|
-
if (date instanceof Date && !isNaN(date.getTime())) {
|
|
25152
|
+
if (date instanceof Date && !Number.isNaN(date.getTime())) {
|
|
25177
25153
|
this.day = date.getDate();
|
|
25178
25154
|
this.month = date.getMonth() + 1; // Months are zero-based
|
|
25179
25155
|
this.year = date.getFullYear();
|
|
@@ -25349,7 +25325,7 @@ function QueryWriteRaiseQueryComponent_div_11_ng_container_50_p_7_Template(rf, c
|
|
|
25349
25325
|
} }
|
|
25350
25326
|
function QueryWriteRaiseQueryComponent_div_11_ng_container_50_Template(rf, ctx) { if (rf & 1) {
|
|
25351
25327
|
i0.ɵɵelementContainerStart(0);
|
|
25352
|
-
i0.ɵɵelementStart(1, "div", 36)(2, "fieldset", 37)(3, "legend")(4, "
|
|
25328
|
+
i0.ɵɵelementStart(1, "div", 36)(2, "fieldset", 37)(3, "legend")(4, "span", 38);
|
|
25353
25329
|
i0.ɵɵtext(5);
|
|
25354
25330
|
i0.ɵɵpipe(6, "rpxTranslate");
|
|
25355
25331
|
i0.ɵɵelementEnd()();
|
|
@@ -25401,7 +25377,7 @@ function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
25401
25377
|
i0.ɵɵelementStart(30, "textarea", 22);
|
|
25402
25378
|
i0.ɵɵtext(31, " ");
|
|
25403
25379
|
i0.ɵɵelementEnd()();
|
|
25404
|
-
i0.ɵɵelementStart(32, "div", 13)(33, "fieldset", 23)(34, "legend")(35, "
|
|
25380
|
+
i0.ɵɵelementStart(32, "div", 13)(33, "fieldset", 23)(34, "legend")(35, "span", 24);
|
|
25405
25381
|
i0.ɵɵtext(36);
|
|
25406
25382
|
i0.ɵɵpipe(37, "rpxTranslate");
|
|
25407
25383
|
i0.ɵɵelementEnd()();
|
|
@@ -25497,7 +25473,7 @@ class QueryWriteRaiseQueryComponent {
|
|
|
25497
25473
|
onSubjectInput() {
|
|
25498
25474
|
const control = this.formGroup.get('subject');
|
|
25499
25475
|
const value = control?.value;
|
|
25500
|
-
if (value
|
|
25476
|
+
if (value?.length > 200) {
|
|
25501
25477
|
control?.setValue(value.substring(0, 200));
|
|
25502
25478
|
}
|
|
25503
25479
|
}
|
|
@@ -25551,7 +25527,7 @@ class QueryWriteRaiseQueryComponent {
|
|
|
25551
25527
|
}
|
|
25552
25528
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRaiseQueryComponent, [{
|
|
25553
25529
|
type: Component,
|
|
25554
|
-
args: [{ selector: 'ccd-query-write-raise-query', standalone: false, template: "<div>\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-4\">{{ 'Enter query details' | rpxTranslate }}</h1>\n </div>\n\n <div>\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\" *ngIf=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <hr>\n\n <div class=\"govuk-!-margin-bottom-4\" *ngIf=\"showForm\">\n <div [formGroup]=\"formGroup\">\n <div>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <ccd-markdown\n [content]=\"serviceMessage | rpxTranslate\">\n </ccd-markdown>\n </strong>\n </div>\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('subject').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"subject\">\n {{ 'Query subject' | rpxTranslate }}\n </label>\n </div>\n <div id=\"subject-hint\" class=\"govuk-hint\">\n {{ 'The subject should be a summary of your query' | rpxTranslate }}\n </div>\n <p id=\"subject-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && (formGroup.get('subject').hasError('required') || formGroup.get('subject').hasError('maxlength'))\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }}</span>\n {{ getSubjectErrorMessage() | rpxTranslate }}\n </p>\n\n <input type=\"text\"\n id=\"subject\"\n class=\"govuk-input\"\n formControlName=\"subject\"\n maxlength=\"200\"\n (input)=\"onSubjectInput()\"\n aria-describedby=\"subject-error\" />\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('body').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"body\">\n {{ 'Query detail' | rpxTranslate }}\n </label>\n </div>\n <div id=\"body-hint\" class=\"govuk-hint\">\n {{ 'Include as many details as possible so case workers can respond to your query' | rpxTranslate }}\n </div>\n <p id=\"body-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('body').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\"\n id=\"body\" name=\"body\" rows=\"5\"\n aria-describedby=\"body-hint body-error\"\n class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body').hasError('required')\"\n >\n </textarea>\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('isHearingRelated').hasError('required')}\">\n <fieldset class=\"govuk-fieldset\">\n <legend>\n <
|
|
25530
|
+
args: [{ selector: 'ccd-query-write-raise-query', standalone: false, template: "<div>\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Raise a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-4\">{{ 'Enter query details' | rpxTranslate }}</h1>\n </div>\n\n <div>\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\" *ngIf=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <hr>\n\n <div class=\"govuk-!-margin-bottom-4\" *ngIf=\"showForm\">\n <div [formGroup]=\"formGroup\">\n <div>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <ccd-markdown\n [content]=\"serviceMessage | rpxTranslate\">\n </ccd-markdown>\n </strong>\n </div>\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('subject').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"subject\">\n {{ 'Query subject' | rpxTranslate }}\n </label>\n </div>\n <div id=\"subject-hint\" class=\"govuk-hint\">\n {{ 'The subject should be a summary of your query' | rpxTranslate }}\n </div>\n <p id=\"subject-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && (formGroup.get('subject').hasError('required') || formGroup.get('subject').hasError('maxlength'))\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }}</span>\n {{ getSubjectErrorMessage() | rpxTranslate }}\n </p>\n\n <input type=\"text\"\n id=\"subject\"\n class=\"govuk-input\"\n formControlName=\"subject\"\n maxlength=\"200\"\n (input)=\"onSubjectInput()\"\n aria-describedby=\"subject-error\" />\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('body').hasError('required')}\">\n <div class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\" for=\"body\">\n {{ 'Query detail' | rpxTranslate }}\n </label>\n </div>\n <div id=\"body-hint\" class=\"govuk-hint\">\n {{ 'Include as many details as possible so case workers can respond to your query' | rpxTranslate }}\n </div>\n <p id=\"body-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('body').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\"\n id=\"body\" name=\"body\" rows=\"5\"\n aria-describedby=\"body-hint body-error\"\n class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body').hasError('required')\"\n >\n </textarea>\n </div>\n\n <div class=\"govuk-form-group\"\n [ngClass]=\"{'govuk-form-group--error': submitted && formGroup.get('isHearingRelated').hasError('required')}\">\n <fieldset class=\"govuk-fieldset\">\n <legend>\n <span class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </span>\n </legend>\n <p id=\"isHearingRelated-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('isHearingRelated').hasError('required')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_HEARING_RELATED | rpxTranslate }}\n </p>\n <div class=\"govuk-radios govuk-radios--inline\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"isHearingRelated-yes\" name=\"isHearingRelated\"\n type=\"radio\"\n formControlName=\"isHearingRelated\"\n [checked]=\"formGroup.get('isHearingRelated').value === true\" [value]=\"true\"\n >\n <label class=\"govuk-label govuk-radios__label\" for=\"isHearingRelated-yes\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'Yes' }}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"isHearingRelated-no\" name=\"isHearingRelated\"\n type=\"radio\"\n formControlName=\"isHearingRelated\"\n [checked]=\"formGroup.get('isHearingRelated').value === false\" [value]=\"false\"\n >\n <label class=\"govuk-label govuk-radios__label\" for=\"isHearingRelated-no\">\n {{ 'Is the query hearing related?' | rpxTranslate: null : 'No' }}\n </label>\n </div>\n </div>\n </fieldset>\n\n <ng-container *ngIf=\"formGroup.get('isHearingRelated').value\">\n <div class=\"govuk-radios__conditional govuk-!-margin-top-1\"\n [ngClass]=\"{'govuk-form-group--error': submitted &&\n formGroup.get('isHearingRelated').value === true &&\n formGroup.get('hearingDate').value === null}\">\n <fieldset class=\"govuk-fieldset\" role=\"group\">\n <legend>\n <span class=\"govuk-label govuk-label--s\">\n {{ 'What is the date of the hearing?' | rpxTranslate }}\n </span>\n </legend>\n <p id=\"hearingDate-error\" class=\"govuk-error-message\"\n *ngIf=\"submitted && formGroup.get('isHearingRelated').value === true && formGroup.get('hearingDate').value === null\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_HEARING_DATE | rpxTranslate }}\n </p>\n <ccd-query-write-date-input formControlName=\"hearingDate\"></ccd-query-write-date-input>\n </fieldset>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
25555
25531
|
}], () => [{ type: QueryManagementService }, { type: i1$2.ActivatedRoute }], { formGroup: [{
|
|
25556
25532
|
type: Input
|
|
25557
25533
|
}], submitted: [{
|
|
@@ -26115,7 +26091,7 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
|
|
|
26115
26091
|
} }
|
|
26116
26092
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
26117
26093
|
i0.ɵɵelementContainerStart(0);
|
|
26118
|
-
i0.ɵɵelementStart(1, "button",
|
|
26094
|
+
i0.ɵɵelementStart(1, "button", 11);
|
|
26119
26095
|
i0.ɵɵtext(2);
|
|
26120
26096
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
26121
26097
|
i0.ɵɵelementEnd();
|
|
@@ -26128,7 +26104,7 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
|
|
|
26128
26104
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
26129
26105
|
} }
|
|
26130
26106
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
26131
|
-
i0.ɵɵelementStart(0, "div")(1, "p",
|
|
26107
|
+
i0.ɵɵelementStart(0, "div")(1, "p", 12);
|
|
26132
26108
|
i0.ɵɵtext(2);
|
|
26133
26109
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
26134
26110
|
i0.ɵɵelementEnd();
|
|
@@ -26161,13 +26137,13 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template
|
|
|
26161
26137
|
} }
|
|
26162
26138
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
26163
26139
|
i0.ɵɵelementContainerStart(0);
|
|
26164
|
-
i0.ɵɵelementStart(1, "div",
|
|
26140
|
+
i0.ɵɵelementStart(1, "div", 13)(2, "span", 14);
|
|
26165
26141
|
i0.ɵɵtext(3, "!");
|
|
26166
26142
|
i0.ɵɵelementEnd();
|
|
26167
|
-
i0.ɵɵelementStart(4, "strong",
|
|
26143
|
+
i0.ɵɵelementStart(4, "strong", 15)(5, "span", 16);
|
|
26168
26144
|
i0.ɵɵtext(6, "Warning");
|
|
26169
26145
|
i0.ɵɵelementEnd();
|
|
26170
|
-
i0.ɵɵelementStart(7, "p",
|
|
26146
|
+
i0.ɵɵelementStart(7, "p", 17);
|
|
26171
26147
|
i0.ɵɵtext(8);
|
|
26172
26148
|
i0.ɵɵpipe(9, "rpxTranslate");
|
|
26173
26149
|
i0.ɵɵelementEnd()()();
|
|
@@ -26277,7 +26253,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
26277
26253
|
: query?.messageType;
|
|
26278
26254
|
}
|
|
26279
26255
|
static ɵfac = function ReadQueryManagementFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadQueryManagementFieldComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
|
|
26280
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["sequentialQuery", ""], ["queryIsInReview", ""], [4, "ngIf", "ngIfElse"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-margin-top-8 govuk-!-margin-bottom-8", 4, "ngIf"], [1, "govuk-!-margin-top-8", "govuk-!-margin-bottom-8"], [3, "selectedQuery", "caseQueriesCollection"], [3, "backClicked", "query", "caseId"], [4, "ngIf"], ["id", "ask-follow-up-question", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], [1, "govuk-!-font-weight-bold"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "qm-service-message", "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
26256
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ReadQueryManagementFieldComponent, selectors: [["ccd-read-query-management-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [["singleQueryDetails", ""], ["sequentialQuery", ""], ["queryIsInReview", ""], [4, "ngIf", "ngIfElse"], [4, "ngFor", "ngForOf"], ["class", "govuk-!-margin-top-8 govuk-!-margin-bottom-8", 4, "ngIf"], [1, "govuk-!-margin-top-8", "govuk-!-margin-bottom-8"], [3, "selectedQuery", "caseQueriesCollection"], [3, "backClicked", "query", "caseId"], [4, "ngIf"], ["id", "ask-follow-up-question-external", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], ["id", "ask-follow-up-question", "data-module", "govuk-button", 1, "govuk-button", 3, "routerLink"], [1, "govuk-!-font-weight-bold"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "qm-service-message", "govuk-!-font-weight-bold"]], template: function ReadQueryManagementFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
26281
26257
|
i0.ɵɵtemplate(0, ReadQueryManagementFieldComponent_ng_container_0_Template, 2, 1, "ng-container", 3)(1, ReadQueryManagementFieldComponent_ng_template_1_Template, 3, 4, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
26282
26258
|
} if (rf & 2) {
|
|
26283
26259
|
const singleQueryDetails_r7 = i0.ɵɵreference(2);
|
|
@@ -26286,7 +26262,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
26286
26262
|
}
|
|
26287
26263
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
26288
26264
|
type: Component,
|
|
26289
|
-
args: [{ selector: 'ccd-read-query-management-field', standalone: false, template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed && !isJudiciaryUser()\">\n <ng-container *ngIf=\"(messageType && messageType === followUpQuery && isMultipleFollowUpEnabled) ||\n (messageType && messageType === respondToQuery) || (messageType && messageType === followUpQuery && query?.isHmctsStaff?.toLowerCase() === 'yes'); else sequentialQuery\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n <ng-template #sequentialQuery>\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-template>\n\n </ng-container>\n <ng-container *ngIf=\"isQueryClosed\">\n <div class=\"govuk-warning-text\">\n <span aria-hidden=\"true\" class=\"govuk-warning-text__icon\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <p class=\"qm-service-message govuk-!-font-weight-bold\">{{ 'This query has been closed by HMCTS staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
|
|
26265
|
+
args: [{ selector: 'ccd-read-query-management-field', standalone: false, template: "<ng-container *ngIf=\"showQueryList; else singleQueryDetails\">\n <ng-container *ngFor=\"let caseQueriesCollection of caseQueriesCollections\">\n <div *ngIf=\"showQueryList\" class=\"govuk-!-margin-top-8 govuk-!-margin-bottom-8\">\n <ccd-query-list (selectedQuery)=\"setQuery($event)\" [caseQueriesCollection]=\"caseQueriesCollection\"></ccd-query-list>\n </div>\n </ng-container>\n</ng-container>\n\n<ng-template #singleQueryDetails>\n <ccd-query-details\n [query]=\"query\"\n (backClicked)=\"showQueryList = true\"\n [caseId]=\"caseId\"\n ></ccd-query-details>\n\n <ng-container *ngIf=\"!isInternalUser() && !isQueryClosed && !isJudiciaryUser()\">\n <ng-container *ngIf=\"(messageType && messageType === followUpQuery && isMultipleFollowUpEnabled) ||\n (messageType && messageType === respondToQuery) || (messageType && messageType === followUpQuery && query?.isHmctsStaff?.toLowerCase() === 'yes'); else sequentialQuery\">\n <button id=\"ask-follow-up-question-external\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n <ng-template #sequentialQuery>\n <ng-container *ngIf=\"query?.children?.length > 0 && query?.children?.length % 2 === 1; else queryIsInReview\">\n <button id=\"ask-follow-up-question\" class=\"govuk-button\" data-module=\"govuk-button\"\n [routerLink]=\"['/query-management', 'query', caseId, '4', query.id]\">\n {{ 'Ask a follow-up question' | rpxTranslate }}\n </button>\n </ng-container>\n\n <ng-template #queryIsInReview>\n <div>\n <p class=\"govuk-!-font-weight-bold\">{{ 'Your query is under review' | rpxTranslate }}</p>\n <p>{{ 'Our team will read your query and respond. Do not submit the same query more than once.' | rpxTranslate }}</p>\n </div>\n </ng-template>\n </ng-template>\n\n </ng-container>\n <ng-container *ngIf=\"isQueryClosed\">\n <div class=\"govuk-warning-text\">\n <span aria-hidden=\"true\" class=\"govuk-warning-text__icon\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">Warning</span>\n <p class=\"qm-service-message govuk-!-font-weight-bold\">{{ 'This query has been closed by HMCTS staff.' | rpxTranslate }}</p>\n </strong>\n </div>\n </ng-container>\n</ng-template>\n" }]
|
|
26290
26266
|
}], () => [{ type: i1$2.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
|
|
26291
26267
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadQueryManagementFieldComponent, { className: "ReadQueryManagementFieldComponent", filePath: "lib/shared/components/palette/query-management/read-query-management-field.component.ts", lineNumber: 19 }); })();
|
|
26292
26268
|
|
|
@@ -29596,7 +29572,7 @@ class YesNoService {
|
|
|
29596
29572
|
case 'boolean':
|
|
29597
29573
|
return value;
|
|
29598
29574
|
case 'string':
|
|
29599
|
-
return YesNoService.YES_INPUTS.
|
|
29575
|
+
return YesNoService.YES_INPUTS.includes(value.toUpperCase());
|
|
29600
29576
|
}
|
|
29601
29577
|
return false;
|
|
29602
29578
|
}
|
|
@@ -29606,7 +29582,7 @@ class YesNoService {
|
|
|
29606
29582
|
case 'boolean':
|
|
29607
29583
|
return !value;
|
|
29608
29584
|
case 'string':
|
|
29609
|
-
return YesNoService.NO_INPUTS.
|
|
29585
|
+
return YesNoService.NO_INPUTS.includes(value.toUpperCase());
|
|
29610
29586
|
}
|
|
29611
29587
|
return false;
|
|
29612
29588
|
}
|
|
@@ -29825,7 +29801,7 @@ class PaletteService {
|
|
|
29825
29801
|
if (argumentValue) {
|
|
29826
29802
|
const displayContextParameterArray = argumentValue.includes(',') ? argumentValue.split(',') : [argumentValue];
|
|
29827
29803
|
const componentToRender = displayContextParameterArray.filter(displayContextParameter => {
|
|
29828
|
-
return !Object.values(DisplayContextParameter).
|
|
29804
|
+
return !Object.values(DisplayContextParameter).some(displayContextParameterFromLookup => {
|
|
29829
29805
|
return displayContextParameter === displayContextParameterFromLookup;
|
|
29830
29806
|
});
|
|
29831
29807
|
});
|
|
@@ -29858,7 +29834,7 @@ class FieldReadComponent extends AbstractFieldReadComponent {
|
|
|
29858
29834
|
}
|
|
29859
29835
|
ngOnInit() {
|
|
29860
29836
|
// Ensure all field values are resolved by label interpolation before the component is fully initialised.
|
|
29861
|
-
Promise.resolve(null).then(() => {
|
|
29837
|
+
void Promise.resolve(null).then(() => {
|
|
29862
29838
|
const componentClass = this.paletteService.getFieldComponentClass(this.caseField, false);
|
|
29863
29839
|
const injector = Injector.create({
|
|
29864
29840
|
providers: [],
|
|
@@ -29871,7 +29847,7 @@ class FieldReadComponent extends AbstractFieldReadComponent {
|
|
|
29871
29847
|
// TODO AW 30/12/20 figure out why FixedLists need plainToClassFromExist
|
|
29872
29848
|
// Added a check to make sure it's NOT already a CaseField and then
|
|
29873
29849
|
// assigning it back to this.caseField so we don't create separation.
|
|
29874
|
-
if (FIX_CASEFIELD_FOR$1.
|
|
29850
|
+
if (FIX_CASEFIELD_FOR$1.includes(this.caseField.field_type.type) && !(this.caseField instanceof CaseField)) {
|
|
29875
29851
|
this.caseField = plainToClassFromExist(new CaseField(), this.caseField);
|
|
29876
29852
|
}
|
|
29877
29853
|
component.instance['caseField'] = this.caseField;
|
|
@@ -29947,7 +29923,7 @@ class FieldWriteComponent extends AbstractFieldWriteComponent {
|
|
|
29947
29923
|
// TODO AW 30/12/20 figure out why FixedLists need plainToClassFromExist
|
|
29948
29924
|
// Added a check to make sure it's NOT already a CaseField and then
|
|
29949
29925
|
// assigning it back to this.caseField so we don't create separation.
|
|
29950
|
-
if (FIX_CASEFIELD_FOR.
|
|
29926
|
+
if (FIX_CASEFIELD_FOR.includes(this.caseField.field_type.type) && !(this.caseField instanceof CaseField)) {
|
|
29951
29927
|
this.caseField = plainToClassFromExist(new CaseField(), this.caseField);
|
|
29952
29928
|
}
|
|
29953
29929
|
this.applyInputsToChild();
|
|
@@ -30151,7 +30127,7 @@ class CaseFileViewFolderSelectorComponent {
|
|
|
30151
30127
|
if (evt.target.checked) {
|
|
30152
30128
|
this.select(evt.target.id);
|
|
30153
30129
|
// get level of this checkbox so we can clear all lower levels
|
|
30154
|
-
let level = parseInt(evt.target.name.split('-')[1], 10) + 1;
|
|
30130
|
+
let level = Number.parseInt(evt.target.name.split('-')[1], 10) + 1;
|
|
30155
30131
|
let nodes = document.getElementsByName(`level-${level}`);
|
|
30156
30132
|
while (nodes.length > 0) {
|
|
30157
30133
|
nodes.forEach((node) => node.checked = false);
|
|
@@ -30192,10 +30168,10 @@ class CaseFileViewFolderSelectorComponent {
|
|
|
30192
30168
|
return null;
|
|
30193
30169
|
}
|
|
30194
30170
|
static ɵfac = function CaseFileViewFolderSelectorComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFileViewFolderSelectorComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialogRef), i0.ɵɵdirectiveInject(MAT_DIALOG_DATA)); };
|
|
30195
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFolderSelectorComponent, selectors: [["xui-case-file-view-folder-selector"]], standalone: false, decls: 14, vars: 2, consts: [["folder", ""], ["
|
|
30171
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewFolderSelectorComponent, selectors: [["xui-case-file-view-folder-selector"]], standalone: false, decls: 14, vars: 2, consts: [["folder", ""], ["type", "button", "aria-label", "Close", 1, "close", 3, "click"], [1, "govuk-heading-l"], [1, "folders", "govuk-radios", "govuk-radios--conditional"], [4, "ngFor", "ngForOf"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"], ["href", "#", 1, "cancel", 3, "click"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "folder", "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "click", "keyup", "name", "id"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["src", "/assets/images/folder.png", "alt", "Folder icon", 1, "iconImg"]], template: function CaseFileViewFolderSelectorComponent_Template(rf, ctx) { if (rf & 1) {
|
|
30196
30172
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
30197
|
-
i0.ɵɵelementStart(0, "
|
|
30198
|
-
i0.ɵɵlistener("click", function
|
|
30173
|
+
i0.ɵɵelementStart(0, "button", 1);
|
|
30174
|
+
i0.ɵɵlistener("click", function CaseFileViewFolderSelectorComponent_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.cancel()); });
|
|
30199
30175
|
i0.ɵɵelementEnd();
|
|
30200
30176
|
i0.ɵɵelementStart(1, "h2", 2);
|
|
30201
30177
|
i0.ɵɵtext(2, "Move File");
|
|
@@ -30224,7 +30200,7 @@ class CaseFileViewFolderSelectorComponent {
|
|
|
30224
30200
|
}
|
|
30225
30201
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
|
|
30226
30202
|
type: Component,
|
|
30227
|
-
args: [{ selector: 'xui-case-file-view-folder-selector', encapsulation: ViewEncapsulation.None, standalone: false, template: "<
|
|
30203
|
+
args: [{ selector: 'xui-case-file-view-folder-selector', encapsulation: ViewEncapsulation.None, standalone: false, template: "<button type=\"button\" aria-label=\"Close\" class=\"close\" (click)=\"cancel()\"></button>\n<h2 class=\"govuk-heading-l\">Move File</h2>\n<p>Where do you want to move \"{{ data.document.document_filename }}\" file?</p>\n<div class=\"folders govuk-radios govuk-radios--conditional\">\n <ng-container *ngFor=\"let cat of currentCategories\">\n <ng-container *ngTemplateOutlet=\"folder;context:{cat:cat,level:1}\"></ng-container>\n </ng-container>\n</div>\n<div class=\"govuk-button-group\">\n <button class=\"button button-primary\" type=\"button\" (click)=\"save()\">Save</button>\n <a (click)=\"cancel(); $event.preventDefault()\" class=\"cancel\" href=\"#\">Cancel</a>\n</div>\n\n<ng-template #folder let-cat=\"cat\" let-level=\"level\">\n <div class=\"folder govuk-radios__item\">\n <input class=\"govuk-radios__input\" type=\"radio\" name=\"level-{{level}}\" [id]=\"cat.category_id\" (click)=\"handleChange($event)\" (keyup)=\"$event.key === 'Enter' ? handleChange($event) : null\" />\n <label class=\"govuk-label govuk-radios__label\" [for]=\"cat.category_id\">\n <img class=\"iconImg\" src=\"/assets/images/folder.png\" alt=\"Folder icon\" />\n {{ cat.category_name }}\n </label>\n <ng-container *ngFor=\"let subcat of cat.sub_categories\">\n <ng-container *ngTemplateOutlet=\"folder;context:{cat:subcat,level:level+1}\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n", styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #CCC;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #CCC}.folders>.folder{display:block}input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat center center;cursor:pointer}.cancel{cursor:pointer}.cdk-overlay-pane{overflow:auto;background:#fff}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}\n"] }]
|
|
30228
30204
|
}], () => [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
|
|
30229
30205
|
type: Inject,
|
|
30230
30206
|
args: [MAT_DIALOG_DATA]
|
|
@@ -30244,7 +30220,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_1_Template(
|
|
|
30244
30220
|
i0.ɵɵadvance(2);
|
|
30245
30221
|
i0.ɵɵtextInterpolate(ctx_r1.title);
|
|
30246
30222
|
} }
|
|
30247
|
-
function
|
|
30223
|
+
function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_img_3_Template(rf, ctx) { if (rf & 1) {
|
|
30248
30224
|
i0.ɵɵelement(0, "img", 10);
|
|
30249
30225
|
} if (rf & 2) {
|
|
30250
30226
|
const item_r4 = i0.ɵɵnextContext().$implicit;
|
|
@@ -30253,16 +30229,16 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_img_2_Tem
|
|
|
30253
30229
|
function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
30254
30230
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
30255
30231
|
i0.ɵɵelementContainerStart(0);
|
|
30256
|
-
i0.ɵɵelementStart(1, "li", 7);
|
|
30257
|
-
i0.ɵɵlistener("click", function
|
|
30258
|
-
i0.ɵɵtemplate(
|
|
30259
|
-
i0.ɵɵelementStart(
|
|
30260
|
-
i0.ɵɵtext(
|
|
30261
|
-
i0.ɵɵelementEnd()();
|
|
30232
|
+
i0.ɵɵelementStart(1, "li")(2, "button", 7);
|
|
30233
|
+
i0.ɵɵlistener("click", function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_Template_button_click_2_listener() { const item_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); item_r4.actionFn(); return i0.ɵɵresetView(ctx_r1.closeOverlay()); });
|
|
30234
|
+
i0.ɵɵtemplate(3, CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_img_3_Template, 1, 3, "img", 8);
|
|
30235
|
+
i0.ɵɵelementStart(4, "span", 9);
|
|
30236
|
+
i0.ɵɵtext(5);
|
|
30237
|
+
i0.ɵɵelementEnd()()();
|
|
30262
30238
|
i0.ɵɵelementContainerEnd();
|
|
30263
30239
|
} if (rf & 2) {
|
|
30264
30240
|
const item_r4 = ctx.$implicit;
|
|
30265
|
-
i0.ɵɵadvance(
|
|
30241
|
+
i0.ɵɵadvance(3);
|
|
30266
30242
|
i0.ɵɵproperty("ngIf", item_r4.iconSrc);
|
|
30267
30243
|
i0.ɵɵadvance(2);
|
|
30268
30244
|
i0.ɵɵtextInterpolate(item_r4.actionText);
|
|
@@ -30271,7 +30247,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) { if (
|
|
|
30271
30247
|
i0.ɵɵelementStart(0, "div", 3);
|
|
30272
30248
|
i0.ɵɵtemplate(1, CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_1_Template, 3, 1, "ng-container", 4);
|
|
30273
30249
|
i0.ɵɵelementStart(2, "ul");
|
|
30274
|
-
i0.ɵɵtemplate(3, CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_Template,
|
|
30250
|
+
i0.ɵɵtemplate(3, CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_Template, 6, 2, "ng-container", 5);
|
|
30275
30251
|
i0.ɵɵelementEnd()();
|
|
30276
30252
|
} if (rf & 2) {
|
|
30277
30253
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -30302,7 +30278,7 @@ class CaseFileViewOverlayMenuComponent {
|
|
|
30302
30278
|
}
|
|
30303
30279
|
}
|
|
30304
30280
|
static ɵfac = function CaseFileViewOverlayMenuComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFileViewOverlayMenuComponent)(); };
|
|
30305
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, standalone: false, ngContentSelectors: _c1$9, decls: 5, vars: 5, consts: [["trigger", "cdkOverlayOrigin"], ["type", "button", "cdkOverlayOrigin", "", "aria-haspopup", "true", 1, "overlay-toggle", 3, "click"], ["cdkConnectedOverlay", "", 3, "backdropClick", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], ["
|
|
30281
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFileViewOverlayMenuComponent, selectors: [["ccd-case-file-view-overlay-menu"]], inputs: { title: "title", menuItems: "menuItems", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, standalone: false, ngContentSelectors: _c1$9, decls: 5, vars: 5, consts: [["trigger", "cdkOverlayOrigin"], ["type", "button", "cdkOverlayOrigin", "", "aria-haspopup", "true", 1, "overlay-toggle", 3, "click"], ["cdkConnectedOverlay", "", 3, "backdropClick", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayBackdropClass"], [1, "overlay-menu"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "overlay-menu__title"], ["type", "button", 1, "overlay-menu__item", 3, "click"], ["class", "overlay-menu__itemIcon", "aria-hidden", "true", 3, "src", "alt", 4, "ngIf"], [1, "overlay-menu__actionText"], ["aria-hidden", "true", 1, "overlay-menu__itemIcon", 3, "src", "alt"]], template: function CaseFileViewOverlayMenuComponent_Template(rf, ctx) { if (rf & 1) {
|
|
30306
30282
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
30307
30283
|
i0.ɵɵprojectionDef(_c0$v);
|
|
30308
30284
|
i0.ɵɵelementStart(0, "div")(1, "button", 1, 0);
|
|
@@ -30322,7 +30298,7 @@ class CaseFileViewOverlayMenuComponent {
|
|
|
30322
30298
|
}
|
|
30323
30299
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewOverlayMenuComponent, [{
|
|
30324
30300
|
type: Component,
|
|
30325
|
-
args: [{ selector: 'ccd-case-file-view-overlay-menu', standalone: false, template: "<div>\n <button type=\"button\"\n class=\"overlay-toggle\"\n (click)=\"$event.stopPropagation(); setOpen()\"\n cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"isOpen\">\n <ng-content select=\"[trigger]\" aria-hidden=\"true\"></ng-content>\n </button>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n (backdropClick)=\"closeOverlay()\"\n >\n <div class=\"overlay-menu\">\n <ng-container *ngIf=\"title\">\n <div class=\"overlay-menu__title\">{{title}}</div>\n </ng-container>\n\n <ul>\n <ng-container *ngFor=\"let item of menuItems;\">\n <li
|
|
30301
|
+
args: [{ selector: 'ccd-case-file-view-overlay-menu', standalone: false, template: "<div>\n <button type=\"button\"\n class=\"overlay-toggle\"\n (click)=\"$event.stopPropagation(); setOpen()\"\n cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"isOpen\">\n <ng-content select=\"[trigger]\" aria-hidden=\"true\"></ng-content>\n </button>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n (backdropClick)=\"closeOverlay()\"\n >\n <div class=\"overlay-menu\">\n <ng-container *ngIf=\"title\">\n <div class=\"overlay-menu__title\">{{title}}</div>\n </ng-container>\n\n <ul>\n <ng-container *ngFor=\"let item of menuItems;\">\n <li>\n <button type=\"button\" class=\"overlay-menu__item\" (click)=\"item.actionFn(); closeOverlay();\">\n <img *ngIf=\"item.iconSrc\" [src]=\"item.iconSrc\" class=\"overlay-menu__itemIcon\" alt=\"{{item.actionText}} icon\" aria-hidden=\"true\" />\n <span class=\"overlay-menu__actionText\">{{item.actionText}}</span>\n </button>\n </li>\n </ng-container>\n </ul>\n </div>\n </ng-template>\n</div>\n", styles: [".overlay-toggle{display:block;background:none;border:0;padding:0 6px;margin-right:-4px;cursor:pointer}.overlay-menu{background-color:#fafafa;border:1px solid grey;margin-top:8px;font-size:1rem}.overlay-menu__title,.overlay-menu__item{padding:10px;border-bottom:1px solid grey}.overlay-menu__title:last-child,.overlay-menu__item:last-child{border:none}.overlay-menu__title{padding-left:6px;padding-right:6px}.overlay-menu__item{display:flex;align-items:center;cursor:pointer;font-size:.875em}.overlay-menu__item:hover{background-color:#fff2cc}.overlay-menu__item:focus{border:2px solid #ffbf47}.overlay-menu__itemIcon{height:1.25em;width:1.25em;margin-right:6px}\n"] }]
|
|
30326
30302
|
}], null, { title: [{
|
|
30327
30303
|
type: Input
|
|
30328
30304
|
}], menuItems: [{
|
|
@@ -31831,7 +31807,7 @@ class ManageCaseFlagsComponent extends AbstractJourneyComponent {
|
|
|
31831
31807
|
if (this.flagsData) {
|
|
31832
31808
|
this.flagsDisplayData = this.flagsData.reduce((displayData, flagsInstance) => {
|
|
31833
31809
|
/* istanbul ignore else */
|
|
31834
|
-
if (flagsInstance.flags.details
|
|
31810
|
+
if (flagsInstance.flags.details?.length > 0) {
|
|
31835
31811
|
displayData = [
|
|
31836
31812
|
...displayData,
|
|
31837
31813
|
...flagsInstance.flags.details.map((detail) => this.mapFlagDetailForDisplay(detail, flagsInstance, originalStatus, originalIdToFlag))
|
|
@@ -31841,7 +31817,7 @@ class ManageCaseFlagsComponent extends AbstractJourneyComponent {
|
|
|
31841
31817
|
}, []).filter((flagForDisplay) => !this.excludedFlagStatuses.includes(flagForDisplay.originalStatus));
|
|
31842
31818
|
}
|
|
31843
31819
|
// Add a FormControl for the selected case flag if there is at least one flags instance remaining after mapping
|
|
31844
|
-
if (this.flagsDisplayData
|
|
31820
|
+
if (this.flagsDisplayData?.length > 0) {
|
|
31845
31821
|
this.formGroup.addControl(this.selectedControlName, new FormControl(null));
|
|
31846
31822
|
}
|
|
31847
31823
|
else {
|
|
@@ -31937,7 +31913,7 @@ class ManageCaseFlagsComponent extends AbstractJourneyComponent {
|
|
|
31937
31913
|
// CaseField formatted_value from which to get the original persisted data
|
|
31938
31914
|
const pathToValue = flagsInstance.pathToFlagsFormGroup;
|
|
31939
31915
|
// Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
|
|
31940
|
-
if (pathToValue.
|
|
31916
|
+
if (pathToValue.includes('.')) {
|
|
31941
31917
|
pathToValue.slice(pathToValue.indexOf('.') + 1).split('.').forEach((part) => {
|
|
31942
31918
|
if (formattedValue && FieldsUtils.isNonEmptyObject(formattedValue)) {
|
|
31943
31919
|
formattedValue = formattedValue[part];
|
|
@@ -33574,7 +33550,7 @@ class UpdateFlagComponent extends AbstractJourneyComponent {
|
|
|
33574
33550
|
static ɵfac = function UpdateFlagComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UpdateFlagComponent)(i0.ɵɵdirectiveInject(i1.RpxTranslationService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
|
|
33575
33551
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateFlagComponent, selectors: [["ccd-update-flag"]], inputs: { formGroup: "formGroup", displayContextParameter: "displayContextParameter" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 23, vars: 22, consts: [["externalUser", ""], ["updateFlagStatusReason", ""], [3, "formGroup"], ["data-module", "govuk-character-count", "data-maxlength", "200", 1, "govuk-character-count"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper", "govuk-!-margin-bottom-4"], [1, "govuk-label", "govuk-label--m"], ["id", "update-flag-hint-external", "class", "govuk-hint", 4, "ngIf"], [1, "govuk-!-margin-bottom-4"], [1, "govuk-label", "govuk-label--s", 3, "for"], ["id", "update-flag-comments-hint-external", "class", "govuk-hint", 4, "ngIf"], [4, "ngIf", "ngIfElse"], ["id", "flag-status-container-v2_1", "class", "govuk-!-margin-bottom-4", 4, "ngIf"], ["id", "translation-checkbox-container", "class", "govuk-!-margin-bottom-6", 4, "ngIf"], ["id", "flag-status-container-v1", "class", "govuk-grid-row", 4, "ngIf"], ["id", "update-flag-hint-external", 1, "govuk-hint"], ["id", "update-flag-comments-hint-external", 1, "govuk-hint"], ["id", "update-flag-comments-hint", 1, "govuk-hint"], ["class", "govuk-warning-text", 4, "ngIf"], ["id", "update-flag-comments-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "update-flag-comments-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", "aria-describedby", "update-flag-comments-hint update-flag-comments-char-limit-info update-flag-comments-char-limit-error", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "update-flag-comments-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], [1, "govuk-warning-text"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], ["id", "update-flag-comments-not-entered-error-message", 1, "govuk-error-message"], ["id", "update-flag-comments-char-limit-error", 1, "govuk-error-message"], [4, "ngIf"], [4, "ngTemplateOutlet"], ["id", "update-flag-status-reason-not-entered-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "update-flag-status-reason-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", "aria-describedby", "update-flag-comments-hint-external update-flag-status-hint update-flag-status-reason-char-limit-info\n update-flag-status-reason-char-limit-error", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "update-flag-status-reason-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "update-flag-status-reason-not-entered-error-message", 1, "govuk-error-message"], ["id", "update-flag-status-reason-char-limit-error", 1, "govuk-error-message"], ["id", "flag-status-container-v2_1", 1, "govuk-!-margin-bottom-4"], ["aria-describedby", "update-flag-status-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--s"], ["id", "update-flag-status-heading", 1, "govuk-fieldset__heading"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--conditional", "govuk-!-margin-bottom-4", 3, "id"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["id", "update-flag-status-hint", 1, "govuk-hint"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "formControlName", "value"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["id", "translation-checkbox-container", 1, "govuk-!-margin-bottom-6"], ["data-module", "govuk-checkboxes", 1, "govuk-checkboxes"], [1, "govuk-checkboxes__item"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "formControlName", "id", "name"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["id", "flag-status-container-v1", 1, "govuk-grid-row"], [1, "govuk-grid-column-one-half"], [1, "govuk-tag", 3, "ngClass"], ["class", "button button-secondary", "type", "button", 3, "click", 4, "ngIf"], ["type", "button", 1, "button", "button-secondary", 3, "click"]], template: function UpdateFlagComponent_Template(rf, ctx) { if (rf & 1) {
|
|
33576
33552
|
i0.ɵɵelementContainerStart(0, 2);
|
|
33577
|
-
i0.ɵɵelementStart(1, "div", 3)(2, "div", 4)(3, "h1", 5)(4, "
|
|
33553
|
+
i0.ɵɵelementStart(1, "div", 3)(2, "div", 4)(3, "h1", 5)(4, "span", 6);
|
|
33578
33554
|
i0.ɵɵtext(5);
|
|
33579
33555
|
i0.ɵɵpipe(6, "rpxTranslate");
|
|
33580
33556
|
i0.ɵɵelementEnd()();
|
|
@@ -33617,7 +33593,7 @@ class UpdateFlagComponent extends AbstractJourneyComponent {
|
|
|
33617
33593
|
}
|
|
33618
33594
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UpdateFlagComponent, [{
|
|
33619
33595
|
type: Component,
|
|
33620
|
-
args: [{ selector: 'ccd-update-flag', standalone: false, template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"200\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <h1 class=\"govuk-label-wrapper govuk-!-margin-bottom-4\">\n <
|
|
33596
|
+
args: [{ selector: 'ccd-update-flag', standalone: false, template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"200\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <h1 class=\"govuk-label-wrapper govuk-!-margin-bottom-4\">\n <span class=\"govuk-label govuk-label--m\">\n {{updateFlagTitle | rpxTranslate}}\n </span>\n </h1>\n <div id=\"update-flag-hint-external\" class=\"govuk-hint\" *ngIf=\"externalUserUpdate\">\n {{selectedFlag?.flagDetailDisplay?.flagDetail | updateFlagTitleDisplay}}\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label class=\"govuk-label govuk-label--s\" [for]=\"caseFlagFormFields.COMMENTS\">\n {{\n externalUserUpdate\n ? (updateFlagStepEnum.COMMENT_FIELD_LABEL_EXTERNAL | rpxTranslate)\n : (updateFlagTitle | rpxTranslate) + (' comments' | rpxTranslate)\n }}\n </label>\n <div id=\"update-flag-comments-hint-external\" class=\"govuk-hint\" *ngIf=\"externalUserUpdate\">\n {{updateFlagStepEnum.COMMENT_HINT_TEXT_EXTERNAL | rpxTranslate}}\n </div>\n <ng-container *ngIf=\"internalUserUpdate || internalUser2Point1EnabledUpdate || displayContextParameter === '';\n else externalUser\">\n <div id=\"update-flag-comments-hint\" class=\"govuk-hint\">\n {{\n internalUserUpdate\n ? (updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL | rpxTranslate)\n : (updateFlagStepEnum.COMMENT_HINT_TEXT_INTERNAL_2_POINT_1 | rpxTranslate)\n }}\n </div>\n <div class=\"govuk-warning-text\" *ngIf=\"internalUser2Point1EnabledUpdate && externallyVisibleFlag\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">{{'Warning' | rpxTranslate}}</span>\n {{updateFlagStepEnum.WARNING_TEXT | rpxTranslate}}\n </strong>\n </div>\n <div id=\"update-flag-comments-not-entered-error-message\" class=\"govuk-error-message\" *ngIf=\"commentsNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{commentsNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"update-flag-comments-char-limit-error\" class=\"govuk-error-message\" *ngIf=\"commentsCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{commentsCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\"\n [id]=\"caseFlagFormFields.COMMENTS\"\n [name]=\"caseFlagFormFields.COMMENTS\"\n [formControlName]=\"caseFlagFormFields.COMMENTS\"\n rows=\"5\"\n aria-describedby=\"update-flag-comments-hint update-flag-comments-char-limit-info update-flag-comments-char-limit-error\">\n </textarea>\n <div id=\"update-flag-comments-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </ng-container>\n <ng-template #externalUser>\n <ng-container *ngIf=\"externalUserUpdate\">\n <ng-container *ngTemplateOutlet=\"updateFlagStatusReason\"></ng-container>\n </ng-container>\n </ng-template>\n </div>\n\n <ng-template #updateFlagStatusReason>\n <div id=\"update-flag-status-reason-not-entered-error-message\" class=\"govuk-error-message\" *ngIf=\"statusReasonNotEnteredErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonNotEnteredErrorMessage | rpxTranslate}}\n </div>\n <div id=\"update-flag-status-reason-char-limit-error\" class=\"govuk-error-message\" *ngIf=\"statusReasonCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{statusReasonCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\"\n [id]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n [name]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n [formControlName]=\"caseFlagFormFields.STATUS_CHANGE_REASON\"\n rows=\"5\"\n aria-describedby=\"update-flag-comments-hint-external update-flag-status-hint update-flag-status-reason-char-limit-info\n update-flag-status-reason-char-limit-error\">\n </textarea>\n <div id=\"update-flag-status-reason-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </ng-template>\n\n <div id=\"flag-status-container-v2_1\" class=\"govuk-!-margin-bottom-4\" *ngIf=\"internalUser2Point1EnabledUpdate\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"update-flag-status-heading\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--s\">\n <h1 id=\"update-flag-status-heading\" class=\"govuk-fieldset__heading\">\n {{updateFlagTitle | rpxTranslate}} {{'status' | rpxTranslate}}\n </h1>\n </legend>\n <div class=\"govuk-radios govuk-radios--conditional govuk-!-margin-bottom-4\" data-module=\"govuk-radios\" [id]=\"caseFlagFormFields.STATUS\">\n <div class=\"govuk-radios__item\" *ngFor=\"let status of validStatusProgressions\">\n <input class=\"govuk-radios__input\" type=\"radio\"\n [id]=\"caseFlagFormFields.STATUS + '_' + status\"\n [name]=\"caseFlagFormFields.STATUS\"\n [formControlName]=\"caseFlagFormFields.STATUS\"\n [value]=\"status\">\n <label class=\"govuk-label govuk-radios__label\" [for]=\"caseFlagFormFields.STATUS + '_' + status\">\n {{caseFlagStatusEnum[status] | rpxTranslate}}\n </label>\n </div>\n </div>\n </fieldset>\n\n <div id=\"update-flag-status-hint\" class=\"govuk-hint\">\n {{updateFlagStepEnum.STATUS_HINT_TEXT | rpxTranslate}}\n </div>\n <ng-container *ngTemplateOutlet=\"updateFlagStatusReason\"></ng-container>\n </div>\n\n <div id=\"translation-checkbox-container\" class=\"govuk-!-margin-bottom-6\" *ngIf=\"internalUser2Point1EnabledUpdate\">\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" type=\"checkbox\"\n [formControlName]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\"\n [id]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\"\n [name]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\">\n <label class=\"govuk-label govuk-checkboxes__label\"\n [for]=\"caseFlagFormFields.IS_WELSH_TRANSLATION_NEEDED\">\n {{'I need to add a translation' | rpxTranslate}}\n </label>\n </div>\n </div>\n </div>\n\n <div id=\"flag-status-container-v1\" class=\"govuk-grid-row\" *ngIf=\"internalUserUpdate\">\n <div class=\"govuk-grid-column-one-half\">\n <p>{{'Flag status:' | rpxTranslate}}\n <span>\n <strong class=\"govuk-tag\" [ngClass]=\"{'govuk-tag--grey': selectedFlag.flagDetailDisplay.flagDetail.status === 'Inactive'}\">\n {{selectedFlag?.flagDetailDisplay?.flagDetail?.status | rpxTranslate}}\n </strong>\n </span>\n </p>\n </div>\n <div class=\"govuk-grid-column-one-half\">\n <button class=\"button button-secondary\" type=\"button\" (click)=\"onMakeInactive()\" *ngIf=\"selectedFlag.flagDetailDisplay.flagDetail.status === 'Active'\">\n {{'Make inactive' | rpxTranslate}}\n </button>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n" }]
|
|
33621
33597
|
}], () => [{ type: i1.RpxTranslationService }, { type: MultipageComponentStateService }], { formGroup: [{
|
|
33622
33598
|
type: Input
|
|
33623
33599
|
}], displayContextParameter: [{
|
|
@@ -33775,7 +33751,7 @@ class UpdateFlagAddTranslationFormComponent extends AbstractJourneyComponent {
|
|
|
33775
33751
|
static ɵfac = /*@__PURE__*/ (() => { let ɵUpdateFlagAddTranslationFormComponent_BaseFactory; return function UpdateFlagAddTranslationFormComponent_Factory(__ngFactoryType__) { return (ɵUpdateFlagAddTranslationFormComponent_BaseFactory || (ɵUpdateFlagAddTranslationFormComponent_BaseFactory = i0.ɵɵgetInheritedFactory(UpdateFlagAddTranslationFormComponent)))(__ngFactoryType__ || UpdateFlagAddTranslationFormComponent); }; })();
|
|
33776
33752
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UpdateFlagAddTranslationFormComponent, selectors: [["ccd-update-flag-add-translation-form"]], inputs: { formGroup: "formGroup" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 50, vars: 54, consts: [[3, "formGroup"], ["data-module", "govuk-character-count", "data-maxlength", "200", 1, "govuk-character-count"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper", "govuk-!-margin-bottom-6"], [1, "govuk-label", "govuk-label--m"], ["id", "add-translation-form-hint", 1, "govuk-hint"], [1, "govuk-!-margin-bottom-4"], [1, "govuk-label", "govuk-label--s", 3, "for"], ["id", "add-translation-other-flag-description-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["rows", "5", 1, "govuk-textarea", 3, "id", "name", "formControlName"], ["id", "add-translation-other-flag-description-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-other-flag-description-welsh-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-translation-other-flag-description-welsh-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-flag-comments-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-translation-flag-comments-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-flag-comments-welsh-char-limit-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "add-translation-flag-comments-welsh-char-limit-info", "aria-live", "polite", 1, "govuk-hint", "govuk-character-count__message"], ["id", "add-translation-other-flag-description-char-limit-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "add-translation-other-flag-description-welsh-char-limit-error", 1, "govuk-error-message"], ["id", "add-translation-flag-comments-char-limit-error", 1, "govuk-error-message"], ["id", "add-translation-flag-comments-welsh-char-limit-error", 1, "govuk-error-message"]], template: function UpdateFlagAddTranslationFormComponent_Template(rf, ctx) { if (rf & 1) {
|
|
33777
33753
|
i0.ɵɵelementContainerStart(0, 0);
|
|
33778
|
-
i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "h1", 3)(4, "
|
|
33754
|
+
i0.ɵɵelementStart(1, "div", 1)(2, "div", 2)(3, "h1", 3)(4, "span", 4);
|
|
33779
33755
|
i0.ɵɵtext(5);
|
|
33780
33756
|
i0.ɵɵpipe(6, "rpxTranslate");
|
|
33781
33757
|
i0.ɵɵelementEnd()();
|
|
@@ -33884,7 +33860,7 @@ class UpdateFlagAddTranslationFormComponent extends AbstractJourneyComponent {
|
|
|
33884
33860
|
}
|
|
33885
33861
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UpdateFlagAddTranslationFormComponent, [{
|
|
33886
33862
|
type: Component,
|
|
33887
|
-
args: [{ selector: 'ccd-update-flag-add-translation-form', standalone: false, template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"200\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <h1 class=\"govuk-label-wrapper govuk-!-margin-bottom-6\">\n <
|
|
33863
|
+
args: [{ selector: 'ccd-update-flag-add-translation-form', standalone: false, template: "<ng-container [formGroup]=\"formGroup\">\n <div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"200\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'form-group-error': errorMessages.length > 0}\">\n <h1 class=\"govuk-label-wrapper govuk-!-margin-bottom-6\">\n <span class=\"govuk-label govuk-label--m\">\n {{ updateFlagAddTranslationTitle | rpxTranslate}}\n </span>\n </h1>\n <div id=\"add-translation-form-hint\" class=\"govuk-hint\">\n {{ updateFlagAddTranslationStepEnum.HINT_TEXT | rpxTranslate}}\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\" class=\"govuk-label govuk-label--s\">{{'Other description' | rpxTranslate}}</label>\n <div id=\"add-translation-other-flag-description-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"otherFlagDescriptionCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{otherFlagDescriptionCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\"\n [name]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\"\n [formControlName]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION\">\n </textarea>\n <div id=\"add-translation-other-flag-description-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\" class=\"govuk-label govuk-label--s\">{{'Other description (Welsh)' | rpxTranslate}}</label>\n <div id=\"add-translation-other-flag-description-welsh-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"otherFlagDescriptionWelshCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{otherFlagDescriptionWelshCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\"\n [name]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\"\n [formControlName]=\"caseFlagFormFields.OTHER_FLAG_DESCRIPTION_WELSH\">\n </textarea>\n <div id=\"add-translation-other-flag-description-welsh-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.COMMENTS\" class=\"govuk-label govuk-label--s\">{{'Flag comments' | rpxTranslate}}</label>\n <div id=\"add-translation-flag-comments-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"flagCommentsCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagCommentsCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.COMMENTS\"\n [name]=\"caseFlagFormFields.COMMENTS\"\n [formControlName]=\"caseFlagFormFields.COMMENTS\">\n </textarea>\n <div id=\"add-translation-flag-comments-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <label [for]=\"caseFlagFormFields.COMMENTS_WELSH\" class=\"govuk-label govuk-label--s\">{{'Flag comments (Welsh)' | rpxTranslate}}</label>\n <div id=\"add-translation-flag-comments-welsh-char-limit-error\" class=\"govuk-error-message\"\n *ngIf=\"flagCommentsWelshCharLimitErrorMessage\">\n <span class=\"govuk-visually-hidden\">{{'Error:' | rpxTranslate}}</span> {{flagCommentsWelshCharLimitErrorMessage | rpxTranslate}}\n </div>\n <textarea\n class=\"govuk-textarea\" rows=\"5\"\n [id]=\"caseFlagFormFields.COMMENTS_WELSH\"\n [name]=\"caseFlagFormFields.COMMENTS_WELSH\"\n [formControlName]=\"caseFlagFormFields.COMMENTS_WELSH\">\n </textarea>\n <div id=\"add-translation-flag-comments-welsh-char-limit-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n {{updateFlagAddTranslationStepEnum.CHARACTER_LIMIT_INFO | rpxTranslate}}\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n" }]
|
|
33888
33864
|
}], null, { formGroup: [{
|
|
33889
33865
|
type: Input
|
|
33890
33866
|
}], caseFlagStateEmitter: [{
|
|
@@ -34692,14 +34668,12 @@ class ReadComplexFieldCollectionTableComponent extends AbstractFieldReadComponen
|
|
|
34692
34668
|
if (this.isHidden[row]) {
|
|
34693
34669
|
return 'assets/img/accordion-plus.png';
|
|
34694
34670
|
}
|
|
34671
|
+
else if (this.isVerticleDataNotEmpty(row)) {
|
|
34672
|
+
return 'assets/img/accordion-minus.png';
|
|
34673
|
+
}
|
|
34695
34674
|
else {
|
|
34696
|
-
|
|
34697
|
-
|
|
34698
|
-
}
|
|
34699
|
-
else {
|
|
34700
|
-
this.isHidden[row] = true;
|
|
34701
|
-
return 'assets/img/accordion-plus.png';
|
|
34702
|
-
}
|
|
34675
|
+
this.isHidden[row] = true;
|
|
34676
|
+
return 'assets/img/accordion-plus.png';
|
|
34703
34677
|
}
|
|
34704
34678
|
}
|
|
34705
34679
|
/**
|
|
@@ -35780,11 +35754,11 @@ class ReadFieldsFilterPipe {
|
|
|
35780
35754
|
values = values || {};
|
|
35781
35755
|
const type = field.field_type;
|
|
35782
35756
|
const value = ReadFieldsFilterPipe.getValue(field, values);
|
|
35783
|
-
const hasChildrenWithValue = type.complex_fields.
|
|
35757
|
+
const hasChildrenWithValue = type.complex_fields.some(f => {
|
|
35784
35758
|
const willKeep = ReadFieldsFilterPipe.keepField(f, value, true, checkConditionalShowAgainst);
|
|
35785
35759
|
return willKeep && ReadFieldsFilterPipe.evaluateConditionalShow(f, checkConditionalShowAgainst).hidden !== true;
|
|
35786
35760
|
});
|
|
35787
|
-
return
|
|
35761
|
+
return hasChildrenWithValue;
|
|
35788
35762
|
}
|
|
35789
35763
|
static isValidCollection(field, values, checkConditionalShowAgainst) {
|
|
35790
35764
|
// if field is collection and it has complex/collection child field; parent field doesnt have value defined
|
|
@@ -35793,7 +35767,7 @@ class ReadFieldsFilterPipe {
|
|
|
35793
35767
|
}
|
|
35794
35768
|
const isNotEmpty = Array.isArray(field.value) && field.value.length > 0;
|
|
35795
35769
|
if (isNotEmpty && field.field_type.collection_field_type.type === 'Complex') {
|
|
35796
|
-
return
|
|
35770
|
+
return field.value.some(item => {
|
|
35797
35771
|
const complexField = plainToClassFromExist(new CaseField(), {
|
|
35798
35772
|
id: field.field_type.collection_field_type.id,
|
|
35799
35773
|
field_type: field.field_type.collection_field_type,
|
|
@@ -35807,7 +35781,7 @@ class ReadFieldsFilterPipe {
|
|
|
35807
35781
|
}
|
|
35808
35782
|
static isEmpty(value) {
|
|
35809
35783
|
const fieldValue = value?.hasOwnProperty('list_items') && value?.hasOwnProperty('value') ? value.value : value;
|
|
35810
|
-
return ReadFieldsFilterPipe.EMPTY_VALUES.
|
|
35784
|
+
return ReadFieldsFilterPipe.EMPTY_VALUES.includes(fieldValue)
|
|
35811
35785
|
|| fieldValue.length === 0;
|
|
35812
35786
|
}
|
|
35813
35787
|
static isCompound(field) {
|
|
@@ -35918,7 +35892,7 @@ class ReadFieldsFilterPipe {
|
|
|
35918
35892
|
return true;
|
|
35919
35893
|
}
|
|
35920
35894
|
// We also shouldn't ditch fields that will always come back with a null value.
|
|
35921
|
-
if (this.ALWAYS_NULL_FIELDS.
|
|
35895
|
+
if (this.ALWAYS_NULL_FIELDS.includes(field.field_type.type)) {
|
|
35922
35896
|
return true;
|
|
35923
35897
|
}
|
|
35924
35898
|
value = value || {};
|
|
@@ -35947,7 +35921,7 @@ class ReadFieldsFilterPipe {
|
|
|
35947
35921
|
}
|
|
35948
35922
|
else if (field.show_condition) {
|
|
35949
35923
|
let cond;
|
|
35950
|
-
if (fieldId && field.show_condition.
|
|
35924
|
+
if (fieldId && field.show_condition.includes(`${fieldId}.`) && !formGroupAvailable && !!Object.keys(formValue).length) {
|
|
35951
35925
|
const search = `/.*${fieldId}./`;
|
|
35952
35926
|
const searchRegExp = new RegExp(search, 'g');
|
|
35953
35927
|
const replaceWith = '';
|
|
@@ -36030,7 +36004,7 @@ class CcdPageFieldsPipe {
|
|
|
36030
36004
|
const control = dataFormGroup.controls['data'].get(key);
|
|
36031
36005
|
return control['caseField'];
|
|
36032
36006
|
}).filter(field => {
|
|
36033
|
-
return field &&
|
|
36007
|
+
return field && page.case_fields.some(pcf => pcf.id === field.id);
|
|
36034
36008
|
}).sort((a, b) => a.order - b.order);
|
|
36035
36009
|
const rawValue = dataFormGroup.value;
|
|
36036
36010
|
const value = page.case_fields.reduce((acc, field) => {
|
|
@@ -36574,9 +36548,9 @@ class FormModule {
|
|
|
36574
36548
|
class CollectionCreateCheckerService {
|
|
36575
36549
|
setDisplayContextForChildren(caseField, profile) {
|
|
36576
36550
|
const children = this.getCaseFieldChildren(caseField);
|
|
36577
|
-
if (children
|
|
36551
|
+
if (children?.length > 0) {
|
|
36578
36552
|
children.forEach(child => {
|
|
36579
|
-
if (
|
|
36553
|
+
if (profile.user.idam.roles.some(role => this.hasCreateAccess(child, role))) {
|
|
36580
36554
|
child.display_context = caseField.display_context;
|
|
36581
36555
|
}
|
|
36582
36556
|
if (this.isCollection(child) || this.isComplex(child)) {
|
|
@@ -36602,7 +36576,7 @@ class CollectionCreateCheckerService {
|
|
|
36602
36576
|
return caseField.field_type.type === 'Collection';
|
|
36603
36577
|
}
|
|
36604
36578
|
hasCreateAccess(caseField, role) {
|
|
36605
|
-
return
|
|
36579
|
+
return caseField.acls.some(acl => acl.role === role && acl.create === true);
|
|
36606
36580
|
}
|
|
36607
36581
|
static ɵfac = function CollectionCreateCheckerService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CollectionCreateCheckerService)(); };
|
|
36608
36582
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CollectionCreateCheckerService, factory: CollectionCreateCheckerService.ɵfac });
|
|
@@ -37810,7 +37784,7 @@ class CaseEditSubmitComponent {
|
|
|
37810
37784
|
return this.caseEdit?.error?.callbackErrors?.length;
|
|
37811
37785
|
}
|
|
37812
37786
|
navigateToPage(pageId) {
|
|
37813
|
-
this.caseEdit.navigateToPage(pageId);
|
|
37787
|
+
void this.caseEdit.navigateToPage(pageId);
|
|
37814
37788
|
}
|
|
37815
37789
|
callbackErrorsNotify(errorContext) {
|
|
37816
37790
|
this.caseEdit.ignoreWarning = errorContext.ignoreWarning;
|
|
@@ -38154,20 +38128,20 @@ class LoadingSpinnerModule {
|
|
|
38154
38128
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(LoadingSpinnerModule, { declarations: [LoadingSpinnerComponent], imports: [CommonModule, i1.RpxTranslationModule], exports: [LoadingSpinnerComponent] }); })();
|
|
38155
38129
|
|
|
38156
38130
|
function CaseEditGenericErrorsComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
38157
|
-
i0.ɵɵelementStart(0, "div",
|
|
38131
|
+
i0.ɵɵelementStart(0, "div", 2)(1, "h1", 3);
|
|
38158
38132
|
i0.ɵɵtext(2, " Something went wrong ");
|
|
38159
38133
|
i0.ɵɵelementEnd();
|
|
38160
|
-
i0.ɵɵelementStart(3, "div",
|
|
38134
|
+
i0.ɵɵelementStart(3, "div", 4)(4, "p");
|
|
38161
38135
|
i0.ɵɵtext(5, "We're working to fix the problem. Try again shortly.");
|
|
38162
38136
|
i0.ɵɵelementEnd();
|
|
38163
|
-
i0.ɵɵelementStart(6, "p")(7, "a",
|
|
38137
|
+
i0.ɵɵelementStart(6, "p")(7, "a", 5);
|
|
38164
38138
|
i0.ɵɵtext(8, "Contact us");
|
|
38165
38139
|
i0.ɵɵelementEnd();
|
|
38166
38140
|
i0.ɵɵtext(9, " if you're still having problems.");
|
|
38167
38141
|
i0.ɵɵelementEnd()()();
|
|
38168
38142
|
} }
|
|
38169
38143
|
function CaseEditGenericErrorsComponent_div_1_ul_5_li_1_Template(rf, ctx) { if (rf & 1) {
|
|
38170
|
-
i0.ɵɵelementStart(0, "li",
|
|
38144
|
+
i0.ɵɵelementStart(0, "li", 11);
|
|
38171
38145
|
i0.ɵɵtext(1);
|
|
38172
38146
|
i0.ɵɵelementEnd();
|
|
38173
38147
|
} if (rf & 2) {
|
|
@@ -38176,8 +38150,8 @@ function CaseEditGenericErrorsComponent_div_1_ul_5_li_1_Template(rf, ctx) { if (
|
|
|
38176
38150
|
i0.ɵɵtextInterpolate(fieldError_r1.message);
|
|
38177
38151
|
} }
|
|
38178
38152
|
function CaseEditGenericErrorsComponent_div_1_ul_5_Template(rf, ctx) { if (rf & 1) {
|
|
38179
|
-
i0.ɵɵelementStart(0, "ul",
|
|
38180
|
-
i0.ɵɵtemplate(1, CaseEditGenericErrorsComponent_div_1_ul_5_li_1_Template, 2, 1, "li",
|
|
38153
|
+
i0.ɵɵelementStart(0, "ul", 9);
|
|
38154
|
+
i0.ɵɵtemplate(1, CaseEditGenericErrorsComponent_div_1_ul_5_li_1_Template, 2, 1, "li", 10);
|
|
38181
38155
|
i0.ɵɵelementEnd();
|
|
38182
38156
|
} if (rf & 2) {
|
|
38183
38157
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -38185,13 +38159,13 @@ function CaseEditGenericErrorsComponent_div_1_ul_5_Template(rf, ctx) { if (rf &
|
|
|
38185
38159
|
i0.ɵɵproperty("ngForOf", ctx_r1.error.details.field_errors);
|
|
38186
38160
|
} }
|
|
38187
38161
|
function CaseEditGenericErrorsComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
38188
|
-
i0.ɵɵelementStart(0, "div",
|
|
38162
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "h3", 7);
|
|
38189
38163
|
i0.ɵɵtext(2, " The event could not be created ");
|
|
38190
38164
|
i0.ɵɵelementEnd();
|
|
38191
38165
|
i0.ɵɵelementStart(3, "p");
|
|
38192
38166
|
i0.ɵɵtext(4);
|
|
38193
38167
|
i0.ɵɵelementEnd();
|
|
38194
|
-
i0.ɵɵtemplate(5, CaseEditGenericErrorsComponent_div_1_ul_5_Template, 2, 1, "ul",
|
|
38168
|
+
i0.ɵɵtemplate(5, CaseEditGenericErrorsComponent_div_1_ul_5_Template, 2, 1, "ul", 8);
|
|
38195
38169
|
i0.ɵɵelementEnd();
|
|
38196
38170
|
} if (rf & 2) {
|
|
38197
38171
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -38203,8 +38177,8 @@ function CaseEditGenericErrorsComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
38203
38177
|
class CaseEditGenericErrorsComponent {
|
|
38204
38178
|
error;
|
|
38205
38179
|
static ɵfac = function CaseEditGenericErrorsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseEditGenericErrorsComponent)(); };
|
|
38206
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditGenericErrorsComponent, selectors: [["ccd-case-edit-generic-errors"]], inputs: { error: "error" }, standalone: false, features: [i0.ɵɵProvidersFeature([])], decls: 2, vars: 2, consts: [["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-
|
|
38207
|
-
i0.ɵɵtemplate(0, CaseEditGenericErrorsComponent_div_0_Template, 10, 0, "div", 0)(1, CaseEditGenericErrorsComponent_div_1_Template, 6, 2, "div",
|
|
38180
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditGenericErrorsComponent, selectors: [["ccd-case-edit-generic-errors"]], inputs: { error: "error" }, standalone: false, features: [i0.ɵɵProvidersFeature([])], decls: 2, vars: 2, consts: [["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error_generic-summary-heading", "tabindex", "-1", 4, "ngIf"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error_generic-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error_generic-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error_generic-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"]], template: function CaseEditGenericErrorsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
38181
|
+
i0.ɵɵtemplate(0, CaseEditGenericErrorsComponent_div_0_Template, 10, 0, "div", 0)(1, CaseEditGenericErrorsComponent_div_1_Template, 6, 2, "div", 1);
|
|
38208
38182
|
} if (rf & 2) {
|
|
38209
38183
|
i0.ɵɵproperty("ngIf", ctx.error && (!(ctx.error.callbackErrors || ctx.error.callbackWarnings || ctx.error.details) && !ctx.error.message));
|
|
38210
38184
|
i0.ɵɵadvance();
|
|
@@ -38213,7 +38187,7 @@ class CaseEditGenericErrorsComponent {
|
|
|
38213
38187
|
}
|
|
38214
38188
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditGenericErrorsComponent, [{
|
|
38215
38189
|
type: Component,
|
|
38216
|
-
args: [{ selector: 'ccd-case-edit-generic-errors', providers: [], standalone: false, template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && (!(error.callbackErrors || error.callbackWarnings || error.details) && !error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-
|
|
38190
|
+
args: [{ selector: 'ccd-case-edit-generic-errors', providers: [], standalone: false, template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && (!(error.callbackErrors || error.callbackWarnings || error.details) && !error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error_generic-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error_generic-summary-heading\">\n Something went wrong\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error_generic-summary-body\">\n <p>We're working to fix the problem. Try again shortly.</p>\n <p><a href=\"get-help\" target=\"_blank\">Contact us</a> if you're still having problems.</p>\n </div>\n </div>\n <!-- Event error heading and error message to be displayed if there are specific error details -->\n <div *ngIf=\"error && (error.details || error.message)\" class=\"error-summary\" role=\"group\" aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h3 class=\"heading-h3 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n The event could not be created\n </h3>\n <p>{{error.message}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\" class=\"ccd-error-summary-li\">{{fieldError.message}}</li>\n </ul>\n </div>\n", styles: ["#fieldset-case-data{margin-bottom:30px}#fieldset-case-data th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}#confirmation-header{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body{width:630px;background-color:#fff}.valign-top{vertical-align:top}.summary-fields{margin-bottom:30px}.summary-fields tbody tr th,.summary-fields tbody tr td{border-bottom:0px}a.disabled{pointer-events:none;cursor:default}.case-field-label{width:45%}.case-field-content{width:50%}.no-bottom-border{border-bottom:none}.case-field-change{width:5%}.refresh-modal-backdrop{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000}.refresh-modal{background:#fff;padding:24px;max-width:520px;width:90%;box-shadow:0 8px 24px #0003;border-radius:4px;text-align:center}.refresh-modal .button{margin-top:12px}\n"] }]
|
|
38217
38191
|
}], null, { error: [{
|
|
38218
38192
|
type: Input
|
|
38219
38193
|
}] }); })();
|
|
@@ -38754,14 +38728,13 @@ function CaseListComponent_td_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
38754
38728
|
i0.ɵɵelementStart(0, "td", 8)(1, "div", 9)(2, "input", 10);
|
|
38755
38729
|
i0.ɵɵlistener("change", function CaseListComponent_td_6_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.selectAll()); });
|
|
38756
38730
|
i0.ɵɵelementEnd();
|
|
38757
|
-
i0.ɵɵ
|
|
38758
|
-
i0.ɵɵ
|
|
38731
|
+
i0.ɵɵelementStart(3, "label", 11);
|
|
38732
|
+
i0.ɵɵtext(4, " Select all cases ");
|
|
38733
|
+
i0.ɵɵelementEnd()()();
|
|
38759
38734
|
} if (rf & 2) {
|
|
38760
38735
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
38761
38736
|
i0.ɵɵadvance(2);
|
|
38762
38737
|
i0.ɵɵproperty("checked", ctx_r1.allOnPageSelected())("disabled", !ctx_r1.canAnyBeShared());
|
|
38763
|
-
i0.ɵɵadvance();
|
|
38764
|
-
i0.ɵɵattribute("aria-labelledby", "select-all");
|
|
38765
38738
|
} }
|
|
38766
38739
|
function CaseListComponent_th_7_Template(rf, ctx) { if (rf & 1) {
|
|
38767
38740
|
i0.ɵɵelementStart(0, "th", 12);
|
|
@@ -38778,8 +38751,9 @@ function CaseListComponent_ng_container_9_td_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
38778
38751
|
i0.ɵɵelementStart(0, "td", 15)(1, "div", 9)(2, "input", 16);
|
|
38779
38752
|
i0.ɵɵlistener("change", function CaseListComponent_ng_container_9_td_2_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r4); const c_r5 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.changeSelection(c_r5)); })("keyup", function CaseListComponent_ng_container_9_td_2_Template_input_keyup_2_listener($event) { i0.ɵɵrestoreView(_r4); const c_r5 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onKeyUp($event, c_r5)); });
|
|
38780
38753
|
i0.ɵɵelementEnd();
|
|
38781
|
-
i0.ɵɵ
|
|
38782
|
-
i0.ɵɵ
|
|
38754
|
+
i0.ɵɵelementStart(3, "label", 17);
|
|
38755
|
+
i0.ɵɵtext(4);
|
|
38756
|
+
i0.ɵɵelementEnd()()();
|
|
38783
38757
|
} if (rf & 2) {
|
|
38784
38758
|
const ctx_r5 = i0.ɵɵnextContext();
|
|
38785
38759
|
const c_r5 = ctx_r5.$implicit;
|
|
@@ -38789,7 +38763,8 @@ function CaseListComponent_ng_container_9_td_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
38789
38763
|
i0.ɵɵproperty("id", i0.ɵɵinterpolate1("select-", c_r5[ctx_r1.tableConfig.idField] || i_r7))("name", i0.ɵɵinterpolate1("select-", c_r5[ctx_r1.tableConfig.idField] || i_r7))("checked", ctx_r1.isSelected(c_r5))("disabled", !ctx_r1.canBeShared(c_r5));
|
|
38790
38764
|
i0.ɵɵadvance();
|
|
38791
38765
|
i0.ɵɵproperty("for", i0.ɵɵinterpolate1("select-", c_r5[ctx_r1.tableConfig.idField] || i_r7));
|
|
38792
|
-
i0.ɵɵ
|
|
38766
|
+
i0.ɵɵadvance();
|
|
38767
|
+
i0.ɵɵtextInterpolate1(" Select case ", c_r5[ctx_r1.tableConfig.idField] || i_r7, " ");
|
|
38793
38768
|
} }
|
|
38794
38769
|
function CaseListComponent_ng_container_9_ng_container_3_th_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
38795
38770
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -38920,7 +38895,7 @@ function CaseListComponent_ng_container_9_ng_container_3_Template(rf, ctx) { if
|
|
|
38920
38895
|
function CaseListComponent_ng_container_9_Template(rf, ctx) { if (rf & 1) {
|
|
38921
38896
|
i0.ɵɵelementContainerStart(0);
|
|
38922
38897
|
i0.ɵɵelementStart(1, "tr", 13);
|
|
38923
|
-
i0.ɵɵtemplate(2, CaseListComponent_ng_container_9_td_2_Template,
|
|
38898
|
+
i0.ɵɵtemplate(2, CaseListComponent_ng_container_9_td_2_Template, 5, 9, "td", 14)(3, CaseListComponent_ng_container_9_ng_container_3_Template, 3, 2, "ng-container", 6);
|
|
38924
38899
|
i0.ɵɵelementEnd();
|
|
38925
38900
|
i0.ɵɵelementContainerEnd();
|
|
38926
38901
|
} if (rf & 2) {
|
|
@@ -39001,10 +38976,8 @@ class CaseListComponent {
|
|
|
39001
38976
|
}
|
|
39002
38977
|
});
|
|
39003
38978
|
}
|
|
39004
|
-
else {
|
|
39005
|
-
|
|
39006
|
-
this.selectedCases = [...this.selectedCases, aCase];
|
|
39007
|
-
}
|
|
38979
|
+
else if (this.canBeShared(aCase)) {
|
|
38980
|
+
this.selectedCases = [...this.selectedCases, aCase];
|
|
39008
38981
|
}
|
|
39009
38982
|
this.selection.emit(this.selectedCases);
|
|
39010
38983
|
}
|
|
@@ -39033,13 +39006,13 @@ class CaseListComponent {
|
|
|
39033
39006
|
this.pageChange.emit(pageNumber);
|
|
39034
39007
|
}
|
|
39035
39008
|
static ɵfac = function CaseListComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseListComponent)(i0.ɵɵdirectiveInject(BrowserService)); };
|
|
39036
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseListComponent, selectors: [["ccd-case-list"]], inputs: { classes: "classes", caption: "caption", firstCellIsHeader: "firstCellIsHeader", cases: "cases", tableConfig: "tableConfig", selectionEnabled: "selectionEnabled", selectedCases: "selectedCases", currentPageNo: "currentPageNo", totalResultsCount: "totalResultsCount", pageSize: "pageSize" }, outputs: { selection: "selection", pageChange: "pageChange" }, standalone: false, decls: 12, vars: 16, consts: [[1, "govuk-table__caption"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["class", "govuk-table__header", 4, "ngIf"], ["class", "govuk-table__header", "scope", "col", 4, "ngFor", "ngForOf"], [1, "govuk-table__body"], [4, "ngFor", "ngForOf"], [3, "pageChange", 4, "ngIf"], [1, "govuk-table__header"], [1, "govuk-checkboxes__item"], ["id", "select-all", "name", "select-all", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "checked", "disabled"], ["for", "select-all", 1, "govuk-label", "govuk-checkboxes__label"], ["scope", "col", 1, "govuk-table__header"], ["data-selector", "table-row", 1, "govuk-table__row"], ["data-selector", "table-header", "class", "govuk-table__header", "scope", "row", 4, "ngIf"], ["data-selector", "table-header", "scope", "row", 1, "govuk-table__header"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "keyup", "id", "name", "checked", "disabled"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["data-selector", "table-cell", "class", "govuk-table__cell", 3, "ngSwitch", 4, "ngIf"], [4, "ngIf"], [1, "govuk-link", 3, "routerLink"], ["data-selector", "table-cell", 1, "govuk-table__cell", 3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], [3, "pageChange"]], template: function CaseListComponent_Template(rf, ctx) { if (rf & 1) {
|
|
39009
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseListComponent, selectors: [["ccd-case-list"]], inputs: { classes: "classes", caption: "caption", firstCellIsHeader: "firstCellIsHeader", cases: "cases", tableConfig: "tableConfig", selectionEnabled: "selectionEnabled", selectedCases: "selectedCases", currentPageNo: "currentPageNo", totalResultsCount: "totalResultsCount", pageSize: "pageSize" }, outputs: { selection: "selection", pageChange: "pageChange" }, standalone: false, decls: 12, vars: 16, consts: [[1, "govuk-table__caption"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["class", "govuk-table__header", 4, "ngIf"], ["class", "govuk-table__header", "scope", "col", 4, "ngFor", "ngForOf"], [1, "govuk-table__body"], [4, "ngFor", "ngForOf"], [3, "pageChange", 4, "ngIf"], [1, "govuk-table__header"], [1, "govuk-checkboxes__item"], ["id", "select-all", "name", "select-all", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "checked", "disabled"], ["for", "select-all", 1, "govuk-label", "govuk-checkboxes__label", "govuk-visually-hidden"], ["scope", "col", 1, "govuk-table__header"], ["data-selector", "table-row", 1, "govuk-table__row"], ["data-selector", "table-header", "class", "govuk-table__header", "scope", "row", 4, "ngIf"], ["data-selector", "table-header", "scope", "row", 1, "govuk-table__header"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "keyup", "id", "name", "checked", "disabled"], [1, "govuk-label", "govuk-checkboxes__label", "govuk-visually-hidden", 3, "for"], ["data-selector", "table-cell", "class", "govuk-table__cell", 3, "ngSwitch", 4, "ngIf"], [4, "ngIf"], [1, "govuk-link", 3, "routerLink"], ["data-selector", "table-cell", 1, "govuk-table__cell", 3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], [3, "pageChange"]], template: function CaseListComponent_Template(rf, ctx) { if (rf & 1) {
|
|
39037
39010
|
i0.ɵɵelementStart(0, "table")(1, "caption", 0);
|
|
39038
39011
|
i0.ɵɵtext(2);
|
|
39039
39012
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
39040
39013
|
i0.ɵɵelementEnd();
|
|
39041
39014
|
i0.ɵɵelementStart(4, "thead", 1)(5, "tr", 2);
|
|
39042
|
-
i0.ɵɵtemplate(6, CaseListComponent_td_6_Template,
|
|
39015
|
+
i0.ɵɵtemplate(6, CaseListComponent_td_6_Template, 5, 2, "td", 3)(7, CaseListComponent_th_7_Template, 3, 3, "th", 4);
|
|
39043
39016
|
i0.ɵɵelementEnd()();
|
|
39044
39017
|
i0.ɵɵelementStart(8, "tbody", 5);
|
|
39045
39018
|
i0.ɵɵtemplate(9, CaseListComponent_ng_container_9_Template, 4, 2, "ng-container", 6);
|
|
@@ -39062,7 +39035,7 @@ class CaseListComponent {
|
|
|
39062
39035
|
}
|
|
39063
39036
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseListComponent, [{
|
|
39064
39037
|
type: Component,
|
|
39065
|
-
args: [{ selector: 'ccd-case-list', standalone: false, template: "<table class=\"{{'govuk-table ' + classes}}\">\n <caption class=\"govuk-table__caption\">{{caption | rpxTranslate}}</caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" *ngIf=\"selectionEnabled\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\"\n [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <!-- This label element is used to hide the standard checkbox with a govuk-styled one -->\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-all\"
|
|
39038
|
+
args: [{ selector: 'ccd-case-list', standalone: false, template: "<table class=\"{{'govuk-table ' + classes}}\">\n <caption class=\"govuk-table__caption\">{{caption | rpxTranslate}}</caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" *ngIf=\"selectionEnabled\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\"\n [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <!-- This label element is used to hide the standard checkbox with a govuk-styled one -->\n <label class=\"govuk-label govuk-checkboxes__label govuk-visually-hidden\" for=\"select-all\">\n Select all cases\n </label>\n </div>\n </td>\n <th class=\"govuk-table__header\" scope=\"col\" *ngFor=\"let h of tableConfig.columnConfigs\">{{h.header | rpxTranslate}}</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <ng-container *ngFor=\"let c of cases | paginate: { itemsPerPage: pageSize, currentPage: currentPageNo, totalItems: totalResultsCount }; index as i\">\n <tr data-selector=\"table-row\" class=\"govuk-table__row\">\n <td data-selector=\"table-header\" class=\"govuk-table__header\" scope=\"row\" *ngIf=\"selectionEnabled\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ c[tableConfig.idField] || i }}\" name=\"select-{{ c[tableConfig.idField] || i }}\"\n type=\"checkbox\" (change)=\"changeSelection(c)\" [checked]=\"isSelected(c)\" [disabled]=\"!canBeShared(c)\" (keyup)=\"onKeyUp($event, c)\" />\n <!-- This label element is used to hide the standard checkbox with a govuk-styled one -->\n <label class=\"govuk-label govuk-checkboxes__label govuk-visually-hidden\" for=\"select-{{ c[tableConfig.idField] || i }}\">\n Select case {{ c[tableConfig.idField] || i }}\n </label>\n </div>\n </td>\n <ng-container *ngFor=\"let col of tableConfig.columnConfigs; first as isFirst\">\n <th data-selector=\"table-header\" class=\"govuk-table__header\" scope=\"row\" *ngIf=\"isFirst && firstCellIsHeader\">\n <ng-container *ngIf=\"!col.type || col.type === 'text'\">{{c[col.key] | rpxTranslate}}</ng-container>\n <ng-container *ngIf=\"col.type === 'link' && c.routerLink\">\n <a class=\"govuk-link\" [routerLink]=\"c.routerLink\">{{c[col.key] | rpxTranslate}}</a>\n </ng-container>\n </th>\n <td data-selector=\"table-cell\" class=\"govuk-table__cell\" *ngIf=\"!(isFirst && firstCellIsHeader)\" [ngSwitch]=\"col?.type\">\n <ng-container *ngIf=\"col.type === 'link' && c.routerLink\">\n <a class=\"govuk-link\" [routerLink]=\"c.routerLink\">{{c[col.key] | rpxTranslate}}</a>\n </ng-container>\n <ng-container *ngSwitchCase=\"'money'\">-{{ c[col.key] | currency:'GBP' }}</ng-container>\n <ng-container *ngSwitchCase=\"'date'\">{{formatDate(c[col.key])}}</ng-container>\n <ng-container *ngSwitchCase=\"'dateAtTime'\">{{formatDateAtTime(c[col.key])}}</ng-container>\n <ng-container *ngSwitchDefault>{{c[col.key] | rpxTranslate}}</ng-container>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </tbody>\n</table>\n<ccd-pagination *ngIf=\"totalResultsCount > pageSize\"\n (pageChange)=\"goToPage($event)\"\n></ccd-pagination>\n" }]
|
|
39066
39039
|
}], () => [{ type: BrowserService }], { classes: [{
|
|
39067
39040
|
type: Input
|
|
39068
39041
|
}], caption: [{
|
|
@@ -40416,22 +40389,20 @@ class CaseResolver {
|
|
|
40416
40389
|
}
|
|
40417
40390
|
isTabViewRoute(route) {
|
|
40418
40391
|
// is route case/:jid/:ctid/:cid#fragment
|
|
40419
|
-
return route.firstChild
|
|
40392
|
+
return route.firstChild?.fragment;
|
|
40420
40393
|
}
|
|
40421
40394
|
getAndCacheCaseView(cid) {
|
|
40422
40395
|
if (this.caseNotifier.cachedCaseView && this.caseNotifier.cachedCaseView.case_id && this.caseNotifier.cachedCaseView.case_id === cid) {
|
|
40423
40396
|
this.caseNotifier.announceCase(this.caseNotifier.cachedCaseView);
|
|
40424
40397
|
return of(this.caseNotifier.cachedCaseView).toPromise();
|
|
40425
40398
|
}
|
|
40399
|
+
else if (Draft.isDraft(cid)) {
|
|
40400
|
+
return this.getAndCacheDraft(cid);
|
|
40401
|
+
}
|
|
40426
40402
|
else {
|
|
40427
|
-
|
|
40428
|
-
|
|
40429
|
-
|
|
40430
|
-
else {
|
|
40431
|
-
return this.caseNotifier.fetchAndRefresh(cid)
|
|
40432
|
-
.pipe(catchError(error => this.processErrorInCaseFetch(error, cid)))
|
|
40433
|
-
.toPromise();
|
|
40434
|
-
}
|
|
40403
|
+
return this.caseNotifier.fetchAndRefresh(cid)
|
|
40404
|
+
.pipe(catchError(error => this.processErrorInCaseFetch(error, cid)))
|
|
40405
|
+
.toPromise();
|
|
40435
40406
|
}
|
|
40436
40407
|
}
|
|
40437
40408
|
getAndCacheDraft(cid) {
|
|
@@ -40569,7 +40540,7 @@ class EventTriggerResolver {
|
|
|
40569
40540
|
const caseType = route.parent.paramMap.get('caseType');
|
|
40570
40541
|
const eventTriggerId = route.paramMap.get(EventTriggerResolver.PARAM_EVENT_ID);
|
|
40571
40542
|
let ignoreWarning = route.queryParamMap.get(EventTriggerResolver.IGNORE_WARNING);
|
|
40572
|
-
if (
|
|
40543
|
+
if (!EventTriggerResolver.IGNORE_WARNING_VALUES.includes(ignoreWarning)) {
|
|
40573
40544
|
ignoreWarning = 'false';
|
|
40574
40545
|
}
|
|
40575
40546
|
const profile$ = this.profileService.get().pipe(tap(profile => this.profileNotifier.announceProfile(profile)));
|
|
@@ -40737,7 +40708,7 @@ class CaseEventTriggerComponent {
|
|
|
40737
40708
|
let previousUrl = this.routerCurrentNavigation?.previousNavigation?.finalUrl?.toString();
|
|
40738
40709
|
if (previousUrl) {
|
|
40739
40710
|
previousUrl = this.getNavigationUrl(previousUrl);
|
|
40740
|
-
if (previousUrl.
|
|
40711
|
+
if (previousUrl.includes('#')) {
|
|
40741
40712
|
const url = previousUrl.split('#')[0];
|
|
40742
40713
|
const fragment = previousUrl.split('#')[1].replace(/%20/g, ' ');
|
|
40743
40714
|
return this.router.navigate([url], { fragment: fragment });
|
|
@@ -41193,15 +41164,15 @@ class DialogsModule {
|
|
|
41193
41164
|
const _c0$c = ["tabGroup"];
|
|
41194
41165
|
const _c1$3 = (a0, a1) => [a0, false, undefined, true, a1];
|
|
41195
41166
|
function CaseFullAccessViewComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
41196
|
-
i0.ɵɵelementStart(0, "div",
|
|
41167
|
+
i0.ɵɵelementStart(0, "div", 13)(1, "h1", 14);
|
|
41197
41168
|
i0.ɵɵtext(2);
|
|
41198
41169
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
41199
41170
|
i0.ɵɵelementEnd();
|
|
41200
|
-
i0.ɵɵelementStart(4, "div",
|
|
41171
|
+
i0.ɵɵelementStart(4, "div", 15)(5, "p");
|
|
41201
41172
|
i0.ɵɵtext(6);
|
|
41202
41173
|
i0.ɵɵpipe(7, "rpxTranslate");
|
|
41203
41174
|
i0.ɵɵelementEnd();
|
|
41204
|
-
i0.ɵɵelementStart(8, "p")(9, "a",
|
|
41175
|
+
i0.ɵɵelementStart(8, "p")(9, "a", 16);
|
|
41205
41176
|
i0.ɵɵtext(10);
|
|
41206
41177
|
i0.ɵɵpipe(11, "rpxTranslate");
|
|
41207
41178
|
i0.ɵɵelementEnd();
|
|
@@ -41229,8 +41200,8 @@ function CaseFullAccessViewComponent_div_1_ul_7_li_1_Template(rf, ctx) { if (rf
|
|
|
41229
41200
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, fieldError_r1.message), " ");
|
|
41230
41201
|
} }
|
|
41231
41202
|
function CaseFullAccessViewComponent_div_1_ul_7_Template(rf, ctx) { if (rf & 1) {
|
|
41232
|
-
i0.ɵɵelementStart(0, "ul",
|
|
41233
|
-
i0.ɵɵtemplate(1, CaseFullAccessViewComponent_div_1_ul_7_li_1_Template, 3, 3, "li",
|
|
41203
|
+
i0.ɵɵelementStart(0, "ul", 20);
|
|
41204
|
+
i0.ɵɵtemplate(1, CaseFullAccessViewComponent_div_1_ul_7_li_1_Template, 3, 3, "li", 21);
|
|
41234
41205
|
i0.ɵɵelementEnd();
|
|
41235
41206
|
} if (rf & 2) {
|
|
41236
41207
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -41238,7 +41209,7 @@ function CaseFullAccessViewComponent_div_1_ul_7_Template(rf, ctx) { if (rf & 1)
|
|
|
41238
41209
|
i0.ɵɵproperty("ngForOf", ctx_r1.error.details.field_errors);
|
|
41239
41210
|
} }
|
|
41240
41211
|
function CaseFullAccessViewComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
41241
|
-
i0.ɵɵelementStart(0, "div",
|
|
41212
|
+
i0.ɵɵelementStart(0, "div", 17)(1, "h2", 18);
|
|
41242
41213
|
i0.ɵɵtext(2);
|
|
41243
41214
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
41244
41215
|
i0.ɵɵelementEnd();
|
|
@@ -41246,7 +41217,7 @@ function CaseFullAccessViewComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
41246
41217
|
i0.ɵɵtext(5);
|
|
41247
41218
|
i0.ɵɵpipe(6, "rpxTranslate");
|
|
41248
41219
|
i0.ɵɵelementEnd();
|
|
41249
|
-
i0.ɵɵtemplate(7, CaseFullAccessViewComponent_div_1_ul_7_Template, 2, 1, "ul",
|
|
41220
|
+
i0.ɵɵtemplate(7, CaseFullAccessViewComponent_div_1_ul_7_Template, 2, 1, "ul", 19);
|
|
41250
41221
|
i0.ɵɵelementEnd();
|
|
41251
41222
|
} if (rf & 2) {
|
|
41252
41223
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -41258,7 +41229,7 @@ function CaseFullAccessViewComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
41258
41229
|
i0.ɵɵproperty("ngIf", ctx_r1.error.details == null ? null : ctx_r1.error.details.field_errors);
|
|
41259
41230
|
} }
|
|
41260
41231
|
function CaseFullAccessViewComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
41261
|
-
i0.ɵɵelementStart(0, "div",
|
|
41232
|
+
i0.ɵɵelementStart(0, "div", 22)(1, "a", 23);
|
|
41262
41233
|
i0.ɵɵtext(2);
|
|
41263
41234
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
41264
41235
|
i0.ɵɵelementEnd()();
|
|
@@ -41268,7 +41239,7 @@ function CaseFullAccessViewComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
41268
41239
|
} }
|
|
41269
41240
|
function CaseFullAccessViewComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
41270
41241
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
41271
|
-
i0.ɵɵelementStart(0, "div",
|
|
41242
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "ccd-event-trigger", 24);
|
|
41272
41243
|
i0.ɵɵlistener("onTriggerChange", function CaseFullAccessViewComponent_div_8_Template_ccd_event_trigger_onTriggerChange_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.clearErrorsAndWarnings()); })("onTriggerSubmit", function CaseFullAccessViewComponent_div_8_Template_ccd_event_trigger_onTriggerSubmit_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.applyTrigger($event)); });
|
|
41273
41244
|
i0.ɵɵelementEnd()();
|
|
41274
41245
|
} if (rf & 2) {
|
|
@@ -41278,7 +41249,7 @@ function CaseFullAccessViewComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
41278
41249
|
} }
|
|
41279
41250
|
function CaseFullAccessViewComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
41280
41251
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
41281
|
-
i0.ɵɵelementStart(0, "div",
|
|
41252
|
+
i0.ɵɵelementStart(0, "div", 5)(1, "div", 11)(2, "ccd-notification-banner", 25);
|
|
41282
41253
|
i0.ɵɵlistener("linkClicked", function CaseFullAccessViewComponent_div_9_Template_ccd_notification_banner_linkClicked_2_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onLinkClicked($event)); });
|
|
41283
41254
|
i0.ɵɵelementEnd()()();
|
|
41284
41255
|
} if (rf & 2) {
|
|
@@ -41297,7 +41268,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_ng_
|
|
|
41297
41268
|
i0.ɵɵelementContainerEnd();
|
|
41298
41269
|
} }
|
|
41299
41270
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
41300
|
-
i0.ɵɵtemplate(0, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_ng_container_0_Template, 2, 0, "ng-container",
|
|
41271
|
+
i0.ɵɵtemplate(0, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_ng_container_0_Template, 2, 0, "ng-container", 12)(1, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_ng_container_1_Template, 2, 0, "ng-container", 12);
|
|
41301
41272
|
} if (rf & 2) {
|
|
41302
41273
|
const tab_r6 = i0.ɵɵnextContext().$implicit;
|
|
41303
41274
|
i0.ɵɵproperty("ngIf", tab_r6.id === "tasks");
|
|
@@ -41305,9 +41276,9 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_Tem
|
|
|
41305
41276
|
i0.ɵɵproperty("ngIf", tab_r6.id === "roles-and-access");
|
|
41306
41277
|
} }
|
|
41307
41278
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template(rf, ctx) { if (rf & 1) {
|
|
41308
|
-
i0.ɵɵelementStart(0, "mat-tab",
|
|
41279
|
+
i0.ɵɵelementStart(0, "mat-tab", 29);
|
|
41309
41280
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
41310
|
-
i0.ɵɵtemplate(2, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_Template, 2, 2, "ng-template",
|
|
41281
|
+
i0.ɵɵtemplate(2, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_Template, 2, 2, "ng-template", 30);
|
|
41311
41282
|
i0.ɵɵelementEnd();
|
|
41312
41283
|
} if (rf & 2) {
|
|
41313
41284
|
const tab_r6 = ctx.$implicit;
|
|
@@ -41315,7 +41286,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template(rf, ctx)
|
|
|
41315
41286
|
i0.ɵɵattribute("data-case-tab-id", tab_r6.id);
|
|
41316
41287
|
} }
|
|
41317
41288
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_th_1_Template(rf, ctx) { if (rf & 1) {
|
|
41318
|
-
i0.ɵɵelementStart(0, "th",
|
|
41289
|
+
i0.ɵɵelementStart(0, "th", 40)(1, "div", 41);
|
|
41319
41290
|
i0.ɵɵtext(2);
|
|
41320
41291
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
41321
41292
|
i0.ɵɵelementEnd()();
|
|
@@ -41327,9 +41298,9 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_
|
|
|
41327
41298
|
} }
|
|
41328
41299
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_Template(rf, ctx) { if (rf & 1) {
|
|
41329
41300
|
i0.ɵɵelementStart(0, "tr");
|
|
41330
|
-
i0.ɵɵtemplate(1, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_th_1_Template, 4, 4, "th",
|
|
41331
|
-
i0.ɵɵelementStart(2, "td",
|
|
41332
|
-
i0.ɵɵelement(4, "ccd-field-read",
|
|
41301
|
+
i0.ɵɵtemplate(1, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_th_1_Template, 4, 4, "th", 36);
|
|
41302
|
+
i0.ɵɵelementStart(2, "td", 37)(3, "span", 38);
|
|
41303
|
+
i0.ɵɵelement(4, "ccd-field-read", 39);
|
|
41333
41304
|
i0.ɵɵelementEnd()()();
|
|
41334
41305
|
} if (rf & 2) {
|
|
41335
41306
|
const field_r7 = i0.ɵɵnextContext().$implicit;
|
|
@@ -41342,10 +41313,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_
|
|
|
41342
41313
|
i0.ɵɵproperty("topLevelFormGroup", ctx_r1.formGroup == null ? null : ctx_r1.formGroup.controls["data"])("caseFields", ctx_r1.caseFields)("caseField", field_r7)("caseReference", ctx_r1.caseDetails.case_id);
|
|
41343
41314
|
} }
|
|
41344
41315
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_5_Template(rf, ctx) { if (rf & 1) {
|
|
41345
|
-
i0.ɵɵelementStart(0, "tr",
|
|
41316
|
+
i0.ɵɵelementStart(0, "tr", 42)(1, "td", 43);
|
|
41346
41317
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
41347
|
-
i0.ɵɵelementStart(3, "span",
|
|
41348
|
-
i0.ɵɵelement(4, "ccd-field-read",
|
|
41318
|
+
i0.ɵɵelementStart(3, "span", 38);
|
|
41319
|
+
i0.ɵɵelement(4, "ccd-field-read", 39);
|
|
41349
41320
|
i0.ɵɵelementEnd()()();
|
|
41350
41321
|
} if (rf & 2) {
|
|
41351
41322
|
const field_r7 = i0.ɵɵnextContext().$implicit;
|
|
@@ -41358,10 +41329,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_
|
|
|
41358
41329
|
} }
|
|
41359
41330
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
41360
41331
|
i0.ɵɵelementContainerStart(0);
|
|
41361
|
-
i0.ɵɵelementStart(1, "div",
|
|
41362
|
-
i0.ɵɵelementContainerStart(2,
|
|
41332
|
+
i0.ɵɵelementStart(1, "div", 32);
|
|
41333
|
+
i0.ɵɵelementContainerStart(2, 33);
|
|
41363
41334
|
i0.ɵɵpipe(3, "ccdIsCompound");
|
|
41364
|
-
i0.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_Template, 5, 6, "tr",
|
|
41335
|
+
i0.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_Template, 5, 6, "tr", 34)(5, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_5_Template, 5, 8, "tr", 35);
|
|
41365
41336
|
i0.ɵɵelementContainerEnd();
|
|
41366
41337
|
i0.ɵɵelementEnd();
|
|
41367
41338
|
i0.ɵɵelementContainerEnd();
|
|
@@ -41381,7 +41352,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_Tem
|
|
|
41381
41352
|
i0.ɵɵelementStart(0, "table");
|
|
41382
41353
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
41383
41354
|
i0.ɵɵelementStart(2, "tbody");
|
|
41384
|
-
i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_Template, 6, 8, "ng-container",
|
|
41355
|
+
i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_Template, 6, 8, "ng-container", 21);
|
|
41385
41356
|
i0.ɵɵpipe(4, "ccdTabFields");
|
|
41386
41357
|
i0.ɵɵpipe(5, "ccdReadFieldsFilter");
|
|
41387
41358
|
i0.ɵɵelementEnd()();
|
|
@@ -41394,10 +41365,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_Tem
|
|
|
41394
41365
|
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBindV(5, 8, i0.ɵɵpureFunction2(14, _c1$3, i0.ɵɵpipeBind1(4, 6, tab_r8), ctx_r1.formGroup == null ? null : ctx_r1.formGroup.controls["data"])));
|
|
41395
41366
|
} }
|
|
41396
41367
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template(rf, ctx) { if (rf & 1) {
|
|
41397
|
-
i0.ɵɵelementStart(0, "mat-tab",
|
|
41368
|
+
i0.ɵɵelementStart(0, "mat-tab", 31);
|
|
41398
41369
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
41399
41370
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
41400
|
-
i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_Template, 6, 17, "ng-template",
|
|
41371
|
+
i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_Template, 6, 17, "ng-template", 30);
|
|
41401
41372
|
i0.ɵɵelementEnd();
|
|
41402
41373
|
} if (rf & 2) {
|
|
41403
41374
|
const tab_r8 = ctx.$implicit;
|
|
@@ -41412,15 +41383,15 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_ng_
|
|
|
41412
41383
|
i0.ɵɵelementContainerEnd();
|
|
41413
41384
|
} }
|
|
41414
41385
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
41415
|
-
i0.ɵɵtemplate(0, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_ng_container_0_Template, 2, 0, "ng-container",
|
|
41386
|
+
i0.ɵɵtemplate(0, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_ng_container_0_Template, 2, 0, "ng-container", 12);
|
|
41416
41387
|
} if (rf & 2) {
|
|
41417
41388
|
const tab_r10 = i0.ɵɵnextContext().$implicit;
|
|
41418
41389
|
i0.ɵɵproperty("ngIf", tab_r10.id === "hearings");
|
|
41419
41390
|
} }
|
|
41420
41391
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template(rf, ctx) { if (rf & 1) {
|
|
41421
|
-
i0.ɵɵelementStart(0, "mat-tab",
|
|
41392
|
+
i0.ɵɵelementStart(0, "mat-tab", 29);
|
|
41422
41393
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
41423
|
-
i0.ɵɵtemplate(2, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_Template, 1, 1, "ng-template",
|
|
41394
|
+
i0.ɵɵtemplate(2, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_Template, 1, 1, "ng-template", 30);
|
|
41424
41395
|
i0.ɵɵelementEnd();
|
|
41425
41396
|
} if (rf & 2) {
|
|
41426
41397
|
const tab_r10 = ctx.$implicit;
|
|
@@ -41430,10 +41401,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template(rf, ctx)
|
|
|
41430
41401
|
function CaseFullAccessViewComponent_ng_container_12_Template(rf, ctx) { if (rf & 1) {
|
|
41431
41402
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
41432
41403
|
i0.ɵɵelementContainerStart(0);
|
|
41433
|
-
i0.ɵɵelementStart(1, "mat-tab-group",
|
|
41404
|
+
i0.ɵɵelementStart(1, "mat-tab-group", 26, 0);
|
|
41434
41405
|
i0.ɵɵlistener("selectedIndexChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedIndexChange_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.tabChanged($event)); });
|
|
41435
41406
|
i0.ɵɵtwoWayListener("selectedIndexChange", function CaseFullAccessViewComponent_ng_container_12_Template_mat_tab_group_selectedIndexChange_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.selectedTabIndex, $event) || (ctx_r1.selectedTabIndex = $event); return i0.ɵɵresetView($event); });
|
|
41436
|
-
i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template, 3, 4, "mat-tab",
|
|
41407
|
+
i0.ɵɵtemplate(3, CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template, 3, 4, "mat-tab", 27)(4, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template, 4, 7, "mat-tab", 28)(5, CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template, 3, 4, "mat-tab", 27);
|
|
41437
41408
|
i0.ɵɵelementEnd();
|
|
41438
41409
|
i0.ɵɵelementContainerEnd();
|
|
41439
41410
|
} if (rf & 2) {
|
|
@@ -41906,21 +41877,21 @@ class CaseFullAccessViewComponent {
|
|
|
41906
41877
|
} if (rf & 2) {
|
|
41907
41878
|
let _t;
|
|
41908
41879
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabGroup = _t.first);
|
|
41909
|
-
} }, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 13, vars: 12, consts: [["tabGroup", ""], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsContext", "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject"], [3, "caseId", "displayMode"], [1, "grid-row"], [1, "column-one-half"], [3, "caseDetails"], ["class", "case-viewer-controls", 4, "ngIf"], ["class", "column-one-half", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "column-full"], [4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-
|
|
41910
|
-
i0.ɵɵtemplate(0, CaseFullAccessViewComponent_div_0_Template, 14, 12, "div", 1)(1, CaseFullAccessViewComponent_div_1_Template, 8, 7, "div",
|
|
41911
|
-
i0.ɵɵelementStart(2, "ccd-callback-errors",
|
|
41880
|
+
} }, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 13, vars: 12, consts: [["tabGroup", ""], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error_generic-summary-heading", "tabindex", "-1", 4, "ngIf"], ["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "callbackErrorsContext", "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject"], [3, "caseId", "displayMode"], [1, "grid-row"], [1, "column-one-half"], [3, "caseDetails"], ["class", "case-viewer-controls", 4, "ngIf"], ["class", "column-one-half", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "column-full"], [4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error_generic-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error_generic-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h2", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], [4, "ngFor", "ngForOf"], [1, "case-viewer-controls"], ["id", "case-viewer-control-print", "routerLink", "print", 1, "button", "button-secondary"], [3, "onTriggerChange", "onTriggerSubmit", "isDisabled", "triggers", "triggerText", "eventId"], [3, "linkClicked", "notificationBannerConfig"], ["animationDuration", "0ms", 3, "selectedIndexChange", "disableRipple", "selectedIndex", "selectedIndex"], [3, "label", 4, "ngFor", "ngForOf"], [3, "label", "aria-label", 4, "ngFor", "ngForOf"], [3, "label"], ["matTabContent", ""], [3, "label", "aria-label"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["scope", "row", 3, "id", 4, "ngIf"], ["scope", "col", 3, "id"], [1, "text-16"], [3, "topLevelFormGroup", "caseFields", "caseField", "caseReference"], ["scope", "row", 3, "id"], [1, "case-viewer-label", "text-16"], [1, "compound-field"], ["role", "rowheader", 3, "id"]], template: function CaseFullAccessViewComponent_Template(rf, ctx) { if (rf & 1) {
|
|
41881
|
+
i0.ɵɵtemplate(0, CaseFullAccessViewComponent_div_0_Template, 14, 12, "div", 1)(1, CaseFullAccessViewComponent_div_1_Template, 8, 7, "div", 2);
|
|
41882
|
+
i0.ɵɵelementStart(2, "ccd-callback-errors", 3);
|
|
41912
41883
|
i0.ɵɵlistener("callbackErrorsContext", function CaseFullAccessViewComponent_Template_ccd_callback_errors_callbackErrorsContext_2_listener($event) { return ctx.callbackErrorsNotify($event); });
|
|
41913
41884
|
i0.ɵɵelementEnd();
|
|
41914
|
-
i0.ɵɵelement(3, "ccd-activity",
|
|
41915
|
-
i0.ɵɵelementStart(4, "div",
|
|
41916
|
-
i0.ɵɵelement(6, "ccd-case-header",
|
|
41917
|
-
i0.ɵɵtemplate(7, CaseFullAccessViewComponent_div_7_Template, 4, 3, "div",
|
|
41885
|
+
i0.ɵɵelement(3, "ccd-activity", 4);
|
|
41886
|
+
i0.ɵɵelementStart(4, "div", 5)(5, "div", 6);
|
|
41887
|
+
i0.ɵɵelement(6, "ccd-case-header", 7);
|
|
41888
|
+
i0.ɵɵtemplate(7, CaseFullAccessViewComponent_div_7_Template, 4, 3, "div", 8);
|
|
41918
41889
|
i0.ɵɵelementEnd();
|
|
41919
|
-
i0.ɵɵtemplate(8, CaseFullAccessViewComponent_div_8_Template, 2, 4, "div",
|
|
41890
|
+
i0.ɵɵtemplate(8, CaseFullAccessViewComponent_div_8_Template, 2, 4, "div", 9);
|
|
41920
41891
|
i0.ɵɵelementEnd();
|
|
41921
|
-
i0.ɵɵtemplate(9, CaseFullAccessViewComponent_div_9_Template, 3, 1, "div",
|
|
41922
|
-
i0.ɵɵelementStart(10, "div",
|
|
41923
|
-
i0.ɵɵtemplate(12, CaseFullAccessViewComponent_ng_container_12_Template, 6, 6, "ng-container",
|
|
41892
|
+
i0.ɵɵtemplate(9, CaseFullAccessViewComponent_div_9_Template, 3, 1, "div", 10);
|
|
41893
|
+
i0.ɵɵelementStart(10, "div", 5)(11, "div", 11);
|
|
41894
|
+
i0.ɵɵtemplate(12, CaseFullAccessViewComponent_ng_container_12_Template, 6, 6, "ng-container", 12);
|
|
41924
41895
|
i0.ɵɵelementEnd()();
|
|
41925
41896
|
} if (rf & 2) {
|
|
41926
41897
|
i0.ɵɵproperty("ngIf", ctx.error && !(ctx.error.callbackErrors || ctx.error.callbackWarnings || ctx.error.details));
|
|
@@ -41944,7 +41915,7 @@ class CaseFullAccessViewComponent {
|
|
|
41944
41915
|
}
|
|
41945
41916
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFullAccessViewComponent, [{
|
|
41946
41917
|
type: Component,
|
|
41947
|
-
args: [{ selector: 'ccd-case-full-access-view', standalone: false, template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && !(error.callbackErrors || error.callbackWarnings || error.details)\" class=\"error-summary\"\n role=\"group\" aria-labelledby=\"edit-case-
|
|
41918
|
+
args: [{ selector: 'ccd-case-full-access-view', standalone: false, template: "<!-- Generic error heading and error message to be displayed only if there are no specific callback errors or warnings, or no error details -->\n<div *ngIf=\"error && !(error.callbackErrors || error.callbackWarnings || error.details)\" class=\"error-summary\"\n role=\"group\" aria-labelledby=\"edit-case-event_error_generic-summary-heading\" tabindex=\"-1\">\n <h1 class=\"heading-h1 error-summary-heading\" id=\"edit-case-event_error_generic-summary-heading\">\n {{'Something went wrong' | rpxTranslate}}\n </h1>\n <div class=\"govuk-error-summary__body\" id=\"edit-case-event_error-summary-body\">\n <p>{{\"We're working to fix the problem. Try again shortly.\" | rpxTranslate}}</p>\n <p>\n <a href=\"get-help\" target=\"_blank\">\n {{\"Contact us\" | rpxTranslate}}</a> {{\"if you're still having problems.\" | rpxTranslate}}\n </p>\n </div>\n</div>\n<!-- Callback error heading and error message to be displayed if there are specific error details -->\n<div *ngIf=\"error && error.details\" class=\"error-summary\" role=\"group\"\n aria-labelledby=\"edit-case-event_error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-h2 error-summary-heading\" id=\"edit-case-event_error-summary-heading\">\n {{'The callback data failed validation' | rpxTranslate}}\n </h2>\n <p>{{error.message | rpxTranslate}}</p>\n <ul *ngIf=\"error.details?.field_errors\" class=\"error-summary-list\">\n <li *ngFor=\"let fieldError of error.details.field_errors\">\n {{fieldError.message | rpxTranslate}}\n </li>\n </ul>\n</div>\n<ccd-callback-errors\n [triggerTextContinue]=\"triggerTextStart\"\n [triggerTextIgnore]=\"triggerTextIgnoreWarnings\"\n [callbackErrorsSubject]=\"callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\">\n</ccd-callback-errors>\n<ccd-activity [caseId]=\"caseDetails.case_id\" [displayMode]=\"BANNER\"></ccd-activity>\n<div class=\"grid-row\">\n <div class=\"column-one-half\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n <div class=\"case-viewer-controls\" *ngIf=\"hasPrint && !isDraft() && isPrintEnabled()\">\n <a id=\"case-viewer-control-print\" routerLink=\"print\" class=\"button button-secondary\">{{'Print' | rpxTranslate}}</a>\n </div>\n </div>\n <div *ngIf=\"hasEventSelector\" class=\"column-one-half\">\n <ccd-event-trigger [isDisabled]=\"isTriggerButtonDisabled()\" [triggers]=\"caseDetails.triggers\"\n [triggerText]=\"triggerText\"\n [eventId]=\"eventId\"\n (onTriggerChange)=\"clearErrorsAndWarnings()\"\n (onTriggerSubmit)=\"applyTrigger($event)\"></ccd-event-trigger>\n </div>\n</div>\n<div class=\"grid-row\" *ngIf=\"activeCaseFlags && !caseFlagsExternalUser\">\n <div class=\"column-full\">\n <ccd-notification-banner [notificationBannerConfig]=\"notificationBannerConfig\" (linkClicked)=\"onLinkClicked($event)\">\n </ccd-notification-banner>\n </div>\n</div>\n<div class=\"grid-row\">\n <div class=\"column-full\">\n <ng-container *ngIf=\"hasTabsPresent()\">\n <!-- Let Material generate header IDs so URL tab fragments do not trigger anchor scrolling. -->\n <mat-tab-group #tabGroup animationDuration=\"0ms\" (selectedIndexChange)=\"tabChanged($event)\" [disableRipple]=\"true\" [(selectedIndex)]=\"selectedTabIndex\"\n [selectedIndex]=\"selectedTabIndex\">\n <mat-tab *ngFor=\"let tab of prependedTabs\" [attr.data-case-tab-id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"tab.id === 'tasks'\">\n <exui-tasks-ce></exui-tasks-ce>\n </ng-container>\n <ng-container *ngIf=\"tab.id === 'roles-and-access'\">\n <exui-roles-and-access-ce></exui-roles-and-access-ce>\n </ng-container>\n </ng-template>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of sortedTabs; let curIdx=index\" [attr.data-case-tab-id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\" [aria-label]=\"curIdx === 0 ? tab.label + ', Please use left and right arrow keys to navigate case tabs' : '' | rpxTranslate\">\n <ng-template matTabContent>\n <table [class]=\"tab.id\" [attr.aria-label]=\"'case viewer table' | rpxTranslate\">\n <tbody>\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true : formGroup?.controls['data']\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"caseFields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th [id]=\"'case-viewer-field-label--' + field.id\" scope=\"row\" *ngIf=\"!isFieldToHaveNoLabel(field) && field.label\">\n <div class=\"case-viewer-label text-16\">\n {{field.label | rpxTranslate}}</div>\n </th>\n <td [id]=\"'case-viewer-field-read--' + field.id\" scope=\"col\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup?.controls['data']\" [caseFields]=\"caseFields\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\">\n </ccd-field-read>\n </span>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <td role=\"rowheader\" [attr.aria-label]=\"(field.label || field.id) | rpxTranslate\" [id]=\"'case-viewer-field-read--' + field.id\">\n <span class=\"text-16\">\n <ccd-field-read [topLevelFormGroup]=\"formGroup.controls['data']\" [caseFields]=\"caseFields\"\n [caseField]=\"field\" [caseReference]=\"caseDetails.case_id\">\n </ccd-field-read>\n </span>\n </td>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </tbody>\n </table>\n </ng-template>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of appendedTabs\" [attr.data-case-tab-id]=\"tab.id\" [label]=\"tab.label | rpxTranslate\">\n <ng-template matTabContent>\n <ng-container *ngIf=\"tab.id === 'hearings'\">\n <exui-case-hearings-ce></exui-case-hearings-ce>\n </ng-container>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </ng-container>\n </div>\n</div>\n", styles: ["th,.compound-field>td{width:1%;white-space:nowrap;vertical-align:top}.compound-field th{padding:0}.compound-field>td{padding:0}.case-viewer-controls{margin-top:47px;margin-bottom:20px}ccd-case-header{float:left;margin-right:10px}ccd-event-trigger{float:right}.case-viewer-label{min-width:300px;white-space:normal}.markdown h3{margin-bottom:0}.hide-table-capion{position:absolute;visibility:hidden}\n"] }]
|
|
41948
41919
|
}], () => [{ type: i0.NgZone }, { type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: NavigationNotifierService }, { type: OrderService }, { type: ActivityPollingService }, { type: i1$3.MatDialog }, { type: AlertService }, { type: DraftService }, { type: ErrorNotifierService }, { type: ConvertHrefToRouterService }, { type: i5.Location }, { type: i0.ChangeDetectorRef }, { type: SessionStorageService }, { type: i1.RpxTranslatePipe }, { type: LoadingService }, { type: LinkedCasesService }, { type: CaseFlagStateService }, { type: i0.NgZone }], { hasPrint: [{
|
|
41949
41920
|
type: Input
|
|
41950
41921
|
}], hasEventSelector: [{
|
|
@@ -41987,8 +41958,8 @@ class PrintUrlPipe {
|
|
|
41987
41958
|
* the rendering engine, "Trident" (used to identify IE 11 because it no longer reports as "MSIE").
|
|
41988
41959
|
* Note: IE does not support the URL interface and requires a workaround to parse URLs.
|
|
41989
41960
|
*/
|
|
41990
|
-
if (navigator.userAgent.
|
|
41991
|
-
navigator.userAgent.
|
|
41961
|
+
if (navigator.userAgent.includes(PrintUrlPipe.MSIE_BROWSER_NAME) ||
|
|
41962
|
+
navigator.userAgent.includes(PrintUrlPipe.IE11_BROWSER_ENGINE)) {
|
|
41992
41963
|
// Workaround for not being able to use the URL interface
|
|
41993
41964
|
const urlParser = document.createElement('a');
|
|
41994
41965
|
urlParser.href = remoteUrl;
|
|
@@ -42204,7 +42175,7 @@ class CaseViewerComponent {
|
|
|
42204
42175
|
return !!this.caseDetails;
|
|
42205
42176
|
}
|
|
42206
42177
|
hasStandardAccess() {
|
|
42207
|
-
return !this.accessGranted ? CaseViewerComponent.NON_STANDARD_USER_ACCESS_TYPES.
|
|
42178
|
+
return !this.accessGranted ? !CaseViewerComponent.NON_STANDARD_USER_ACCESS_TYPES.includes(this.userAccessType) : true;
|
|
42208
42179
|
}
|
|
42209
42180
|
suffixDuplicateTabs(tabs) {
|
|
42210
42181
|
const count = {};
|
|
@@ -43496,7 +43467,7 @@ function CaseChallengedAccessRequestComponent_div_24_Template(rf, ctx) { if (rf
|
|
|
43496
43467
|
i0.ɵɵattribute("aria-describedby", ((tmp_5_0 = ctx_r0.formGroup.get("caseReference")) == null ? null : tmp_5_0.invalid) && ctx_r0.submitted ? "case-reference-error-message" : null);
|
|
43497
43468
|
} }
|
|
43498
43469
|
function CaseChallengedAccessRequestComponent_div_40_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
43499
|
-
i0.ɵɵelementStart(0, "div",
|
|
43470
|
+
i0.ɵɵelementStart(0, "div", 36);
|
|
43500
43471
|
i0.ɵɵtext(1);
|
|
43501
43472
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
43502
43473
|
i0.ɵɵelementEnd();
|
|
@@ -43508,19 +43479,25 @@ function CaseChallengedAccessRequestComponent_div_40_div_2_Template(rf, ctx) { i
|
|
|
43508
43479
|
function CaseChallengedAccessRequestComponent_div_40_Template(rf, ctx) { if (rf & 1) {
|
|
43509
43480
|
i0.ɵɵelementStart(0, "div", 32)(1, "div", 3);
|
|
43510
43481
|
i0.ɵɵtemplate(2, CaseChallengedAccessRequestComponent_div_40_div_2_Template, 3, 3, "div", 33);
|
|
43511
|
-
i0.ɵɵ
|
|
43482
|
+
i0.ɵɵelementStart(3, "label", 34);
|
|
43483
|
+
i0.ɵɵtext(4);
|
|
43484
|
+
i0.ɵɵpipe(5, "rpxTranslate");
|
|
43485
|
+
i0.ɵɵelementEnd();
|
|
43486
|
+
i0.ɵɵelement(6, "textarea", 35);
|
|
43512
43487
|
i0.ɵɵelementEnd()();
|
|
43513
43488
|
} if (rf & 2) {
|
|
43514
43489
|
let tmp_1_0;
|
|
43515
|
-
let
|
|
43490
|
+
let tmp_5_0;
|
|
43516
43491
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
43517
43492
|
i0.ɵɵadvance();
|
|
43518
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
43493
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$4, ((tmp_1_0 = ctx_r0.formGroup.get("otherReason")) == null ? null : tmp_1_0.invalid) && ctx_r0.submitted));
|
|
43519
43494
|
i0.ɵɵadvance();
|
|
43520
43495
|
i0.ɵɵproperty("ngIf", ctx_r0.formGroup.get("otherReason").invalid && ctx_r0.submitted);
|
|
43521
|
-
i0.ɵɵadvance();
|
|
43522
|
-
i0.ɵɵ
|
|
43523
|
-
i0.ɵɵ
|
|
43496
|
+
i0.ɵɵadvance(2);
|
|
43497
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 5, "Other reason"), " ");
|
|
43498
|
+
i0.ɵɵadvance(2);
|
|
43499
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c2, ctx_r0.formGroup.get("otherReason").invalid && ctx_r0.submitted));
|
|
43500
|
+
i0.ɵɵattribute("aria-describedby", "reason-3-label" + (((tmp_5_0 = ctx_r0.formGroup.get("otherReason")) == null ? null : tmp_5_0.invalid) && ctx_r0.submitted ? " other-reason-error-message" : ""));
|
|
43524
43501
|
} }
|
|
43525
43502
|
class CaseChallengedAccessRequestComponent {
|
|
43526
43503
|
fb;
|
|
@@ -43668,7 +43645,7 @@ class CaseChallengedAccessRequestComponent {
|
|
|
43668
43645
|
return input.value === null || input.value.trim().length === 0;
|
|
43669
43646
|
}
|
|
43670
43647
|
static ɵfac = function CaseChallengedAccessRequestComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseChallengedAccessRequestComponent)(i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(i1$2.Router), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i4$1.Title)); };
|
|
43671
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseChallengedAccessRequestComponent, selectors: [["ccd-case-challenged-access-request"]], standalone: false, decls: 50, vars: 50, consts: [[3, "error", 4, "ngIf"], ["type", "information"], [3, "submit", "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "reason-hint", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--l"], [1, "govuk-fieldset__heading"], ["id", "reason-hint", 1, "govuk-hint"], ["id", "error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--conditional"], [1, "govuk-radios__item"], ["id", "reason-0", "name", "radioSelected", "type", "radio", "data-aria-controls", "conditional-reason-0", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-0", 1, "govuk-label", "govuk-radios__label"], ["id", "conditional-reason-0", "class", "govuk-radios__conditional", 4, "ngIf"], ["id", "reason-1", "name", "radioSelected", "type", "radio", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-1", 1, "govuk-label", "govuk-radios__label"], ["id", "reason-2", "name", "radioSelected", "type", "radio", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-2", 1, "govuk-label", "govuk-radios__label"], ["id", "reason-3", "name", "radioSelected", "type", "radio", "data-aria-controls", "conditional-reason-3", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-3", "id", "reason-3-label", 1, "govuk-label", "govuk-radios__label"], ["id", "conditional-reason-3", "class", "govuk-radios__conditional", 4, "ngIf"], [1, "govuk-button-group"], ["type", "submit", 1, "govuk-button", "govuk-!-margin-right-3"], [1, "govuk-grid-column-full", "govuk-!-padding-left-0"], ["href", "#", 1, "govuk-body", 3, "click"], [3, "error"], ["id", "error-message", 1, "govuk-error-message"], ["id", "conditional-reason-0", 1, "govuk-radios__conditional"], ["for", "case-reference", 1, "govuk-label"], ["id", "case-reference-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "case-reference", "name", "case-reference", "type", "text", "formControlName", "caseReference", 1, "govuk-input", "govuk-!-width-one-third", 3, "ngClass"], ["id", "case-reference-error-message", 1, "govuk-error-message"], ["id", "conditional-reason-3", 1, "govuk-radios__conditional"], ["id", "other-reason-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "other-reason", "name", "other-reason", "rows", "5", "formControlName", "otherReason", 1, "govuk-textarea", 3, "ngClass"], ["id", "other-reason-error-message", 1, "govuk-error-message"]], template: function CaseChallengedAccessRequestComponent_Template(rf, ctx) { if (rf & 1) {
|
|
43648
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseChallengedAccessRequestComponent, selectors: [["ccd-case-challenged-access-request"]], standalone: false, decls: 50, vars: 50, consts: [[3, "error", 4, "ngIf"], ["type", "information"], [3, "submit", "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "reason-hint", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--l"], [1, "govuk-fieldset__heading"], ["id", "reason-hint", 1, "govuk-hint"], ["id", "error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--conditional"], [1, "govuk-radios__item"], ["id", "reason-0", "name", "radioSelected", "type", "radio", "data-aria-controls", "conditional-reason-0", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-0", 1, "govuk-label", "govuk-radios__label"], ["id", "conditional-reason-0", "class", "govuk-radios__conditional", 4, "ngIf"], ["id", "reason-1", "name", "radioSelected", "type", "radio", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-1", 1, "govuk-label", "govuk-radios__label"], ["id", "reason-2", "name", "radioSelected", "type", "radio", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-2", 1, "govuk-label", "govuk-radios__label"], ["id", "reason-3", "name", "radioSelected", "type", "radio", "data-aria-controls", "conditional-reason-3", "formControlName", "radioSelected", 1, "govuk-radios__input", 3, "change", "value", "checked"], ["for", "reason-3", "id", "reason-3-label", 1, "govuk-label", "govuk-radios__label"], ["id", "conditional-reason-3", "class", "govuk-radios__conditional", 4, "ngIf"], [1, "govuk-button-group"], ["type", "submit", 1, "govuk-button", "govuk-!-margin-right-3"], [1, "govuk-grid-column-full", "govuk-!-padding-left-0"], ["href", "#", 1, "govuk-body", 3, "click"], [3, "error"], ["id", "error-message", 1, "govuk-error-message"], ["id", "conditional-reason-0", 1, "govuk-radios__conditional"], ["for", "case-reference", 1, "govuk-label"], ["id", "case-reference-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "case-reference", "name", "case-reference", "type", "text", "formControlName", "caseReference", 1, "govuk-input", "govuk-!-width-one-third", 3, "ngClass"], ["id", "case-reference-error-message", 1, "govuk-error-message"], ["id", "conditional-reason-3", 1, "govuk-radios__conditional"], ["id", "other-reason-error-message", "class", "govuk-error-message", 4, "ngIf"], ["for", "other-reason", 1, "govuk-label", "govuk-visually-hidden"], ["id", "other-reason", "name", "other-reason", "rows", "5", "formControlName", "otherReason", 1, "govuk-textarea", 3, "ngClass"], ["id", "other-reason-error-message", 1, "govuk-error-message"]], template: function CaseChallengedAccessRequestComponent_Template(rf, ctx) { if (rf & 1) {
|
|
43672
43649
|
i0.ɵɵtemplate(0, CaseChallengedAccessRequestComponent_exui_error_message_0_Template, 1, 1, "exui-error-message", 0);
|
|
43673
43650
|
i0.ɵɵelementStart(1, "cut-alert", 1);
|
|
43674
43651
|
i0.ɵɵtext(2);
|
|
@@ -43717,7 +43694,7 @@ class CaseChallengedAccessRequestComponent {
|
|
|
43717
43694
|
i0.ɵɵtext(38);
|
|
43718
43695
|
i0.ɵɵpipe(39, "rpxTranslate");
|
|
43719
43696
|
i0.ɵɵelementEnd()();
|
|
43720
|
-
i0.ɵɵtemplate(40, CaseChallengedAccessRequestComponent_div_40_Template,
|
|
43697
|
+
i0.ɵɵtemplate(40, CaseChallengedAccessRequestComponent_div_40_Template, 7, 11, "div", 20);
|
|
43721
43698
|
i0.ɵɵelementEnd()()();
|
|
43722
43699
|
i0.ɵɵelementStart(41, "div", 21)(42, "button", 22);
|
|
43723
43700
|
i0.ɵɵtext(43);
|
|
@@ -43781,7 +43758,7 @@ class CaseChallengedAccessRequestComponent {
|
|
|
43781
43758
|
}
|
|
43782
43759
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseChallengedAccessRequestComponent, [{
|
|
43783
43760
|
type: Component,
|
|
43784
|
-
args: [{ selector: 'ccd-case-challenged-access-request', standalone: false, template: "<exui-error-message *ngIf=\"formGroup.invalid && submitted\" [error]=\"errorMessage\"></exui-error-message>\n<cut-alert type=\"information\">\n {{'This case requires challenged access.' | rpxTranslate}}<br/>\n {{'This is because the case is outside your work area. If you request access to the case, it will be logged for auditing purposes.' | rpxTranslate}}\n</cut-alert>\n<form [formGroup]=\"formGroup\" (submit)=\"onSubmit()\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': formGroup.get('radioSelected')?.invalid && submitted}\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"reason-hint\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"govuk-fieldset__heading\">\n {{title | rpxTranslate}}\n </h1>\n </legend>\n <div id=\"reason-hint\" class=\"govuk-hint\">\n {{hint | rpxTranslate}}\n </div>\n <div id=\"error-message\" class=\"govuk-error-message\" *ngIf=\"formGroup.get('radioSelected').invalid && submitted\">\n {{errorMessage.description | rpxTranslate}}\n </div>\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-0\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[0].reason\"\n data-aria-controls=\"conditional-reason-0\" formControlName=\"radioSelected\" [checked]=\"accessReasons[0].checked\"\n [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-0\">\n {{accessReasons[0].reason | rpxTranslate}}\n </label>\n </div>\n <div id=\"conditional-reason-0\" *ngIf=\"formGroup.get('radioSelected').value === accessReasons[0].reason\"\n class=\"govuk-radios__conditional\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': formGroup.get('caseReference')?.invalid && submitted}\">\n <label class=\"govuk-label\" for=\"case-reference\">\n {{caseRefLabel}}\n </label>\n <div id=\"case-reference-error-message\" class=\"govuk-error-message\" *ngIf=\"formGroup.get('caseReference').invalid && submitted\">\n {{errorMessage.description | rpxTranslate}}\n </div>\n <input class=\"govuk-input govuk-!-width-one-third\"\n [ngClass]=\"{'govuk-input--error': formGroup.get('caseReference').invalid && submitted}\" id=\"case-reference\"\n name=\"case-reference\" type=\"text\" [attr.aria-describedby]=\"formGroup.get('caseReference')?.invalid && submitted ? 'case-reference-error-message' : null\" formControlName=\"caseReference\">\n </div>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-1\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[1].reason\"\n formControlName=\"radioSelected\" [checked]=\"accessReasons[1].checked\" [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-1\">\n {{accessReasons[1].reason | rpxTranslate}}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-2\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[2].reason\"\n formControlName=\"radioSelected\" [checked]=\"accessReasons[2].checked\" [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-2\">\n {{accessReasons[2].reason | rpxTranslate}}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-3\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[3].reason\"\n data-aria-controls=\"conditional-reason-3\" formControlName=\"radioSelected\" [checked]=\"accessReasons[3].checked\"\n [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-3\" id=\"reason-3-label\">\n {{accessReasons[3].reason | rpxTranslate}}\n </label>\n </div>\n <div id=\"conditional-reason-3\" *ngIf=\"formGroup.get('radioSelected').value === accessReasons[3].reason\"\n class=\"govuk-radios__conditional\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': formGroup.get('otherReason')?.invalid && submitted}\">\n <div id=\"other-reason-error-message\" class=\"govuk-error-message\" *ngIf=\"formGroup.get('otherReason').invalid && submitted\">\n {{errorMessage.description | rpxTranslate}}\n </div>\n <textarea class=\"govuk-textarea\" [ngClass]=\"{'govuk-textarea--error': formGroup.get('otherReason').invalid && submitted}\"\n id=\"other-reason\" name=\"other-reason\" rows=\"5\" [attr.aria-describedby]=\"'reason-3-label' + (formGroup.get('otherReason')?.invalid && submitted ? ' other-reason-error-message' : '')\" formControlName=\"otherReason\"></textarea>\n </div>\n </div>\n </div>\n </fieldset>\n </div>\n <div class=\"govuk-button-group\">\n <button class=\"govuk-button govuk-!-margin-right-3\" type=\"submit\">\n {{'Submit' | rpxTranslate}}\n </button>\n <div class=\"govuk-grid-column-full govuk-!-padding-left-0\">\n <p>\n <a class='govuk-body' (click)=\"onCancel(); $event.preventDefault()\" href=\"#\">\n {{'Cancel' | rpxTranslate}}\n </a>\n </p>\n </div>\n </div>\n</form>\n" }]
|
|
43761
|
+
args: [{ selector: 'ccd-case-challenged-access-request', standalone: false, template: "<exui-error-message *ngIf=\"formGroup.invalid && submitted\" [error]=\"errorMessage\"></exui-error-message>\n<cut-alert type=\"information\">\n {{'This case requires challenged access.' | rpxTranslate}}<br/>\n {{'This is because the case is outside your work area. If you request access to the case, it will be logged for auditing purposes.' | rpxTranslate}}\n</cut-alert>\n<form [formGroup]=\"formGroup\" (submit)=\"onSubmit()\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': formGroup.get('radioSelected')?.invalid && submitted}\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"reason-hint\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"govuk-fieldset__heading\">\n {{title | rpxTranslate}}\n </h1>\n </legend>\n <div id=\"reason-hint\" class=\"govuk-hint\">\n {{hint | rpxTranslate}}\n </div>\n <div id=\"error-message\" class=\"govuk-error-message\" *ngIf=\"formGroup.get('radioSelected').invalid && submitted\">\n {{errorMessage.description | rpxTranslate}}\n </div>\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-0\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[0].reason\"\n data-aria-controls=\"conditional-reason-0\" formControlName=\"radioSelected\" [checked]=\"accessReasons[0].checked\"\n [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-0\">\n {{accessReasons[0].reason | rpxTranslate}}\n </label>\n </div>\n <div id=\"conditional-reason-0\" *ngIf=\"formGroup.get('radioSelected').value === accessReasons[0].reason\"\n class=\"govuk-radios__conditional\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': formGroup.get('caseReference')?.invalid && submitted}\">\n <label class=\"govuk-label\" for=\"case-reference\">\n {{caseRefLabel}}\n </label>\n <div id=\"case-reference-error-message\" class=\"govuk-error-message\" *ngIf=\"formGroup.get('caseReference').invalid && submitted\">\n {{errorMessage.description | rpxTranslate}}\n </div>\n <input class=\"govuk-input govuk-!-width-one-third\"\n [ngClass]=\"{'govuk-input--error': formGroup.get('caseReference').invalid && submitted}\" id=\"case-reference\"\n name=\"case-reference\" type=\"text\" [attr.aria-describedby]=\"formGroup.get('caseReference')?.invalid && submitted ? 'case-reference-error-message' : null\" formControlName=\"caseReference\">\n </div>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-1\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[1].reason\"\n formControlName=\"radioSelected\" [checked]=\"accessReasons[1].checked\" [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-1\">\n {{accessReasons[1].reason | rpxTranslate}}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-2\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[2].reason\"\n formControlName=\"radioSelected\" [checked]=\"accessReasons[2].checked\" [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-2\">\n {{accessReasons[2].reason | rpxTranslate}}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"reason-3\" name=\"radioSelected\" type=\"radio\" [value]=\"accessReasons[3].reason\"\n data-aria-controls=\"conditional-reason-3\" formControlName=\"radioSelected\" [checked]=\"accessReasons[3].checked\"\n [attr.aria-describedby]=\"formGroup.get('radioSelected')?.invalid && submitted ? 'error-message' : null\" (change)=\"onChange()\"/>\n <label class=\"govuk-label govuk-radios__label\" for=\"reason-3\" id=\"reason-3-label\">\n {{accessReasons[3].reason | rpxTranslate}}\n </label>\n </div>\n <div id=\"conditional-reason-3\" *ngIf=\"formGroup.get('radioSelected').value === accessReasons[3].reason\"\n class=\"govuk-radios__conditional\">\n <div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': formGroup.get('otherReason')?.invalid && submitted}\">\n <div id=\"other-reason-error-message\" class=\"govuk-error-message\" *ngIf=\"formGroup.get('otherReason').invalid && submitted\">\n {{errorMessage.description | rpxTranslate}}\n </div>\n <label class=\"govuk-label govuk-visually-hidden\" for=\"other-reason\">\n {{ 'Other reason' | rpxTranslate }}\n </label>\n <textarea class=\"govuk-textarea\" [ngClass]=\"{'govuk-textarea--error': formGroup.get('otherReason').invalid && submitted}\"\n id=\"other-reason\" name=\"other-reason\" rows=\"5\" [attr.aria-describedby]=\"'reason-3-label' + (formGroup.get('otherReason')?.invalid && submitted ? ' other-reason-error-message' : '')\" formControlName=\"otherReason\"></textarea>\n </div>\n </div>\n </div>\n </fieldset>\n </div>\n <div class=\"govuk-button-group\">\n <button class=\"govuk-button govuk-!-margin-right-3\" type=\"submit\">\n {{'Submit' | rpxTranslate}}\n </button>\n <div class=\"govuk-grid-column-full govuk-!-padding-left-0\">\n <p>\n <a class='govuk-body' (click)=\"onCancel(); $event.preventDefault()\" href=\"#\">\n {{'Cancel' | rpxTranslate}}\n </a>\n </p>\n </div>\n </div>\n</form>\n" }]
|
|
43785
43762
|
}], () => [{ type: i4.FormBuilder }, { type: i1$2.Router }, { type: CasesService }, { type: i1$2.ActivatedRoute }, { type: CaseNotifier }, { type: i4$1.Title }], null); })();
|
|
43786
43763
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseChallengedAccessRequestComponent, { className: "CaseChallengedAccessRequestComponent", filePath: "lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.ts", lineNumber: 16 }); })();
|
|
43787
43764
|
|
|
@@ -44869,10 +44846,10 @@ class CreateCaseFiltersComponent {
|
|
|
44869
44846
|
retainEventsWithCreateRights(events) {
|
|
44870
44847
|
const userProfile = safeJsonParse(this.sessionStorageService.getItem(USER_DETAILS), null);
|
|
44871
44848
|
return events.filter(event => userProfile && userProfile.roles &&
|
|
44872
|
-
|
|
44849
|
+
userProfile.roles.some(role => this.hasCreateAccess(event, role)));
|
|
44873
44850
|
}
|
|
44874
44851
|
hasCreateAccess(caseEvent, role) {
|
|
44875
|
-
return
|
|
44852
|
+
return caseEvent.acls.some(acl => acl.role === role && acl.create === true);
|
|
44876
44853
|
}
|
|
44877
44854
|
selectJurisdiction(jurisdictions, filterJurisdictionControl) {
|
|
44878
44855
|
if (jurisdictions.length === 1) {
|
|
@@ -45152,7 +45129,7 @@ class SearchFiltersComponent {
|
|
|
45152
45129
|
this.selected.jurisdiction = this.jurisdictions
|
|
45153
45130
|
.filter(j => j.id === jurisdiction.id)[0];
|
|
45154
45131
|
if (jurisdiction.currentCaseType &&
|
|
45155
|
-
this.selected.jurisdiction.caseTypes.
|
|
45132
|
+
this.selected.jurisdiction.caseTypes.some(ct => ct.id === jurisdiction.currentCaseType.id)) {
|
|
45156
45133
|
this.selected.jurisdiction.currentCaseType = jurisdiction.currentCaseType;
|
|
45157
45134
|
}
|
|
45158
45135
|
else {
|
|
@@ -45604,14 +45581,13 @@ function SearchResultComponent_table_0_td_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
45604
45581
|
i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 23);
|
|
45605
45582
|
i0.ɵɵlistener("change", function SearchResultComponent_table_0_td_10_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.selectAll()); });
|
|
45606
45583
|
i0.ɵɵelementEnd();
|
|
45607
|
-
i0.ɵɵ
|
|
45608
|
-
i0.ɵɵ
|
|
45584
|
+
i0.ɵɵelementStart(3, "label", 24);
|
|
45585
|
+
i0.ɵɵtext(4, " Select all cases ");
|
|
45586
|
+
i0.ɵɵelementEnd()()();
|
|
45609
45587
|
} if (rf & 2) {
|
|
45610
45588
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
45611
45589
|
i0.ɵɵadvance(2);
|
|
45612
45590
|
i0.ɵɵproperty("checked", ctx_r0.allOnPageSelected())("disabled", !ctx_r0.canAnyBeShared());
|
|
45613
|
-
i0.ɵɵadvance();
|
|
45614
|
-
i0.ɵɵattribute("aria-labelledby", "select-all");
|
|
45615
45591
|
} }
|
|
45616
45592
|
function SearchResultComponent_table_0_th_11_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
45617
45593
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
@@ -45654,16 +45630,18 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template(rf, ct
|
|
|
45654
45630
|
i0.ɵɵelementStart(0, "td", 34)(1, "div", 22)(2, "input", 35);
|
|
45655
45631
|
i0.ɵɵlistener("change", function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r7); const result_r8 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.changeSelection(result_r8)); });
|
|
45656
45632
|
i0.ɵɵelementEnd();
|
|
45657
|
-
i0.ɵɵ
|
|
45658
|
-
i0.ɵɵ
|
|
45633
|
+
i0.ɵɵelementStart(3, "label", 36);
|
|
45634
|
+
i0.ɵɵtext(4);
|
|
45635
|
+
i0.ɵɵelementEnd()()();
|
|
45659
45636
|
} if (rf & 2) {
|
|
45660
45637
|
const result_r8 = i0.ɵɵnextContext().$implicit;
|
|
45661
45638
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
45662
45639
|
i0.ɵɵadvance(2);
|
|
45663
|
-
i0.ɵɵproperty("id", i0.ɵɵinterpolate1("select-", result_r8.case_id))("name", i0.ɵɵinterpolate1("select-", result_r8.case_id))("checked", ctx_r0.isSelected(result_r8))("disabled", !ctx_r0.canBeShared(result_r8));
|
|
45640
|
+
i0.ɵɵproperty("id", i0.ɵɵinterpolate1("consumer-select-", result_r8.case_id))("name", i0.ɵɵinterpolate1("consumer-select-", result_r8.case_id))("checked", ctx_r0.isSelected(result_r8))("disabled", !ctx_r0.canBeShared(result_r8));
|
|
45641
|
+
i0.ɵɵadvance();
|
|
45642
|
+
i0.ɵɵproperty("for", i0.ɵɵinterpolate1("consumer-select-", result_r8.case_id));
|
|
45664
45643
|
i0.ɵɵadvance();
|
|
45665
|
-
i0.ɵɵ
|
|
45666
|
-
i0.ɵɵattribute("aria-labelledby", "select-" + result_r8.case_id);
|
|
45644
|
+
i0.ɵɵtextInterpolate1(" Select case ", result_r8.case_id, " ");
|
|
45667
45645
|
} }
|
|
45668
45646
|
function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template(rf, ctx) { if (rf & 1) {
|
|
45669
45647
|
i0.ɵɵelement(0, "ccd-field-read", 44);
|
|
@@ -45742,7 +45720,7 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template(rf, ct
|
|
|
45742
45720
|
} }
|
|
45743
45721
|
function SearchResultComponent_table_0_ng_container_14_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
45744
45722
|
i0.ɵɵelementStart(0, "tr");
|
|
45745
|
-
i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template,
|
|
45723
|
+
i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template, 5, 9, "td", 32)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template, 3, 2, "td", 33)(3, SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template, 3, 4, "td", 1);
|
|
45746
45724
|
i0.ɵɵelementEnd();
|
|
45747
45725
|
} if (rf & 2) {
|
|
45748
45726
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -45768,8 +45746,9 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ct
|
|
|
45768
45746
|
i0.ɵɵelementStart(0, "td", 34)(1, "div", 22)(2, "input", 46);
|
|
45769
45747
|
i0.ɵɵlistener("change", function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r12); const result_r13 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.changeSelection(result_r13)); })("keyup", function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template_input_keyup_2_listener($event) { i0.ɵɵrestoreView(_r12); const result_r13 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onKeyUp($event, result_r13)); });
|
|
45770
45748
|
i0.ɵɵelementEnd();
|
|
45771
|
-
i0.ɵɵ
|
|
45772
|
-
i0.ɵɵ
|
|
45749
|
+
i0.ɵɵelementStart(3, "label", 36);
|
|
45750
|
+
i0.ɵɵtext(4);
|
|
45751
|
+
i0.ɵɵelementEnd()()();
|
|
45773
45752
|
} if (rf & 2) {
|
|
45774
45753
|
const result_r13 = i0.ɵɵnextContext().$implicit;
|
|
45775
45754
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -45777,7 +45756,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ct
|
|
|
45777
45756
|
i0.ɵɵproperty("id", i0.ɵɵinterpolate1("select-", result_r13.case_id))("name", i0.ɵɵinterpolate1("select-", result_r13.case_id))("checked", ctx_r0.isSelected(result_r13))("disabled", !ctx_r0.canBeShared(result_r13));
|
|
45778
45757
|
i0.ɵɵadvance();
|
|
45779
45758
|
i0.ɵɵproperty("for", i0.ɵɵinterpolate1("select-", result_r13.case_id));
|
|
45780
|
-
i0.ɵɵ
|
|
45759
|
+
i0.ɵɵadvance();
|
|
45760
|
+
i0.ɵɵtextInterpolate1(" Select case ", result_r13.case_id, " ");
|
|
45781
45761
|
} }
|
|
45782
45762
|
function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template(rf, ctx) { if (rf & 1) {
|
|
45783
45763
|
i0.ɵɵelement(0, "ccd-field-read", 44);
|
|
@@ -45856,7 +45836,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template(rf, ct
|
|
|
45856
45836
|
} }
|
|
45857
45837
|
function SearchResultComponent_table_0_ng_container_15_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
45858
45838
|
i0.ɵɵelementStart(0, "tr");
|
|
45859
|
-
i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template,
|
|
45839
|
+
i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template, 5, 9, "td", 32)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template, 3, 2, "td", 33)(3, SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template, 3, 4, "td", 1);
|
|
45860
45840
|
i0.ɵɵelementEnd();
|
|
45861
45841
|
} if (rf & 2) {
|
|
45862
45842
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -45886,7 +45866,7 @@ function SearchResultComponent_table_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
45886
45866
|
i0.ɵɵtemplate(5, SearchResultComponent_table_0_div_5_Template, 11, 12, "div", 5)(6, SearchResultComponent_table_0_div_6_Template, 18, 18, "div", 6)(7, SearchResultComponent_table_0_div_7_Template, 6, 6, "div", 7);
|
|
45887
45867
|
i0.ɵɵelementEnd();
|
|
45888
45868
|
i0.ɵɵelementStart(8, "thead")(9, "tr", 8);
|
|
45889
|
-
i0.ɵɵtemplate(10, SearchResultComponent_table_0_td_10_Template,
|
|
45869
|
+
i0.ɵɵtemplate(10, SearchResultComponent_table_0_td_10_Template, 5, 2, "td", 9)(11, SearchResultComponent_table_0_th_11_Template, 6, 5, "th", 10)(12, SearchResultComponent_table_0_th_12_Template, 2, 0, "th", 11);
|
|
45890
45870
|
i0.ɵɵelementEnd()();
|
|
45891
45871
|
i0.ɵɵelementStart(13, "tbody");
|
|
45892
45872
|
i0.ɵɵtemplate(14, SearchResultComponent_table_0_ng_container_14_Template, 3, 8, "ng-container", 1)(15, SearchResultComponent_table_0_ng_container_15_Template, 4, 11, "ng-container", 1);
|
|
@@ -46022,7 +46002,7 @@ class SearchResultComponent {
|
|
|
46022
46002
|
this.selection.emit(this.selectedCases);
|
|
46023
46003
|
}
|
|
46024
46004
|
canBeShared(caseView) {
|
|
46025
|
-
return caseView.supplementary_data
|
|
46005
|
+
return !!caseView.supplementary_data?.hasOwnProperty('orgs_assigned_users');
|
|
46026
46006
|
}
|
|
46027
46007
|
canAnyBeShared() {
|
|
46028
46008
|
for (let i = 0, l = this.resultView.results.length; i < l; i++) {
|
|
@@ -46060,10 +46040,8 @@ class SearchResultComponent {
|
|
|
46060
46040
|
}
|
|
46061
46041
|
});
|
|
46062
46042
|
}
|
|
46063
|
-
else {
|
|
46064
|
-
|
|
46065
|
-
this.selectedCases.push(c);
|
|
46066
|
-
}
|
|
46043
|
+
else if (this.canBeShared(c)) {
|
|
46044
|
+
this.selectedCases.push(c);
|
|
46067
46045
|
}
|
|
46068
46046
|
this.selection.emit(this.selectedCases);
|
|
46069
46047
|
}
|
|
@@ -46179,16 +46157,14 @@ class SearchResultComponent {
|
|
|
46179
46157
|
this.consumerSortParameters.type = column.case_field_type.type;
|
|
46180
46158
|
this.sortHandler.emit(this.consumerSortParameters);
|
|
46181
46159
|
}
|
|
46160
|
+
else if (this.comparator(column) === undefined) {
|
|
46161
|
+
return;
|
|
46162
|
+
}
|
|
46163
|
+
else if (this.isSortAscending(column)) {
|
|
46164
|
+
this.sortParameters = new SortParameters(this.comparator(column), SortOrder$1.ASCENDING);
|
|
46165
|
+
}
|
|
46182
46166
|
else {
|
|
46183
|
-
|
|
46184
|
-
return;
|
|
46185
|
-
}
|
|
46186
|
-
else if (this.isSortAscending(column)) {
|
|
46187
|
-
this.sortParameters = new SortParameters(this.comparator(column), SortOrder$1.ASCENDING);
|
|
46188
|
-
}
|
|
46189
|
-
else {
|
|
46190
|
-
this.sortParameters = new SortParameters(this.comparator(column), SortOrder$1.DESCENDING);
|
|
46191
|
-
}
|
|
46167
|
+
this.sortParameters = new SortParameters(this.comparator(column), SortOrder$1.DESCENDING);
|
|
46192
46168
|
}
|
|
46193
46169
|
}
|
|
46194
46170
|
sortWidget(column) {
|
|
@@ -46210,19 +46186,13 @@ class SearchResultComponent {
|
|
|
46210
46186
|
if (col.case_field_id === '[CASE_REFERENCE]') {
|
|
46211
46187
|
return this.caseReferencePipe.transform(result.case_fields[col.case_field_id]);
|
|
46212
46188
|
}
|
|
46213
|
-
|
|
46214
|
-
|
|
46215
|
-
|
|
46216
|
-
|
|
46217
|
-
|
|
46218
|
-
else {
|
|
46219
|
-
return result.case_fields[col.id];
|
|
46220
|
-
}
|
|
46221
|
-
}
|
|
46222
|
-
else {
|
|
46223
|
-
return result.case_fields[col.case_field_id];
|
|
46224
|
-
}
|
|
46189
|
+
if (!col.id) {
|
|
46190
|
+
return result.case_fields[col.case_field_id];
|
|
46191
|
+
}
|
|
46192
|
+
if (col.id === '[CASE_REFERENCE]') {
|
|
46193
|
+
return this.caseReferencePipe.transform(result.case_fields[col.id]);
|
|
46225
46194
|
}
|
|
46195
|
+
return result.case_fields[col.id];
|
|
46226
46196
|
}
|
|
46227
46197
|
draftPrefixOrGet(col, result) {
|
|
46228
46198
|
return result.case_id.startsWith(DRAFT_PREFIX) ? DRAFT_PREFIX : this.hyphenateIfCaseReferenceOrGet(col, result);
|
|
@@ -46274,7 +46244,7 @@ class SearchResultComponent {
|
|
|
46274
46244
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
46275
46245
|
noop() { }
|
|
46276
46246
|
static ɵfac = function SearchResultComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SearchResultComponent)(i0.ɵɵdirectiveInject(SearchResultViewItemComparatorFactory), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(ActivityService), i0.ɵɵdirectiveInject(CaseReferencePipe), i0.ɵɵdirectiveInject(PlaceholderService), i0.ɵɵdirectiveInject(BrowserService), i0.ɵɵdirectiveInject(SessionStorageService)); };
|
|
46277
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchResultComponent, selectors: [["ccd-search-result"]], inputs: { caseLinkUrlTemplate: "caseLinkUrlTemplate", jurisdiction: "jurisdiction", caseType: "caseType", caseState: "caseState", caseFilterFG: "caseFilterFG", resultView: "resultView", page: "page", paginationMetadata: "paginationMetadata", metadataFields: "metadataFields", selectionEnabled: "selectionEnabled", showOnlySelected: "showOnlySelected", preSelectedCases: "preSelectedCases", consumerSortingEnabled: "consumerSortingEnabled" }, outputs: { selection: "selection", changePage: "changePage", clickCase: "clickCase", sortHandler: "sortHandler" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 3, consts: [["case_reference", ""], [4, "ngIf"], [3, "visibilityLabel", "autoHide", "maxSize", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel", "pageChange", 4, "ngIf"], ["class", "notification", "role", "status", 4, "ngIf"], ["id", "search-result-heading__text", "tabindex", "-1", 1, "heading-h2"], ["class", "govuk-warning-text pagination-limit-warning", 4, "ngIf"], ["class", "pagination-top", 4, "ngIf"], ["class", "reset-selection", 4, "ngIf"], ["scope", "row"], ["class", "govuk-table__checkbox", 4, "ngIf"], ["class", "search-result-column-header", "scope", "col", 4, "ngFor", "ngForOf"], ["style", "width: 110px;", "scope", "col", 4, "ngIf"], [1, "govuk-warning-text", "pagination-limit-warning"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "pagination-top"], ["id", "search-result-summary__text", 1, "text-16"], [1, "govuk-!-font-weight-bold"], [1, "reset-selection"], ["href", "#", 1, "search-result-reset-link", 3, "click"], [1, "govuk-table__checkbox"], [1, "govuk-checkboxes__item"], ["id", "select-all", "name", "select-all", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "checked", "disabled"], ["for", "select-all", 1, "govuk-label", "govuk-checkboxes__label"], ["scope", "col", 1, "search-result-column-header"], [1, "search-result-column-label", 3, "click", "keyup"], ["class", "search-result-column-sort", 4, "ngIf"], [1, "search-result-column-sort"], ["href", "#", 1, "sort-widget", 3, "click", "keyup.enter", "innerHTML"], ["scope", "col", 2, "width", "110px"], [4, "ngFor", "ngForOf"], ["class", "govuk-table__checkbox", "scope", "col", 4, "ngIf"], ["class", "search-result-column-cell", "scope", "row", 4, "ngFor", "ngForOf"], ["scope", "col", 1, "govuk-table__checkbox"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "id", "name", "checked", "disabled"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["scope", "row", 1, "search-result-column-cell"], ["class", "govuk-link", 3, "routerLink", 4, "ngIf"], ["class", "text-16", 3, "visibility", 4, "ngIf"], [1, "govuk-link", 3, "routerLink"], ["class", "text-16", 4, "ngIf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "elementsToSubstitute", 4, "ngIf", "ngIfElse"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "elementsToSubstitute"], [3, "caseId", "displayMode"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "keyup", "id", "name", "checked", "disabled"], [3, "pageChange", "visibilityLabel", "autoHide", "maxSize", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel"], ["role", "status", 1, "notification"]], template: function SearchResultComponent_Template(rf, ctx) { if (rf & 1) {
|
|
46247
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SearchResultComponent, selectors: [["ccd-search-result"]], inputs: { caseLinkUrlTemplate: "caseLinkUrlTemplate", jurisdiction: "jurisdiction", caseType: "caseType", caseState: "caseState", caseFilterFG: "caseFilterFG", resultView: "resultView", page: "page", paginationMetadata: "paginationMetadata", metadataFields: "metadataFields", selectionEnabled: "selectionEnabled", showOnlySelected: "showOnlySelected", preSelectedCases: "preSelectedCases", consumerSortingEnabled: "consumerSortingEnabled" }, outputs: { selection: "selection", changePage: "changePage", clickCase: "clickCase", sortHandler: "sortHandler" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 3, consts: [["case_reference", ""], [4, "ngIf"], [3, "visibilityLabel", "autoHide", "maxSize", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel", "pageChange", 4, "ngIf"], ["class", "notification", "role", "status", 4, "ngIf"], ["id", "search-result-heading__text", "tabindex", "-1", 1, "heading-h2"], ["class", "govuk-warning-text pagination-limit-warning", 4, "ngIf"], ["class", "pagination-top", 4, "ngIf"], ["class", "reset-selection", 4, "ngIf"], ["scope", "row"], ["class", "govuk-table__checkbox", 4, "ngIf"], ["class", "search-result-column-header", "scope", "col", 4, "ngFor", "ngForOf"], ["style", "width: 110px;", "scope", "col", 4, "ngIf"], [1, "govuk-warning-text", "pagination-limit-warning"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-visually-hidden"], [1, "pagination-top"], ["id", "search-result-summary__text", 1, "text-16"], [1, "govuk-!-font-weight-bold"], [1, "reset-selection"], ["href", "#", 1, "search-result-reset-link", 3, "click"], [1, "govuk-table__checkbox"], [1, "govuk-checkboxes__item"], ["id", "select-all", "name", "select-all", "type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "checked", "disabled"], ["for", "select-all", 1, "govuk-label", "govuk-checkboxes__label", "govuk-visually-hidden"], ["scope", "col", 1, "search-result-column-header"], [1, "search-result-column-label", 3, "click", "keyup"], ["class", "search-result-column-sort", 4, "ngIf"], [1, "search-result-column-sort"], ["href", "#", 1, "sort-widget", 3, "click", "keyup.enter", "innerHTML"], ["scope", "col", 2, "width", "110px"], [4, "ngFor", "ngForOf"], ["class", "govuk-table__checkbox", "scope", "col", 4, "ngIf"], ["class", "search-result-column-cell", "scope", "row", 4, "ngFor", "ngForOf"], ["scope", "col", 1, "govuk-table__checkbox"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "id", "name", "checked", "disabled"], [1, "govuk-label", "govuk-checkboxes__label", "govuk-visually-hidden", 3, "for"], ["scope", "row", 1, "search-result-column-cell"], ["class", "govuk-link", 3, "routerLink", 4, "ngIf"], ["class", "text-16", 3, "visibility", 4, "ngIf"], [1, "govuk-link", 3, "routerLink"], ["class", "text-16", 4, "ngIf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "elementsToSubstitute", 4, "ngIf", "ngIfElse"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "elementsToSubstitute"], [3, "caseId", "displayMode"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "change", "keyup", "id", "name", "checked", "disabled"], [3, "pageChange", "visibilityLabel", "autoHide", "maxSize", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel"], ["role", "status", 1, "notification"]], template: function SearchResultComponent_Template(rf, ctx) { if (rf & 1) {
|
|
46278
46248
|
i0.ɵɵtemplate(0, SearchResultComponent_table_0_Template, 16, 11, "table", 1)(1, SearchResultComponent_ccd_pagination_1_Template, 1, 6, "ccd-pagination", 2)(2, SearchResultComponent_div_2_Template, 3, 3, "div", 3);
|
|
46279
46249
|
} if (rf & 2) {
|
|
46280
46250
|
i0.ɵɵproperty("ngIf", ctx.hasResults() || ctx.hasDrafts());
|
|
@@ -46286,7 +46256,7 @@ class SearchResultComponent {
|
|
|
46286
46256
|
}
|
|
46287
46257
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
|
|
46288
46258
|
type: Component,
|
|
46289
|
-
args: [{ selector: 'ccd-search-result', standalone: false, template: "<table *ngIf=\"hasResults() || hasDrafts()\">\n <caption>\n <h2 class=\"heading-h2\" id=\"search-result-heading__text\" tabindex=\"-1\">{{ (caseState ? 'Your cases' : 'Search result') | rpxTranslate}}</h2>\n\n <div class=\"govuk-warning-text pagination-limit-warning\" *ngIf=\"paginationLimitEnforced\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">{{'Warning' | rpxTranslate}}</span>\n {{'The total size of the result set is' | rpxTranslate}} {{paginationMetadata.totalResultsCount | number}}. {{'Only the first 10,000 records are available for display.' | rpxTranslate}}\n </strong>\n </div>\n\n <div *ngIf=\"(hasResults() || hasDrafts())\" class=\"pagination-top\">\n <output [attr.aria-label]=\"getTotalResults() + ' ' + ('results have been found' | rpxTranslate)\"></output>\n <span class=\"text-16\" id=\"search-result-summary__text\">{{'Showing' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getFirstResult() }}</span>\n {{'to' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getLastResult() }}</span>\n {{'of' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getTotalResults() }}</span> {{'results' | rpxTranslate}}</span>\n </div>\n <div *ngIf=\"(hasResults() || hasDrafts()) && selectionEnabled\" class=\"reset-selection\"\n [attr.aria-label]=\"'Reset selection' | rpxTranslate\">\n <span><a class=\"search-result-reset-link\" href=\"#\" (click)=\"clearSelection(); $event.preventDefault()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\" [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-all\" [attr.aria-labelledby]=\"'select-all'\">\n </label>\n </div>\n </td>\n <th *ngFor=\"let col of resultView.columns\" class=\"search-result-column-header\"\n [attr.aria-sort]=\"isSortAscending(col) === null ? null : (isSortAscending(col) ? 'ascending' : 'descending')\" scope=\"col\">\n <div>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\" (keyup)=\"noop()\">\n {{ isTranslatable(col) ? (col.label | rpxTranslate) : col.label }}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col); $event.preventDefault()\" (keyup.enter)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" [attr.aria-label]=\"'Sort ' + col.label | rpxTranslate\" href=\"#\"></a>\n </div>\n </div>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\" scope=\"col\">​</th>\n </tr>\n </thead>\n\n <tbody>\n <!-- sorted by consumer -->\n <ng-container *ngIf=\"consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\" [attr.aria-labelledby]=\"'select-' + result.case_id\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n <!-- sorted by toolkit -->\n <ng-container *ngIf=\"!consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | ccdSortSearchResult : sortParameters | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" (keyup)=\"onKeyUp($event, result)\" />\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"select-{{ result.case_id }}\" [attr.aria-labelledby]=\"'select-' + result.case_id\">\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n\n </tbody>\n</table>\n\n<ccd-pagination\n *ngIf=\"hasResults()\"\n (pageChange)=\"goToPage($event)\"\n [visibilityLabel]=\"hideRows ? 'hidden' : 'visible'\"\n [autoHide]=\"true\"\n [maxSize]=\"8\"\n [screenReaderPaginationLabel]=\"'Pagination'\"\n [screenReaderPageLabel]=\"page\"\n [screenReaderCurrentLabel]=\"'You\\'re on page'\"></ccd-pagination>\n\n<div *ngIf=\"!(hasResults() || hasDrafts())\" class=\"notification\" role=\"status\">\n{{'No cases found. Try using different filters.' | rpxTranslate}}\n</div>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}table thead tr th{vertical-align:top}table tbody tr td{font-size:16px;word-wrap:break-word}table tbody tr td a{float:left}table .caseid-col{white-space:nowrap}.notification{text-align:center;padding:30px 0;margin-top:75px}a:hover{color:#005ea5}.search-result-reset-link{padding-right:15px;padding-left:15px}.search-result-column-header{width:unset;table-layout:normal}.search-result-column-header div{display:table-cell;width:auto}@media screen and (max-width:379px){.search-result-column-header div{display:block;float:right}}.search-result-column-label{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort{font-size:16px}.sort-widget{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium{margin-top:-20px}.govuk-table__checkbox{vertical-align:middle;padding-left:3px}#search-result-heading__text:focus{outline:none}\n"] }]
|
|
46259
|
+
args: [{ selector: 'ccd-search-result', standalone: false, template: "<table *ngIf=\"hasResults() || hasDrafts()\">\n <caption>\n <h2 class=\"heading-h2\" id=\"search-result-heading__text\" tabindex=\"-1\">{{ (caseState ? 'Your cases' : 'Search result') | rpxTranslate}}</h2>\n\n <div class=\"govuk-warning-text pagination-limit-warning\" *ngIf=\"paginationLimitEnforced\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-visually-hidden\">{{'Warning' | rpxTranslate}}</span>\n {{'The total size of the result set is' | rpxTranslate}} {{paginationMetadata.totalResultsCount | number}}. {{'Only the first 10,000 records are available for display.' | rpxTranslate}}\n </strong>\n </div>\n\n <div *ngIf=\"(hasResults() || hasDrafts())\" class=\"pagination-top\">\n <output [attr.aria-label]=\"getTotalResults() + ' ' + ('results have been found' | rpxTranslate)\"></output>\n <span class=\"text-16\" id=\"search-result-summary__text\">{{'Showing' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getFirstResult() }}</span>\n {{'to' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getLastResult() }}</span>\n {{'of' | rpxTranslate}}\n <span class=\"govuk-!-font-weight-bold\">{{ getTotalResults() }}</span> {{'results' | rpxTranslate}}</span>\n </div>\n <div *ngIf=\"(hasResults() || hasDrafts()) && selectionEnabled\" class=\"reset-selection\"\n [attr.aria-label]=\"'Reset selection' | rpxTranslate\">\n <span><a class=\"search-result-reset-link\" href=\"#\" (click)=\"clearSelection(); $event.preventDefault()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-all\" name=\"select-all\" type=\"checkbox\" (change)=\"selectAll()\" [checked]=\"allOnPageSelected()\" [disabled]=\"!canAnyBeShared()\" />\n <label class=\"govuk-label govuk-checkboxes__label govuk-visually-hidden\" for=\"select-all\">\n Select all cases\n </label>\n </div>\n </td>\n <th *ngFor=\"let col of resultView.columns\" class=\"search-result-column-header\"\n [attr.aria-sort]=\"isSortAscending(col) === null ? null : (isSortAscending(col) ? 'ascending' : 'descending')\" scope=\"col\">\n <div>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\" (keyup)=\"noop()\">\n {{ isTranslatable(col) ? (col.label | rpxTranslate) : col.label }}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col); $event.preventDefault()\" (keyup.enter)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" [attr.aria-label]=\"'Sort ' + col.label | rpxTranslate\" href=\"#\"></a>\n </div>\n </div>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\" scope=\"col\">​</th>\n </tr>\n </thead>\n\n <tbody>\n <!-- sorted by consumer -->\n <ng-container *ngIf=\"consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"consumer-select-{{ result.case_id }}\" name=\"consumer-select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" />\n <label class=\"govuk-label govuk-checkboxes__label govuk-visually-hidden\" for=\"consumer-select-{{ result.case_id }}\">\n Select case {{ result.case_id }}\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n <!-- sorted by toolkit -->\n <ng-container *ngIf=\"!consumerSortingEnabled\">\n <tr *ngFor=\"let result of resultView.results | ccdSortSearchResult : sortParameters | paginate: { itemsPerPage: paginationPageSize, currentPage: selected.page, totalItems: resultTotal }\">\n <td *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"select-{{ result.case_id }}\" name=\"select-{{ result.case_id }}\"\n type=\"checkbox\" (change)=\"changeSelection(result)\" [checked]=\"isSelected(result)\" [disabled]=\"!canBeShared(result)\" (keyup)=\"onKeyUp($event, result)\" />\n <label class=\"govuk-label govuk-checkboxes__label govuk-visually-hidden\" for=\"select-{{ result.case_id }}\">\n Select case {{ result.case_id }}\n </label>\n </div>\n </td>\n <td class=\"search-result-column-cell\" *ngFor=\"let col of resultView.columns; let colIndex = index\" scope=\"row\">\n\n <a *ngIf=\"colIndex == 0\" [routerLink]=\"prepareCaseLinkUrl(result.case_id)\"\n attr.aria-label=\"go to case with Case reference:{{ result.case_id | ccdCaseReference }}\" class=\"govuk-link\">\n <ng-container class=\"text-16\" *ngIf=\"!hideRows\">\n <ccd-field-read *ngIf=\"draftPrefixOrGet(col, result); else case_reference\"\n ccdLabelSubstitutor [caseField]=\"getColumnsWithPrefix(result.columns[col.case_field_id], result)\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n <ng-template #case_reference>{{result.case_id | ccdCaseReference}}</ng-template>\n </ng-container>\n </a>\n <div *ngIf=\"colIndex != 0\" class=\"text-16\" [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-field-read ccdLabelSubstitutor\n [caseField]=\"result.columns[col.case_field_id]\"\n [contextFields]=\"result.hydrated_case_fields\"\n [elementsToSubstitute]=\"['value']\"></ccd-field-read>\n </div>\n </td>\n <td *ngIf=\"activityEnabled()\">\n <div [style.visibility]=\"hideRows ? 'hidden' : 'visible'\">\n <ccd-activity [caseId]=\"result.case_id\" [displayMode]=\"ICON\"></ccd-activity>\n </div>\n </td>\n </tr>\n </ng-container>\n\n </tbody>\n</table>\n\n<ccd-pagination\n *ngIf=\"hasResults()\"\n (pageChange)=\"goToPage($event)\"\n [visibilityLabel]=\"hideRows ? 'hidden' : 'visible'\"\n [autoHide]=\"true\"\n [maxSize]=\"8\"\n [screenReaderPaginationLabel]=\"'Pagination'\"\n [screenReaderPageLabel]=\"page\"\n [screenReaderCurrentLabel]=\"'You\\'re on page'\"></ccd-pagination>\n\n<div *ngIf=\"!(hasResults() || hasDrafts())\" class=\"notification\" role=\"status\">\n{{'No cases found. Try using different filters.' | rpxTranslate}}\n</div>\n", styles: [".govuk-js-link{appearance:none;background:none;border:none;color:#005ea5;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0;text-decoration:underline}.govuk-js-link:hover{color:#2b8cc4;text-decoration-thickness:max(3px,.1875rem,.12em)}.govuk-js-link:focus{background-color:#ffbf47;color:#000;outline:3px solid transparent;text-decoration:none;box-shadow:0 -2px #ffbf47,0 4px #000}.govuk-js-link:visited{color:#4c2c92}table thead tr th{vertical-align:top}table tbody tr td{font-size:16px;word-wrap:break-word}table tbody tr td a{float:left}table .caseid-col{white-space:nowrap}.notification{text-align:center;padding:30px 0;margin-top:75px}a:hover{color:#005ea5}.search-result-reset-link{padding-right:15px;padding-left:15px}.search-result-column-header{width:unset;table-layout:normal}.search-result-column-header div{display:table-cell;width:auto}@media screen and (max-width:379px){.search-result-column-header div{display:block;float:right}}.search-result-column-label{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort{font-size:16px}.sort-widget{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium{margin-top:-20px}.govuk-table__checkbox{vertical-align:middle;padding-left:3px}#search-result-heading__text:focus{outline:none}\n"] }]
|
|
46290
46260
|
}], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }], { caseLinkUrlTemplate: [{
|
|
46291
46261
|
type: Input
|
|
46292
46262
|
}], jurisdiction: [{
|