@hmcts/ccd-case-ui-toolkit 7.4.20 → 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 +501 -544
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/index.d.ts +17 -18
- 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) {
|
|
@@ -14883,7 +14871,7 @@ class CaseFileViewFieldComponent {
|
|
|
14883
14871
|
}
|
|
14884
14872
|
setMediaViewerFile(document) {
|
|
14885
14873
|
const documentDetails = {
|
|
14886
|
-
document_binary_url:
|
|
14874
|
+
document_binary_url: document.document_binary_url,
|
|
14887
14875
|
document_filename: document.document_filename,
|
|
14888
14876
|
content_type: document.content_type
|
|
14889
14877
|
};
|
|
@@ -14898,19 +14886,6 @@ class CaseFileViewFieldComponent {
|
|
|
14898
14886
|
const mediaViewerInfo = this.documentManagementService.getMediaViewerInfo(documentDetails);
|
|
14899
14887
|
this.currentDocument = JSON.parse(mediaViewerInfo);
|
|
14900
14888
|
}
|
|
14901
|
-
withLegacyDocumentAccessContext(documentBinaryUrl) {
|
|
14902
|
-
if (!documentBinaryUrl || !this.caseId) {
|
|
14903
|
-
return documentBinaryUrl;
|
|
14904
|
-
}
|
|
14905
|
-
const [path, query = ''] = documentBinaryUrl.split('?');
|
|
14906
|
-
if (!/^\/documents\/[^/]+\/binary\/?$/.test(path)) {
|
|
14907
|
-
return documentBinaryUrl;
|
|
14908
|
-
}
|
|
14909
|
-
// XUI validates legacy document access against the case before proxying the binary request.
|
|
14910
|
-
const searchParams = new URLSearchParams(query);
|
|
14911
|
-
searchParams.set('caseId', this.caseId);
|
|
14912
|
-
return `${path}?${searchParams.toString()}`;
|
|
14913
|
-
}
|
|
14914
14889
|
moveDocument(data) {
|
|
14915
14890
|
const cid = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
|
|
14916
14891
|
const loadingToken = this.loadingService.register();
|
|
@@ -15132,7 +15107,7 @@ function ReadCaseFlagFieldComponent_ng_container_1_ng_container_2_Template(rf, c
|
|
|
15132
15107
|
i0.ɵɵproperty("ngForOf", ctx_r1.partyLevelCaseFlagData);
|
|
15133
15108
|
} }
|
|
15134
15109
|
function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_ccd_case_flag_table_1_Template(rf, ctx) { if (rf & 1) {
|
|
15135
|
-
i0.ɵɵelement(0, "ccd-case-flag-table",
|
|
15110
|
+
i0.ɵɵelement(0, "ccd-case-flag-table", 11);
|
|
15136
15111
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
15137
15112
|
} if (rf & 2) {
|
|
15138
15113
|
const flagData_r4 = i0.ɵɵnextContext().$implicit;
|
|
@@ -15140,7 +15115,7 @@ function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_ccd_case
|
|
|
15140
15115
|
} }
|
|
15141
15116
|
function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
15142
15117
|
i0.ɵɵelementStart(0, "div");
|
|
15143
|
-
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);
|
|
15144
15119
|
i0.ɵɵelementEnd();
|
|
15145
15120
|
} if (rf & 2) {
|
|
15146
15121
|
const flagData_r4 = ctx.$implicit;
|
|
@@ -15149,7 +15124,7 @@ function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_4_Template
|
|
|
15149
15124
|
} }
|
|
15150
15125
|
function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
15151
15126
|
i0.ɵɵelementStart(0, "div");
|
|
15152
|
-
i0.ɵɵelement(1, "ccd-case-flag-table",
|
|
15127
|
+
i0.ɵɵelement(1, "ccd-case-flag-table", 11);
|
|
15153
15128
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
15154
15129
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
15155
15130
|
i0.ɵɵelementEnd();
|
|
@@ -15160,7 +15135,7 @@ function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_div_5_Template
|
|
|
15160
15135
|
} }
|
|
15161
15136
|
function ReadCaseFlagFieldComponent_ng_container_1_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
15162
15137
|
i0.ɵɵelementContainerStart(0);
|
|
15163
|
-
i0.ɵɵelementStart(1, "h2",
|
|
15138
|
+
i0.ɵɵelementStart(1, "h2", 9);
|
|
15164
15139
|
i0.ɵɵtext(2);
|
|
15165
15140
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
15166
15141
|
i0.ɵɵelementEnd();
|
|
@@ -15329,7 +15304,7 @@ class ReadCaseFlagFieldComponent extends AbstractFieldReadComponent {
|
|
|
15329
15304
|
let flagsCaseFieldValue = selectedFlagsLocation.caseField?.value;
|
|
15330
15305
|
const path = selectedFlagsLocation.pathToFlagsFormGroup;
|
|
15331
15306
|
// Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
|
|
15332
|
-
if (path.
|
|
15307
|
+
if (path.includes('.')) {
|
|
15333
15308
|
path.slice(path.indexOf('.') + 1).split('.').forEach(part => flagsCaseFieldValue = flagsCaseFieldValue[part]);
|
|
15334
15309
|
}
|
|
15335
15310
|
if (flagsCaseFieldValue) {
|
|
@@ -15346,7 +15321,7 @@ class ReadCaseFlagFieldComponent extends AbstractFieldReadComponent {
|
|
|
15346
15321
|
this.router.navigate([`../${this.caseFlagStateService.pageLocation}`], { relativeTo: this.route });
|
|
15347
15322
|
}
|
|
15348
15323
|
static ɵfac = function ReadCaseFlagFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ReadCaseFlagFieldComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(i1$2.Router), i0.ɵɵdirectiveInject(CaseFlagStateService)); };
|
|
15349
|
-
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) {
|
|
15350
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);
|
|
15351
15326
|
} if (rf & 2) {
|
|
15352
15327
|
i0.ɵɵproperty("ngIf", ctx.context === ctx.paletteContext.CHECK_YOUR_ANSWER);
|
|
@@ -15356,7 +15331,7 @@ class ReadCaseFlagFieldComponent extends AbstractFieldReadComponent {
|
|
|
15356
15331
|
}
|
|
15357
15332
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCaseFlagFieldComponent, [{
|
|
15358
15333
|
type: Component,
|
|
15359
|
-
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"] }]
|
|
15360
15335
|
}], () => [{ type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: CaseFlagStateService }], null); })();
|
|
15361
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 }); })();
|
|
15362
15337
|
|
|
@@ -15609,7 +15584,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
15609
15584
|
}), true);
|
|
15610
15585
|
// Get the case type ID from the CaseView object in the snapshot data (required for retrieving the available flag
|
|
15611
15586
|
// types for a case)
|
|
15612
|
-
if (this.route.snapshot.data.case
|
|
15587
|
+
if (this.route.snapshot.data.case?.case_type) {
|
|
15613
15588
|
this.caseTypeId = this.route.snapshot.data.case.case_type.id;
|
|
15614
15589
|
// Get the jurisdiction (required for retrieving the available flag types if unable to determine using case type ID)
|
|
15615
15590
|
if (this.route.snapshot.data.case.case_type.jurisdiction) {
|
|
@@ -15832,7 +15807,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
15832
15807
|
let value = instance.caseField?.value;
|
|
15833
15808
|
const pathToValue = instance.pathToFlagsFormGroup;
|
|
15834
15809
|
// Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
|
|
15835
|
-
if (pathToValue.
|
|
15810
|
+
if (pathToValue.includes('.')) {
|
|
15836
15811
|
pathToValue.slice(pathToValue.indexOf('.') + 1).split('.').forEach(part => value = value[part]);
|
|
15837
15812
|
}
|
|
15838
15813
|
if (value?.details?.length > 0) {
|
|
@@ -15857,7 +15832,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
15857
15832
|
// Use the pathToFlagsFormGroup property from the selected flag location to drill down to the correct part of the
|
|
15858
15833
|
// CaseField value to apply changes to
|
|
15859
15834
|
// Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
|
|
15860
|
-
if (path.
|
|
15835
|
+
if (path.includes('.')) {
|
|
15861
15836
|
path.slice(path.indexOf('.') + 1).split('.').forEach(part => flagsCaseFieldValue = flagsCaseFieldValue[part]);
|
|
15862
15837
|
}
|
|
15863
15838
|
// If the CaseField for the selected flags location has no value, set it to an empty object so it can be populated
|
|
@@ -15959,7 +15934,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
15959
15934
|
let formattedValue = instance.caseField?.formatted_value;
|
|
15960
15935
|
const pathToValue = instance.pathToFlagsFormGroup;
|
|
15961
15936
|
// Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
|
|
15962
|
-
if (pathToValue.
|
|
15937
|
+
if (pathToValue.includes('.')) {
|
|
15963
15938
|
pathToValue.slice(pathToValue.indexOf('.') + 1).split('.').forEach(part => {
|
|
15964
15939
|
value = value[part];
|
|
15965
15940
|
if (formattedValue && FieldsUtils.isNonEmptyObject(formattedValue)) {
|
|
@@ -15990,7 +15965,7 @@ class WriteCaseFlagFieldComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
15990
15965
|
// CaseField value to apply changes to
|
|
15991
15966
|
const path = this.selectedFlag.pathToFlagsFormGroup;
|
|
15992
15967
|
// Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
|
|
15993
|
-
if (path.
|
|
15968
|
+
if (path.includes('.')) {
|
|
15994
15969
|
path.slice(path.indexOf('.') + 1).split('.').forEach(part => flagsCaseFieldValue = flagsCaseFieldValue[part]);
|
|
15995
15970
|
}
|
|
15996
15971
|
if (flagsCaseFieldValue) {
|
|
@@ -16199,7 +16174,7 @@ function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
16199
16174
|
} }
|
|
16200
16175
|
class ReadCaseLinkFieldComponent extends AbstractFieldReadComponent {
|
|
16201
16176
|
hasReference() {
|
|
16202
|
-
return this.caseField.value
|
|
16177
|
+
return this.caseField.value?.CaseReference;
|
|
16203
16178
|
}
|
|
16204
16179
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadCaseLinkFieldComponent_BaseFactory; return function ReadCaseLinkFieldComponent_Factory(__ngFactoryType__) { return (ɵReadCaseLinkFieldComponent_BaseFactory || (ɵReadCaseLinkFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent)))(__ngFactoryType__ || ReadCaseLinkFieldComponent); }; })();
|
|
16205
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) {
|
|
@@ -16279,10 +16254,8 @@ class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
|
16279
16254
|
}
|
|
16280
16255
|
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
16281
16256
|
}
|
|
16282
|
-
else {
|
|
16283
|
-
|
|
16284
|
-
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
16285
|
-
}
|
|
16257
|
+
else if (control.touched) {
|
|
16258
|
+
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
16286
16259
|
}
|
|
16287
16260
|
return null;
|
|
16288
16261
|
};
|
|
@@ -16396,12 +16369,12 @@ class ReadCollectionFieldComponent extends AbstractFieldReadComponent {
|
|
|
16396
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) {
|
|
16397
16370
|
i0.ɵɵtemplate(0, ReadCollectionFieldComponent_table_0_Template, 4, 3, "table", 0);
|
|
16398
16371
|
} if (rf & 2) {
|
|
16399
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.value
|
|
16372
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.value == null ? null : ctx.caseField.value.length);
|
|
16400
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}"] });
|
|
16401
16374
|
}
|
|
16402
16375
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCollectionFieldComponent, [{
|
|
16403
16376
|
type: Component,
|
|
16404
|
-
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"] }]
|
|
16405
16378
|
}], null, { caseFields: [{
|
|
16406
16379
|
type: Input
|
|
16407
16380
|
}] }); })();
|
|
@@ -16506,37 +16479,35 @@ function WriteCollectionFieldComponent_h2_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
16506
16479
|
} }
|
|
16507
16480
|
function WriteCollectionFieldComponent_div_7_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
16508
16481
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
16509
|
-
i0.ɵɵelementStart(0, "div", 1, 0)(2, "div", 16)(3, "div", 17)(4, "legend", 18)(5, "
|
|
16510
|
-
i0.ɵɵtext(
|
|
16511
|
-
i0.ɵɵpipe(
|
|
16512
|
-
i0.ɵɵelementEnd()()()
|
|
16513
|
-
i0.ɵɵelementStart(
|
|
16514
|
-
i0.ɵɵlistener("click", function
|
|
16515
|
-
i0.ɵɵtext(
|
|
16516
|
-
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");
|
|
16517
16490
|
i0.ɵɵelementEnd()()();
|
|
16518
|
-
i0.ɵɵelement(
|
|
16491
|
+
i0.ɵɵelement(12, "ccd-field-write", 22);
|
|
16519
16492
|
i0.ɵɵelementEnd();
|
|
16520
16493
|
} if (rf & 2) {
|
|
16521
16494
|
const item_r4 = ctx.$implicit;
|
|
16522
16495
|
const i_r3 = ctx.index;
|
|
16523
16496
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
16524
16497
|
i0.ɵɵproperty("id", ctx_r0.buildIdPrefix(i_r3) + i_r3);
|
|
16525
|
-
i0.ɵɵadvance(
|
|
16526
|
-
i0.ɵɵ
|
|
16527
|
-
i0.ɵɵadvance(2);
|
|
16528
|
-
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)));
|
|
16529
16500
|
i0.ɵɵadvance(3);
|
|
16530
16501
|
i0.ɵɵattribute("aria-label", i0.ɵɵinterpolate1("Remove ", ctx_r0.itemLabel(i_r3)));
|
|
16531
16502
|
i0.ɵɵproperty("disabled", ctx_r0.isNotAuthorisedToDelete(i_r3));
|
|
16532
16503
|
i0.ɵɵadvance();
|
|
16533
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(
|
|
16504
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(11, 16, "Remove"));
|
|
16534
16505
|
i0.ɵɵadvance(2);
|
|
16535
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);
|
|
16536
16507
|
} }
|
|
16537
16508
|
function WriteCollectionFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
16538
16509
|
i0.ɵɵelementStart(0, "div", 13)(1, "fieldset", 14);
|
|
16539
|
-
i0.ɵɵtemplate(2, WriteCollectionFieldComponent_div_7_div_2_Template,
|
|
16510
|
+
i0.ɵɵtemplate(2, WriteCollectionFieldComponent_div_7_div_2_Template, 13, 18, "div", 15);
|
|
16540
16511
|
i0.ɵɵelementEnd()();
|
|
16541
16512
|
} if (rf & 2) {
|
|
16542
16513
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
@@ -16546,7 +16517,7 @@ function WriteCollectionFieldComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
16546
16517
|
} }
|
|
16547
16518
|
function WriteCollectionFieldComponent_button_8_Template(rf, ctx) { if (rf & 1) {
|
|
16548
16519
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
16549
|
-
i0.ɵɵelementStart(0, "button",
|
|
16520
|
+
i0.ɵɵelementStart(0, "button", 23);
|
|
16550
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)); });
|
|
16551
16522
|
i0.ɵɵtext(1);
|
|
16552
16523
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
@@ -16838,7 +16809,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
16838
16809
|
return false;
|
|
16839
16810
|
}
|
|
16840
16811
|
hasUpdateAccess(role) {
|
|
16841
|
-
return
|
|
16812
|
+
return this.caseField.acls.some(acl => acl.role === role && acl.update === true);
|
|
16842
16813
|
}
|
|
16843
16814
|
isNotAuthorisedToDelete(index) {
|
|
16844
16815
|
if (this.isExpanded) {
|
|
@@ -16879,7 +16850,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
16879
16850
|
}
|
|
16880
16851
|
isCollectionOfSimpleType(caseField) {
|
|
16881
16852
|
const notSimple = ['Collection', 'Complex'];
|
|
16882
|
-
return notSimple.
|
|
16853
|
+
return !notSimple.includes(caseField.field_type.collection_field_type.type);
|
|
16883
16854
|
}
|
|
16884
16855
|
static ɵfac = function WriteCollectionFieldComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WriteCollectionFieldComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(ProfileNotifier), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
16885
16856
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
@@ -16887,7 +16858,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
16887
16858
|
} if (rf & 2) {
|
|
16888
16859
|
let _t;
|
|
16889
16860
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.items = _t);
|
|
16890
|
-
} }, 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) {
|
|
16891
16862
|
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
|
|
16892
16863
|
i0.ɵɵtemplate(2, WriteCollectionFieldComponent_h2_2_Template, 3, 3, "h2", 3);
|
|
16893
16864
|
i0.ɵɵelementStart(3, "button", 4);
|
|
@@ -16908,14 +16879,14 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
16908
16879
|
i0.ɵɵadvance(2);
|
|
16909
16880
|
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text || ctx.formArray.errors);
|
|
16910
16881
|
i0.ɵɵadvance();
|
|
16911
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.value
|
|
16882
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.value == null ? null : ctx.caseField.value.length);
|
|
16912
16883
|
i0.ɵɵadvance();
|
|
16913
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.value
|
|
16884
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.value == null ? null : ctx.caseField.value.length);
|
|
16914
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}"] });
|
|
16915
16886
|
}
|
|
16916
16887
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCollectionFieldComponent, [{
|
|
16917
16888
|
type: Component,
|
|
16918
|
-
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"] }]
|
|
16919
16890
|
}], () => [{ type: i1$3.MatDialog }, { type: ProfileNotifier }, { type: i0.ChangeDetectorRef }], { caseFields: [{
|
|
16920
16891
|
type: Input
|
|
16921
16892
|
}], items: [{
|
|
@@ -17087,10 +17058,8 @@ class ReadDocumentFieldComponent extends AbstractFieldReadComponent {
|
|
|
17087
17058
|
}
|
|
17088
17059
|
});
|
|
17089
17060
|
}
|
|
17090
|
-
else {
|
|
17091
|
-
|
|
17092
|
-
this.openMediaViewer(this.caseField.value);
|
|
17093
|
-
}
|
|
17061
|
+
else if (this.caseField && this.caseField.value) {
|
|
17062
|
+
this.openMediaViewer(this.caseField.value);
|
|
17094
17063
|
}
|
|
17095
17064
|
}
|
|
17096
17065
|
openMediaViewer(documentFieldValue) {
|
|
@@ -17277,12 +17246,10 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
17277
17246
|
this.jurisdictionId = caseInfo.jurisdiction;
|
|
17278
17247
|
this.caseId = caseInfo.caseId;
|
|
17279
17248
|
}
|
|
17280
|
-
else {
|
|
17281
|
-
|
|
17282
|
-
|
|
17283
|
-
|
|
17284
|
-
this.caseId = currUrl.split('/')[5];
|
|
17285
|
-
}
|
|
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];
|
|
17286
17253
|
}
|
|
17287
17254
|
}
|
|
17288
17255
|
else {
|
|
@@ -17364,7 +17331,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
17364
17331
|
this.fileInput.nativeElement.click();
|
|
17365
17332
|
}
|
|
17366
17333
|
fileSelectEvent() {
|
|
17367
|
-
if ((this.caseField.value
|
|
17334
|
+
if ((this.caseField.value?.document_filename) ||
|
|
17368
17335
|
(this.selectedFile && this.selectedFile.name)) {
|
|
17369
17336
|
this.openDialog(this.dialogConfig);
|
|
17370
17337
|
}
|
|
@@ -18106,7 +18073,7 @@ class DynamicRadioListPipe {
|
|
|
18106
18073
|
*
|
|
18107
18074
|
* If value is object with element `value.code`, use code instead.
|
|
18108
18075
|
*/
|
|
18109
|
-
if (value
|
|
18076
|
+
if (value?.value?.code) {
|
|
18110
18077
|
value = value.value.code;
|
|
18111
18078
|
}
|
|
18112
18079
|
const item = items.find(i => i.code === value);
|
|
@@ -18164,8 +18131,8 @@ class ReadDynamicRadioListFieldComponent extends AbstractFieldReadComponent {
|
|
|
18164
18131
|
|
|
18165
18132
|
const _c0$S = a0 => ({ "form-group-error": a0 });
|
|
18166
18133
|
const _c1$m = a0 => ({ selected: a0 });
|
|
18167
|
-
function
|
|
18168
|
-
i0.ɵɵelementStart(0, "span",
|
|
18134
|
+
function WriteDynamicRadioListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
18135
|
+
i0.ɵɵelementStart(0, "span", 5);
|
|
18169
18136
|
i0.ɵɵtext(1);
|
|
18170
18137
|
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
18171
18138
|
i0.ɵɵelementEnd();
|
|
@@ -18174,8 +18141,8 @@ function WriteDynamicRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf &
|
|
|
18174
18141
|
i0.ɵɵadvance();
|
|
18175
18142
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
18176
18143
|
} }
|
|
18177
|
-
function
|
|
18178
|
-
i0.ɵɵelementStart(0, "span",
|
|
18144
|
+
function WriteDynamicRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
18145
|
+
i0.ɵɵelementStart(0, "span", 6);
|
|
18179
18146
|
i0.ɵɵtext(1);
|
|
18180
18147
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
18181
18148
|
i0.ɵɵelementEnd();
|
|
@@ -18184,8 +18151,8 @@ function WriteDynamicRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf &
|
|
|
18184
18151
|
i0.ɵɵadvance();
|
|
18185
18152
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
|
|
18186
18153
|
} }
|
|
18187
|
-
function
|
|
18188
|
-
i0.ɵɵelementStart(0, "span",
|
|
18154
|
+
function WriteDynamicRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
18155
|
+
i0.ɵɵelementStart(0, "span", 5);
|
|
18189
18156
|
i0.ɵɵtext(1);
|
|
18190
18157
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
18191
18158
|
i0.ɵɵelementEnd();
|
|
@@ -18193,8 +18160,8 @@ function WriteDynamicRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf &
|
|
|
18193
18160
|
i0.ɵɵadvance();
|
|
18194
18161
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Select an option below"));
|
|
18195
18162
|
} }
|
|
18196
|
-
function
|
|
18197
|
-
i0.ɵɵelementStart(0, "span",
|
|
18163
|
+
function WriteDynamicRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
|
|
18164
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
18198
18165
|
i0.ɵɵtext(1);
|
|
18199
18166
|
i0.ɵɵpipe(2, "ccdFirstError");
|
|
18200
18167
|
i0.ɵɵelementEnd();
|
|
@@ -18203,10 +18170,10 @@ function WriteDynamicRadioListFieldComponent_span_7_Template(rf, ctx) { if (rf &
|
|
|
18203
18170
|
i0.ɵɵadvance();
|
|
18204
18171
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.dynamicRadioListControl.errors));
|
|
18205
18172
|
} }
|
|
18206
|
-
function
|
|
18207
|
-
i0.ɵɵelementStart(0, "div",
|
|
18208
|
-
i0.ɵɵelement(1, "input",
|
|
18209
|
-
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);
|
|
18210
18177
|
i0.ɵɵtext(3);
|
|
18211
18178
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
18212
18179
|
i0.ɵɵelementEnd()();
|
|
@@ -18246,21 +18213,17 @@ class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
|
18246
18213
|
return this.parent?.value?.id ? this.parent.value.id + this.parent.value.value : super.createElementId(name);
|
|
18247
18214
|
}
|
|
18248
18215
|
static ɵfac = /*@__PURE__*/ (() => { let ɵWriteDynamicRadioListFieldComponent_BaseFactory; return function WriteDynamicRadioListFieldComponent_Factory(__ngFactoryType__) { return (ɵWriteDynamicRadioListFieldComponent_BaseFactory || (ɵWriteDynamicRadioListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteDynamicRadioListFieldComponent)))(__ngFactoryType__ || WriteDynamicRadioListFieldComponent); }; })();
|
|
18249
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteDynamicRadioListFieldComponent, selectors: [["ccd-write-dynamic-radio-list-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
18250
|
-
i0.ɵɵelementStart(0, "div", 0)(1, "fieldset");
|
|
18251
|
-
i0.ɵɵ
|
|
18252
|
-
i0.ɵɵelementStart(3, "label", 2);
|
|
18253
|
-
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);
|
|
18254
18219
|
i0.ɵɵelementEnd();
|
|
18255
|
-
i0.ɵɵelementContainerStart(
|
|
18256
|
-
i0.ɵɵtemplate(
|
|
18220
|
+
i0.ɵɵelementContainerStart(7);
|
|
18221
|
+
i0.ɵɵtemplate(8, WriteDynamicRadioListFieldComponent_div_8_Template, 5, 11, "div", 4);
|
|
18257
18222
|
i0.ɵɵelementContainerEnd();
|
|
18258
18223
|
i0.ɵɵelementEnd()();
|
|
18259
18224
|
} if (rf & 2) {
|
|
18260
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
18225
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$S, !ctx.dynamicRadioListControl.valid && ctx.dynamicRadioListControl.dirty))("id", ctx.id());
|
|
18261
18226
|
i0.ɵɵadvance(3);
|
|
18262
|
-
i0.ɵɵproperty("for", ctx.id());
|
|
18263
|
-
i0.ɵɵadvance();
|
|
18264
18227
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
18265
18228
|
i0.ɵɵadvance();
|
|
18266
18229
|
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
@@ -18274,7 +18237,7 @@ class WriteDynamicRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
|
18274
18237
|
}
|
|
18275
18238
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDynamicRadioListFieldComponent, [{
|
|
18276
18239
|
type: Component,
|
|
18277
|
-
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" }]
|
|
18278
18241
|
}], null, null); })();
|
|
18279
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 }); })();
|
|
18280
18243
|
|
|
@@ -18539,8 +18502,8 @@ class ReadFixedRadioListFieldComponent extends AbstractFieldReadComponent {
|
|
|
18539
18502
|
|
|
18540
18503
|
const _c0$P = a0 => ({ "form-group-error": a0 });
|
|
18541
18504
|
const _c1$k = a0 => ({ selected: a0 });
|
|
18542
|
-
function
|
|
18543
|
-
i0.ɵɵelementStart(0, "span",
|
|
18505
|
+
function WriteFixedRadioListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
18506
|
+
i0.ɵɵelementStart(0, "span", 5);
|
|
18544
18507
|
i0.ɵɵtext(1);
|
|
18545
18508
|
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
18546
18509
|
i0.ɵɵelementEnd();
|
|
@@ -18549,8 +18512,8 @@ function WriteFixedRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1
|
|
|
18549
18512
|
i0.ɵɵadvance();
|
|
18550
18513
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
18551
18514
|
} }
|
|
18552
|
-
function
|
|
18553
|
-
i0.ɵɵelementStart(0, "span",
|
|
18515
|
+
function WriteFixedRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
18516
|
+
i0.ɵɵelementStart(0, "span", 6);
|
|
18554
18517
|
i0.ɵɵtext(1);
|
|
18555
18518
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
18556
18519
|
i0.ɵɵelementEnd();
|
|
@@ -18559,8 +18522,8 @@ function WriteFixedRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1
|
|
|
18559
18522
|
i0.ɵɵadvance();
|
|
18560
18523
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField.hint_text));
|
|
18561
18524
|
} }
|
|
18562
|
-
function
|
|
18563
|
-
i0.ɵɵelementStart(0, "span",
|
|
18525
|
+
function WriteFixedRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
18526
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
18564
18527
|
i0.ɵɵtext(1);
|
|
18565
18528
|
i0.ɵɵpipe(2, "ccdFirstError");
|
|
18566
18529
|
i0.ɵɵelementEnd();
|
|
@@ -18569,10 +18532,10 @@ function WriteFixedRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1
|
|
|
18569
18532
|
i0.ɵɵadvance();
|
|
18570
18533
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r0.fixedRadioListControl.errors, ctx_r0.caseField.label));
|
|
18571
18534
|
} }
|
|
18572
|
-
function
|
|
18573
|
-
i0.ɵɵelementStart(0, "div",
|
|
18574
|
-
i0.ɵɵelement(1, "input",
|
|
18575
|
-
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);
|
|
18576
18539
|
i0.ɵɵtext(3);
|
|
18577
18540
|
i0.ɵɵpipe(4, "rpxTranslate");
|
|
18578
18541
|
i0.ɵɵelementEnd()();
|
|
@@ -18594,21 +18557,17 @@ class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
|
18594
18557
|
this.fixedRadioListControl = this.registerControl(new FormControl(notEmpty ? this.caseField.value : null));
|
|
18595
18558
|
}
|
|
18596
18559
|
static ɵfac = /*@__PURE__*/ (() => { let ɵWriteFixedRadioListFieldComponent_BaseFactory; return function WriteFixedRadioListFieldComponent_Factory(__ngFactoryType__) { return (ɵWriteFixedRadioListFieldComponent_BaseFactory || (ɵWriteFixedRadioListFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(WriteFixedRadioListFieldComponent)))(__ngFactoryType__ || WriteFixedRadioListFieldComponent); }; })();
|
|
18597
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteFixedRadioListFieldComponent, selectors: [["ccd-write-fixed-radio-list-field"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
18598
|
-
i0.ɵɵelementStart(0, "div", 0)(1, "fieldset")(2, "legend")
|
|
18599
|
-
i0.ɵɵtemplate(4, WriteFixedRadioListFieldComponent_span_4_Template, 3, 3, "span", 2);
|
|
18600
|
-
i0.ɵɵelementEnd();
|
|
18601
|
-
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);
|
|
18602
18563
|
i0.ɵɵelementEnd();
|
|
18603
|
-
i0.ɵɵelementContainerStart(
|
|
18604
|
-
i0.ɵɵtemplate(
|
|
18564
|
+
i0.ɵɵelementContainerStart(6);
|
|
18565
|
+
i0.ɵɵtemplate(7, WriteFixedRadioListFieldComponent_div_7_Template, 5, 11, "div", 4);
|
|
18605
18566
|
i0.ɵɵelementContainerEnd();
|
|
18606
18567
|
i0.ɵɵelementEnd()();
|
|
18607
18568
|
} if (rf & 2) {
|
|
18608
|
-
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());
|
|
18609
18570
|
i0.ɵɵadvance(3);
|
|
18610
|
-
i0.ɵɵproperty("for", ctx.id());
|
|
18611
|
-
i0.ɵɵadvance();
|
|
18612
18571
|
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
18613
18572
|
i0.ɵɵadvance();
|
|
18614
18573
|
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
@@ -18620,7 +18579,7 @@ class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
|
18620
18579
|
}
|
|
18621
18580
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteFixedRadioListFieldComponent, [{
|
|
18622
18581
|
type: Component,
|
|
18623
|
-
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" }]
|
|
18624
18583
|
}], null, null); })();
|
|
18625
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 }); })();
|
|
18626
18585
|
|
|
@@ -19417,7 +19376,7 @@ class BeforeYouStartComponent extends AbstractJourneyComponent {
|
|
|
19417
19376
|
this.serverLinkedApiError = this.linkedCasesService.serverLinkedApiError;
|
|
19418
19377
|
const linkedCaseReferenceIds = this.linkedCasesService.caseFieldValue.filter((item) => item).map((item) => item.id);
|
|
19419
19378
|
if (this.linkedCasesService.initialCaseLinks.length !== (this.linkedCasesService.caseFieldValue.length + this.linkedCasesService.casesToUnlink.length)) {
|
|
19420
|
-
this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter((item) => linkedCaseReferenceIds.
|
|
19379
|
+
this.linkedCasesService.linkedCases = this.linkedCasesService.linkedCases.filter((item) => linkedCaseReferenceIds.includes(item.caseReference));
|
|
19421
19380
|
}
|
|
19422
19381
|
if (this.linkedCasesService.linkedCases.length === 0 && this.linkedCasesService.caseFieldValue.length !== 0 && !this.linkedCasesService.hasContinuedFromStart) {
|
|
19423
19382
|
this.linkedCasesService.caseFieldValue.forEach((item) => {
|
|
@@ -19704,7 +19663,7 @@ class ValidatorsUtils {
|
|
|
19704
19663
|
const _c0$M = a0 => ({ "govuk-form-group--error": a0 });
|
|
19705
19664
|
const _c1$h = a0 => ({ "table-group-error": a0 });
|
|
19706
19665
|
function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
19707
|
-
i0.ɵɵelementStart(0, "span",
|
|
19666
|
+
i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
|
|
19708
19667
|
i0.ɵɵtext(2, "Error:");
|
|
19709
19668
|
i0.ɵɵelementEnd();
|
|
19710
19669
|
i0.ɵɵtext(3);
|
|
@@ -19714,8 +19673,8 @@ function LinkCasesComponent_div_8_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
19714
19673
|
i0.ɵɵadvance(3);
|
|
19715
19674
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.caseNumberError, " ");
|
|
19716
19675
|
} }
|
|
19717
|
-
function
|
|
19718
|
-
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);
|
|
19719
19678
|
i0.ɵɵtext(2, "Error:");
|
|
19720
19679
|
i0.ɵɵelementEnd();
|
|
19721
19680
|
i0.ɵɵtext(3);
|
|
@@ -19725,12 +19684,12 @@ function LinkCasesComponent_div_8_span_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
19725
19684
|
i0.ɵɵadvance(3);
|
|
19726
19685
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.caseReasonError, " ");
|
|
19727
19686
|
} }
|
|
19728
|
-
function
|
|
19687
|
+
function LinkCasesComponent_div_8_div_15_Template(rf, ctx) { if (rf & 1) {
|
|
19729
19688
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
19730
|
-
i0.ɵɵelementStart(0, "div",
|
|
19731
|
-
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)); });
|
|
19732
19691
|
i0.ɵɵelementEnd();
|
|
19733
|
-
i0.ɵɵelementStart(2, "label",
|
|
19692
|
+
i0.ɵɵelementStart(2, "label", 34);
|
|
19734
19693
|
i0.ɵɵtext(3);
|
|
19735
19694
|
i0.ɵɵelementEnd()();
|
|
19736
19695
|
} if (rf & 2) {
|
|
@@ -19744,8 +19703,8 @@ function LinkCasesComponent_div_8_div_13_Template(rf, ctx) { if (rf & 1) {
|
|
|
19744
19703
|
i0.ɵɵadvance();
|
|
19745
19704
|
i0.ɵɵtextInterpolate(reason_r4.value_en);
|
|
19746
19705
|
} }
|
|
19747
|
-
function
|
|
19748
|
-
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);
|
|
19749
19708
|
i0.ɵɵtext(2, "Error:");
|
|
19750
19709
|
i0.ɵɵelementEnd();
|
|
19751
19710
|
i0.ɵɵtext(3);
|
|
@@ -19755,25 +19714,30 @@ function LinkCasesComponent_div_8_div_14_span_3_Template(rf, ctx) { if (rf & 1)
|
|
|
19755
19714
|
i0.ɵɵadvance(3);
|
|
19756
19715
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.caseReasonCommentsError, " ");
|
|
19757
19716
|
} }
|
|
19758
|
-
function
|
|
19759
|
-
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);
|
|
19760
19719
|
i0.ɵɵtext(2, "Comments");
|
|
19761
19720
|
i0.ɵɵelementEnd();
|
|
19762
|
-
i0.ɵɵtemplate(3,
|
|
19763
|
-
i0.ɵɵelementStart(4, "
|
|
19764
|
-
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);
|
|
19724
|
+
i0.ɵɵelementEnd();
|
|
19725
|
+
i0.ɵɵelementStart(6, "textarea", 37);
|
|
19726
|
+
i0.ɵɵtext(7, " ");
|
|
19765
19727
|
i0.ɵɵelementEnd();
|
|
19766
|
-
i0.ɵɵelementStart(
|
|
19767
|
-
i0.ɵɵtext(
|
|
19728
|
+
i0.ɵɵelementStart(8, "div", 38);
|
|
19729
|
+
i0.ɵɵtext(9, " You can enter up to 100 characters ");
|
|
19768
19730
|
i0.ɵɵelementEnd()();
|
|
19769
19731
|
} if (rf & 2) {
|
|
19770
19732
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
19771
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
19733
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c0$M, !!ctx_r1.caseReasonCommentsError));
|
|
19772
19734
|
i0.ɵɵadvance(3);
|
|
19773
19735
|
i0.ɵɵproperty("ngIf", ctx_r1.caseReasonCommentsError);
|
|
19736
|
+
i0.ɵɵadvance(2);
|
|
19737
|
+
i0.ɵɵtextInterpolate1(" ", "Other description", " ");
|
|
19774
19738
|
} }
|
|
19775
|
-
function
|
|
19776
|
-
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);
|
|
19777
19741
|
i0.ɵɵtext(2, "Error:");
|
|
19778
19742
|
i0.ɵɵelementEnd();
|
|
19779
19743
|
i0.ɵɵtext(3);
|
|
@@ -19785,38 +19749,43 @@ function LinkCasesComponent_div_8_span_17_Template(rf, ctx) { if (rf & 1) {
|
|
|
19785
19749
|
} }
|
|
19786
19750
|
function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
19787
19751
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
19788
|
-
i0.ɵɵelementStart(0, "div", 19)(1, "div",
|
|
19752
|
+
i0.ɵɵelementStart(0, "div", 19)(1, "div", 20)(2, "h3", 21);
|
|
19789
19753
|
i0.ɵɵtext(3, "Enter case reference");
|
|
19790
19754
|
i0.ɵɵelementEnd();
|
|
19791
19755
|
i0.ɵɵtemplate(4, LinkCasesComponent_div_8_span_4_Template, 4, 1, "span", 6);
|
|
19792
|
-
i0.ɵɵ
|
|
19756
|
+
i0.ɵɵelementStart(5, "label", 22);
|
|
19757
|
+
i0.ɵɵtext(6);
|
|
19758
|
+
i0.ɵɵelementEnd();
|
|
19759
|
+
i0.ɵɵelement(7, "input", 23);
|
|
19793
19760
|
i0.ɵɵelementEnd();
|
|
19794
|
-
i0.ɵɵelementStart(
|
|
19795
|
-
i0.ɵɵtext(
|
|
19761
|
+
i0.ɵɵelementStart(8, "div", 24)(9, "h3", 21);
|
|
19762
|
+
i0.ɵɵtext(10, "Why should these cases be linked?");
|
|
19796
19763
|
i0.ɵɵelementEnd();
|
|
19797
|
-
i0.ɵɵelementStart(
|
|
19798
|
-
i0.ɵɵtext(
|
|
19764
|
+
i0.ɵɵelementStart(11, "div", 25);
|
|
19765
|
+
i0.ɵɵtext(12, " Select all that apply. ");
|
|
19799
19766
|
i0.ɵɵelementEnd();
|
|
19800
|
-
i0.ɵɵtemplate(
|
|
19801
|
-
i0.ɵɵelementStart(
|
|
19802
|
-
i0.ɵɵtemplate(
|
|
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);
|
|
19803
19770
|
i0.ɵɵelementEnd()();
|
|
19804
|
-
i0.ɵɵtemplate(
|
|
19805
|
-
i0.ɵɵelement(
|
|
19806
|
-
i0.ɵɵtemplate(
|
|
19807
|
-
i0.ɵɵelementStart(
|
|
19808
|
-
i0.ɵɵlistener("click", function
|
|
19809
|
-
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");
|
|
19810
19777
|
i0.ɵɵelementEnd()();
|
|
19811
19778
|
} if (rf & 2) {
|
|
19812
19779
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
19813
19780
|
i0.ɵɵproperty("formGroup", ctx_r1.linkCaseForm);
|
|
19814
19781
|
i0.ɵɵadvance();
|
|
19815
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
19782
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$M, !!ctx_r1.caseNumberError));
|
|
19816
19783
|
i0.ɵɵadvance(3);
|
|
19817
19784
|
i0.ɵɵproperty("ngIf", ctx_r1.caseNumberError);
|
|
19818
19785
|
i0.ɵɵadvance(2);
|
|
19819
|
-
i0.ɵɵ
|
|
19786
|
+
i0.ɵɵtextInterpolate1(" ", "Enter case reference", " ");
|
|
19787
|
+
i0.ɵɵadvance(2);
|
|
19788
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0$M, !!ctx_r1.caseReasonError));
|
|
19820
19789
|
i0.ɵɵadvance(5);
|
|
19821
19790
|
i0.ɵɵproperty("ngIf", ctx_r1.caseReasonError);
|
|
19822
19791
|
i0.ɵɵadvance(2);
|
|
@@ -19827,7 +19796,7 @@ function LinkCasesComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
19827
19796
|
i0.ɵɵproperty("ngIf", ctx_r1.caseSelectionError);
|
|
19828
19797
|
} }
|
|
19829
19798
|
function LinkCasesComponent_span_13_Template(rf, ctx) { if (rf & 1) {
|
|
19830
|
-
i0.ɵɵelementStart(0, "span",
|
|
19799
|
+
i0.ɵɵelementStart(0, "span", 30)(1, "span", 31);
|
|
19831
19800
|
i0.ɵɵtext(2, "Error:");
|
|
19832
19801
|
i0.ɵɵelementEnd();
|
|
19833
19802
|
i0.ɵɵtext(3);
|
|
@@ -19850,27 +19819,27 @@ function LinkCasesComponent_tr_31_span_15_Template(rf, ctx) { if (rf & 1) {
|
|
|
19850
19819
|
} }
|
|
19851
19820
|
function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
|
|
19852
19821
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
19853
|
-
i0.ɵɵelementStart(0, "tr", 10)(1, "td",
|
|
19854
|
-
i0.ɵɵelement(2, "div",
|
|
19822
|
+
i0.ɵɵelementStart(0, "tr", 10)(1, "td", 39);
|
|
19823
|
+
i0.ɵɵelement(2, "div", 40);
|
|
19855
19824
|
i0.ɵɵelementStart(3, "span");
|
|
19856
19825
|
i0.ɵɵtext(4);
|
|
19857
19826
|
i0.ɵɵelement(5, "br");
|
|
19858
19827
|
i0.ɵɵtext(6);
|
|
19859
19828
|
i0.ɵɵpipe(7, "ccdCaseReference");
|
|
19860
19829
|
i0.ɵɵelementEnd()();
|
|
19861
|
-
i0.ɵɵelementStart(8, "td",
|
|
19830
|
+
i0.ɵɵelementStart(8, "td", 41);
|
|
19862
19831
|
i0.ɵɵtext(9);
|
|
19863
19832
|
i0.ɵɵelementEnd();
|
|
19864
|
-
i0.ɵɵelementStart(10, "td",
|
|
19833
|
+
i0.ɵɵelementStart(10, "td", 39);
|
|
19865
19834
|
i0.ɵɵtext(11);
|
|
19866
19835
|
i0.ɵɵelementEnd();
|
|
19867
|
-
i0.ɵɵelementStart(12, "td",
|
|
19836
|
+
i0.ɵɵelementStart(12, "td", 41);
|
|
19868
19837
|
i0.ɵɵtext(13);
|
|
19869
19838
|
i0.ɵɵelementEnd();
|
|
19870
|
-
i0.ɵɵelementStart(14, "td",
|
|
19871
|
-
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);
|
|
19872
19841
|
i0.ɵɵelementEnd();
|
|
19873
|
-
i0.ɵɵelementStart(16, "td",
|
|
19842
|
+
i0.ɵɵelementStart(16, "td", 39)(17, "a", 43);
|
|
19874
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)); });
|
|
19875
19844
|
i0.ɵɵtext(18, "Remove");
|
|
19876
19845
|
i0.ɵɵelementEnd()()();
|
|
@@ -19899,7 +19868,7 @@ function LinkCasesComponent_tr_31_Template(rf, ctx) { if (rf & 1) {
|
|
|
19899
19868
|
i0.ɵɵattribute("id", case_r9.caseReference);
|
|
19900
19869
|
} }
|
|
19901
19870
|
function LinkCasesComponent_tr_32_Template(rf, ctx) { if (rf & 1) {
|
|
19902
|
-
i0.ɵɵelementStart(0, "tr", 10)(1, "td",
|
|
19871
|
+
i0.ɵɵelementStart(0, "tr", 10)(1, "td", 44);
|
|
19903
19872
|
i0.ɵɵtext(2, " None ");
|
|
19904
19873
|
i0.ɵɵelementEnd()();
|
|
19905
19874
|
} }
|
|
@@ -19967,7 +19936,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
|
|
|
19967
19936
|
}
|
|
19968
19937
|
toggleLinkCaseReasonOtherComments(event) {
|
|
19969
19938
|
this.linkCaseReasons.find((reason) => reason.value_en === event.target.value).selected = event.target.checked;
|
|
19970
|
-
this.showComments = this.linkCaseReasons.
|
|
19939
|
+
this.showComments = this.linkCaseReasons.some((reason) => reason.value_en === 'Other' && reason.selected);
|
|
19971
19940
|
}
|
|
19972
19941
|
submitCaseInfo() {
|
|
19973
19942
|
this.errorMessages = [];
|
|
@@ -19995,7 +19964,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
|
|
|
19995
19964
|
return false;
|
|
19996
19965
|
}
|
|
19997
19966
|
const caseNumber = this.linkCaseForm.value.caseNumber;
|
|
19998
|
-
return
|
|
19967
|
+
return linkedCases.some((caseLink) => caseLink.caseReference.split('-').join('').trim() === caseNumber.split('-').join('').trim());
|
|
19999
19968
|
}
|
|
20000
19969
|
isCaseInInitial(proposedCaseLink) {
|
|
20001
19970
|
if (proposedCaseLink) {
|
|
@@ -20030,7 +19999,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
|
|
|
20030
19999
|
});
|
|
20031
20000
|
}
|
|
20032
20001
|
if (this.linkCaseForm.controls.reasonType.valid
|
|
20033
|
-
&& this.linkCaseReasons.
|
|
20002
|
+
&& this.linkCaseReasons.some((reason) => reason.value_en === 'Other' && reason.selected)) {
|
|
20034
20003
|
if (this.linkCaseForm.controls.otherDescription.value.trim().length === 0) {
|
|
20035
20004
|
this.caseReasonCommentsError = LinkedCasesErrorMessages.otherDescriptionError;
|
|
20036
20005
|
this.errorMessages.push({
|
|
@@ -20203,7 +20172,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
|
|
|
20203
20172
|
}
|
|
20204
20173
|
}
|
|
20205
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)); };
|
|
20206
|
-
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) {
|
|
20207
20176
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div")(3, "span", 2);
|
|
20208
20177
|
i0.ɵɵtext(4);
|
|
20209
20178
|
i0.ɵɵpipe(5, "ccdCaseReference");
|
|
@@ -20211,7 +20180,7 @@ class LinkCasesComponent extends AbstractJourneyComponent {
|
|
|
20211
20180
|
i0.ɵɵelementStart(6, "h1", 3);
|
|
20212
20181
|
i0.ɵɵtext(7, "Select a\u00A0case you want to link to this case");
|
|
20213
20182
|
i0.ɵɵelementEnd();
|
|
20214
|
-
i0.ɵɵtemplate(8, LinkCasesComponent_div_8_Template,
|
|
20183
|
+
i0.ɵɵtemplate(8, LinkCasesComponent_div_8_Template, 22, 13, "div", 4);
|
|
20215
20184
|
i0.ɵɵelement(9, "hr")(10, "br")(11, "br");
|
|
20216
20185
|
i0.ɵɵelementStart(12, "div", 5);
|
|
20217
20186
|
i0.ɵɵtemplate(13, LinkCasesComponent_span_13_Template, 4, 1, "span", 6);
|
|
@@ -20251,11 +20220,11 @@ class LinkCasesComponent extends AbstractJourneyComponent {
|
|
|
20251
20220
|
i0.ɵɵproperty("ngForOf", ctx.selectedCases);
|
|
20252
20221
|
i0.ɵɵadvance();
|
|
20253
20222
|
i0.ɵɵproperty("ngIf", !ctx.selectedCases.length);
|
|
20254
|
-
} }, 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}"] });
|
|
20255
20224
|
}
|
|
20256
20225
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkCasesComponent, [{
|
|
20257
20226
|
type: Component,
|
|
20258
|
-
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"] }]
|
|
20259
20228
|
}], () => [{ type: CasesService }, { type: i4.FormBuilder }, { type: ValidatorsUtils }, { type: LinkedCasesService }, { type: MultipageComponentStateService }], { linkedCasesStateEmitter: [{
|
|
20260
20229
|
type: Output
|
|
20261
20230
|
}] }); })();
|
|
@@ -20419,7 +20388,7 @@ class LinkedCasesFromTableComponent {
|
|
|
20419
20388
|
}
|
|
20420
20389
|
ngAfterViewInit() {
|
|
20421
20390
|
const labelField = document.getElementsByClassName('case-viewer-label');
|
|
20422
|
-
if (labelField
|
|
20391
|
+
if (labelField?.length) {
|
|
20423
20392
|
labelField[0].replaceWith('');
|
|
20424
20393
|
}
|
|
20425
20394
|
}
|
|
@@ -20479,7 +20448,7 @@ class LinkedCasesFromTableComponent {
|
|
|
20479
20448
|
: 'Show';
|
|
20480
20449
|
}
|
|
20481
20450
|
static ɵfac = function LinkedCasesFromTableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LinkedCasesFromTableComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(LinkedCasesService)); };
|
|
20482
|
-
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) {
|
|
20483
20452
|
i0.ɵɵtemplate(0, LinkedCasesFromTableComponent_button_0_Template, 2, 1, "button", 0)(1, LinkedCasesFromTableComponent_table_1_Template, 14, 1, "table", 1);
|
|
20484
20453
|
} if (rf & 2) {
|
|
20485
20454
|
i0.ɵɵproperty("ngIf", !ctx.noLinkedCases && !ctx.isServerError);
|
|
@@ -20489,7 +20458,7 @@ class LinkedCasesFromTableComponent {
|
|
|
20489
20458
|
}
|
|
20490
20459
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesFromTableComponent, [{
|
|
20491
20460
|
type: Component,
|
|
20492
|
-
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"] }]
|
|
20493
20462
|
}], () => [{ type: i1$2.ActivatedRoute }, { type: CasesService }, { type: LinkedCasesService }], { caseField: [{
|
|
20494
20463
|
type: Input
|
|
20495
20464
|
}], notifyAPIFailure: [{
|
|
@@ -20632,11 +20601,11 @@ class LinkedCasesToTableComponent {
|
|
|
20632
20601
|
}
|
|
20633
20602
|
ngAfterViewInit() {
|
|
20634
20603
|
let labelField = document.getElementsByClassName('govuk-heading-l');
|
|
20635
|
-
if (labelField
|
|
20604
|
+
if (labelField?.length) {
|
|
20636
20605
|
labelField[0].replaceWith('');
|
|
20637
20606
|
}
|
|
20638
20607
|
labelField = document.getElementsByClassName('heading-h2');
|
|
20639
|
-
if (labelField
|
|
20608
|
+
if (labelField?.length) {
|
|
20640
20609
|
labelField[0].replaceWith('');
|
|
20641
20610
|
}
|
|
20642
20611
|
}
|
|
@@ -20755,7 +20724,7 @@ class LinkedCasesToTableComponent {
|
|
|
20755
20724
|
};
|
|
20756
20725
|
}
|
|
20757
20726
|
static ɵfac = function LinkedCasesToTableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LinkedCasesToTableComponent)(i0.ɵɵdirectiveInject(i1$2.ActivatedRoute), i0.ɵɵdirectiveInject(LinkedCasesService), i0.ɵɵdirectiveInject(CasesService)); };
|
|
20758
|
-
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) {
|
|
20759
20728
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
20760
20729
|
i0.ɵɵtemplate(2, LinkedCasesToTableComponent_table_2_Template, 16, 2, "table", 2);
|
|
20761
20730
|
i0.ɵɵelementEnd()();
|
|
@@ -20766,7 +20735,7 @@ class LinkedCasesToTableComponent {
|
|
|
20766
20735
|
}
|
|
20767
20736
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkedCasesToTableComponent, [{
|
|
20768
20737
|
type: Component,
|
|
20769
|
-
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"] }]
|
|
20770
20739
|
}], () => [{ type: i1$2.ActivatedRoute }, { type: LinkedCasesService }, { type: CasesService }], { caseField: [{
|
|
20771
20740
|
type: Input
|
|
20772
20741
|
}], notifyAPIFailure: [{
|
|
@@ -20964,7 +20933,7 @@ class UnLinkCasesComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
20964
20933
|
searchCases.forEach((response) => {
|
|
20965
20934
|
const linkedCaseFromList = this.linkedCases.find((linkedCase) => {
|
|
20966
20935
|
const caseRefToUse = this.getLinkedCaseId(linkedCase);
|
|
20967
|
-
if (this.linkedCasesService.casesToUnlink.
|
|
20936
|
+
if (this.linkedCasesService.casesToUnlink.includes(caseRefToUse)) {
|
|
20968
20937
|
linkedCase.unlink = true;
|
|
20969
20938
|
}
|
|
20970
20939
|
return caseRefToUse === response.case_id;
|
|
@@ -21022,7 +20991,7 @@ class UnLinkCasesComponent extends AbstractFieldWriteJourneyComponent {
|
|
|
21022
20991
|
onNext() {
|
|
21023
20992
|
this.resetErrorMessages();
|
|
21024
20993
|
let navigateToNextPage = true;
|
|
21025
|
-
const casesMarkedToUnlink = this.linkedCases.
|
|
20994
|
+
const casesMarkedToUnlink = this.linkedCases.some((linkedCase) => linkedCase.unlink && linkedCase.unlink === true);
|
|
21026
20995
|
if (!casesMarkedToUnlink) {
|
|
21027
20996
|
this.errorMessages.push({
|
|
21028
20997
|
title: 'case-selection',
|
|
@@ -21192,7 +21161,7 @@ function ReadLinkedCasesFieldComponent_ng_template_18_Template(rf, ctx) { if (rf
|
|
|
21192
21161
|
i0.ɵɵelementStart(0, "div", 8)(1, "p", 9);
|
|
21193
21162
|
i0.ɵɵtext(2);
|
|
21194
21163
|
i0.ɵɵelementEnd();
|
|
21195
|
-
i0.ɵɵelementStart(3, "span", 10)(4, "a",
|
|
21164
|
+
i0.ɵɵelementStart(3, "span", 10)(4, "a", 12);
|
|
21196
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()); });
|
|
21197
21166
|
i0.ɵɵtext(5, "Reload the Linked cases tab");
|
|
21198
21167
|
i0.ɵɵelementEnd()()();
|
|
@@ -21224,7 +21193,7 @@ class ReadLinkedCasesFieldComponent {
|
|
|
21224
21193
|
this.commonDataService = commonDataService;
|
|
21225
21194
|
}
|
|
21226
21195
|
ngOnInit() {
|
|
21227
|
-
if (this.route.snapshot.data.case
|
|
21196
|
+
if (this.route.snapshot.data.case?.tabs) {
|
|
21228
21197
|
const tabs = this.route.snapshot.data.case.tabs;
|
|
21229
21198
|
const tab = tabs?.filter(tabItem => tabItem.fields?.some(field => field.id === 'caseLinks'))[0];
|
|
21230
21199
|
this.caseField = tab?.fields?.find(field => field.id === 'caseLinks');
|
|
@@ -21251,15 +21220,15 @@ class ReadLinkedCasesFieldComponent {
|
|
|
21251
21220
|
ngAfterViewInit() {
|
|
21252
21221
|
this.linkedCasesService.caseFieldValue = this.caseField?.value ?? [];
|
|
21253
21222
|
let labelField = document.getElementsByClassName('govuk-heading-l');
|
|
21254
|
-
if (labelField
|
|
21223
|
+
if (labelField?.length) {
|
|
21255
21224
|
labelField[0].replaceWith('');
|
|
21256
21225
|
}
|
|
21257
21226
|
labelField = document.getElementsByClassName('heading-h2');
|
|
21258
|
-
if (labelField
|
|
21227
|
+
if (labelField?.length) {
|
|
21259
21228
|
labelField[0].replaceWith('');
|
|
21260
21229
|
}
|
|
21261
21230
|
labelField = document.getElementsByClassName('case-viewer-label');
|
|
21262
|
-
if (labelField
|
|
21231
|
+
if (labelField?.length) {
|
|
21263
21232
|
labelField[0].replaceWith('');
|
|
21264
21233
|
}
|
|
21265
21234
|
}
|
|
@@ -21273,12 +21242,12 @@ class ReadLinkedCasesFieldComponent {
|
|
|
21273
21242
|
this.isServerLinkedFromError = true;
|
|
21274
21243
|
}
|
|
21275
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)); };
|
|
21276
|
-
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) {
|
|
21277
21246
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
21278
21247
|
i0.ɵɵelementStart(0, "div")(1, "div", 2)(2, "h1", 3);
|
|
21279
21248
|
i0.ɵɵtext(3, "Linked cases");
|
|
21280
21249
|
i0.ɵɵelementEnd();
|
|
21281
|
-
i0.ɵɵelementStart(4, "
|
|
21250
|
+
i0.ɵɵelementStart(4, "span", 4);
|
|
21282
21251
|
i0.ɵɵtext(5, "This case is linked to");
|
|
21283
21252
|
i0.ɵɵelementEnd();
|
|
21284
21253
|
i0.ɵɵelementStart(6, "ccd-linked-cases-to-table", 5);
|
|
@@ -21286,7 +21255,7 @@ class ReadLinkedCasesFieldComponent {
|
|
|
21286
21255
|
i0.ɵɵelementEnd();
|
|
21287
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);
|
|
21288
21257
|
i0.ɵɵelementEnd();
|
|
21289
|
-
i0.ɵɵelementStart(9, "div", 7)(10, "
|
|
21258
|
+
i0.ɵɵelementStart(9, "div", 7)(10, "span", 4);
|
|
21290
21259
|
i0.ɵɵtext(11, "This case is linked from");
|
|
21291
21260
|
i0.ɵɵelementEnd();
|
|
21292
21261
|
i0.ɵɵelement(12, "br");
|
|
@@ -21315,7 +21284,7 @@ class ReadLinkedCasesFieldComponent {
|
|
|
21315
21284
|
}
|
|
21316
21285
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadLinkedCasesFieldComponent, [{
|
|
21317
21286
|
type: Component,
|
|
21318
|
-
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"] }]
|
|
21319
21288
|
}], () => [{ type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }], null); })();
|
|
21320
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 }); })();
|
|
21321
21290
|
|
|
@@ -21464,12 +21433,10 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteJourneyComponent
|
|
|
21464
21433
|
this.addState(this.linkedCasesPage);
|
|
21465
21434
|
this.proceedToNextPage();
|
|
21466
21435
|
}
|
|
21467
|
-
else {
|
|
21468
|
-
|
|
21469
|
-
|
|
21470
|
-
|
|
21471
|
-
});
|
|
21472
|
-
}
|
|
21436
|
+
else if (linkedCasesState.errorMessages?.length) {
|
|
21437
|
+
linkedCasesState.errorMessages.forEach((errorMessage, index) => {
|
|
21438
|
+
this.caseEditDataService.addFormValidationError({ id: errorMessage.fieldId, message: errorMessage.description });
|
|
21439
|
+
});
|
|
21473
21440
|
}
|
|
21474
21441
|
}
|
|
21475
21442
|
getLinkedCaseReasons(serviceId) {
|
|
@@ -21521,7 +21488,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteJourneyComponent
|
|
|
21521
21488
|
}
|
|
21522
21489
|
const unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(item => item.unlink).map(item => item.caseReference);
|
|
21523
21490
|
const caseFieldValue = this.linkedCasesService.caseFieldValue;
|
|
21524
|
-
this.linkedCasesService.caseFieldValue = caseFieldValue.filter(item => unlinkedCaseRefereneIds.
|
|
21491
|
+
this.linkedCasesService.caseFieldValue = caseFieldValue.filter(item => !unlinkedCaseRefereneIds.includes(item.id));
|
|
21525
21492
|
}
|
|
21526
21493
|
this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue;
|
|
21527
21494
|
this.caseEditForm.controls['data'] = new FormGroup({ caseLinks: new FormControl(this.linkedCasesService.caseFieldValue || []) });
|
|
@@ -21561,7 +21528,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteJourneyComponent
|
|
|
21561
21528
|
getLinkedCases() {
|
|
21562
21529
|
this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe((caseView) => {
|
|
21563
21530
|
const caseViewFiltered = caseView.tabs.filter((tab) => {
|
|
21564
|
-
return tab.fields.some(({ field_type }) => field_type
|
|
21531
|
+
return tab.fields.some(({ field_type }) => field_type?.collection_field_type?.id === 'CaseLink');
|
|
21565
21532
|
});
|
|
21566
21533
|
if (caseViewFiltered) {
|
|
21567
21534
|
const caseLinkFieldValue = caseViewFiltered.map((filtered) => filtered.fields?.length > 0 && filtered.fields.filter((field) => field.id === 'caseLinks')[0].value);
|
|
@@ -21659,7 +21626,7 @@ class ReadMoneyGbpFieldComponent extends AbstractFieldReadComponent {
|
|
|
21659
21626
|
}
|
|
21660
21627
|
}
|
|
21661
21628
|
isNumber() {
|
|
21662
|
-
return null !== this.value && !isNaN(this.value);
|
|
21629
|
+
return null !== this.value && !Number.isNaN(Number(this.value));
|
|
21663
21630
|
}
|
|
21664
21631
|
static ɵfac = /*@__PURE__*/ (() => { let ɵReadMoneyGbpFieldComponent_BaseFactory; return function ReadMoneyGbpFieldComponent_Factory(__ngFactoryType__) { return (ɵReadMoneyGbpFieldComponent_BaseFactory || (ɵReadMoneyGbpFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadMoneyGbpFieldComponent)))(__ngFactoryType__ || ReadMoneyGbpFieldComponent); }; })();
|
|
21665
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) {
|
|
@@ -22508,13 +22475,11 @@ class WriteOrganisationFieldComponent extends AbstractFieldWriteComponent {
|
|
|
22508
22475
|
}
|
|
22509
22476
|
this.preSelectDefaultOrg();
|
|
22510
22477
|
}
|
|
22478
|
+
else if (this.caseField && this.caseField.value && this.caseField.value.OrganisationID) {
|
|
22479
|
+
this.preSelectDefaultOrg();
|
|
22480
|
+
}
|
|
22511
22481
|
else {
|
|
22512
|
-
|
|
22513
|
-
this.preSelectDefaultOrg();
|
|
22514
|
-
}
|
|
22515
|
-
else {
|
|
22516
|
-
this.preSelectEmptyOrg();
|
|
22517
|
-
}
|
|
22482
|
+
this.preSelectEmptyOrg();
|
|
22518
22483
|
}
|
|
22519
22484
|
// Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although an
|
|
22520
22485
|
// Organisation field uses the Complex type, it is meant to be treated as one field
|
|
@@ -22548,7 +22513,7 @@ class WriteOrganisationFieldComponent extends AbstractFieldWriteComponent {
|
|
|
22548
22513
|
});
|
|
22549
22514
|
organisations.forEach((org) => {
|
|
22550
22515
|
const resultSet = [...partMatchingResultSet, ...withSpaceMatchingResultSet];
|
|
22551
|
-
const hasMatchingOrganisation = resultSet.
|
|
22516
|
+
const hasMatchingOrganisation = resultSet.some(item => item.organisationIdentifier === org.organisationIdentifier);
|
|
22552
22517
|
const searchHasSpace = this.searchWithSpace(org, lowerOrgSearchText);
|
|
22553
22518
|
const hasResultSetBelowMaxCount = resultSet.length < MAX_RESULT_COUNT;
|
|
22554
22519
|
if (!hasMatchingOrganisation && partMatchingResultSet.length === 0 && hasResultSetBelowMaxCount && searchHasSpace) {
|
|
@@ -24360,19 +24325,17 @@ class QueryCheckYourAnswersComponent {
|
|
|
24360
24325
|
this.error = null;
|
|
24361
24326
|
this.callbackErrorsSubject.next(error);
|
|
24362
24327
|
}
|
|
24328
|
+
else if (error && error.status !== 401 && error.status !== 403) {
|
|
24329
|
+
this.error = error;
|
|
24330
|
+
}
|
|
24363
24331
|
else {
|
|
24364
|
-
|
|
24365
|
-
this.error = error;
|
|
24366
|
-
}
|
|
24367
|
-
else {
|
|
24368
|
-
this.router.navigate(['/', 'service-down']);
|
|
24369
|
-
}
|
|
24332
|
+
this.router.navigate(['/', 'service-down']);
|
|
24370
24333
|
}
|
|
24371
24334
|
window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
|
|
24372
24335
|
}
|
|
24373
24336
|
getDocumentAttachments() {
|
|
24374
24337
|
const attachmentsValue = this.formGroup.get('attachments').value;
|
|
24375
|
-
if (attachmentsValue
|
|
24338
|
+
if (attachmentsValue?.length > 0) {
|
|
24376
24339
|
const documents = attachmentsValue;
|
|
24377
24340
|
this.attachments = documents.map(QueryManagementUtils.documentToCollectionFormDocument);
|
|
24378
24341
|
}
|
|
@@ -25186,7 +25149,7 @@ class QueryWriteDateInputComponent {
|
|
|
25186
25149
|
onChange;
|
|
25187
25150
|
onTouched;
|
|
25188
25151
|
writeValue(date) {
|
|
25189
|
-
if (date instanceof Date && !isNaN(date.getTime())) {
|
|
25152
|
+
if (date instanceof Date && !Number.isNaN(date.getTime())) {
|
|
25190
25153
|
this.day = date.getDate();
|
|
25191
25154
|
this.month = date.getMonth() + 1; // Months are zero-based
|
|
25192
25155
|
this.year = date.getFullYear();
|
|
@@ -25362,7 +25325,7 @@ function QueryWriteRaiseQueryComponent_div_11_ng_container_50_p_7_Template(rf, c
|
|
|
25362
25325
|
} }
|
|
25363
25326
|
function QueryWriteRaiseQueryComponent_div_11_ng_container_50_Template(rf, ctx) { if (rf & 1) {
|
|
25364
25327
|
i0.ɵɵelementContainerStart(0);
|
|
25365
|
-
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);
|
|
25366
25329
|
i0.ɵɵtext(5);
|
|
25367
25330
|
i0.ɵɵpipe(6, "rpxTranslate");
|
|
25368
25331
|
i0.ɵɵelementEnd()();
|
|
@@ -25414,7 +25377,7 @@ function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
25414
25377
|
i0.ɵɵelementStart(30, "textarea", 22);
|
|
25415
25378
|
i0.ɵɵtext(31, " ");
|
|
25416
25379
|
i0.ɵɵelementEnd()();
|
|
25417
|
-
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);
|
|
25418
25381
|
i0.ɵɵtext(36);
|
|
25419
25382
|
i0.ɵɵpipe(37, "rpxTranslate");
|
|
25420
25383
|
i0.ɵɵelementEnd()();
|
|
@@ -25510,7 +25473,7 @@ class QueryWriteRaiseQueryComponent {
|
|
|
25510
25473
|
onSubjectInput() {
|
|
25511
25474
|
const control = this.formGroup.get('subject');
|
|
25512
25475
|
const value = control?.value;
|
|
25513
|
-
if (value
|
|
25476
|
+
if (value?.length > 200) {
|
|
25514
25477
|
control?.setValue(value.substring(0, 200));
|
|
25515
25478
|
}
|
|
25516
25479
|
}
|
|
@@ -25564,7 +25527,7 @@ class QueryWriteRaiseQueryComponent {
|
|
|
25564
25527
|
}
|
|
25565
25528
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRaiseQueryComponent, [{
|
|
25566
25529
|
type: Component,
|
|
25567
|
-
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" }]
|
|
25568
25531
|
}], () => [{ type: QueryManagementService }, { type: i1$2.ActivatedRoute }], { formGroup: [{
|
|
25569
25532
|
type: Input
|
|
25570
25533
|
}], submitted: [{
|
|
@@ -26128,7 +26091,7 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_conta
|
|
|
26128
26091
|
} }
|
|
26129
26092
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
26130
26093
|
i0.ɵɵelementContainerStart(0);
|
|
26131
|
-
i0.ɵɵelementStart(1, "button",
|
|
26094
|
+
i0.ɵɵelementStart(1, "button", 11);
|
|
26132
26095
|
i0.ɵɵtext(2);
|
|
26133
26096
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
26134
26097
|
i0.ɵɵelementEnd();
|
|
@@ -26141,7 +26104,7 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_templ
|
|
|
26141
26104
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "Ask a follow-up question"), " ");
|
|
26142
26105
|
} }
|
|
26143
26106
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_ng_template_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
26144
|
-
i0.ɵɵelementStart(0, "div")(1, "p",
|
|
26107
|
+
i0.ɵɵelementStart(0, "div")(1, "p", 12);
|
|
26145
26108
|
i0.ɵɵtext(2);
|
|
26146
26109
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
26147
26110
|
i0.ɵɵelementEnd();
|
|
@@ -26174,13 +26137,13 @@ function ReadQueryManagementFieldComponent_ng_template_1_ng_container_1_Template
|
|
|
26174
26137
|
} }
|
|
26175
26138
|
function ReadQueryManagementFieldComponent_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
26176
26139
|
i0.ɵɵelementContainerStart(0);
|
|
26177
|
-
i0.ɵɵelementStart(1, "div",
|
|
26140
|
+
i0.ɵɵelementStart(1, "div", 13)(2, "span", 14);
|
|
26178
26141
|
i0.ɵɵtext(3, "!");
|
|
26179
26142
|
i0.ɵɵelementEnd();
|
|
26180
|
-
i0.ɵɵelementStart(4, "strong",
|
|
26143
|
+
i0.ɵɵelementStart(4, "strong", 15)(5, "span", 16);
|
|
26181
26144
|
i0.ɵɵtext(6, "Warning");
|
|
26182
26145
|
i0.ɵɵelementEnd();
|
|
26183
|
-
i0.ɵɵelementStart(7, "p",
|
|
26146
|
+
i0.ɵɵelementStart(7, "p", 17);
|
|
26184
26147
|
i0.ɵɵtext(8);
|
|
26185
26148
|
i0.ɵɵpipe(9, "rpxTranslate");
|
|
26186
26149
|
i0.ɵɵelementEnd()()();
|
|
@@ -26290,7 +26253,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
26290
26253
|
: query?.messageType;
|
|
26291
26254
|
}
|
|
26292
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)); };
|
|
26293
|
-
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) {
|
|
26294
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);
|
|
26295
26258
|
} if (rf & 2) {
|
|
26296
26259
|
const singleQueryDetails_r7 = i0.ɵɵreference(2);
|
|
@@ -26299,7 +26262,7 @@ class ReadQueryManagementFieldComponent extends AbstractFieldReadComponent {
|
|
|
26299
26262
|
}
|
|
26300
26263
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadQueryManagementFieldComponent, [{
|
|
26301
26264
|
type: Component,
|
|
26302
|
-
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" }]
|
|
26303
26266
|
}], () => [{ type: i1$2.ActivatedRoute }, { type: SessionStorageService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
|
|
26304
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 }); })();
|
|
26305
26268
|
|
|
@@ -29609,7 +29572,7 @@ class YesNoService {
|
|
|
29609
29572
|
case 'boolean':
|
|
29610
29573
|
return value;
|
|
29611
29574
|
case 'string':
|
|
29612
|
-
return YesNoService.YES_INPUTS.
|
|
29575
|
+
return YesNoService.YES_INPUTS.includes(value.toUpperCase());
|
|
29613
29576
|
}
|
|
29614
29577
|
return false;
|
|
29615
29578
|
}
|
|
@@ -29619,7 +29582,7 @@ class YesNoService {
|
|
|
29619
29582
|
case 'boolean':
|
|
29620
29583
|
return !value;
|
|
29621
29584
|
case 'string':
|
|
29622
|
-
return YesNoService.NO_INPUTS.
|
|
29585
|
+
return YesNoService.NO_INPUTS.includes(value.toUpperCase());
|
|
29623
29586
|
}
|
|
29624
29587
|
return false;
|
|
29625
29588
|
}
|
|
@@ -29838,7 +29801,7 @@ class PaletteService {
|
|
|
29838
29801
|
if (argumentValue) {
|
|
29839
29802
|
const displayContextParameterArray = argumentValue.includes(',') ? argumentValue.split(',') : [argumentValue];
|
|
29840
29803
|
const componentToRender = displayContextParameterArray.filter(displayContextParameter => {
|
|
29841
|
-
return !Object.values(DisplayContextParameter).
|
|
29804
|
+
return !Object.values(DisplayContextParameter).some(displayContextParameterFromLookup => {
|
|
29842
29805
|
return displayContextParameter === displayContextParameterFromLookup;
|
|
29843
29806
|
});
|
|
29844
29807
|
});
|
|
@@ -29871,7 +29834,7 @@ class FieldReadComponent extends AbstractFieldReadComponent {
|
|
|
29871
29834
|
}
|
|
29872
29835
|
ngOnInit() {
|
|
29873
29836
|
// Ensure all field values are resolved by label interpolation before the component is fully initialised.
|
|
29874
|
-
Promise.resolve(null).then(() => {
|
|
29837
|
+
void Promise.resolve(null).then(() => {
|
|
29875
29838
|
const componentClass = this.paletteService.getFieldComponentClass(this.caseField, false);
|
|
29876
29839
|
const injector = Injector.create({
|
|
29877
29840
|
providers: [],
|
|
@@ -29884,7 +29847,7 @@ class FieldReadComponent extends AbstractFieldReadComponent {
|
|
|
29884
29847
|
// TODO AW 30/12/20 figure out why FixedLists need plainToClassFromExist
|
|
29885
29848
|
// Added a check to make sure it's NOT already a CaseField and then
|
|
29886
29849
|
// assigning it back to this.caseField so we don't create separation.
|
|
29887
|
-
if (FIX_CASEFIELD_FOR$1.
|
|
29850
|
+
if (FIX_CASEFIELD_FOR$1.includes(this.caseField.field_type.type) && !(this.caseField instanceof CaseField)) {
|
|
29888
29851
|
this.caseField = plainToClassFromExist(new CaseField(), this.caseField);
|
|
29889
29852
|
}
|
|
29890
29853
|
component.instance['caseField'] = this.caseField;
|
|
@@ -29960,7 +29923,7 @@ class FieldWriteComponent extends AbstractFieldWriteComponent {
|
|
|
29960
29923
|
// TODO AW 30/12/20 figure out why FixedLists need plainToClassFromExist
|
|
29961
29924
|
// Added a check to make sure it's NOT already a CaseField and then
|
|
29962
29925
|
// assigning it back to this.caseField so we don't create separation.
|
|
29963
|
-
if (FIX_CASEFIELD_FOR.
|
|
29926
|
+
if (FIX_CASEFIELD_FOR.includes(this.caseField.field_type.type) && !(this.caseField instanceof CaseField)) {
|
|
29964
29927
|
this.caseField = plainToClassFromExist(new CaseField(), this.caseField);
|
|
29965
29928
|
}
|
|
29966
29929
|
this.applyInputsToChild();
|
|
@@ -30164,7 +30127,7 @@ class CaseFileViewFolderSelectorComponent {
|
|
|
30164
30127
|
if (evt.target.checked) {
|
|
30165
30128
|
this.select(evt.target.id);
|
|
30166
30129
|
// get level of this checkbox so we can clear all lower levels
|
|
30167
|
-
let level = parseInt(evt.target.name.split('-')[1], 10) + 1;
|
|
30130
|
+
let level = Number.parseInt(evt.target.name.split('-')[1], 10) + 1;
|
|
30168
30131
|
let nodes = document.getElementsByName(`level-${level}`);
|
|
30169
30132
|
while (nodes.length > 0) {
|
|
30170
30133
|
nodes.forEach((node) => node.checked = false);
|
|
@@ -30205,10 +30168,10 @@ class CaseFileViewFolderSelectorComponent {
|
|
|
30205
30168
|
return null;
|
|
30206
30169
|
}
|
|
30207
30170
|
static ɵfac = function CaseFileViewFolderSelectorComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFileViewFolderSelectorComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialogRef), i0.ɵɵdirectiveInject(MAT_DIALOG_DATA)); };
|
|
30208
|
-
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) {
|
|
30209
30172
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
30210
|
-
i0.ɵɵelementStart(0, "
|
|
30211
|
-
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()); });
|
|
30212
30175
|
i0.ɵɵelementEnd();
|
|
30213
30176
|
i0.ɵɵelementStart(1, "h2", 2);
|
|
30214
30177
|
i0.ɵɵtext(2, "Move File");
|
|
@@ -30237,7 +30200,7 @@ class CaseFileViewFolderSelectorComponent {
|
|
|
30237
30200
|
}
|
|
30238
30201
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
|
|
30239
30202
|
type: Component,
|
|
30240
|
-
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"] }]
|
|
30241
30204
|
}], () => [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
|
|
30242
30205
|
type: Inject,
|
|
30243
30206
|
args: [MAT_DIALOG_DATA]
|
|
@@ -30257,7 +30220,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_1_Template(
|
|
|
30257
30220
|
i0.ɵɵadvance(2);
|
|
30258
30221
|
i0.ɵɵtextInterpolate(ctx_r1.title);
|
|
30259
30222
|
} }
|
|
30260
|
-
function
|
|
30223
|
+
function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_img_3_Template(rf, ctx) { if (rf & 1) {
|
|
30261
30224
|
i0.ɵɵelement(0, "img", 10);
|
|
30262
30225
|
} if (rf & 2) {
|
|
30263
30226
|
const item_r4 = i0.ɵɵnextContext().$implicit;
|
|
@@ -30266,16 +30229,16 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_img_2_Tem
|
|
|
30266
30229
|
function CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
30267
30230
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
30268
30231
|
i0.ɵɵelementContainerStart(0);
|
|
30269
|
-
i0.ɵɵelementStart(1, "li", 7);
|
|
30270
|
-
i0.ɵɵlistener("click", function
|
|
30271
|
-
i0.ɵɵtemplate(
|
|
30272
|
-
i0.ɵɵelementStart(
|
|
30273
|
-
i0.ɵɵtext(
|
|
30274
|
-
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()()();
|
|
30275
30238
|
i0.ɵɵelementContainerEnd();
|
|
30276
30239
|
} if (rf & 2) {
|
|
30277
30240
|
const item_r4 = ctx.$implicit;
|
|
30278
|
-
i0.ɵɵadvance(
|
|
30241
|
+
i0.ɵɵadvance(3);
|
|
30279
30242
|
i0.ɵɵproperty("ngIf", item_r4.iconSrc);
|
|
30280
30243
|
i0.ɵɵadvance(2);
|
|
30281
30244
|
i0.ɵɵtextInterpolate(item_r4.actionText);
|
|
@@ -30284,7 +30247,7 @@ function CaseFileViewOverlayMenuComponent_ng_template_4_Template(rf, ctx) { if (
|
|
|
30284
30247
|
i0.ɵɵelementStart(0, "div", 3);
|
|
30285
30248
|
i0.ɵɵtemplate(1, CaseFileViewOverlayMenuComponent_ng_template_4_ng_container_1_Template, 3, 1, "ng-container", 4);
|
|
30286
30249
|
i0.ɵɵelementStart(2, "ul");
|
|
30287
|
-
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);
|
|
30288
30251
|
i0.ɵɵelementEnd()();
|
|
30289
30252
|
} if (rf & 2) {
|
|
30290
30253
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -30315,7 +30278,7 @@ class CaseFileViewOverlayMenuComponent {
|
|
|
30315
30278
|
}
|
|
30316
30279
|
}
|
|
30317
30280
|
static ɵfac = function CaseFileViewOverlayMenuComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFileViewOverlayMenuComponent)(); };
|
|
30318
|
-
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) {
|
|
30319
30282
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
30320
30283
|
i0.ɵɵprojectionDef(_c0$v);
|
|
30321
30284
|
i0.ɵɵelementStart(0, "div")(1, "button", 1, 0);
|
|
@@ -30335,7 +30298,7 @@ class CaseFileViewOverlayMenuComponent {
|
|
|
30335
30298
|
}
|
|
30336
30299
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewOverlayMenuComponent, [{
|
|
30337
30300
|
type: Component,
|
|
30338
|
-
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"] }]
|
|
30339
30302
|
}], null, { title: [{
|
|
30340
30303
|
type: Input
|
|
30341
30304
|
}], menuItems: [{
|
|
@@ -31844,7 +31807,7 @@ class ManageCaseFlagsComponent extends AbstractJourneyComponent {
|
|
|
31844
31807
|
if (this.flagsData) {
|
|
31845
31808
|
this.flagsDisplayData = this.flagsData.reduce((displayData, flagsInstance) => {
|
|
31846
31809
|
/* istanbul ignore else */
|
|
31847
|
-
if (flagsInstance.flags.details
|
|
31810
|
+
if (flagsInstance.flags.details?.length > 0) {
|
|
31848
31811
|
displayData = [
|
|
31849
31812
|
...displayData,
|
|
31850
31813
|
...flagsInstance.flags.details.map((detail) => this.mapFlagDetailForDisplay(detail, flagsInstance, originalStatus, originalIdToFlag))
|
|
@@ -31854,7 +31817,7 @@ class ManageCaseFlagsComponent extends AbstractJourneyComponent {
|
|
|
31854
31817
|
}, []).filter((flagForDisplay) => !this.excludedFlagStatuses.includes(flagForDisplay.originalStatus));
|
|
31855
31818
|
}
|
|
31856
31819
|
// Add a FormControl for the selected case flag if there is at least one flags instance remaining after mapping
|
|
31857
|
-
if (this.flagsDisplayData
|
|
31820
|
+
if (this.flagsDisplayData?.length > 0) {
|
|
31858
31821
|
this.formGroup.addControl(this.selectedControlName, new FormControl(null));
|
|
31859
31822
|
}
|
|
31860
31823
|
else {
|
|
@@ -31950,7 +31913,7 @@ class ManageCaseFlagsComponent extends AbstractJourneyComponent {
|
|
|
31950
31913
|
// CaseField formatted_value from which to get the original persisted data
|
|
31951
31914
|
const pathToValue = flagsInstance.pathToFlagsFormGroup;
|
|
31952
31915
|
// Root-level Flags CaseFields don't have a dot-delimited path - just the CaseField ID itself - so don't drill down
|
|
31953
|
-
if (pathToValue.
|
|
31916
|
+
if (pathToValue.includes('.')) {
|
|
31954
31917
|
pathToValue.slice(pathToValue.indexOf('.') + 1).split('.').forEach((part) => {
|
|
31955
31918
|
if (formattedValue && FieldsUtils.isNonEmptyObject(formattedValue)) {
|
|
31956
31919
|
formattedValue = formattedValue[part];
|
|
@@ -33587,7 +33550,7 @@ class UpdateFlagComponent extends AbstractJourneyComponent {
|
|
|
33587
33550
|
static ɵfac = function UpdateFlagComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UpdateFlagComponent)(i0.ɵɵdirectiveInject(i1.RpxTranslationService), i0.ɵɵdirectiveInject(MultipageComponentStateService)); };
|
|
33588
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) {
|
|
33589
33552
|
i0.ɵɵelementContainerStart(0, 2);
|
|
33590
|
-
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);
|
|
33591
33554
|
i0.ɵɵtext(5);
|
|
33592
33555
|
i0.ɵɵpipe(6, "rpxTranslate");
|
|
33593
33556
|
i0.ɵɵelementEnd()();
|
|
@@ -33630,7 +33593,7 @@ class UpdateFlagComponent extends AbstractJourneyComponent {
|
|
|
33630
33593
|
}
|
|
33631
33594
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UpdateFlagComponent, [{
|
|
33632
33595
|
type: Component,
|
|
33633
|
-
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" }]
|
|
33634
33597
|
}], () => [{ type: i1.RpxTranslationService }, { type: MultipageComponentStateService }], { formGroup: [{
|
|
33635
33598
|
type: Input
|
|
33636
33599
|
}], displayContextParameter: [{
|
|
@@ -33788,7 +33751,7 @@ class UpdateFlagAddTranslationFormComponent extends AbstractJourneyComponent {
|
|
|
33788
33751
|
static ɵfac = /*@__PURE__*/ (() => { let ɵUpdateFlagAddTranslationFormComponent_BaseFactory; return function UpdateFlagAddTranslationFormComponent_Factory(__ngFactoryType__) { return (ɵUpdateFlagAddTranslationFormComponent_BaseFactory || (ɵUpdateFlagAddTranslationFormComponent_BaseFactory = i0.ɵɵgetInheritedFactory(UpdateFlagAddTranslationFormComponent)))(__ngFactoryType__ || UpdateFlagAddTranslationFormComponent); }; })();
|
|
33789
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) {
|
|
33790
33753
|
i0.ɵɵelementContainerStart(0, 0);
|
|
33791
|
-
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);
|
|
33792
33755
|
i0.ɵɵtext(5);
|
|
33793
33756
|
i0.ɵɵpipe(6, "rpxTranslate");
|
|
33794
33757
|
i0.ɵɵelementEnd()();
|
|
@@ -33897,7 +33860,7 @@ class UpdateFlagAddTranslationFormComponent extends AbstractJourneyComponent {
|
|
|
33897
33860
|
}
|
|
33898
33861
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UpdateFlagAddTranslationFormComponent, [{
|
|
33899
33862
|
type: Component,
|
|
33900
|
-
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" }]
|
|
33901
33864
|
}], null, { formGroup: [{
|
|
33902
33865
|
type: Input
|
|
33903
33866
|
}], caseFlagStateEmitter: [{
|
|
@@ -34705,14 +34668,12 @@ class ReadComplexFieldCollectionTableComponent extends AbstractFieldReadComponen
|
|
|
34705
34668
|
if (this.isHidden[row]) {
|
|
34706
34669
|
return 'assets/img/accordion-plus.png';
|
|
34707
34670
|
}
|
|
34671
|
+
else if (this.isVerticleDataNotEmpty(row)) {
|
|
34672
|
+
return 'assets/img/accordion-minus.png';
|
|
34673
|
+
}
|
|
34708
34674
|
else {
|
|
34709
|
-
|
|
34710
|
-
|
|
34711
|
-
}
|
|
34712
|
-
else {
|
|
34713
|
-
this.isHidden[row] = true;
|
|
34714
|
-
return 'assets/img/accordion-plus.png';
|
|
34715
|
-
}
|
|
34675
|
+
this.isHidden[row] = true;
|
|
34676
|
+
return 'assets/img/accordion-plus.png';
|
|
34716
34677
|
}
|
|
34717
34678
|
}
|
|
34718
34679
|
/**
|
|
@@ -35793,11 +35754,11 @@ class ReadFieldsFilterPipe {
|
|
|
35793
35754
|
values = values || {};
|
|
35794
35755
|
const type = field.field_type;
|
|
35795
35756
|
const value = ReadFieldsFilterPipe.getValue(field, values);
|
|
35796
|
-
const hasChildrenWithValue = type.complex_fields.
|
|
35757
|
+
const hasChildrenWithValue = type.complex_fields.some(f => {
|
|
35797
35758
|
const willKeep = ReadFieldsFilterPipe.keepField(f, value, true, checkConditionalShowAgainst);
|
|
35798
35759
|
return willKeep && ReadFieldsFilterPipe.evaluateConditionalShow(f, checkConditionalShowAgainst).hidden !== true;
|
|
35799
35760
|
});
|
|
35800
|
-
return
|
|
35761
|
+
return hasChildrenWithValue;
|
|
35801
35762
|
}
|
|
35802
35763
|
static isValidCollection(field, values, checkConditionalShowAgainst) {
|
|
35803
35764
|
// if field is collection and it has complex/collection child field; parent field doesnt have value defined
|
|
@@ -35806,7 +35767,7 @@ class ReadFieldsFilterPipe {
|
|
|
35806
35767
|
}
|
|
35807
35768
|
const isNotEmpty = Array.isArray(field.value) && field.value.length > 0;
|
|
35808
35769
|
if (isNotEmpty && field.field_type.collection_field_type.type === 'Complex') {
|
|
35809
|
-
return
|
|
35770
|
+
return field.value.some(item => {
|
|
35810
35771
|
const complexField = plainToClassFromExist(new CaseField(), {
|
|
35811
35772
|
id: field.field_type.collection_field_type.id,
|
|
35812
35773
|
field_type: field.field_type.collection_field_type,
|
|
@@ -35820,7 +35781,7 @@ class ReadFieldsFilterPipe {
|
|
|
35820
35781
|
}
|
|
35821
35782
|
static isEmpty(value) {
|
|
35822
35783
|
const fieldValue = value?.hasOwnProperty('list_items') && value?.hasOwnProperty('value') ? value.value : value;
|
|
35823
|
-
return ReadFieldsFilterPipe.EMPTY_VALUES.
|
|
35784
|
+
return ReadFieldsFilterPipe.EMPTY_VALUES.includes(fieldValue)
|
|
35824
35785
|
|| fieldValue.length === 0;
|
|
35825
35786
|
}
|
|
35826
35787
|
static isCompound(field) {
|
|
@@ -35931,7 +35892,7 @@ class ReadFieldsFilterPipe {
|
|
|
35931
35892
|
return true;
|
|
35932
35893
|
}
|
|
35933
35894
|
// We also shouldn't ditch fields that will always come back with a null value.
|
|
35934
|
-
if (this.ALWAYS_NULL_FIELDS.
|
|
35895
|
+
if (this.ALWAYS_NULL_FIELDS.includes(field.field_type.type)) {
|
|
35935
35896
|
return true;
|
|
35936
35897
|
}
|
|
35937
35898
|
value = value || {};
|
|
@@ -35960,7 +35921,7 @@ class ReadFieldsFilterPipe {
|
|
|
35960
35921
|
}
|
|
35961
35922
|
else if (field.show_condition) {
|
|
35962
35923
|
let cond;
|
|
35963
|
-
if (fieldId && field.show_condition.
|
|
35924
|
+
if (fieldId && field.show_condition.includes(`${fieldId}.`) && !formGroupAvailable && !!Object.keys(formValue).length) {
|
|
35964
35925
|
const search = `/.*${fieldId}./`;
|
|
35965
35926
|
const searchRegExp = new RegExp(search, 'g');
|
|
35966
35927
|
const replaceWith = '';
|
|
@@ -36043,7 +36004,7 @@ class CcdPageFieldsPipe {
|
|
|
36043
36004
|
const control = dataFormGroup.controls['data'].get(key);
|
|
36044
36005
|
return control['caseField'];
|
|
36045
36006
|
}).filter(field => {
|
|
36046
|
-
return field &&
|
|
36007
|
+
return field && page.case_fields.some(pcf => pcf.id === field.id);
|
|
36047
36008
|
}).sort((a, b) => a.order - b.order);
|
|
36048
36009
|
const rawValue = dataFormGroup.value;
|
|
36049
36010
|
const value = page.case_fields.reduce((acc, field) => {
|
|
@@ -36587,9 +36548,9 @@ class FormModule {
|
|
|
36587
36548
|
class CollectionCreateCheckerService {
|
|
36588
36549
|
setDisplayContextForChildren(caseField, profile) {
|
|
36589
36550
|
const children = this.getCaseFieldChildren(caseField);
|
|
36590
|
-
if (children
|
|
36551
|
+
if (children?.length > 0) {
|
|
36591
36552
|
children.forEach(child => {
|
|
36592
|
-
if (
|
|
36553
|
+
if (profile.user.idam.roles.some(role => this.hasCreateAccess(child, role))) {
|
|
36593
36554
|
child.display_context = caseField.display_context;
|
|
36594
36555
|
}
|
|
36595
36556
|
if (this.isCollection(child) || this.isComplex(child)) {
|
|
@@ -36615,7 +36576,7 @@ class CollectionCreateCheckerService {
|
|
|
36615
36576
|
return caseField.field_type.type === 'Collection';
|
|
36616
36577
|
}
|
|
36617
36578
|
hasCreateAccess(caseField, role) {
|
|
36618
|
-
return
|
|
36579
|
+
return caseField.acls.some(acl => acl.role === role && acl.create === true);
|
|
36619
36580
|
}
|
|
36620
36581
|
static ɵfac = function CollectionCreateCheckerService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CollectionCreateCheckerService)(); };
|
|
36621
36582
|
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CollectionCreateCheckerService, factory: CollectionCreateCheckerService.ɵfac });
|
|
@@ -37823,7 +37784,7 @@ class CaseEditSubmitComponent {
|
|
|
37823
37784
|
return this.caseEdit?.error?.callbackErrors?.length;
|
|
37824
37785
|
}
|
|
37825
37786
|
navigateToPage(pageId) {
|
|
37826
|
-
this.caseEdit.navigateToPage(pageId);
|
|
37787
|
+
void this.caseEdit.navigateToPage(pageId);
|
|
37827
37788
|
}
|
|
37828
37789
|
callbackErrorsNotify(errorContext) {
|
|
37829
37790
|
this.caseEdit.ignoreWarning = errorContext.ignoreWarning;
|
|
@@ -38167,20 +38128,20 @@ class LoadingSpinnerModule {
|
|
|
38167
38128
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(LoadingSpinnerModule, { declarations: [LoadingSpinnerComponent], imports: [CommonModule, i1.RpxTranslationModule], exports: [LoadingSpinnerComponent] }); })();
|
|
38168
38129
|
|
|
38169
38130
|
function CaseEditGenericErrorsComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
38170
|
-
i0.ɵɵelementStart(0, "div",
|
|
38131
|
+
i0.ɵɵelementStart(0, "div", 2)(1, "h1", 3);
|
|
38171
38132
|
i0.ɵɵtext(2, " Something went wrong ");
|
|
38172
38133
|
i0.ɵɵelementEnd();
|
|
38173
|
-
i0.ɵɵelementStart(3, "div",
|
|
38134
|
+
i0.ɵɵelementStart(3, "div", 4)(4, "p");
|
|
38174
38135
|
i0.ɵɵtext(5, "We're working to fix the problem. Try again shortly.");
|
|
38175
38136
|
i0.ɵɵelementEnd();
|
|
38176
|
-
i0.ɵɵelementStart(6, "p")(7, "a",
|
|
38137
|
+
i0.ɵɵelementStart(6, "p")(7, "a", 5);
|
|
38177
38138
|
i0.ɵɵtext(8, "Contact us");
|
|
38178
38139
|
i0.ɵɵelementEnd();
|
|
38179
38140
|
i0.ɵɵtext(9, " if you're still having problems.");
|
|
38180
38141
|
i0.ɵɵelementEnd()()();
|
|
38181
38142
|
} }
|
|
38182
38143
|
function CaseEditGenericErrorsComponent_div_1_ul_5_li_1_Template(rf, ctx) { if (rf & 1) {
|
|
38183
|
-
i0.ɵɵelementStart(0, "li",
|
|
38144
|
+
i0.ɵɵelementStart(0, "li", 11);
|
|
38184
38145
|
i0.ɵɵtext(1);
|
|
38185
38146
|
i0.ɵɵelementEnd();
|
|
38186
38147
|
} if (rf & 2) {
|
|
@@ -38189,8 +38150,8 @@ function CaseEditGenericErrorsComponent_div_1_ul_5_li_1_Template(rf, ctx) { if (
|
|
|
38189
38150
|
i0.ɵɵtextInterpolate(fieldError_r1.message);
|
|
38190
38151
|
} }
|
|
38191
38152
|
function CaseEditGenericErrorsComponent_div_1_ul_5_Template(rf, ctx) { if (rf & 1) {
|
|
38192
|
-
i0.ɵɵelementStart(0, "ul",
|
|
38193
|
-
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);
|
|
38194
38155
|
i0.ɵɵelementEnd();
|
|
38195
38156
|
} if (rf & 2) {
|
|
38196
38157
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -38198,13 +38159,13 @@ function CaseEditGenericErrorsComponent_div_1_ul_5_Template(rf, ctx) { if (rf &
|
|
|
38198
38159
|
i0.ɵɵproperty("ngForOf", ctx_r1.error.details.field_errors);
|
|
38199
38160
|
} }
|
|
38200
38161
|
function CaseEditGenericErrorsComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
38201
|
-
i0.ɵɵelementStart(0, "div",
|
|
38162
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "h3", 7);
|
|
38202
38163
|
i0.ɵɵtext(2, " The event could not be created ");
|
|
38203
38164
|
i0.ɵɵelementEnd();
|
|
38204
38165
|
i0.ɵɵelementStart(3, "p");
|
|
38205
38166
|
i0.ɵɵtext(4);
|
|
38206
38167
|
i0.ɵɵelementEnd();
|
|
38207
|
-
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);
|
|
38208
38169
|
i0.ɵɵelementEnd();
|
|
38209
38170
|
} if (rf & 2) {
|
|
38210
38171
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -38216,8 +38177,8 @@ function CaseEditGenericErrorsComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
38216
38177
|
class CaseEditGenericErrorsComponent {
|
|
38217
38178
|
error;
|
|
38218
38179
|
static ɵfac = function CaseEditGenericErrorsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseEditGenericErrorsComponent)(); };
|
|
38219
|
-
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-
|
|
38220
|
-
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);
|
|
38221
38182
|
} if (rf & 2) {
|
|
38222
38183
|
i0.ɵɵproperty("ngIf", ctx.error && (!(ctx.error.callbackErrors || ctx.error.callbackWarnings || ctx.error.details) && !ctx.error.message));
|
|
38223
38184
|
i0.ɵɵadvance();
|
|
@@ -38226,7 +38187,7 @@ class CaseEditGenericErrorsComponent {
|
|
|
38226
38187
|
}
|
|
38227
38188
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditGenericErrorsComponent, [{
|
|
38228
38189
|
type: Component,
|
|
38229
|
-
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"] }]
|
|
38230
38191
|
}], null, { error: [{
|
|
38231
38192
|
type: Input
|
|
38232
38193
|
}] }); })();
|
|
@@ -38767,14 +38728,13 @@ function CaseListComponent_td_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
38767
38728
|
i0.ɵɵelementStart(0, "td", 8)(1, "div", 9)(2, "input", 10);
|
|
38768
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()); });
|
|
38769
38730
|
i0.ɵɵelementEnd();
|
|
38770
|
-
i0.ɵɵ
|
|
38771
|
-
i0.ɵɵ
|
|
38731
|
+
i0.ɵɵelementStart(3, "label", 11);
|
|
38732
|
+
i0.ɵɵtext(4, " Select all cases ");
|
|
38733
|
+
i0.ɵɵelementEnd()()();
|
|
38772
38734
|
} if (rf & 2) {
|
|
38773
38735
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
38774
38736
|
i0.ɵɵadvance(2);
|
|
38775
38737
|
i0.ɵɵproperty("checked", ctx_r1.allOnPageSelected())("disabled", !ctx_r1.canAnyBeShared());
|
|
38776
|
-
i0.ɵɵadvance();
|
|
38777
|
-
i0.ɵɵattribute("aria-labelledby", "select-all");
|
|
38778
38738
|
} }
|
|
38779
38739
|
function CaseListComponent_th_7_Template(rf, ctx) { if (rf & 1) {
|
|
38780
38740
|
i0.ɵɵelementStart(0, "th", 12);
|
|
@@ -38791,8 +38751,9 @@ function CaseListComponent_ng_container_9_td_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
38791
38751
|
i0.ɵɵelementStart(0, "td", 15)(1, "div", 9)(2, "input", 16);
|
|
38792
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)); });
|
|
38793
38753
|
i0.ɵɵelementEnd();
|
|
38794
|
-
i0.ɵɵ
|
|
38795
|
-
i0.ɵɵ
|
|
38754
|
+
i0.ɵɵelementStart(3, "label", 17);
|
|
38755
|
+
i0.ɵɵtext(4);
|
|
38756
|
+
i0.ɵɵelementEnd()()();
|
|
38796
38757
|
} if (rf & 2) {
|
|
38797
38758
|
const ctx_r5 = i0.ɵɵnextContext();
|
|
38798
38759
|
const c_r5 = ctx_r5.$implicit;
|
|
@@ -38802,7 +38763,8 @@ function CaseListComponent_ng_container_9_td_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
38802
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));
|
|
38803
38764
|
i0.ɵɵadvance();
|
|
38804
38765
|
i0.ɵɵproperty("for", i0.ɵɵinterpolate1("select-", c_r5[ctx_r1.tableConfig.idField] || i_r7));
|
|
38805
|
-
i0.ɵɵ
|
|
38766
|
+
i0.ɵɵadvance();
|
|
38767
|
+
i0.ɵɵtextInterpolate1(" Select case ", c_r5[ctx_r1.tableConfig.idField] || i_r7, " ");
|
|
38806
38768
|
} }
|
|
38807
38769
|
function CaseListComponent_ng_container_9_ng_container_3_th_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
38808
38770
|
i0.ɵɵelementContainerStart(0);
|
|
@@ -38933,7 +38895,7 @@ function CaseListComponent_ng_container_9_ng_container_3_Template(rf, ctx) { if
|
|
|
38933
38895
|
function CaseListComponent_ng_container_9_Template(rf, ctx) { if (rf & 1) {
|
|
38934
38896
|
i0.ɵɵelementContainerStart(0);
|
|
38935
38897
|
i0.ɵɵelementStart(1, "tr", 13);
|
|
38936
|
-
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);
|
|
38937
38899
|
i0.ɵɵelementEnd();
|
|
38938
38900
|
i0.ɵɵelementContainerEnd();
|
|
38939
38901
|
} if (rf & 2) {
|
|
@@ -39014,10 +38976,8 @@ class CaseListComponent {
|
|
|
39014
38976
|
}
|
|
39015
38977
|
});
|
|
39016
38978
|
}
|
|
39017
|
-
else {
|
|
39018
|
-
|
|
39019
|
-
this.selectedCases = [...this.selectedCases, aCase];
|
|
39020
|
-
}
|
|
38979
|
+
else if (this.canBeShared(aCase)) {
|
|
38980
|
+
this.selectedCases = [...this.selectedCases, aCase];
|
|
39021
38981
|
}
|
|
39022
38982
|
this.selection.emit(this.selectedCases);
|
|
39023
38983
|
}
|
|
@@ -39046,13 +39006,13 @@ class CaseListComponent {
|
|
|
39046
39006
|
this.pageChange.emit(pageNumber);
|
|
39047
39007
|
}
|
|
39048
39008
|
static ɵfac = function CaseListComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseListComponent)(i0.ɵɵdirectiveInject(BrowserService)); };
|
|
39049
|
-
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) {
|
|
39050
39010
|
i0.ɵɵelementStart(0, "table")(1, "caption", 0);
|
|
39051
39011
|
i0.ɵɵtext(2);
|
|
39052
39012
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
39053
39013
|
i0.ɵɵelementEnd();
|
|
39054
39014
|
i0.ɵɵelementStart(4, "thead", 1)(5, "tr", 2);
|
|
39055
|
-
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);
|
|
39056
39016
|
i0.ɵɵelementEnd()();
|
|
39057
39017
|
i0.ɵɵelementStart(8, "tbody", 5);
|
|
39058
39018
|
i0.ɵɵtemplate(9, CaseListComponent_ng_container_9_Template, 4, 2, "ng-container", 6);
|
|
@@ -39075,7 +39035,7 @@ class CaseListComponent {
|
|
|
39075
39035
|
}
|
|
39076
39036
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseListComponent, [{
|
|
39077
39037
|
type: Component,
|
|
39078
|
-
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" }]
|
|
39079
39039
|
}], () => [{ type: BrowserService }], { classes: [{
|
|
39080
39040
|
type: Input
|
|
39081
39041
|
}], caption: [{
|
|
@@ -40429,22 +40389,20 @@ class CaseResolver {
|
|
|
40429
40389
|
}
|
|
40430
40390
|
isTabViewRoute(route) {
|
|
40431
40391
|
// is route case/:jid/:ctid/:cid#fragment
|
|
40432
|
-
return route.firstChild
|
|
40392
|
+
return route.firstChild?.fragment;
|
|
40433
40393
|
}
|
|
40434
40394
|
getAndCacheCaseView(cid) {
|
|
40435
40395
|
if (this.caseNotifier.cachedCaseView && this.caseNotifier.cachedCaseView.case_id && this.caseNotifier.cachedCaseView.case_id === cid) {
|
|
40436
40396
|
this.caseNotifier.announceCase(this.caseNotifier.cachedCaseView);
|
|
40437
40397
|
return of(this.caseNotifier.cachedCaseView).toPromise();
|
|
40438
40398
|
}
|
|
40399
|
+
else if (Draft.isDraft(cid)) {
|
|
40400
|
+
return this.getAndCacheDraft(cid);
|
|
40401
|
+
}
|
|
40439
40402
|
else {
|
|
40440
|
-
|
|
40441
|
-
|
|
40442
|
-
|
|
40443
|
-
else {
|
|
40444
|
-
return this.caseNotifier.fetchAndRefresh(cid)
|
|
40445
|
-
.pipe(catchError(error => this.processErrorInCaseFetch(error, cid)))
|
|
40446
|
-
.toPromise();
|
|
40447
|
-
}
|
|
40403
|
+
return this.caseNotifier.fetchAndRefresh(cid)
|
|
40404
|
+
.pipe(catchError(error => this.processErrorInCaseFetch(error, cid)))
|
|
40405
|
+
.toPromise();
|
|
40448
40406
|
}
|
|
40449
40407
|
}
|
|
40450
40408
|
getAndCacheDraft(cid) {
|
|
@@ -40582,7 +40540,7 @@ class EventTriggerResolver {
|
|
|
40582
40540
|
const caseType = route.parent.paramMap.get('caseType');
|
|
40583
40541
|
const eventTriggerId = route.paramMap.get(EventTriggerResolver.PARAM_EVENT_ID);
|
|
40584
40542
|
let ignoreWarning = route.queryParamMap.get(EventTriggerResolver.IGNORE_WARNING);
|
|
40585
|
-
if (
|
|
40543
|
+
if (!EventTriggerResolver.IGNORE_WARNING_VALUES.includes(ignoreWarning)) {
|
|
40586
40544
|
ignoreWarning = 'false';
|
|
40587
40545
|
}
|
|
40588
40546
|
const profile$ = this.profileService.get().pipe(tap(profile => this.profileNotifier.announceProfile(profile)));
|
|
@@ -40750,7 +40708,7 @@ class CaseEventTriggerComponent {
|
|
|
40750
40708
|
let previousUrl = this.routerCurrentNavigation?.previousNavigation?.finalUrl?.toString();
|
|
40751
40709
|
if (previousUrl) {
|
|
40752
40710
|
previousUrl = this.getNavigationUrl(previousUrl);
|
|
40753
|
-
if (previousUrl.
|
|
40711
|
+
if (previousUrl.includes('#')) {
|
|
40754
40712
|
const url = previousUrl.split('#')[0];
|
|
40755
40713
|
const fragment = previousUrl.split('#')[1].replace(/%20/g, ' ');
|
|
40756
40714
|
return this.router.navigate([url], { fragment: fragment });
|
|
@@ -41206,15 +41164,15 @@ class DialogsModule {
|
|
|
41206
41164
|
const _c0$c = ["tabGroup"];
|
|
41207
41165
|
const _c1$3 = (a0, a1) => [a0, false, undefined, true, a1];
|
|
41208
41166
|
function CaseFullAccessViewComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
41209
|
-
i0.ɵɵelementStart(0, "div",
|
|
41167
|
+
i0.ɵɵelementStart(0, "div", 13)(1, "h1", 14);
|
|
41210
41168
|
i0.ɵɵtext(2);
|
|
41211
41169
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
41212
41170
|
i0.ɵɵelementEnd();
|
|
41213
|
-
i0.ɵɵelementStart(4, "div",
|
|
41171
|
+
i0.ɵɵelementStart(4, "div", 15)(5, "p");
|
|
41214
41172
|
i0.ɵɵtext(6);
|
|
41215
41173
|
i0.ɵɵpipe(7, "rpxTranslate");
|
|
41216
41174
|
i0.ɵɵelementEnd();
|
|
41217
|
-
i0.ɵɵelementStart(8, "p")(9, "a",
|
|
41175
|
+
i0.ɵɵelementStart(8, "p")(9, "a", 16);
|
|
41218
41176
|
i0.ɵɵtext(10);
|
|
41219
41177
|
i0.ɵɵpipe(11, "rpxTranslate");
|
|
41220
41178
|
i0.ɵɵelementEnd();
|
|
@@ -41242,8 +41200,8 @@ function CaseFullAccessViewComponent_div_1_ul_7_li_1_Template(rf, ctx) { if (rf
|
|
|
41242
41200
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, fieldError_r1.message), " ");
|
|
41243
41201
|
} }
|
|
41244
41202
|
function CaseFullAccessViewComponent_div_1_ul_7_Template(rf, ctx) { if (rf & 1) {
|
|
41245
|
-
i0.ɵɵelementStart(0, "ul",
|
|
41246
|
-
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);
|
|
41247
41205
|
i0.ɵɵelementEnd();
|
|
41248
41206
|
} if (rf & 2) {
|
|
41249
41207
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -41251,7 +41209,7 @@ function CaseFullAccessViewComponent_div_1_ul_7_Template(rf, ctx) { if (rf & 1)
|
|
|
41251
41209
|
i0.ɵɵproperty("ngForOf", ctx_r1.error.details.field_errors);
|
|
41252
41210
|
} }
|
|
41253
41211
|
function CaseFullAccessViewComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
41254
|
-
i0.ɵɵelementStart(0, "div",
|
|
41212
|
+
i0.ɵɵelementStart(0, "div", 17)(1, "h2", 18);
|
|
41255
41213
|
i0.ɵɵtext(2);
|
|
41256
41214
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
41257
41215
|
i0.ɵɵelementEnd();
|
|
@@ -41259,7 +41217,7 @@ function CaseFullAccessViewComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
41259
41217
|
i0.ɵɵtext(5);
|
|
41260
41218
|
i0.ɵɵpipe(6, "rpxTranslate");
|
|
41261
41219
|
i0.ɵɵelementEnd();
|
|
41262
|
-
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);
|
|
41263
41221
|
i0.ɵɵelementEnd();
|
|
41264
41222
|
} if (rf & 2) {
|
|
41265
41223
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -41271,7 +41229,7 @@ function CaseFullAccessViewComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
41271
41229
|
i0.ɵɵproperty("ngIf", ctx_r1.error.details == null ? null : ctx_r1.error.details.field_errors);
|
|
41272
41230
|
} }
|
|
41273
41231
|
function CaseFullAccessViewComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
41274
|
-
i0.ɵɵelementStart(0, "div",
|
|
41232
|
+
i0.ɵɵelementStart(0, "div", 22)(1, "a", 23);
|
|
41275
41233
|
i0.ɵɵtext(2);
|
|
41276
41234
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
41277
41235
|
i0.ɵɵelementEnd()();
|
|
@@ -41281,7 +41239,7 @@ function CaseFullAccessViewComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
41281
41239
|
} }
|
|
41282
41240
|
function CaseFullAccessViewComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
41283
41241
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
41284
|
-
i0.ɵɵelementStart(0, "div",
|
|
41242
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "ccd-event-trigger", 24);
|
|
41285
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)); });
|
|
41286
41244
|
i0.ɵɵelementEnd()();
|
|
41287
41245
|
} if (rf & 2) {
|
|
@@ -41291,7 +41249,7 @@ function CaseFullAccessViewComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
41291
41249
|
} }
|
|
41292
41250
|
function CaseFullAccessViewComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
41293
41251
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
41294
|
-
i0.ɵɵelementStart(0, "div",
|
|
41252
|
+
i0.ɵɵelementStart(0, "div", 5)(1, "div", 11)(2, "ccd-notification-banner", 25);
|
|
41295
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)); });
|
|
41296
41254
|
i0.ɵɵelementEnd()()();
|
|
41297
41255
|
} if (rf & 2) {
|
|
@@ -41310,7 +41268,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_ng_
|
|
|
41310
41268
|
i0.ɵɵelementContainerEnd();
|
|
41311
41269
|
} }
|
|
41312
41270
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
41313
|
-
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);
|
|
41314
41272
|
} if (rf & 2) {
|
|
41315
41273
|
const tab_r6 = i0.ɵɵnextContext().$implicit;
|
|
41316
41274
|
i0.ɵɵproperty("ngIf", tab_r6.id === "tasks");
|
|
@@ -41318,9 +41276,9 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_ng_template_2_Tem
|
|
|
41318
41276
|
i0.ɵɵproperty("ngIf", tab_r6.id === "roles-and-access");
|
|
41319
41277
|
} }
|
|
41320
41278
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template(rf, ctx) { if (rf & 1) {
|
|
41321
|
-
i0.ɵɵelementStart(0, "mat-tab",
|
|
41279
|
+
i0.ɵɵelementStart(0, "mat-tab", 29);
|
|
41322
41280
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
41323
|
-
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);
|
|
41324
41282
|
i0.ɵɵelementEnd();
|
|
41325
41283
|
} if (rf & 2) {
|
|
41326
41284
|
const tab_r6 = ctx.$implicit;
|
|
@@ -41328,7 +41286,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_3_Template(rf, ctx)
|
|
|
41328
41286
|
i0.ɵɵattribute("data-case-tab-id", tab_r6.id);
|
|
41329
41287
|
} }
|
|
41330
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) {
|
|
41331
|
-
i0.ɵɵelementStart(0, "th",
|
|
41289
|
+
i0.ɵɵelementStart(0, "th", 40)(1, "div", 41);
|
|
41332
41290
|
i0.ɵɵtext(2);
|
|
41333
41291
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
41334
41292
|
i0.ɵɵelementEnd()();
|
|
@@ -41340,9 +41298,9 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_
|
|
|
41340
41298
|
} }
|
|
41341
41299
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_Template(rf, ctx) { if (rf & 1) {
|
|
41342
41300
|
i0.ɵɵelementStart(0, "tr");
|
|
41343
|
-
i0.ɵɵtemplate(1, CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_4_th_1_Template, 4, 4, "th",
|
|
41344
|
-
i0.ɵɵelementStart(2, "td",
|
|
41345
|
-
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);
|
|
41346
41304
|
i0.ɵɵelementEnd()()();
|
|
41347
41305
|
} if (rf & 2) {
|
|
41348
41306
|
const field_r7 = i0.ɵɵnextContext().$implicit;
|
|
@@ -41355,10 +41313,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_
|
|
|
41355
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);
|
|
41356
41314
|
} }
|
|
41357
41315
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_tr_5_Template(rf, ctx) { if (rf & 1) {
|
|
41358
|
-
i0.ɵɵelementStart(0, "tr",
|
|
41316
|
+
i0.ɵɵelementStart(0, "tr", 42)(1, "td", 43);
|
|
41359
41317
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
41360
|
-
i0.ɵɵelementStart(3, "span",
|
|
41361
|
-
i0.ɵɵelement(4, "ccd-field-read",
|
|
41318
|
+
i0.ɵɵelementStart(3, "span", 38);
|
|
41319
|
+
i0.ɵɵelement(4, "ccd-field-read", 39);
|
|
41362
41320
|
i0.ɵɵelementEnd()()();
|
|
41363
41321
|
} if (rf & 2) {
|
|
41364
41322
|
const field_r7 = i0.ɵɵnextContext().$implicit;
|
|
@@ -41371,10 +41329,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_
|
|
|
41371
41329
|
} }
|
|
41372
41330
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
41373
41331
|
i0.ɵɵelementContainerStart(0);
|
|
41374
|
-
i0.ɵɵelementStart(1, "div",
|
|
41375
|
-
i0.ɵɵelementContainerStart(2,
|
|
41332
|
+
i0.ɵɵelementStart(1, "div", 32);
|
|
41333
|
+
i0.ɵɵelementContainerStart(2, 33);
|
|
41376
41334
|
i0.ɵɵpipe(3, "ccdIsCompound");
|
|
41377
|
-
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);
|
|
41378
41336
|
i0.ɵɵelementContainerEnd();
|
|
41379
41337
|
i0.ɵɵelementEnd();
|
|
41380
41338
|
i0.ɵɵelementContainerEnd();
|
|
@@ -41394,7 +41352,7 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_Tem
|
|
|
41394
41352
|
i0.ɵɵelementStart(0, "table");
|
|
41395
41353
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
41396
41354
|
i0.ɵɵelementStart(2, "tbody");
|
|
41397
|
-
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);
|
|
41398
41356
|
i0.ɵɵpipe(4, "ccdTabFields");
|
|
41399
41357
|
i0.ɵɵpipe(5, "ccdReadFieldsFilter");
|
|
41400
41358
|
i0.ɵɵelementEnd()();
|
|
@@ -41407,10 +41365,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_ng_template_3_Tem
|
|
|
41407
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"])));
|
|
41408
41366
|
} }
|
|
41409
41367
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_4_Template(rf, ctx) { if (rf & 1) {
|
|
41410
|
-
i0.ɵɵelementStart(0, "mat-tab",
|
|
41368
|
+
i0.ɵɵelementStart(0, "mat-tab", 31);
|
|
41411
41369
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
41412
41370
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
41413
|
-
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);
|
|
41414
41372
|
i0.ɵɵelementEnd();
|
|
41415
41373
|
} if (rf & 2) {
|
|
41416
41374
|
const tab_r8 = ctx.$implicit;
|
|
@@ -41425,15 +41383,15 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_ng_
|
|
|
41425
41383
|
i0.ɵɵelementContainerEnd();
|
|
41426
41384
|
} }
|
|
41427
41385
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
41428
|
-
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);
|
|
41429
41387
|
} if (rf & 2) {
|
|
41430
41388
|
const tab_r10 = i0.ɵɵnextContext().$implicit;
|
|
41431
41389
|
i0.ɵɵproperty("ngIf", tab_r10.id === "hearings");
|
|
41432
41390
|
} }
|
|
41433
41391
|
function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template(rf, ctx) { if (rf & 1) {
|
|
41434
|
-
i0.ɵɵelementStart(0, "mat-tab",
|
|
41392
|
+
i0.ɵɵelementStart(0, "mat-tab", 29);
|
|
41435
41393
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
41436
|
-
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);
|
|
41437
41395
|
i0.ɵɵelementEnd();
|
|
41438
41396
|
} if (rf & 2) {
|
|
41439
41397
|
const tab_r10 = ctx.$implicit;
|
|
@@ -41443,10 +41401,10 @@ function CaseFullAccessViewComponent_ng_container_12_mat_tab_5_Template(rf, ctx)
|
|
|
41443
41401
|
function CaseFullAccessViewComponent_ng_container_12_Template(rf, ctx) { if (rf & 1) {
|
|
41444
41402
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
41445
41403
|
i0.ɵɵelementContainerStart(0);
|
|
41446
|
-
i0.ɵɵelementStart(1, "mat-tab-group",
|
|
41404
|
+
i0.ɵɵelementStart(1, "mat-tab-group", 26, 0);
|
|
41447
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)); });
|
|
41448
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); });
|
|
41449
|
-
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);
|
|
41450
41408
|
i0.ɵɵelementEnd();
|
|
41451
41409
|
i0.ɵɵelementContainerEnd();
|
|
41452
41410
|
} if (rf & 2) {
|
|
@@ -41919,21 +41877,21 @@ class CaseFullAccessViewComponent {
|
|
|
41919
41877
|
} if (rf & 2) {
|
|
41920
41878
|
let _t;
|
|
41921
41879
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabGroup = _t.first);
|
|
41922
|
-
} }, 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-
|
|
41923
|
-
i0.ɵɵtemplate(0, CaseFullAccessViewComponent_div_0_Template, 14, 12, "div", 1)(1, CaseFullAccessViewComponent_div_1_Template, 8, 7, "div",
|
|
41924
|
-
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);
|
|
41925
41883
|
i0.ɵɵlistener("callbackErrorsContext", function CaseFullAccessViewComponent_Template_ccd_callback_errors_callbackErrorsContext_2_listener($event) { return ctx.callbackErrorsNotify($event); });
|
|
41926
41884
|
i0.ɵɵelementEnd();
|
|
41927
|
-
i0.ɵɵelement(3, "ccd-activity",
|
|
41928
|
-
i0.ɵɵelementStart(4, "div",
|
|
41929
|
-
i0.ɵɵelement(6, "ccd-case-header",
|
|
41930
|
-
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);
|
|
41931
41889
|
i0.ɵɵelementEnd();
|
|
41932
|
-
i0.ɵɵtemplate(8, CaseFullAccessViewComponent_div_8_Template, 2, 4, "div",
|
|
41890
|
+
i0.ɵɵtemplate(8, CaseFullAccessViewComponent_div_8_Template, 2, 4, "div", 9);
|
|
41933
41891
|
i0.ɵɵelementEnd();
|
|
41934
|
-
i0.ɵɵtemplate(9, CaseFullAccessViewComponent_div_9_Template, 3, 1, "div",
|
|
41935
|
-
i0.ɵɵelementStart(10, "div",
|
|
41936
|
-
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);
|
|
41937
41895
|
i0.ɵɵelementEnd()();
|
|
41938
41896
|
} if (rf & 2) {
|
|
41939
41897
|
i0.ɵɵproperty("ngIf", ctx.error && !(ctx.error.callbackErrors || ctx.error.callbackWarnings || ctx.error.details));
|
|
@@ -41957,7 +41915,7 @@ class CaseFullAccessViewComponent {
|
|
|
41957
41915
|
}
|
|
41958
41916
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFullAccessViewComponent, [{
|
|
41959
41917
|
type: Component,
|
|
41960
|
-
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"] }]
|
|
41961
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: [{
|
|
41962
41920
|
type: Input
|
|
41963
41921
|
}], hasEventSelector: [{
|
|
@@ -42000,8 +41958,8 @@ class PrintUrlPipe {
|
|
|
42000
41958
|
* the rendering engine, "Trident" (used to identify IE 11 because it no longer reports as "MSIE").
|
|
42001
41959
|
* Note: IE does not support the URL interface and requires a workaround to parse URLs.
|
|
42002
41960
|
*/
|
|
42003
|
-
if (navigator.userAgent.
|
|
42004
|
-
navigator.userAgent.
|
|
41961
|
+
if (navigator.userAgent.includes(PrintUrlPipe.MSIE_BROWSER_NAME) ||
|
|
41962
|
+
navigator.userAgent.includes(PrintUrlPipe.IE11_BROWSER_ENGINE)) {
|
|
42005
41963
|
// Workaround for not being able to use the URL interface
|
|
42006
41964
|
const urlParser = document.createElement('a');
|
|
42007
41965
|
urlParser.href = remoteUrl;
|
|
@@ -42217,7 +42175,7 @@ class CaseViewerComponent {
|
|
|
42217
42175
|
return !!this.caseDetails;
|
|
42218
42176
|
}
|
|
42219
42177
|
hasStandardAccess() {
|
|
42220
|
-
return !this.accessGranted ? CaseViewerComponent.NON_STANDARD_USER_ACCESS_TYPES.
|
|
42178
|
+
return !this.accessGranted ? !CaseViewerComponent.NON_STANDARD_USER_ACCESS_TYPES.includes(this.userAccessType) : true;
|
|
42221
42179
|
}
|
|
42222
42180
|
suffixDuplicateTabs(tabs) {
|
|
42223
42181
|
const count = {};
|
|
@@ -43509,7 +43467,7 @@ function CaseChallengedAccessRequestComponent_div_24_Template(rf, ctx) { if (rf
|
|
|
43509
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);
|
|
43510
43468
|
} }
|
|
43511
43469
|
function CaseChallengedAccessRequestComponent_div_40_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
43512
|
-
i0.ɵɵelementStart(0, "div",
|
|
43470
|
+
i0.ɵɵelementStart(0, "div", 36);
|
|
43513
43471
|
i0.ɵɵtext(1);
|
|
43514
43472
|
i0.ɵɵpipe(2, "rpxTranslate");
|
|
43515
43473
|
i0.ɵɵelementEnd();
|
|
@@ -43521,19 +43479,25 @@ function CaseChallengedAccessRequestComponent_div_40_div_2_Template(rf, ctx) { i
|
|
|
43521
43479
|
function CaseChallengedAccessRequestComponent_div_40_Template(rf, ctx) { if (rf & 1) {
|
|
43522
43480
|
i0.ɵɵelementStart(0, "div", 32)(1, "div", 3);
|
|
43523
43481
|
i0.ɵɵtemplate(2, CaseChallengedAccessRequestComponent_div_40_div_2_Template, 3, 3, "div", 33);
|
|
43524
|
-
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);
|
|
43525
43487
|
i0.ɵɵelementEnd()();
|
|
43526
43488
|
} if (rf & 2) {
|
|
43527
43489
|
let tmp_1_0;
|
|
43528
|
-
let
|
|
43490
|
+
let tmp_5_0;
|
|
43529
43491
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
43530
43492
|
i0.ɵɵadvance();
|
|
43531
|
-
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));
|
|
43532
43494
|
i0.ɵɵadvance();
|
|
43533
43495
|
i0.ɵɵproperty("ngIf", ctx_r0.formGroup.get("otherReason").invalid && ctx_r0.submitted);
|
|
43534
|
-
i0.ɵɵadvance();
|
|
43535
|
-
i0.ɵɵ
|
|
43536
|
-
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" : ""));
|
|
43537
43501
|
} }
|
|
43538
43502
|
class CaseChallengedAccessRequestComponent {
|
|
43539
43503
|
fb;
|
|
@@ -43681,7 +43645,7 @@ class CaseChallengedAccessRequestComponent {
|
|
|
43681
43645
|
return input.value === null || input.value.trim().length === 0;
|
|
43682
43646
|
}
|
|
43683
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)); };
|
|
43684
|
-
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) {
|
|
43685
43649
|
i0.ɵɵtemplate(0, CaseChallengedAccessRequestComponent_exui_error_message_0_Template, 1, 1, "exui-error-message", 0);
|
|
43686
43650
|
i0.ɵɵelementStart(1, "cut-alert", 1);
|
|
43687
43651
|
i0.ɵɵtext(2);
|
|
@@ -43730,7 +43694,7 @@ class CaseChallengedAccessRequestComponent {
|
|
|
43730
43694
|
i0.ɵɵtext(38);
|
|
43731
43695
|
i0.ɵɵpipe(39, "rpxTranslate");
|
|
43732
43696
|
i0.ɵɵelementEnd()();
|
|
43733
|
-
i0.ɵɵtemplate(40, CaseChallengedAccessRequestComponent_div_40_Template,
|
|
43697
|
+
i0.ɵɵtemplate(40, CaseChallengedAccessRequestComponent_div_40_Template, 7, 11, "div", 20);
|
|
43734
43698
|
i0.ɵɵelementEnd()()();
|
|
43735
43699
|
i0.ɵɵelementStart(41, "div", 21)(42, "button", 22);
|
|
43736
43700
|
i0.ɵɵtext(43);
|
|
@@ -43794,7 +43758,7 @@ class CaseChallengedAccessRequestComponent {
|
|
|
43794
43758
|
}
|
|
43795
43759
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseChallengedAccessRequestComponent, [{
|
|
43796
43760
|
type: Component,
|
|
43797
|
-
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" }]
|
|
43798
43762
|
}], () => [{ type: i4.FormBuilder }, { type: i1$2.Router }, { type: CasesService }, { type: i1$2.ActivatedRoute }, { type: CaseNotifier }, { type: i4$1.Title }], null); })();
|
|
43799
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 }); })();
|
|
43800
43764
|
|
|
@@ -44882,10 +44846,10 @@ class CreateCaseFiltersComponent {
|
|
|
44882
44846
|
retainEventsWithCreateRights(events) {
|
|
44883
44847
|
const userProfile = safeJsonParse(this.sessionStorageService.getItem(USER_DETAILS), null);
|
|
44884
44848
|
return events.filter(event => userProfile && userProfile.roles &&
|
|
44885
|
-
|
|
44849
|
+
userProfile.roles.some(role => this.hasCreateAccess(event, role)));
|
|
44886
44850
|
}
|
|
44887
44851
|
hasCreateAccess(caseEvent, role) {
|
|
44888
|
-
return
|
|
44852
|
+
return caseEvent.acls.some(acl => acl.role === role && acl.create === true);
|
|
44889
44853
|
}
|
|
44890
44854
|
selectJurisdiction(jurisdictions, filterJurisdictionControl) {
|
|
44891
44855
|
if (jurisdictions.length === 1) {
|
|
@@ -45165,7 +45129,7 @@ class SearchFiltersComponent {
|
|
|
45165
45129
|
this.selected.jurisdiction = this.jurisdictions
|
|
45166
45130
|
.filter(j => j.id === jurisdiction.id)[0];
|
|
45167
45131
|
if (jurisdiction.currentCaseType &&
|
|
45168
|
-
this.selected.jurisdiction.caseTypes.
|
|
45132
|
+
this.selected.jurisdiction.caseTypes.some(ct => ct.id === jurisdiction.currentCaseType.id)) {
|
|
45169
45133
|
this.selected.jurisdiction.currentCaseType = jurisdiction.currentCaseType;
|
|
45170
45134
|
}
|
|
45171
45135
|
else {
|
|
@@ -45617,14 +45581,13 @@ function SearchResultComponent_table_0_td_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
45617
45581
|
i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 23);
|
|
45618
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()); });
|
|
45619
45583
|
i0.ɵɵelementEnd();
|
|
45620
|
-
i0.ɵɵ
|
|
45621
|
-
i0.ɵɵ
|
|
45584
|
+
i0.ɵɵelementStart(3, "label", 24);
|
|
45585
|
+
i0.ɵɵtext(4, " Select all cases ");
|
|
45586
|
+
i0.ɵɵelementEnd()()();
|
|
45622
45587
|
} if (rf & 2) {
|
|
45623
45588
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
45624
45589
|
i0.ɵɵadvance(2);
|
|
45625
45590
|
i0.ɵɵproperty("checked", ctx_r0.allOnPageSelected())("disabled", !ctx_r0.canAnyBeShared());
|
|
45626
|
-
i0.ɵɵadvance();
|
|
45627
|
-
i0.ɵɵattribute("aria-labelledby", "select-all");
|
|
45628
45591
|
} }
|
|
45629
45592
|
function SearchResultComponent_table_0_th_11_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
45630
45593
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
@@ -45667,16 +45630,18 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template(rf, ct
|
|
|
45667
45630
|
i0.ɵɵelementStart(0, "td", 34)(1, "div", 22)(2, "input", 35);
|
|
45668
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)); });
|
|
45669
45632
|
i0.ɵɵelementEnd();
|
|
45670
|
-
i0.ɵɵ
|
|
45671
|
-
i0.ɵɵ
|
|
45633
|
+
i0.ɵɵelementStart(3, "label", 36);
|
|
45634
|
+
i0.ɵɵtext(4);
|
|
45635
|
+
i0.ɵɵelementEnd()()();
|
|
45672
45636
|
} if (rf & 2) {
|
|
45673
45637
|
const result_r8 = i0.ɵɵnextContext().$implicit;
|
|
45674
45638
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
45675
45639
|
i0.ɵɵadvance(2);
|
|
45676
|
-
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));
|
|
45677
45641
|
i0.ɵɵadvance();
|
|
45678
|
-
i0.ɵɵproperty("for", i0.ɵɵinterpolate1("select-", result_r8.case_id));
|
|
45679
|
-
i0.ɵɵ
|
|
45642
|
+
i0.ɵɵproperty("for", i0.ɵɵinterpolate1("consumer-select-", result_r8.case_id));
|
|
45643
|
+
i0.ɵɵadvance();
|
|
45644
|
+
i0.ɵɵtextInterpolate1(" Select case ", result_r8.case_id, " ");
|
|
45680
45645
|
} }
|
|
45681
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) {
|
|
45682
45647
|
i0.ɵɵelement(0, "ccd-field-read", 44);
|
|
@@ -45755,7 +45720,7 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template(rf, ct
|
|
|
45755
45720
|
} }
|
|
45756
45721
|
function SearchResultComponent_table_0_ng_container_14_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
45757
45722
|
i0.ɵɵelementStart(0, "tr");
|
|
45758
|
-
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);
|
|
45759
45724
|
i0.ɵɵelementEnd();
|
|
45760
45725
|
} if (rf & 2) {
|
|
45761
45726
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -45781,8 +45746,9 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ct
|
|
|
45781
45746
|
i0.ɵɵelementStart(0, "td", 34)(1, "div", 22)(2, "input", 46);
|
|
45782
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)); });
|
|
45783
45748
|
i0.ɵɵelementEnd();
|
|
45784
|
-
i0.ɵɵ
|
|
45785
|
-
i0.ɵɵ
|
|
45749
|
+
i0.ɵɵelementStart(3, "label", 36);
|
|
45750
|
+
i0.ɵɵtext(4);
|
|
45751
|
+
i0.ɵɵelementEnd()()();
|
|
45786
45752
|
} if (rf & 2) {
|
|
45787
45753
|
const result_r13 = i0.ɵɵnextContext().$implicit;
|
|
45788
45754
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -45790,7 +45756,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ct
|
|
|
45790
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));
|
|
45791
45757
|
i0.ɵɵadvance();
|
|
45792
45758
|
i0.ɵɵproperty("for", i0.ɵɵinterpolate1("select-", result_r13.case_id));
|
|
45793
|
-
i0.ɵɵ
|
|
45759
|
+
i0.ɵɵadvance();
|
|
45760
|
+
i0.ɵɵtextInterpolate1(" Select case ", result_r13.case_id, " ");
|
|
45794
45761
|
} }
|
|
45795
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) {
|
|
45796
45763
|
i0.ɵɵelement(0, "ccd-field-read", 44);
|
|
@@ -45869,7 +45836,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template(rf, ct
|
|
|
45869
45836
|
} }
|
|
45870
45837
|
function SearchResultComponent_table_0_ng_container_15_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
45871
45838
|
i0.ɵɵelementStart(0, "tr");
|
|
45872
|
-
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);
|
|
45873
45840
|
i0.ɵɵelementEnd();
|
|
45874
45841
|
} if (rf & 2) {
|
|
45875
45842
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -45899,7 +45866,7 @@ function SearchResultComponent_table_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
45899
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);
|
|
45900
45867
|
i0.ɵɵelementEnd();
|
|
45901
45868
|
i0.ɵɵelementStart(8, "thead")(9, "tr", 8);
|
|
45902
|
-
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);
|
|
45903
45870
|
i0.ɵɵelementEnd()();
|
|
45904
45871
|
i0.ɵɵelementStart(13, "tbody");
|
|
45905
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);
|
|
@@ -46035,7 +46002,7 @@ class SearchResultComponent {
|
|
|
46035
46002
|
this.selection.emit(this.selectedCases);
|
|
46036
46003
|
}
|
|
46037
46004
|
canBeShared(caseView) {
|
|
46038
|
-
return caseView.supplementary_data
|
|
46005
|
+
return !!caseView.supplementary_data?.hasOwnProperty('orgs_assigned_users');
|
|
46039
46006
|
}
|
|
46040
46007
|
canAnyBeShared() {
|
|
46041
46008
|
for (let i = 0, l = this.resultView.results.length; i < l; i++) {
|
|
@@ -46073,10 +46040,8 @@ class SearchResultComponent {
|
|
|
46073
46040
|
}
|
|
46074
46041
|
});
|
|
46075
46042
|
}
|
|
46076
|
-
else {
|
|
46077
|
-
|
|
46078
|
-
this.selectedCases.push(c);
|
|
46079
|
-
}
|
|
46043
|
+
else if (this.canBeShared(c)) {
|
|
46044
|
+
this.selectedCases.push(c);
|
|
46080
46045
|
}
|
|
46081
46046
|
this.selection.emit(this.selectedCases);
|
|
46082
46047
|
}
|
|
@@ -46192,16 +46157,14 @@ class SearchResultComponent {
|
|
|
46192
46157
|
this.consumerSortParameters.type = column.case_field_type.type;
|
|
46193
46158
|
this.sortHandler.emit(this.consumerSortParameters);
|
|
46194
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
|
+
}
|
|
46195
46166
|
else {
|
|
46196
|
-
|
|
46197
|
-
return;
|
|
46198
|
-
}
|
|
46199
|
-
else if (this.isSortAscending(column)) {
|
|
46200
|
-
this.sortParameters = new SortParameters(this.comparator(column), SortOrder$1.ASCENDING);
|
|
46201
|
-
}
|
|
46202
|
-
else {
|
|
46203
|
-
this.sortParameters = new SortParameters(this.comparator(column), SortOrder$1.DESCENDING);
|
|
46204
|
-
}
|
|
46167
|
+
this.sortParameters = new SortParameters(this.comparator(column), SortOrder$1.DESCENDING);
|
|
46205
46168
|
}
|
|
46206
46169
|
}
|
|
46207
46170
|
sortWidget(column) {
|
|
@@ -46223,19 +46186,13 @@ class SearchResultComponent {
|
|
|
46223
46186
|
if (col.case_field_id === '[CASE_REFERENCE]') {
|
|
46224
46187
|
return this.caseReferencePipe.transform(result.case_fields[col.case_field_id]);
|
|
46225
46188
|
}
|
|
46226
|
-
|
|
46227
|
-
|
|
46228
|
-
|
|
46229
|
-
|
|
46230
|
-
|
|
46231
|
-
else {
|
|
46232
|
-
return result.case_fields[col.id];
|
|
46233
|
-
}
|
|
46234
|
-
}
|
|
46235
|
-
else {
|
|
46236
|
-
return result.case_fields[col.case_field_id];
|
|
46237
|
-
}
|
|
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]);
|
|
46238
46194
|
}
|
|
46195
|
+
return result.case_fields[col.id];
|
|
46239
46196
|
}
|
|
46240
46197
|
draftPrefixOrGet(col, result) {
|
|
46241
46198
|
return result.case_id.startsWith(DRAFT_PREFIX) ? DRAFT_PREFIX : this.hyphenateIfCaseReferenceOrGet(col, result);
|
|
@@ -46287,7 +46244,7 @@ class SearchResultComponent {
|
|
|
46287
46244
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
46288
46245
|
noop() { }
|
|
46289
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)); };
|
|
46290
|
-
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) {
|
|
46291
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);
|
|
46292
46249
|
} if (rf & 2) {
|
|
46293
46250
|
i0.ɵɵproperty("ngIf", ctx.hasResults() || ctx.hasDrafts());
|
|
@@ -46299,7 +46256,7 @@ class SearchResultComponent {
|
|
|
46299
46256
|
}
|
|
46300
46257
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
|
|
46301
46258
|
type: Component,
|
|
46302
|
-
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"] }]
|
|
46303
46260
|
}], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }], { caseLinkUrlTemplate: [{
|
|
46304
46261
|
type: Input
|
|
46305
46262
|
}], jurisdiction: [{
|