@hmcts/ccd-case-ui-toolkit 7.1.32-qm-style-update → 7.1.32-return-application-task-not-completing

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.
Files changed (56) hide show
  1. package/esm2022/lib/shared/components/case-editor/case-edit/case-edit.component.mjs +40 -17
  2. package/esm2022/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.mjs +13 -1
  3. package/esm2022/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.mjs +3 -2
  4. package/esm2022/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.mjs +4 -3
  5. package/esm2022/lib/shared/components/case-editor/services/cases.service.mjs +4 -3
  6. package/esm2022/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +18 -5
  7. package/esm2022/lib/shared/components/case-editor/services/work-allocation.service.mjs +5 -1
  8. package/esm2022/lib/shared/components/case-history/case-history.component.mjs +8 -9
  9. package/esm2022/lib/shared/components/event-start/event-guard/event-start.guard.mjs +36 -48
  10. package/esm2022/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +5 -3
  11. package/esm2022/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.mjs +8 -9
  12. package/esm2022/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.mjs +2 -2
  13. package/esm2022/lib/shared/components/palette/document/write-document-field.component.mjs +17 -5
  14. package/esm2022/lib/shared/components/palette/history/event-log/event-log-table.component.mjs +41 -18
  15. package/esm2022/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.mjs +17 -17
  16. package/esm2022/lib/shared/components/palette/linked-cases/components/unlink-cases/unlink-cases.component.mjs +10 -10
  17. package/esm2022/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.mjs +30 -13
  18. package/esm2022/lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-detail/qualifying-question-detail.component.mjs +10 -12
  19. package/esm2022/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.mjs +1 -1
  20. package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.mjs +114 -103
  21. package/esm2022/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.mjs +45 -35
  22. package/esm2022/lib/shared/components/palette/unsupported-field.component.mjs +4 -3
  23. package/esm2022/lib/shared/components/palette/utils/date.pipe.mjs +2 -2
  24. package/esm2022/lib/shared/components/search-result/search-result.component.mjs +39 -35
  25. package/esm2022/lib/shared/domain/work-allocation/Task.mjs +1 -1
  26. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +880 -771
  27. package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
  28. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +6 -2
  29. package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
  30. package/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.d.ts +2 -0
  31. package/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.d.ts.map +1 -1
  32. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-cancelled/case-event-completion-task-cancelled.component.d.ts.map +1 -1
  33. package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
  34. package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
  35. package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts.map +1 -1
  36. package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
  37. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +2 -3
  38. package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
  39. package/lib/shared/components/event-start/services/event-start-state-machine.service.d.ts.map +1 -1
  40. package/lib/shared/components/palette/document/write-document-field.component.d.ts +3 -1
  41. package/lib/shared/components/palette/document/write-document-field.component.d.ts.map +1 -1
  42. package/lib/shared/components/palette/history/event-log/event-log-table.component.d.ts +4 -0
  43. package/lib/shared/components/palette/history/event-log/event-log-table.component.d.ts.map +1 -1
  44. package/lib/shared/components/palette/linked-cases/components/unlink-cases/unlink-cases.component.d.ts.map +1 -1
  45. package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
  46. package/lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-detail/qualifying-question-detail.component.d.ts.map +1 -1
  47. package/lib/shared/components/palette/query-management/components/query-check-your-answers/query-check-your-answers.component.d.ts.map +1 -1
  48. package/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.d.ts +2 -1
  49. package/lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.d.ts.map +1 -1
  50. package/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.d.ts +2 -1
  51. package/lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.d.ts.map +1 -1
  52. package/lib/shared/components/palette/unsupported-field.component.d.ts +1 -1
  53. package/lib/shared/components/palette/unsupported-field.component.d.ts.map +1 -1
  54. package/lib/shared/domain/work-allocation/Task.d.ts +1 -0
  55. package/lib/shared/domain/work-allocation/Task.d.ts.map +1 -1
  56. package/package.json +1 -1
@@ -2744,7 +2744,7 @@ class DatePipe {
2744
2744
  if (this.formatTrans && format && format !== 'short') {
2745
2745
  // support for java style formatting strings for dates
2746
2746
  format = this.translateDateFormat(format);
2747
- resultDate = moment(date).format(format);
2747
+ resultDate = moment(offsetDate).format(format);
2748
2748
  }
2749
2749
  else {
2750
2750
  // RDM-1149 changed the pipe logic so that it doesn't add an hour to 'Summer Time' dates on DateTime field type
@@ -8036,455 +8036,6 @@ class WizardPageFieldToCaseFieldMapper {
8036
8036
  }]
8037
8037
  }], null, null); })();
8038
8038
 
8039
- function convertNonASCIICharacter(character) {
8040
- if (character === '£') {
8041
- // pound sign will be frequently used and works for btoa despite being non-ASCII
8042
- // note: this could be done for other characters provided they work for btoa()
8043
- return character;
8044
- }
8045
- // Note: Will convert to HTML entity
8046
- return CaseEditUtils.PREFIX + character.charCodeAt(0) + CaseEditUtils.SUFFIX;
8047
- }
8048
- class CaseEditUtils {
8049
- static PREFIX = '&#';
8050
- static SUFFIX = ';';
8051
- convertNonASCIICharacters(rawString) {
8052
- return rawString ? rawString.replace(/[^\x20-\x7E]/g, function (c) {
8053
- return convertNonASCIICharacter(c);
8054
- }) : '';
8055
- }
8056
- convertHTMLEntities(editedString) {
8057
- const revertedCharacterList = editedString.split(CaseEditUtils.PREFIX);
8058
- let rawString = revertedCharacterList[0];
8059
- for (let index = 1; index < revertedCharacterList.length; index++) {
8060
- const currentSection = revertedCharacterList[index];
8061
- if (!currentSection.includes(CaseEditUtils.SUFFIX)) {
8062
- return rawString.concat(currentSection);
8063
- }
8064
- else {
8065
- const suffixSplitList = currentSection.split(CaseEditUtils.SUFFIX);
8066
- const characterCode = Number(suffixSplitList[0]);
8067
- rawString = rawString.concat(String.fromCharCode(characterCode), suffixSplitList[1]);
8068
- }
8069
- }
8070
- return rawString;
8071
- }
8072
- }
8073
-
8074
- class CasesService {
8075
- http;
8076
- appConfig;
8077
- orderService;
8078
- errorService;
8079
- wizardPageFieldToCaseFieldMapper;
8080
- loadingService;
8081
- sessionStorageService;
8082
- retryUtil;
8083
- // Internal (UI) API
8084
- static V2_MEDIATYPE_CASE_VIEW = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json';
8085
- static V2_MEDIATYPE_START_CASE_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-case-trigger.v2+json;charset=UTF-8';
8086
- static V2_MEDIATYPE_START_EVENT_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8';
8087
- static V2_MEDIATYPE_START_DRAFT_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-draft-trigger.v2+json;charset=UTF-8';
8088
- // External (Data Store) API
8089
- static V2_MEDIATYPE_CASE_DOCUMENTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.case-documents.v2+json;charset=UTF-8';
8090
- static V2_MEDIATYPE_CASE_DATA_VALIDATE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8';
8091
- static V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
8092
- static V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
8093
- static PUI_CASE_MANAGER = 'pui-case-manager';
8094
- get = this.getCaseView;
8095
- static updateChallengedAccessRequestAttributes(httpClient, caseId, attributesToUpdate) {
8096
- return httpClient.post(`/api/challenged-access-request/update-attributes`, {
8097
- caseId,
8098
- attributesToUpdate
8099
- });
8100
- }
8101
- static updateSpecificAccessRequestAttributes(httpClient, caseId, attributesToUpdate) {
8102
- return httpClient.post(`/api/specific-access-request/update-attributes`, {
8103
- caseId,
8104
- attributesToUpdate
8105
- });
8106
- }
8107
- constructor(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService, retryUtil) {
8108
- this.http = http;
8109
- this.appConfig = appConfig;
8110
- this.orderService = orderService;
8111
- this.errorService = errorService;
8112
- this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
8113
- this.loadingService = loadingService;
8114
- this.sessionStorageService = sessionStorageService;
8115
- this.retryUtil = retryUtil;
8116
- }
8117
- getCaseView(jurisdictionId, caseTypeId, caseId) {
8118
- const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases/${caseId}`;
8119
- const loadingToken = this.loadingService.register();
8120
- return this.http
8121
- .get(url)
8122
- .pipe(catchError(error => {
8123
- this.errorService.setError(error);
8124
- return throwError(error);
8125
- }), finalize(() => this.loadingService.unregister(loadingToken)));
8126
- }
8127
- getCaseViewV2(caseId) {
8128
- const url = `${this.appConfig.getCaseDataUrl()}/internal/cases/${caseId}`;
8129
- const headers = new HttpHeaders()
8130
- .set('experimental', 'true')
8131
- .set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
8132
- .set('Content-Type', 'application/json');
8133
- const loadingToken = this.loadingService.register();
8134
- let http$ = this.http.get(url, { headers, observe: 'body' });
8135
- const artificialDelay = this.appConfig.getTimeoutsCaseRetrievalArtificialDelay();
8136
- const timeoutPeriods = this.appConfig.getTimeoutsForCaseRetrieval();
8137
- console.log(`Timeout periods: ${timeoutPeriods} seconds.`);
8138
- if (timeoutPeriods && timeoutPeriods.length > 0 && timeoutPeriods[0] > 0) {
8139
- http$ = this.retryUtil.pipeTimeoutMechanismOn(http$, artificialDelay, timeoutPeriods);
8140
- }
8141
- else {
8142
- console.warn('Skipping to pipe a retry mechanism!');
8143
- }
8144
- http$ = this.pipeErrorProcessor(http$);
8145
- http$ = http$.pipe(finalize(() => this.finalizeGetCaseViewWith(caseId, loadingToken)));
8146
- return http$;
8147
- }
8148
- pipeErrorProcessor(in$) {
8149
- const out$ = in$.pipe(catchError(error => {
8150
- console.error(`Error while getting case view with getCaseViewV2! Error type: '${typeof error}, Error name: '${error?.name}'`);
8151
- console.error(error);
8152
- this.errorService.setError(error);
8153
- return throwError(error);
8154
- }));
8155
- return out$;
8156
- }
8157
- finalizeGetCaseViewWith(caseId, loadingToken) {
8158
- this.loadingService.unregister(loadingToken);
8159
- }
8160
- syncWait(seconds) {
8161
- const end = Date.now() + seconds * 1000;
8162
- while (Date.now() < end)
8163
- continue;
8164
- }
8165
- getEventTrigger(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
8166
- ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
8167
- const url = this.buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning);
8168
- let headers = new HttpHeaders();
8169
- headers = headers.set('experimental', 'true');
8170
- headers = headers.set('Content-Type', 'application/json');
8171
- headers = this.addClientContextHeader(headers);
8172
- if (Draft.isDraft(caseId)) {
8173
- headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_DRAFT_TRIGGER);
8174
- }
8175
- else if (caseId !== undefined && caseId !== null) {
8176
- headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_EVENT_TRIGGER);
8177
- }
8178
- else {
8179
- headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_CASE_TRIGGER);
8180
- }
8181
- return this.http
8182
- .get(url, { headers, observe: 'response' })
8183
- .pipe(map((response) => {
8184
- this.updateClientContextStorage(response.headers);
8185
- return FieldsUtils.handleNestedDynamicLists(response.body);
8186
- }), catchError(error => {
8187
- this.errorService.setError(error);
8188
- return throwError(error);
8189
- }), map((p) => plainToClass(CaseEventTrigger, p)), tap(eventTrigger => this.initialiseEventTrigger(eventTrigger)));
8190
- }
8191
- createEvent(caseDetails, eventData) {
8192
- const caseId = caseDetails.case_id;
8193
- const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
8194
- let headers = new HttpHeaders()
8195
- .set('experimental', 'true')
8196
- .set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
8197
- .set('Content-Type', 'application/json');
8198
- headers = this.addClientContextHeader(headers);
8199
- return this.http
8200
- .post(url, eventData, { headers, observe: 'response' })
8201
- .pipe(map((response) => {
8202
- this.updateClientContextStorage(response.headers);
8203
- return response.body;
8204
- }), catchError(error => {
8205
- this.errorService.setError(error);
8206
- return throwError(error);
8207
- }));
8208
- }
8209
- validateCase(ctid, eventData, pageId) {
8210
- const pageIdString = pageId ? `?pageId=${pageId}` : '';
8211
- const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
8212
- let headers = new HttpHeaders()
8213
- .set('experimental', 'true')
8214
- .set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
8215
- .set('Content-Type', 'application/json');
8216
- headers = this.addClientContextHeader(headers);
8217
- return this.http
8218
- .post(url, eventData, { headers, observe: 'response' })
8219
- .pipe(map((response) => {
8220
- this.updateClientContextStorage(response.headers);
8221
- return response.body;
8222
- }), catchError(error => {
8223
- this.errorService.setError(error);
8224
- return throwError(error);
8225
- }));
8226
- }
8227
- createCase(ctid, eventData) {
8228
- let ignoreWarning = 'false';
8229
- if (eventData.ignore_warning) {
8230
- ignoreWarning = 'true';
8231
- }
8232
- const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
8233
- let headers = new HttpHeaders()
8234
- .set('experimental', 'true')
8235
- .set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
8236
- .set('Content-Type', 'application/json');
8237
- headers = this.addClientContextHeader(headers);
8238
- return this.http
8239
- .post(url, eventData, { headers, observe: 'response' })
8240
- .pipe(map((response) => {
8241
- this.updateClientContextStorage(response.headers);
8242
- return response.body;
8243
- }), catchError(error => {
8244
- this.errorService.setError(error);
8245
- return throwError(error);
8246
- }));
8247
- }
8248
- getPrintDocuments(caseId) {
8249
- const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
8250
- let headers = new HttpHeaders()
8251
- .set('experimental', 'true')
8252
- .set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
8253
- .set('Content-Type', 'application/json');
8254
- headers = this.addClientContextHeader(headers);
8255
- return this.http
8256
- .get(url, { headers, observe: 'response' })
8257
- .pipe(map((response) => {
8258
- this.updateClientContextStorage(response.headers);
8259
- return response.body.documentResources;
8260
- }), catchError(error => {
8261
- this.errorService.setError(error);
8262
- return throwError(error);
8263
- }));
8264
- }
8265
- buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
8266
- let url = `${this.appConfig.getCaseDataUrl()}/internal`;
8267
- if (Draft.isDraft(caseId)) {
8268
- url += `/drafts/${caseId}`
8269
- + `/event-trigger`
8270
- + `?ignore-warning=${ignoreWarning}`;
8271
- }
8272
- else if (caseTypeId === undefined || caseTypeId === null) {
8273
- url += `/cases/${caseId}`
8274
- + `/event-triggers/${eventTriggerId}`
8275
- + `?ignore-warning=${ignoreWarning}`;
8276
- }
8277
- else {
8278
- url += `/case-types/${caseTypeId}`
8279
- + `/event-triggers/${eventTriggerId}`
8280
- + `?ignore-warning=${ignoreWarning}`;
8281
- }
8282
- return url;
8283
- }
8284
- initialiseEventTrigger(eventTrigger) {
8285
- if (!eventTrigger.wizard_pages) {
8286
- eventTrigger.wizard_pages = [];
8287
- }
8288
- eventTrigger.wizard_pages.forEach((wizardPage) => {
8289
- wizardPage.parsedShowCondition = ShowCondition.getInstance(wizardPage.show_condition);
8290
- wizardPage.case_fields = this.orderService.sort(this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
8291
- });
8292
- }
8293
- getCourtOrHearingCentreName(locationId) {
8294
- return this.http.post(`/api/locations/getLocationsById`, { locations: [{ locationId }] });
8295
- }
8296
- createChallengedAccessRequest(caseId, request) {
8297
- // Assignment API endpoint
8298
- const userInfoStr = this.sessionStorageService.getItem('userDetails');
8299
- const camUtils = new CaseAccessUtils();
8300
- let userInfo;
8301
- if (userInfoStr) {
8302
- userInfo = JSON.parse(userInfoStr);
8303
- }
8304
- const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
8305
- const roleName = camUtils.getAMRoleName('challenged', roleCategory);
8306
- const beginTime = new Date();
8307
- const endTime = new Date(new Date().setUTCHours(23, 59, 59, 999));
8308
- const id = userInfo.id ? userInfo.id : userInfo.uid;
8309
- const isNew = true;
8310
- const payload = camUtils.getAMPayload(id, id, roleName, roleCategory, 'CHALLENGED', caseId, request, beginTime, endTime, isNew);
8311
- return this.http.post(`/api/challenged-access-request`, payload);
8312
- }
8313
- createSpecificAccessRequest(caseId, sar) {
8314
- // Assignment API endpoint
8315
- const userInfoStr = this.sessionStorageService.getItem('userDetails');
8316
- const camUtils = new CaseAccessUtils();
8317
- let userInfo;
8318
- if (userInfoStr) {
8319
- userInfo = JSON.parse(userInfoStr);
8320
- }
8321
- const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
8322
- const roleName = camUtils.getAMRoleName('specific', roleCategory);
8323
- const id = userInfo.id ? userInfo.id : userInfo.uid;
8324
- const payload = camUtils.getAMPayload(null, id, roleName, roleCategory, 'SPECIFIC', caseId, sar, null, null, true);
8325
- payload.roleRequest = {
8326
- ...payload.roleRequest,
8327
- process: 'specific-access',
8328
- replaceExisting: true,
8329
- assignerId: payload.requestedRoles[0].actorId,
8330
- reference: `${caseId}/${roleName}/${payload.requestedRoles[0].actorId}`
8331
- };
8332
- payload.requestedRoles[0] = {
8333
- ...payload.requestedRoles[0],
8334
- roleName: 'specific-access-requested',
8335
- roleCategory,
8336
- classification: 'PRIVATE',
8337
- endTime: new Date(new Date().setDate(new Date().getDate() + 30)),
8338
- beginTime: null,
8339
- grantType: 'BASIC',
8340
- readOnly: true
8341
- };
8342
- payload.requestedRoles[0].attributes = {
8343
- ...payload.requestedRoles[0].attributes,
8344
- requestedRole: roleName,
8345
- specificAccessReason: sar.specificReason
8346
- };
8347
- payload.requestedRoles[0].notes[0] = {
8348
- ...payload.requestedRoles[0].notes[0],
8349
- userId: payload.requestedRoles[0].actorId
8350
- };
8351
- return this.http.post(`/api/specific-access-request`, payload);
8352
- }
8353
- getLinkedCases(caseId) {
8354
- const url = `${this.appConfig.getCaseDataStoreApiUrl()}/${caseId}`;
8355
- return this.http
8356
- .get(url)
8357
- .pipe(catchError(error => throwError(error)));
8358
- }
8359
- addClientContextHeader(headers) {
8360
- const clientContextDetails = this.sessionStorageService.getItem('clientContext');
8361
- if (clientContextDetails) {
8362
- const caseEditUtils = new CaseEditUtils();
8363
- // below changes non-ASCII characters
8364
- const editedClientContext = caseEditUtils.convertNonASCIICharacters(clientContextDetails);
8365
- const clientContext = window.btoa(editedClientContext);
8366
- if (clientContext) {
8367
- headers = headers.set('Client-Context', clientContext);
8368
- }
8369
- }
8370
- return headers;
8371
- }
8372
- updateClientContextStorage(headers) {
8373
- if (headers && headers.get('Client-Context')) {
8374
- const caseEditUtils = new CaseEditUtils();
8375
- const clientContextString = window.atob(headers.get('Client-Context'));
8376
- // below reverts non-ASCII characters
8377
- const editedClientContextString = caseEditUtils.convertHTMLEntities(clientContextString);
8378
- this.sessionStorageService.setItem('clientContext', editedClientContextString);
8379
- }
8380
- }
8381
- static ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(OrderService), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0.ɵɵinject(LoadingService), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(RetryUtil)); };
8382
- static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
8383
- }
8384
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CasesService, [{
8385
- type: Injectable
8386
- }], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }, { type: RetryUtil }], null); })();
8387
-
8388
- class EventTriggerService {
8389
- eventTriggerSource = new Subject();
8390
- announceEventTrigger(eventTrigger) {
8391
- this.eventTriggerSource.next(eventTrigger);
8392
- }
8393
- static ɵfac = function EventTriggerService_Factory(t) { return new (t || EventTriggerService)(); };
8394
- static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventTriggerService, factory: EventTriggerService.ɵfac, providedIn: 'root' });
8395
- }
8396
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventTriggerService, [{
8397
- type: Injectable,
8398
- args: [{
8399
- providedIn: 'root',
8400
- }]
8401
- }], null, null); })();
8402
-
8403
- function CaseCreateComponent_div_0_Template(rf, ctx) { if (rf & 1) {
8404
- const _r1 = i0.ɵɵgetCurrentView();
8405
- i0.ɵɵelementStart(0, "div")(1, "ccd-case-edit", 1);
8406
- i0.ɵɵlistener("cancelled", function CaseCreateComponent_div_0_Template_ccd_case_edit_cancelled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.emitCancelled($event)); })("submitted", function CaseCreateComponent_div_0_Template_ccd_case_edit_submitted_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.emitSubmitted($event)); });
8407
- i0.ɵɵelementEnd()();
8408
- } if (rf & 2) {
8409
- const ctx_r1 = i0.ɵɵnextContext();
8410
- i0.ɵɵadvance();
8411
- i0.ɵɵproperty("submit", ctx_r1.submit())("validate", ctx_r1.validate())("saveDraft", ctx_r1.saveDraft())("eventTrigger", ctx_r1.eventTrigger);
8412
- } }
8413
- class CaseCreateComponent {
8414
- casesService;
8415
- alertService;
8416
- draftService;
8417
- eventTriggerService;
8418
- jurisdiction;
8419
- caseType;
8420
- event;
8421
- cancelled = new EventEmitter();
8422
- submitted = new EventEmitter();
8423
- eventTrigger;
8424
- constructor(casesService, alertService, draftService, eventTriggerService) {
8425
- this.casesService = casesService;
8426
- this.alertService = alertService;
8427
- this.draftService = draftService;
8428
- this.eventTriggerService = eventTriggerService;
8429
- }
8430
- ngOnInit() {
8431
- this.casesService.getEventTrigger(this.caseType, this.event).toPromise()
8432
- .then(eventTrigger => {
8433
- this.eventTrigger = eventTrigger;
8434
- this.eventTriggerService.announceEventTrigger(eventTrigger);
8435
- })
8436
- .catch((error) => {
8437
- this.alertService.error({ phrase: error.message });
8438
- return throwError(error);
8439
- });
8440
- }
8441
- submit() {
8442
- return (sanitizedEditForm) => {
8443
- sanitizedEditForm.draft_id = this.eventTrigger.case_id;
8444
- return this.casesService.createCase(this.caseType, sanitizedEditForm);
8445
- };
8446
- }
8447
- validate() {
8448
- return (sanitizedEditForm, pageId) => this.casesService
8449
- .validateCase(this.caseType, sanitizedEditForm, pageId);
8450
- }
8451
- saveDraft() {
8452
- if (this.eventTrigger.can_save_draft) {
8453
- return (caseEventData) => this.draftService.createOrUpdateDraft(this.caseType, this.eventTrigger.case_id, caseEventData);
8454
- }
8455
- }
8456
- emitCancelled(event) {
8457
- this.cancelled.emit(event);
8458
- }
8459
- emitSubmitted(event) {
8460
- this.submitted.emit(event);
8461
- }
8462
- isDataLoaded() {
8463
- return this.eventTrigger ? true : false;
8464
- }
8465
- static ɵfac = function CaseCreateComponent_Factory(t) { return new (t || CaseCreateComponent)(i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(DraftService), i0.ɵɵdirectiveInject(EventTriggerService)); };
8466
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseCreateComponent, selectors: [["ccd-case-create"]], inputs: { jurisdiction: "jurisdiction", caseType: "caseType", event: "event" }, outputs: { cancelled: "cancelled", submitted: "submitted" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [3, "cancelled", "submitted", "submit", "validate", "saveDraft", "eventTrigger"]], template: function CaseCreateComponent_Template(rf, ctx) { if (rf & 1) {
8467
- i0.ɵɵtemplate(0, CaseCreateComponent_div_0_Template, 2, 4, "div", 0);
8468
- } if (rf & 2) {
8469
- i0.ɵɵproperty("ngIf", ctx.isDataLoaded());
8470
- } }, encapsulation: 2 });
8471
- }
8472
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseCreateComponent, [{
8473
- type: Component,
8474
- args: [{ selector: 'ccd-case-create', template: "<div *ngIf=\"isDataLoaded()\">\n <ccd-case-edit [submit]=\"submit()\"\n [validate]=\"validate()\"\n [saveDraft]=\"saveDraft()\"\n [eventTrigger]=\"eventTrigger\"\n (cancelled)=\"emitCancelled($event)\"\n (submitted)=\"emitSubmitted($event)\"></ccd-case-edit>\n</div>" }]
8475
- }], () => [{ type: CasesService }, { type: AlertService }, { type: DraftService }, { type: EventTriggerService }], { jurisdiction: [{
8476
- type: Input
8477
- }], caseType: [{
8478
- type: Input
8479
- }], event: [{
8480
- type: Input
8481
- }], cancelled: [{
8482
- type: Output
8483
- }], submitted: [{
8484
- type: Output
8485
- }] }); })();
8486
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseCreateComponent, { className: "CaseCreateComponent", filePath: "lib/shared/components/case-editor/case-create/case-create.component.ts", lineNumber: 17 }); })();
8487
-
8488
8039
  class Confirmation {
8489
8040
  caseId;
8490
8041
  status;
@@ -8622,6 +8173,21 @@ class ConvertHrefToRouterService {
8622
8173
  type: Injectable
8623
8174
  }], () => [{ type: i1$1.Router }], null); })();
8624
8175
 
8176
+ class EventTriggerService {
8177
+ eventTriggerSource = new Subject();
8178
+ announceEventTrigger(eventTrigger) {
8179
+ this.eventTriggerSource.next(eventTrigger);
8180
+ }
8181
+ static ɵfac = function EventTriggerService_Factory(t) { return new (t || EventTriggerService)(); };
8182
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventTriggerService, factory: EventTriggerService.ɵfac, providedIn: 'root' });
8183
+ }
8184
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventTriggerService, [{
8185
+ type: Injectable,
8186
+ args: [{
8187
+ providedIn: 'root',
8188
+ }]
8189
+ }], null, null); })();
8190
+
8625
8191
  class WizardFactoryService {
8626
8192
  create(eventTrigger) {
8627
8193
  return new Wizard(eventTrigger.wizard_pages);
@@ -8847,7 +8413,7 @@ class EventCompletionStateMachineService {
8847
8413
  entryActionForStateCheckTasksCanBeCompleted(state, context) {
8848
8414
  const assignNeeded = context.sessionStorageService.getItem('assignNeeded');
8849
8415
  context.workAllocationService.getTask(context.task.id).subscribe(taskResponse => {
8850
- if (taskResponse && taskResponse.task && taskResponse.task.task_state) {
8416
+ if (taskResponse?.task?.task_state) {
8851
8417
  switch (taskResponse.task.task_state.toUpperCase()) {
8852
8418
  case TaskState.Unassigned:
8853
8419
  // Task unassigned
@@ -8882,6 +8448,14 @@ class EventCompletionStateMachineService {
8882
8448
  break;
8883
8449
  }
8884
8450
  }
8451
+ else if (!taskResponse?.task) {
8452
+ context.alertService.setPreserveAlerts(true);
8453
+ context.alertService.warning({ phrase: 'Task statecheck : no task available for completion', replacements: {} });
8454
+ }
8455
+ else {
8456
+ context.alertService.setPreserveAlerts(true);
8457
+ context.alertService.warning({ phrase: 'Task statecheck : no task state available for completion', replacements: {} });
8458
+ }
8885
8459
  }, error => {
8886
8460
  context.alertService.error(error.message);
8887
8461
  return throwError(error);
@@ -8896,7 +8470,7 @@ class EventCompletionStateMachineService {
8896
8470
  entryActionForStateCompleteEventAndTask(state, context) {
8897
8471
  // Trigger final state to complete processing of state machine
8898
8472
  state.trigger(EventCompletionStates.Final);
8899
- const clientContextStr = context.sessionStorageService.getItem('clientContext');
8473
+ const clientContextStr = context.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
8900
8474
  const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8901
8475
  if (userTask?.task_data) {
8902
8476
  context.sessionStorageService.setItem('assignNeeded', 'false');
@@ -8904,6 +8478,8 @@ class EventCompletionStateMachineService {
8904
8478
  context.component.eventCanBeCompleted.emit(true);
8905
8479
  }
8906
8480
  else {
8481
+ context.alertService.setPreserveAlerts(true);
8482
+ context.alertService.warning({ phrase: 'CompleteEventAndTask : no task available for completion', replacements: {} });
8907
8483
  // Emit event cannot be completed event
8908
8484
  context.component.eventCanBeCompleted.emit(false);
8909
8485
  }
@@ -8917,13 +8493,15 @@ class EventCompletionStateMachineService {
8917
8493
  entryActionForStateTaskUnassigned(state, context) {
8918
8494
  // Trigger final state to complete processing of state machine
8919
8495
  state.trigger(EventCompletionStates.Final);
8920
- const clientContextStr = context.sessionStorageService.getItem('clientContext');
8496
+ const clientContextStr = context.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
8921
8497
  const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8922
8498
  if (userTask?.task_data) {
8923
8499
  context.sessionStorageService.setItem('assignNeeded', 'true');
8924
8500
  context.component.eventCanBeCompleted.emit(true);
8925
8501
  }
8926
8502
  else {
8503
+ context.alertService.setPreserveAlerts(true);
8504
+ context.alertService.warning({ phrase: 'Unassigned task : no task available for completion', replacements: {} });
8927
8505
  // Emit event cannot be completed event
8928
8506
  context.component.eventCanBeCompleted.emit(false);
8929
8507
  }
@@ -8955,7 +8533,7 @@ class EventCompletionStateMachineService {
8955
8533
  this.stateTaskUnassigned.addTransition(EventCompletionStates.Final, this.stateFinal);
8956
8534
  }
8957
8535
  taskPresentInSessionStorage(context) {
8958
- const clientContextStr = context.sessionStorageService.getItem('clientContext');
8536
+ const clientContextStr = context.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
8959
8537
  const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
8960
8538
  return !!userTask.task_data;
8961
8539
  }
@@ -9131,6 +8709,8 @@ class WorkAllocationService {
9131
8709
  */
9132
8710
  completeTask(taskId, eventName) {
9133
8711
  if (!this.isWAEnabled()) {
8712
+ this.alertService.setPreserveAlerts(true);
8713
+ this.alertService.warning({ phrase: 'completeTask: Work Allocation is not enabled, so the task could not be completed. Please complete the task associated with the case manually.' });
9134
8714
  return of(null);
9135
8715
  }
9136
8716
  this.appConfig.logMessage(`completeTask: completing ${taskId}`);
@@ -9152,6 +8732,8 @@ class WorkAllocationService {
9152
8732
  */
9153
8733
  assignAndCompleteTask(taskId, eventName) {
9154
8734
  if (!this.isWAEnabled()) {
8735
+ this.alertService.setPreserveAlerts(true);
8736
+ this.alertService.warning({ phrase: 'assignAndCompleteTask: Work Allocation is not enabled, so the task could not be completed. Please complete the task associated with the case manually.' });
9155
8737
  return of(null);
9156
8738
  }
9157
8739
  this.appConfig.logMessage(`assignAndCompleteTask: completing ${taskId}`);
@@ -9318,8 +8900,11 @@ class CaseEditComponent {
9318
8900
  workAllocationService;
9319
8901
  alertService;
9320
8902
  abstractConfig;
8903
+ cookieService;
9321
8904
  static ORIGIN_QUERY_PARAM = 'origin';
9322
8905
  static ALERT_MESSAGE = 'Page is being refreshed so you will be redirected to the first page of this event.';
8906
+ static CLIENT_CONTEXT = 'clientContext';
8907
+ static TASK_EVENT_COMPLETION_INFO = 'taskEventCompletionInfo';
9323
8908
  eventTrigger;
9324
8909
  submit;
9325
8910
  validate;
@@ -9343,7 +8928,7 @@ class CaseEditComponent {
9343
8928
  error;
9344
8929
  callbackErrorsSubject = new Subject();
9345
8930
  validPageList = [];
9346
- constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService, abstractConfig) {
8931
+ constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService, abstractConfig, cookieService) {
9347
8932
  this.fb = fb;
9348
8933
  this.caseNotifier = caseNotifier;
9349
8934
  this.router = router;
@@ -9361,6 +8946,7 @@ class CaseEditComponent {
9361
8946
  this.workAllocationService = workAllocationService;
9362
8947
  this.alertService = alertService;
9363
8948
  this.abstractConfig = abstractConfig;
8949
+ this.cookieService = cookieService;
9364
8950
  }
9365
8951
  ngOnInit() {
9366
8952
  this.wizard = this.wizardFactory.create(this.eventTrigger);
@@ -9378,6 +8964,7 @@ class CaseEditComponent {
9378
8964
  this.route.queryParams.subscribe((params) => {
9379
8965
  this.navigationOrigin = params[CaseEditComponent.ORIGIN_QUERY_PARAM];
9380
8966
  });
8967
+ removeTaskFromClientContext(this.sessionStorageService);
9381
8968
  }
9382
8969
  ngOnDestroy() {
9383
8970
  /* istanbul ignore else */
@@ -9467,12 +9054,12 @@ class CaseEditComponent {
9467
9054
  this.isSubmitting = true;
9468
9055
  // We have to run the event completion checks if task in session storage
9469
9056
  // and if the task is in session storage, then is it associated to the case
9470
- const clientContextStr = this.sessionStorageService.getItem('clientContext');
9057
+ const clientContextStr = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
9471
9058
  const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
9472
9059
  const taskInSessionStorage = userTask ? userTask.task_data : null;
9473
9060
  let taskEventCompletionInfo;
9474
9061
  let userInfo;
9475
- const taskEventCompletionStr = this.sessionStorageService.getItem('taskEventCompletionInfo');
9062
+ const taskEventCompletionStr = this.sessionStorageService.getItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
9476
9063
  const userInfoStr = this.sessionStorageService.getItem('userDetails');
9477
9064
  const assignNeeded = this.sessionStorageService.getItem('assignNeeded');
9478
9065
  if (taskEventCompletionStr) {
@@ -9502,7 +9089,7 @@ class CaseEditComponent {
9502
9089
  taskId: taskInSessionStorage.id,
9503
9090
  createdTimestamp: Date.now()
9504
9091
  };
9505
- this.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
9092
+ this.sessionStorageService.setItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO, JSON.stringify(taskEventCompletionInfo));
9506
9093
  this.isEventCompletionChecksRequired = true;
9507
9094
  }
9508
9095
  else {
@@ -9618,8 +9205,8 @@ class CaseEditComponent {
9618
9205
  const caseField = caseFieldsLookup[key];
9619
9206
  // If caseField.hidden is NOT truthy and also NOT equal to false, then it must be null/undefined (remember that
9620
9207
  // both null and undefined are equal to *neither false nor true*)
9621
- if (caseField && caseField.retain_hidden_value &&
9622
- (caseField.hidden || (caseField.hidden !== false && parentField && parentField.hidden))) {
9208
+ if (caseField?.retain_hidden_value &&
9209
+ (caseField?.hidden || (caseField?.hidden !== false && parentField?.hidden))) {
9623
9210
  if (caseField.field_type.type === 'Complex') {
9624
9211
  this.handleComplexField(caseField, formGroup, key, rawFormValueData);
9625
9212
  }
@@ -9674,8 +9261,9 @@ class CaseEditComponent {
9674
9261
  }), finalize(() => {
9675
9262
  this.loadingService.unregister(loadingSpinnerToken);
9676
9263
  // on event completion ensure the previous event clientContext/taskEventCompletionInfo removed
9677
- this.sessionStorageService.removeItem('clientContext');
9678
- this.sessionStorageService.removeItem('taskEventCompletionInfo');
9264
+ // Note - Not removeTaskFromClientContext because could interfere with other logic
9265
+ this.sessionStorageService.removeItem(CaseEditComponent.CLIENT_CONTEXT);
9266
+ this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
9679
9267
  this.isSubmitting = false;
9680
9268
  }))
9681
9269
  .subscribe(() => {
@@ -9703,7 +9291,7 @@ class CaseEditComponent {
9703
9291
  });
9704
9292
  }
9705
9293
  postCompleteTaskIfRequired() {
9706
- const clientContextStr = this.sessionStorageService.getItem('clientContext');
9294
+ const clientContextStr = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
9707
9295
  const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
9708
9296
  const [task, taskToBeCompleted] = userTask ? [userTask.task_data, userTask.complete_task] : [null, false];
9709
9297
  const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
@@ -9743,7 +9331,15 @@ class CaseEditComponent {
9743
9331
  }
9744
9332
  if (!taskEventCompletionInfo) {
9745
9333
  // if no task event present then there is no task to complete from previous event present
9746
- return true;
9334
+ // EXUI-2668 - Add additional logic to confirm the task is relevant to the event
9335
+ if (this.taskIsForEvent(taskInSessionStorage, eventDetails)) {
9336
+ return true;
9337
+ }
9338
+ else {
9339
+ // client context still needed for language
9340
+ removeTaskFromClientContext(this.sessionStorageService);
9341
+ return false;
9342
+ }
9747
9343
  }
9748
9344
  else {
9749
9345
  if (taskEventCompletionInfo.taskId !== taskInSessionStorage.id) {
@@ -9753,8 +9349,8 @@ class CaseEditComponent {
9753
9349
  this.eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails))
9754
9350
  || this.eventMoreThanDayAgo(taskEventCompletionInfo.createdTimestamp)) {
9755
9351
  // if the session storage not related to event, ignore it and remove
9756
- this.sessionStorageService.removeItem('clientContext');
9757
- this.sessionStorageService.removeItem('taskEventCompletionInfo');
9352
+ removeTaskFromClientContext(this.sessionStorageService);
9353
+ this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
9758
9354
  return false;
9759
9355
  }
9760
9356
  if (eventDetails.assignNeeded === 'false' && eventDetails.userId !== taskInSessionStorage.assignee) {
@@ -9796,7 +9392,15 @@ class CaseEditComponent {
9796
9392
  }
9797
9393
  return false;
9798
9394
  }
9799
- static ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(FieldsPurger), i0.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0.ɵɵdirectiveInject(WizardFactoryService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(AbstractAppConfig)); };
9395
+ taskIsForEvent(task, eventDetails) {
9396
+ // EXUI-2668 - Ensure description for task includes event ID
9397
+ // Note - This is a failsafe for an edge case that may never occur again
9398
+ // Description may not include eventId in some cases which may mean task not completed (however this will be easy to check)
9399
+ // In instances of the above taskEventCompletionInfo will be created to block this check from occurring
9400
+ this.abstractConfig.logMessage(`checking taskIsForEvent: task ID ${task.id}, task description ${task.description}, event name ${eventDetails.eventId}`);
9401
+ return task.case_id === eventDetails.caseId && (task.description && task.description.includes(eventDetails.eventId));
9402
+ }
9403
+ static ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(FieldsPurger), i0.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0.ɵɵdirectiveInject(WizardFactoryService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService), i0.ɵɵdirectiveInject(WorkAllocationService), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(ReadCookieService)); };
9800
9404
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditComponent, selectors: [["ccd-case-edit"]], inputs: { eventTrigger: "eventTrigger", submit: "submit", validate: "validate", saveDraft: "saveDraft", caseDetails: "caseDetails" }, outputs: { cancelled: "cancelled", submitted: "submitted" }, features: [i0.ɵɵProvidersFeature([GreyBarService])], decls: 1, vars: 0, template: function CaseEditComponent_Template(rf, ctx) { if (rf & 1) {
9801
9405
  i0.ɵɵelement(0, "router-outlet");
9802
9406
  } }, dependencies: [i1$1.RouterOutlet], styles: ["#fieldset-case-data[_ngcontent-%COMP%]{margin-bottom:30px}#fieldset-case-data[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}#confirmation-header[_ngcontent-%COMP%]{width:630px;background-color:#17958b;border:solid 1px #979797;color:#fff;text-align:center}#confirmation-body[_ngcontent-%COMP%]{width:630px;background-color:#fff}.valign-top[_ngcontent-%COMP%]{vertical-align:top}.summary-fields[_ngcontent-%COMP%]{margin-bottom:30px}.summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:0px}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.case-field-label[_ngcontent-%COMP%]{width:45%}.case-field-content[_ngcontent-%COMP%]{width:50%}.no-bottom-border[_ngcontent-%COMP%]{border-bottom:none}.case-field-change[_ngcontent-%COMP%]{width:5%}"] });
@@ -9804,7 +9408,7 @@ class CaseEditComponent {
9804
9408
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditComponent, [{
9805
9409
  type: Component,
9806
9410
  args: [{ selector: 'ccd-case-edit', providers: [GreyBarService], template: "<router-outlet></router-outlet>\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%}\n"] }]
9807
- }], () => [{ type: i4.FormBuilder }, { type: CaseNotifier }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: WorkAllocationService }, { type: AlertService }, { type: AbstractAppConfig }], { eventTrigger: [{
9411
+ }], () => [{ type: i4.FormBuilder }, { type: CaseNotifier }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }, { type: WorkAllocationService }, { type: AlertService }, { type: AbstractAppConfig }, { type: ReadCookieService }], { eventTrigger: [{
9808
9412
  type: Input
9809
9413
  }], submit: [{
9810
9414
  type: Input
@@ -9819,7 +9423,452 @@ class CaseEditComponent {
9819
9423
  }], submitted: [{
9820
9424
  type: Output
9821
9425
  }] }); })();
9822
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 35 }); })();
9426
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 37 }); })();
9427
+
9428
+ function convertNonASCIICharacter(character) {
9429
+ if (character === '£') {
9430
+ // pound sign will be frequently used and works for btoa despite being non-ASCII
9431
+ // note: this could be done for other characters provided they work for btoa()
9432
+ return character;
9433
+ }
9434
+ // Note: Will convert to HTML entity
9435
+ return CaseEditUtils.PREFIX + character.charCodeAt(0) + CaseEditUtils.SUFFIX;
9436
+ }
9437
+ class CaseEditUtils {
9438
+ static PREFIX = '&#';
9439
+ static SUFFIX = ';';
9440
+ convertNonASCIICharacters(rawString) {
9441
+ return rawString ? rawString.replace(/[^\x20-\x7E]/g, function (c) {
9442
+ return convertNonASCIICharacter(c);
9443
+ }) : '';
9444
+ }
9445
+ convertHTMLEntities(editedString) {
9446
+ const revertedCharacterList = editedString.split(CaseEditUtils.PREFIX);
9447
+ let rawString = revertedCharacterList[0];
9448
+ for (let index = 1; index < revertedCharacterList.length; index++) {
9449
+ const currentSection = revertedCharacterList[index];
9450
+ if (!currentSection.includes(CaseEditUtils.SUFFIX)) {
9451
+ return rawString.concat(currentSection);
9452
+ }
9453
+ else {
9454
+ const suffixSplitList = currentSection.split(CaseEditUtils.SUFFIX);
9455
+ const characterCode = Number(suffixSplitList[0]);
9456
+ rawString = rawString.concat(String.fromCharCode(characterCode), suffixSplitList[1]);
9457
+ }
9458
+ }
9459
+ return rawString;
9460
+ }
9461
+ }
9462
+ function removeTaskFromClientContext(sessionStorageService) {
9463
+ if (!sessionStorageService) {
9464
+ return;
9465
+ }
9466
+ const clientContextString = sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
9467
+ const clientContext = clientContextString ? JSON.parse(clientContextString) : null;
9468
+ if (clientContext?.client_context?.user_task) {
9469
+ delete clientContext.client_context.user_task;
9470
+ sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(clientContext));
9471
+ }
9472
+ }
9473
+
9474
+ class CasesService {
9475
+ http;
9476
+ appConfig;
9477
+ orderService;
9478
+ errorService;
9479
+ wizardPageFieldToCaseFieldMapper;
9480
+ loadingService;
9481
+ sessionStorageService;
9482
+ retryUtil;
9483
+ // Internal (UI) API
9484
+ static V2_MEDIATYPE_CASE_VIEW = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json';
9485
+ static V2_MEDIATYPE_START_CASE_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-case-trigger.v2+json;charset=UTF-8';
9486
+ static V2_MEDIATYPE_START_EVENT_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8';
9487
+ static V2_MEDIATYPE_START_DRAFT_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-draft-trigger.v2+json;charset=UTF-8';
9488
+ // External (Data Store) API
9489
+ static V2_MEDIATYPE_CASE_DOCUMENTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.case-documents.v2+json;charset=UTF-8';
9490
+ static V2_MEDIATYPE_CASE_DATA_VALIDATE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8';
9491
+ static V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
9492
+ static V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
9493
+ static PUI_CASE_MANAGER = 'pui-case-manager';
9494
+ get = this.getCaseView;
9495
+ static updateChallengedAccessRequestAttributes(httpClient, caseId, attributesToUpdate) {
9496
+ return httpClient.post(`/api/challenged-access-request/update-attributes`, {
9497
+ caseId,
9498
+ attributesToUpdate
9499
+ });
9500
+ }
9501
+ static updateSpecificAccessRequestAttributes(httpClient, caseId, attributesToUpdate) {
9502
+ return httpClient.post(`/api/specific-access-request/update-attributes`, {
9503
+ caseId,
9504
+ attributesToUpdate
9505
+ });
9506
+ }
9507
+ constructor(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService, retryUtil) {
9508
+ this.http = http;
9509
+ this.appConfig = appConfig;
9510
+ this.orderService = orderService;
9511
+ this.errorService = errorService;
9512
+ this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
9513
+ this.loadingService = loadingService;
9514
+ this.sessionStorageService = sessionStorageService;
9515
+ this.retryUtil = retryUtil;
9516
+ }
9517
+ getCaseView(jurisdictionId, caseTypeId, caseId) {
9518
+ const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases/${caseId}`;
9519
+ const loadingToken = this.loadingService.register();
9520
+ return this.http
9521
+ .get(url)
9522
+ .pipe(catchError(error => {
9523
+ this.errorService.setError(error);
9524
+ return throwError(error);
9525
+ }), finalize(() => this.loadingService.unregister(loadingToken)));
9526
+ }
9527
+ getCaseViewV2(caseId) {
9528
+ const url = `${this.appConfig.getCaseDataUrl()}/internal/cases/${caseId}`;
9529
+ const headers = new HttpHeaders()
9530
+ .set('experimental', 'true')
9531
+ .set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
9532
+ .set('Content-Type', 'application/json');
9533
+ const loadingToken = this.loadingService.register();
9534
+ let http$ = this.http.get(url, { headers, observe: 'body' });
9535
+ const artificialDelay = this.appConfig.getTimeoutsCaseRetrievalArtificialDelay();
9536
+ const timeoutPeriods = this.appConfig.getTimeoutsForCaseRetrieval();
9537
+ console.log(`Timeout periods: ${timeoutPeriods} seconds.`);
9538
+ if (timeoutPeriods && timeoutPeriods.length > 0 && timeoutPeriods[0] > 0) {
9539
+ http$ = this.retryUtil.pipeTimeoutMechanismOn(http$, artificialDelay, timeoutPeriods);
9540
+ }
9541
+ else {
9542
+ console.warn('Skipping to pipe a retry mechanism!');
9543
+ }
9544
+ http$ = this.pipeErrorProcessor(http$);
9545
+ http$ = http$.pipe(finalize(() => this.finalizeGetCaseViewWith(caseId, loadingToken)));
9546
+ return http$;
9547
+ }
9548
+ pipeErrorProcessor(in$) {
9549
+ const out$ = in$.pipe(catchError(error => {
9550
+ console.error(`Error while getting case view with getCaseViewV2! Error type: '${typeof error}, Error name: '${error?.name}'`);
9551
+ console.error(error);
9552
+ this.errorService.setError(error);
9553
+ return throwError(error);
9554
+ }));
9555
+ return out$;
9556
+ }
9557
+ finalizeGetCaseViewWith(caseId, loadingToken) {
9558
+ this.loadingService.unregister(loadingToken);
9559
+ }
9560
+ syncWait(seconds) {
9561
+ const end = Date.now() + seconds * 1000;
9562
+ while (Date.now() < end)
9563
+ continue;
9564
+ }
9565
+ getEventTrigger(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
9566
+ ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
9567
+ const url = this.buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning);
9568
+ let headers = new HttpHeaders();
9569
+ headers = headers.set('experimental', 'true');
9570
+ headers = headers.set('Content-Type', 'application/json');
9571
+ headers = this.addClientContextHeader(headers);
9572
+ if (Draft.isDraft(caseId)) {
9573
+ headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_DRAFT_TRIGGER);
9574
+ }
9575
+ else if (caseId !== undefined && caseId !== null) {
9576
+ headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_EVENT_TRIGGER);
9577
+ }
9578
+ else {
9579
+ headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_CASE_TRIGGER);
9580
+ }
9581
+ return this.http
9582
+ .get(url, { headers, observe: 'response' })
9583
+ .pipe(map((response) => {
9584
+ this.updateClientContextStorage(response.headers);
9585
+ return FieldsUtils.handleNestedDynamicLists(response.body);
9586
+ }), catchError(error => {
9587
+ this.errorService.setError(error);
9588
+ return throwError(error);
9589
+ }), map((p) => plainToClass(CaseEventTrigger, p)), tap(eventTrigger => this.initialiseEventTrigger(eventTrigger)));
9590
+ }
9591
+ createEvent(caseDetails, eventData) {
9592
+ const caseId = caseDetails.case_id;
9593
+ const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
9594
+ let headers = new HttpHeaders()
9595
+ .set('experimental', 'true')
9596
+ .set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
9597
+ .set('Content-Type', 'application/json');
9598
+ headers = this.addClientContextHeader(headers);
9599
+ return this.http
9600
+ .post(url, eventData, { headers, observe: 'response' })
9601
+ .pipe(map((response) => {
9602
+ this.updateClientContextStorage(response.headers);
9603
+ return response.body;
9604
+ }), catchError(error => {
9605
+ this.errorService.setError(error);
9606
+ return throwError(error);
9607
+ }));
9608
+ }
9609
+ validateCase(ctid, eventData, pageId) {
9610
+ const pageIdString = pageId ? `?pageId=${pageId}` : '';
9611
+ const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
9612
+ let headers = new HttpHeaders()
9613
+ .set('experimental', 'true')
9614
+ .set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
9615
+ .set('Content-Type', 'application/json');
9616
+ headers = this.addClientContextHeader(headers);
9617
+ return this.http
9618
+ .post(url, eventData, { headers, observe: 'response' })
9619
+ .pipe(map((response) => {
9620
+ this.updateClientContextStorage(response.headers);
9621
+ return response.body;
9622
+ }), catchError(error => {
9623
+ this.errorService.setError(error);
9624
+ return throwError(error);
9625
+ }));
9626
+ }
9627
+ createCase(ctid, eventData) {
9628
+ let ignoreWarning = 'false';
9629
+ if (eventData.ignore_warning) {
9630
+ ignoreWarning = 'true';
9631
+ }
9632
+ const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
9633
+ let headers = new HttpHeaders()
9634
+ .set('experimental', 'true')
9635
+ .set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
9636
+ .set('Content-Type', 'application/json');
9637
+ headers = this.addClientContextHeader(headers);
9638
+ return this.http
9639
+ .post(url, eventData, { headers, observe: 'response' })
9640
+ .pipe(map((response) => {
9641
+ this.updateClientContextStorage(response.headers);
9642
+ return response.body;
9643
+ }), catchError(error => {
9644
+ this.errorService.setError(error);
9645
+ return throwError(error);
9646
+ }));
9647
+ }
9648
+ getPrintDocuments(caseId) {
9649
+ const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
9650
+ let headers = new HttpHeaders()
9651
+ .set('experimental', 'true')
9652
+ .set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
9653
+ .set('Content-Type', 'application/json');
9654
+ headers = this.addClientContextHeader(headers);
9655
+ return this.http
9656
+ .get(url, { headers, observe: 'response' })
9657
+ .pipe(map((response) => {
9658
+ this.updateClientContextStorage(response.headers);
9659
+ return response.body.documentResources;
9660
+ }), catchError(error => {
9661
+ this.errorService.setError(error);
9662
+ return throwError(error);
9663
+ }));
9664
+ }
9665
+ buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
9666
+ let url = `${this.appConfig.getCaseDataUrl()}/internal`;
9667
+ if (Draft.isDraft(caseId)) {
9668
+ url += `/drafts/${caseId}`
9669
+ + `/event-trigger`
9670
+ + `?ignore-warning=${ignoreWarning}`;
9671
+ }
9672
+ else if (caseTypeId === undefined || caseTypeId === null) {
9673
+ url += `/cases/${caseId}`
9674
+ + `/event-triggers/${eventTriggerId}`
9675
+ + `?ignore-warning=${ignoreWarning}`;
9676
+ }
9677
+ else {
9678
+ url += `/case-types/${caseTypeId}`
9679
+ + `/event-triggers/${eventTriggerId}`
9680
+ + `?ignore-warning=${ignoreWarning}`;
9681
+ }
9682
+ return url;
9683
+ }
9684
+ initialiseEventTrigger(eventTrigger) {
9685
+ if (!eventTrigger.wizard_pages) {
9686
+ eventTrigger.wizard_pages = [];
9687
+ }
9688
+ eventTrigger.wizard_pages.forEach((wizardPage) => {
9689
+ wizardPage.parsedShowCondition = ShowCondition.getInstance(wizardPage.show_condition);
9690
+ wizardPage.case_fields = this.orderService.sort(this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
9691
+ });
9692
+ }
9693
+ getCourtOrHearingCentreName(locationId) {
9694
+ return this.http.post(`/api/locations/getLocationsById`, { locations: [{ locationId }] });
9695
+ }
9696
+ createChallengedAccessRequest(caseId, request) {
9697
+ // Assignment API endpoint
9698
+ const userInfoStr = this.sessionStorageService.getItem('userDetails');
9699
+ const camUtils = new CaseAccessUtils();
9700
+ let userInfo;
9701
+ if (userInfoStr) {
9702
+ userInfo = JSON.parse(userInfoStr);
9703
+ }
9704
+ const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
9705
+ const roleName = camUtils.getAMRoleName('challenged', roleCategory);
9706
+ const beginTime = new Date();
9707
+ const endTime = new Date(new Date().setUTCHours(23, 59, 59, 999));
9708
+ const id = userInfo.id ? userInfo.id : userInfo.uid;
9709
+ const isNew = true;
9710
+ const payload = camUtils.getAMPayload(id, id, roleName, roleCategory, 'CHALLENGED', caseId, request, beginTime, endTime, isNew);
9711
+ return this.http.post(`/api/challenged-access-request`, payload);
9712
+ }
9713
+ createSpecificAccessRequest(caseId, sar) {
9714
+ // Assignment API endpoint
9715
+ const userInfoStr = this.sessionStorageService.getItem('userDetails');
9716
+ const camUtils = new CaseAccessUtils();
9717
+ let userInfo;
9718
+ if (userInfoStr) {
9719
+ userInfo = JSON.parse(userInfoStr);
9720
+ }
9721
+ const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
9722
+ const roleName = camUtils.getAMRoleName('specific', roleCategory);
9723
+ const id = userInfo.id ? userInfo.id : userInfo.uid;
9724
+ const payload = camUtils.getAMPayload(null, id, roleName, roleCategory, 'SPECIFIC', caseId, sar, null, null, true);
9725
+ payload.roleRequest = {
9726
+ ...payload.roleRequest,
9727
+ process: 'specific-access',
9728
+ replaceExisting: true,
9729
+ assignerId: payload.requestedRoles[0].actorId,
9730
+ reference: `${caseId}/${roleName}/${payload.requestedRoles[0].actorId}`
9731
+ };
9732
+ payload.requestedRoles[0] = {
9733
+ ...payload.requestedRoles[0],
9734
+ roleName: 'specific-access-requested',
9735
+ roleCategory,
9736
+ classification: 'PRIVATE',
9737
+ endTime: new Date(new Date().setDate(new Date().getDate() + 30)),
9738
+ beginTime: null,
9739
+ grantType: 'BASIC',
9740
+ readOnly: true
9741
+ };
9742
+ payload.requestedRoles[0].attributes = {
9743
+ ...payload.requestedRoles[0].attributes,
9744
+ requestedRole: roleName,
9745
+ specificAccessReason: sar.specificReason
9746
+ };
9747
+ payload.requestedRoles[0].notes[0] = {
9748
+ ...payload.requestedRoles[0].notes[0],
9749
+ userId: payload.requestedRoles[0].actorId
9750
+ };
9751
+ return this.http.post(`/api/specific-access-request`, payload);
9752
+ }
9753
+ getLinkedCases(caseId) {
9754
+ const url = `${this.appConfig.getCaseDataStoreApiUrl()}/${caseId}`;
9755
+ return this.http
9756
+ .get(url)
9757
+ .pipe(catchError(error => throwError(error)));
9758
+ }
9759
+ addClientContextHeader(headers) {
9760
+ const clientContextDetails = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
9761
+ if (clientContextDetails) {
9762
+ const caseEditUtils = new CaseEditUtils();
9763
+ // below changes non-ASCII characters
9764
+ const editedClientContext = caseEditUtils.convertNonASCIICharacters(clientContextDetails);
9765
+ const clientContext = window.btoa(editedClientContext);
9766
+ if (clientContext) {
9767
+ headers = headers.set('Client-Context', clientContext);
9768
+ }
9769
+ }
9770
+ return headers;
9771
+ }
9772
+ updateClientContextStorage(headers) {
9773
+ if (headers && headers.get('Client-Context')) {
9774
+ const caseEditUtils = new CaseEditUtils();
9775
+ const clientContextString = window.atob(headers.get('Client-Context'));
9776
+ // below reverts non-ASCII characters
9777
+ const editedClientContextString = caseEditUtils.convertHTMLEntities(clientContextString);
9778
+ this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, editedClientContextString);
9779
+ }
9780
+ }
9781
+ static ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(OrderService), i0.ɵɵinject(HttpErrorService), i0.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0.ɵɵinject(LoadingService), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(RetryUtil)); };
9782
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
9783
+ }
9784
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CasesService, [{
9785
+ type: Injectable
9786
+ }], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }, { type: RetryUtil }], null); })();
9787
+
9788
+ function CaseCreateComponent_div_0_Template(rf, ctx) { if (rf & 1) {
9789
+ const _r1 = i0.ɵɵgetCurrentView();
9790
+ i0.ɵɵelementStart(0, "div")(1, "ccd-case-edit", 1);
9791
+ i0.ɵɵlistener("cancelled", function CaseCreateComponent_div_0_Template_ccd_case_edit_cancelled_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.emitCancelled($event)); })("submitted", function CaseCreateComponent_div_0_Template_ccd_case_edit_submitted_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.emitSubmitted($event)); });
9792
+ i0.ɵɵelementEnd()();
9793
+ } if (rf & 2) {
9794
+ const ctx_r1 = i0.ɵɵnextContext();
9795
+ i0.ɵɵadvance();
9796
+ i0.ɵɵproperty("submit", ctx_r1.submit())("validate", ctx_r1.validate())("saveDraft", ctx_r1.saveDraft())("eventTrigger", ctx_r1.eventTrigger);
9797
+ } }
9798
+ class CaseCreateComponent {
9799
+ casesService;
9800
+ alertService;
9801
+ draftService;
9802
+ eventTriggerService;
9803
+ jurisdiction;
9804
+ caseType;
9805
+ event;
9806
+ cancelled = new EventEmitter();
9807
+ submitted = new EventEmitter();
9808
+ eventTrigger;
9809
+ constructor(casesService, alertService, draftService, eventTriggerService) {
9810
+ this.casesService = casesService;
9811
+ this.alertService = alertService;
9812
+ this.draftService = draftService;
9813
+ this.eventTriggerService = eventTriggerService;
9814
+ }
9815
+ ngOnInit() {
9816
+ this.casesService.getEventTrigger(this.caseType, this.event).toPromise()
9817
+ .then(eventTrigger => {
9818
+ this.eventTrigger = eventTrigger;
9819
+ this.eventTriggerService.announceEventTrigger(eventTrigger);
9820
+ })
9821
+ .catch((error) => {
9822
+ this.alertService.error({ phrase: error.message });
9823
+ return throwError(error);
9824
+ });
9825
+ }
9826
+ submit() {
9827
+ return (sanitizedEditForm) => {
9828
+ sanitizedEditForm.draft_id = this.eventTrigger.case_id;
9829
+ return this.casesService.createCase(this.caseType, sanitizedEditForm);
9830
+ };
9831
+ }
9832
+ validate() {
9833
+ return (sanitizedEditForm, pageId) => this.casesService
9834
+ .validateCase(this.caseType, sanitizedEditForm, pageId);
9835
+ }
9836
+ saveDraft() {
9837
+ if (this.eventTrigger.can_save_draft) {
9838
+ return (caseEventData) => this.draftService.createOrUpdateDraft(this.caseType, this.eventTrigger.case_id, caseEventData);
9839
+ }
9840
+ }
9841
+ emitCancelled(event) {
9842
+ this.cancelled.emit(event);
9843
+ }
9844
+ emitSubmitted(event) {
9845
+ this.submitted.emit(event);
9846
+ }
9847
+ isDataLoaded() {
9848
+ return this.eventTrigger ? true : false;
9849
+ }
9850
+ static ɵfac = function CaseCreateComponent_Factory(t) { return new (t || CaseCreateComponent)(i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(DraftService), i0.ɵɵdirectiveInject(EventTriggerService)); };
9851
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseCreateComponent, selectors: [["ccd-case-create"]], inputs: { jurisdiction: "jurisdiction", caseType: "caseType", event: "event" }, outputs: { cancelled: "cancelled", submitted: "submitted" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [3, "cancelled", "submitted", "submit", "validate", "saveDraft", "eventTrigger"]], template: function CaseCreateComponent_Template(rf, ctx) { if (rf & 1) {
9852
+ i0.ɵɵtemplate(0, CaseCreateComponent_div_0_Template, 2, 4, "div", 0);
9853
+ } if (rf & 2) {
9854
+ i0.ɵɵproperty("ngIf", ctx.isDataLoaded());
9855
+ } }, encapsulation: 2 });
9856
+ }
9857
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseCreateComponent, [{
9858
+ type: Component,
9859
+ args: [{ selector: 'ccd-case-create', template: "<div *ngIf=\"isDataLoaded()\">\n <ccd-case-edit [submit]=\"submit()\"\n [validate]=\"validate()\"\n [saveDraft]=\"saveDraft()\"\n [eventTrigger]=\"eventTrigger\"\n (cancelled)=\"emitCancelled($event)\"\n (submitted)=\"emitSubmitted($event)\"></ccd-case-edit>\n</div>" }]
9860
+ }], () => [{ type: CasesService }, { type: AlertService }, { type: DraftService }, { type: EventTriggerService }], { jurisdiction: [{
9861
+ type: Input
9862
+ }], caseType: [{
9863
+ type: Input
9864
+ }], event: [{
9865
+ type: Input
9866
+ }], cancelled: [{
9867
+ type: Output
9868
+ }], submitted: [{
9869
+ type: Output
9870
+ }] }); })();
9871
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseCreateComponent, { className: "CaseCreateComponent", filePath: "lib/shared/components/case-editor/case-create/case-create.component.ts", lineNumber: 17 }); })();
9823
9872
 
9824
9873
  function CaseEditConfirmComponent_div_3_Template(rf, ctx) { if (rf & 1) {
9825
9874
  i0.ɵɵelement(0, "div");
@@ -11244,7 +11293,7 @@ class CaseEventCompletionTaskCancelledComponent {
11244
11293
  }
11245
11294
  onContinue() {
11246
11295
  // Removes task to complete so event completes without task
11247
- this.context.sessionStorageService.removeItem('clientContext');
11296
+ this.context.sessionStorageService.removeItem(CaseEditComponent.CLIENT_CONTEXT);
11248
11297
  // may be able to remove this call below since it is now unneccesary
11249
11298
  this.notifyEventCompletionCancelled.emit(true);
11250
11299
  }
@@ -11430,7 +11479,7 @@ class CaseEventCompletionTaskReassignedComponent {
11430
11479
  }
11431
11480
  onContinue() {
11432
11481
  // Get task details
11433
- const clientContextStr = this.sessionStorageService.getItem('clientContext');
11482
+ const clientContextStr = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
11434
11483
  const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
11435
11484
  const task = userTask ? userTask.task_data : null;
11436
11485
  // not complete_task not utilised here as related to event completion
@@ -11460,7 +11509,7 @@ class CaseEventCompletionTaskReassignedComponent {
11460
11509
  }], notifyEventCompletionReassigned: [{
11461
11510
  type: Output
11462
11511
  }] }); })();
11463
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskReassignedComponent, { className: "CaseEventCompletionTaskReassignedComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.ts", lineNumber: 15 }); })();
11512
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEventCompletionTaskReassignedComponent, { className: "CaseEventCompletionTaskReassignedComponent", filePath: "lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.ts", lineNumber: 16 }); })();
11464
11513
 
11465
11514
  class AddressOption {
11466
11515
  description;
@@ -14247,6 +14296,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
14247
14296
  static UPLOAD_TIMESTAMP = 'upload_timestamp';
14248
14297
  static UPLOAD_ERROR_FILE_REQUIRED = 'File required';
14249
14298
  static UPLOAD_ERROR_NOT_AVAILABLE = 'Document upload facility is not available at the moment';
14299
+ static UPLOAD_ERROR_INVALID_FORMAT = 'Document format is not supported';
14250
14300
  static UPLOAD_WAITING_FILE_STATUS = 'Uploading...';
14251
14301
  static ERROR_UPLOADING_FILE = 'Error Uploading File';
14252
14302
  fileInput;
@@ -14324,8 +14374,15 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
14324
14374
  }
14325
14375
  }
14326
14376
  }
14327
- fileChangeEvent(fileInput) {
14328
- if (fileInput.target.files[0]) {
14377
+ fileChangeEvent(fileInput, allowedRegex) {
14378
+ let fileTypeRegex;
14379
+ if (allowedRegex) {
14380
+ fileTypeRegex = new RegExp(`(${allowedRegex.replace(/,/g, '|')})`);
14381
+ }
14382
+ if (fileInput.target?.files[0] && !fileInput.target?.files[0]?.name?.match(fileTypeRegex)) {
14383
+ this.invalidFileFormat();
14384
+ }
14385
+ else if (fileInput.target.files[0]) {
14329
14386
  this.selectedFile = fileInput.target.files[0];
14330
14387
  this.displayFileUploadMessages(WriteDocumentFieldComponent.UPLOAD_WAITING_FILE_STATUS);
14331
14388
  const documentUpload = this.buildDocumentUploadData(this.selectedFile);
@@ -14358,6 +14415,10 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
14358
14415
  }
14359
14416
  return false;
14360
14417
  }
14418
+ invalidFileFormat() {
14419
+ this.updateDocumentForm(null, null, null);
14420
+ this.displayFileUploadMessages(WriteDocumentFieldComponent.UPLOAD_ERROR_INVALID_FORMAT);
14421
+ }
14361
14422
  getUploadedFileName() {
14362
14423
  if (this.uploadedDocument) {
14363
14424
  return this.uploadedDocument.get(WriteDocumentFieldComponent.DOCUMENT_FILENAME).value;
@@ -14575,7 +14636,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
14575
14636
  i0.ɵɵlistener("click", function WriteDocumentFieldComponent_Template_div_click_11_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.fileSelectEvent()); })("keyup", function WriteDocumentFieldComponent_Template_div_keyup_11_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.fileSelectEvent()); });
14576
14637
  i0.ɵɵelementEnd();
14577
14638
  i0.ɵɵelementStart(12, "input", 9, 0);
14578
- i0.ɵɵlistener("keydown.Tab", function WriteDocumentFieldComponent_Template_input_keydown_Tab_12_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.fileValidationsOnTab()); })("change", function WriteDocumentFieldComponent_Template_input_change_12_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.fileChangeEvent($event)); });
14639
+ i0.ɵɵlistener("keydown.Tab", function WriteDocumentFieldComponent_Template_input_keydown_Tab_12_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.fileValidationsOnTab()); })("change", function WriteDocumentFieldComponent_Template_input_change_12_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.fileChangeEvent($event, ctx.caseField.field_type.regular_expression)); });
14579
14640
  i0.ɵɵelementEnd()()();
14580
14641
  i0.ɵɵelementStart(14, "div", 10)(15, "button", 11);
14581
14642
  i0.ɵɵlistener("click", function WriteDocumentFieldComponent_Template_button_click_15_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.cancelUpload()); });
@@ -14609,7 +14670,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
14609
14670
  }
14610
14671
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDocumentFieldComponent, [{
14611
14672
  type: Component,
14612
- args: [{ selector: 'ccd-write-document-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error bottom-30': !valid}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" attr.aria-label=\"{{caseField | ccdFieldLabel}}\">{{(caseField | ccdFieldLabel)}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"fileUploadMessages && !valid\">{{fileUploadMessages | rpxTranslate}}</span>\n\n <div>\n <!--<span *ngIf=\"getUploadedFileName()\" class=\"text-16\">File name: {{getUploadedFileName()}}</span>-->\n <ccd-read-document-field *ngIf=\"caseField\" [caseField]=\"caseField\"></ccd-read-document-field>\n </div>\n\n <div style='position:relative'>\n <div [id]=\"createElementId('fileInputWrapper')\" (click)=\"fileSelectEvent()\" (keyup)=\"fileSelectEvent()\"></div>\n <input class=\"form-control bottom-30\" [id]=\"id()\" type=\"file\" (keydown.Tab)=\"fileValidationsOnTab()\" (change)=\"fileChangeEvent($event)\"\n accept=\"{{caseField.field_type.regular_expression}}\" #fileInput/>\n </div>\n</div>\n<div class=\"form-group bottom-30\">\n <button class=\"button button-secondary\" type=\"button\" aria-label=\"Cancel upload\" (click)=\"cancelUpload()\" [disabled]=\"!isUploadInProgress()\">{{'Cancel upload' | rpxTranslate}}</button>\n</div>\n" }]
14673
+ args: [{ selector: 'ccd-write-document-field', template: "<div class=\"form-group\" [ngClass]=\"{'form-group-error bottom-30': !valid}\">\n <label [for]=\"id()\">\n <span class=\"form-label\" attr.aria-label=\"{{caseField | ccdFieldLabel}}\">{{(caseField | ccdFieldLabel)}}</span>\n </label>\n <span class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span class=\"error-message\" *ngIf=\"fileUploadMessages && !valid\">{{fileUploadMessages | rpxTranslate}}</span>\n\n <div>\n <!--<span *ngIf=\"getUploadedFileName()\" class=\"text-16\">File name: {{getUploadedFileName()}}</span>-->\n <ccd-read-document-field *ngIf=\"caseField\" [caseField]=\"caseField\"></ccd-read-document-field>\n </div>\n\n <div style='position:relative'>\n <div [id]=\"createElementId('fileInputWrapper')\" (click)=\"fileSelectEvent()\" (keyup)=\"fileSelectEvent()\"></div>\n <input class=\"form-control bottom-30\" [id]=\"id()\" type=\"file\" (keydown.Tab)=\"fileValidationsOnTab()\" (change)=\"fileChangeEvent($event, caseField.field_type.regular_expression)\"\n accept=\"{{caseField.field_type.regular_expression}}\" #fileInput/>\n </div>\n</div>\n<div class=\"form-group bottom-30\">\n <button class=\"button button-secondary\" type=\"button\" aria-label=\"Cancel upload\" (click)=\"cancelUpload()\" [disabled]=\"!isUploadInProgress()\">{{'Cancel upload' | rpxTranslate}}</button>\n</div>\n" }]
14613
14674
  }], () => [{ type: AbstractAppConfig }, { type: CaseNotifier }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: FileUploadStateService }, { type: JurisdictionService }], { fileInput: [{
14614
14675
  type: ViewChild,
14615
14676
  args: ['fileInput', { static: false }]
@@ -16651,8 +16712,8 @@ class LinkCasesComponent {
16651
16712
  })), this.validatorsUtils.formArraySelectedValidator());
16652
16713
  }
16653
16714
  toggleLinkCaseReasonOtherComments(event) {
16654
- this.linkCaseReasons.find(reason => reason.value_en === event.target.value).selected = event.target.checked;
16655
- this.showComments = this.linkCaseReasons.find(reason => reason.value_en === 'Other').selected;
16715
+ this.linkCaseReasons.find((reason) => reason.value_en === event.target.value).selected = event.target.checked;
16716
+ this.showComments = this.linkCaseReasons.find((reason) => reason.value_en === 'Other')?.selected;
16656
16717
  }
16657
16718
  submitCaseInfo() {
16658
16719
  this.errorMessages = [];
@@ -16691,7 +16752,7 @@ class LinkCasesComponent {
16691
16752
  this.errorMessages.push({
16692
16753
  title: 'dummy-case-number',
16693
16754
  description: LinkedCasesErrorMessages.CaseNumberError,
16694
- fieldId: 'caseNumber',
16755
+ fieldId: 'caseNumber'
16695
16756
  });
16696
16757
  }
16697
16758
  if (this.linkCaseForm.controls.reasonType.invalid) {
@@ -16699,17 +16760,17 @@ class LinkCasesComponent {
16699
16760
  this.errorMessages.push({
16700
16761
  title: 'dummy-case-reason',
16701
16762
  description: LinkedCasesErrorMessages.ReasonSelectionError,
16702
- fieldId: 'caseReason',
16763
+ fieldId: 'caseReason'
16703
16764
  });
16704
16765
  }
16705
16766
  if (this.linkCaseForm.controls.reasonType.valid
16706
- && this.linkCaseReasons.find(reason => reason.value_en === 'Other').selected) {
16767
+ && this.linkCaseReasons.find((reason) => reason.value_en === 'Other').selected) {
16707
16768
  if (this.linkCaseForm.controls.otherDescription.value.trim().length === 0) {
16708
16769
  this.caseReasonCommentsError = LinkedCasesErrorMessages.otherDescriptionError;
16709
16770
  this.errorMessages.push({
16710
16771
  title: 'dummy-case-reason-comments',
16711
16772
  description: LinkedCasesErrorMessages.otherDescriptionError,
16712
- fieldId: 'otherDescription',
16773
+ fieldId: 'otherDescription'
16713
16774
  });
16714
16775
  }
16715
16776
  if (this.linkCaseForm.controls.otherDescription.value.trim().length > 100) {
@@ -16717,7 +16778,7 @@ class LinkCasesComponent {
16717
16778
  this.errorMessages.push({
16718
16779
  title: 'dummy-case-reason-comments',
16719
16780
  description: LinkedCasesErrorMessages.otherDescriptionMaxLengthError,
16720
- fieldId: 'otherDescription',
16781
+ fieldId: 'otherDescription'
16721
16782
  });
16722
16783
  }
16723
16784
  }
@@ -16726,7 +16787,7 @@ class LinkCasesComponent {
16726
16787
  this.errorMessages.push({
16727
16788
  title: 'dummy-case-number',
16728
16789
  description: LinkedCasesErrorMessages.CaseProposedError,
16729
- fieldId: 'caseNumber',
16790
+ fieldId: 'caseNumber'
16730
16791
  });
16731
16792
  }
16732
16793
  if (this.isCaseSelected(this.linkedCasesService.linkedCases)) {
@@ -16734,14 +16795,14 @@ class LinkCasesComponent {
16734
16795
  this.errorMessages.push({
16735
16796
  title: 'dummy-case-number',
16736
16797
  description: LinkedCasesErrorMessages.CasesLinkedError,
16737
- fieldId: 'caseNumber',
16798
+ fieldId: 'caseNumber'
16738
16799
  });
16739
16800
  }
16740
16801
  if (this.linkCaseForm.value.caseNumber.split('-').join('') === this.linkedCasesService.caseId.split('-').join('')) {
16741
16802
  this.errorMessages.push({
16742
16803
  title: 'dummy-case-number',
16743
16804
  description: LinkedCasesErrorMessages.ProposedCaseWithIn,
16744
- fieldId: 'caseNumber',
16805
+ fieldId: 'caseNumber'
16745
16806
  });
16746
16807
  }
16747
16808
  window.scrollTo(0, 0);
@@ -16762,7 +16823,7 @@ class LinkCasesComponent {
16762
16823
  caseState: caseView.state.name || '',
16763
16824
  caseStateDescription: caseView.state.description || '',
16764
16825
  caseService: caseView.case_type && caseView.case_type.jurisdiction && caseView.case_type.jurisdiction.description || '',
16765
- caseName: this.linkedCasesService.getCaseName(caseView),
16826
+ caseName: this.linkedCasesService.getCaseName(caseView)
16766
16827
  };
16767
16828
  const ccdApiCaseLinkData = {
16768
16829
  CaseReference: caseView.case_id,
@@ -16775,7 +16836,7 @@ class LinkCasesComponent {
16775
16836
  }
16776
16837
  this.linkedCasesService.caseFieldValue.push({ id: caseView.case_id.toString(), value: ccdApiCaseLinkData });
16777
16838
  this.selectedCases.push(caseLink);
16778
- this.linkCaseReasons.forEach(reason => reason.selected = false);
16839
+ this.linkCaseReasons.forEach((reason) => reason.selected = false);
16779
16840
  this.initForm();
16780
16841
  this.emitLinkedCasesState(false);
16781
16842
  }, (error) => {
@@ -16783,7 +16844,7 @@ class LinkCasesComponent {
16783
16844
  this.errorMessages.push({
16784
16845
  title: 'dummy-case-number',
16785
16846
  description: LinkedCasesErrorMessages.CaseCheckAgainError,
16786
- fieldId: 'caseNumber',
16847
+ fieldId: 'caseNumber'
16787
16848
  });
16788
16849
  this.emitLinkedCasesState(false);
16789
16850
  window.scrollTo(0, 0);
@@ -16795,7 +16856,7 @@ class LinkCasesComponent {
16795
16856
  this.linkedCasesStateEmitter.emit({
16796
16857
  currentLinkedCasesPage: LinkedCasesPages.LINK_CASE,
16797
16858
  errorMessages: this.errorMessages,
16798
- navigateToNextPage: isNavigateToNextPage,
16859
+ navigateToNextPage: isNavigateToNextPage
16799
16860
  });
16800
16861
  }
16801
16862
  getSelectedCaseReasons() {
@@ -16830,7 +16891,7 @@ class LinkCasesComponent {
16830
16891
  }
16831
16892
  onSelectedLinkedCaseRemove(pos, selectedCaseReference) {
16832
16893
  const caseFieldValue = this.linkedCasesService.caseFieldValue || [];
16833
- const updatedItems = caseFieldValue.filter(item => item.value && item.value.CaseReference !== selectedCaseReference);
16894
+ const updatedItems = caseFieldValue.filter((item) => item.value && item.value.CaseReference !== selectedCaseReference);
16834
16895
  if (updatedItems) {
16835
16896
  this.linkedCasesService.caseFieldValue = updatedItems;
16836
16897
  }
@@ -16851,7 +16912,7 @@ class LinkCasesComponent {
16851
16912
  this.errorMessages.push({
16852
16913
  title: 'dummy-case-selection',
16853
16914
  description: LinkedCasesErrorMessages.CaseSelectionError,
16854
- fieldId: 'caseReason',
16915
+ fieldId: 'caseReason'
16855
16916
  });
16856
16917
  navigateToNextPage = false;
16857
16918
  }
@@ -17586,7 +17647,7 @@ class UnLinkCasesComponent {
17586
17647
  }
17587
17648
  else {
17588
17649
  this.casesService.getCaseViewV2(this.caseId).subscribe((caseView) => {
17589
- const linkedCasesTab = caseView.tabs.find(tab => tab.id === UnLinkCasesComponent.LINKED_CASES_TAB_ID);
17650
+ const linkedCasesTab = caseView.tabs.find((tab) => tab.id === UnLinkCasesComponent.LINKED_CASES_TAB_ID);
17590
17651
  if (linkedCasesTab) {
17591
17652
  const linkedCases = linkedCasesTab.fields[0].value;
17592
17653
  this.linkedCases = linkedCases;
@@ -17598,22 +17659,22 @@ class UnLinkCasesComponent {
17598
17659
  }
17599
17660
  getAllLinkedCaseInformation() {
17600
17661
  const searchCasesResponse = [];
17601
- this.linkedCases.forEach(linkedCase => {
17662
+ this.linkedCases.forEach((linkedCase) => {
17602
17663
  searchCasesResponse.push(this.casesService.getCaseViewV2(linkedCase.caseReference));
17603
17664
  });
17604
17665
  if (searchCasesResponse.length) {
17605
17666
  this.searchCasesByCaseIds(searchCasesResponse).subscribe((searchCases) => {
17606
17667
  searchCases.forEach((response) => {
17607
- const linkedCaseFromList = this.linkedCases.find(linkedCase => linkedCase.caseReference === response.case_id);
17668
+ const linkedCaseFromList = this.linkedCases.find((linkedCase) => linkedCase.caseReference === response.case_id);
17608
17669
  if (linkedCaseFromList) {
17609
17670
  const caseName = this.linkedCasesService.getCaseName(response);
17610
- this.linkedCases.find(linkedCase => linkedCase.caseReference === response.case_id).caseName = caseName;
17671
+ this.linkedCases.find((linkedCase) => linkedCase.caseReference === response.case_id).caseName = caseName;
17611
17672
  }
17612
17673
  });
17613
17674
  this.initForm();
17614
17675
  this.linkedCasesService.linkedCases = this.linkedCases;
17615
17676
  this.isServerError = false;
17616
- }, err => {
17677
+ }, (err) => {
17617
17678
  this.isServerError = true;
17618
17679
  this.notifyAPIFailure.emit(true);
17619
17680
  });
@@ -17628,7 +17689,7 @@ class UnLinkCasesComponent {
17628
17689
  });
17629
17690
  }
17630
17691
  get getLinkedCasesFormArray() {
17631
- const formFieldArray = this.linkedCases.map(val => this.fb.group({
17692
+ const formFieldArray = this.linkedCases.map((val) => this.fb.group({
17632
17693
  caseReference: val.caseReference,
17633
17694
  reasons: val.reasons,
17634
17695
  createdDateTime: val.createdDateTime,
@@ -17642,7 +17703,7 @@ class UnLinkCasesComponent {
17642
17703
  }
17643
17704
  onChange(caseSelected) {
17644
17705
  this.resetErrorMessages();
17645
- const selectedCase = this.linkedCases.find(linkedCase => linkedCase.caseReference === caseSelected.value);
17706
+ const selectedCase = this.linkedCases.find((linkedCase) => linkedCase.caseReference === caseSelected.value);
17646
17707
  if (selectedCase) {
17647
17708
  selectedCase.unlink = caseSelected.checked ? true : false;
17648
17709
  }
@@ -17650,7 +17711,7 @@ class UnLinkCasesComponent {
17650
17711
  onNext() {
17651
17712
  this.resetErrorMessages();
17652
17713
  let navigateToNextPage = true;
17653
- const casesMarkedToUnlink = this.linkedCases.find(linkedCase => linkedCase.unlink && linkedCase.unlink === true);
17714
+ const casesMarkedToUnlink = this.linkedCases.find((linkedCase) => linkedCase.unlink && linkedCase.unlink === true);
17654
17715
  if (!casesMarkedToUnlink) {
17655
17716
  this.errorMessages.push({
17656
17717
  title: 'case-selection',
@@ -17668,7 +17729,7 @@ class UnLinkCasesComponent {
17668
17729
  this.linkedCasesStateEmitter.emit({
17669
17730
  currentLinkedCasesPage: LinkedCasesPages.UNLINK_CASE,
17670
17731
  errorMessages: this.errorMessages,
17671
- navigateToNextPage: isNavigateToNextPage,
17732
+ navigateToNextPage: isNavigateToNextPage
17672
17733
  });
17673
17734
  }
17674
17735
  resetErrorMessages() {
@@ -18011,14 +18072,16 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
18011
18072
  // Get linked case reasons from ref data
18012
18073
  this.linkedCasesService.editMode = false;
18013
18074
  this.subscriptions.add(this.caseEditDataService.caseDetails$.subscribe({
18014
- next: caseDetails => { this.initialiseCaseDetails(caseDetails); }
18075
+ next: (caseDetails) => {
18076
+ this.initialiseCaseDetails(caseDetails);
18077
+ }
18015
18078
  }));
18016
18079
  this.getOrgService();
18017
18080
  this.subscriptions.add(this.caseEditDataService.caseEventTriggerName$.subscribe({
18018
- next: name => this.linkedCasesService.isLinkedCasesEventTrigger = (name === LinkedCasesEventTriggers.LINK_CASES)
18081
+ next: (name) => this.linkedCasesService.isLinkedCasesEventTrigger = (name === LinkedCasesEventTriggers.LINK_CASES)
18019
18082
  }));
18020
18083
  this.subscriptions.add(this.caseEditDataService.caseEditForm$.subscribe({
18021
- next: editForm => this.caseEditForm = editForm
18084
+ next: (editForm) => this.caseEditForm = editForm
18022
18085
  }));
18023
18086
  }
18024
18087
  initialiseCaseDetails(caseDetails) {
@@ -18094,13 +18157,28 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
18094
18157
  }
18095
18158
  }
18096
18159
  submitLinkedCases() {
18160
+ let caseFieldValue = [...(this.linkedCasesService.caseFieldValue || [])];
18097
18161
  if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
18098
- const unlinkedCaseRefereneIds = this.linkedCasesService.linkedCases.filter(item => item.unlink).map(item => item.caseReference);
18099
- const caseFieldValue = this.linkedCasesService.caseFieldValue;
18100
- this.linkedCasesService.caseFieldValue = caseFieldValue.filter(item => unlinkedCaseRefereneIds.indexOf(item.id) === -1);
18162
+ const unlinkedCaseReferenceIds = this.linkedCasesService.linkedCases
18163
+ .filter((item) => item.unlink)
18164
+ .map((item) => item.caseReference);
18165
+ caseFieldValue = caseFieldValue.filter((item) => !unlinkedCaseReferenceIds.includes(item.id));
18166
+ }
18167
+ // Replace the caseLinks value in this.formGroup
18168
+ this.formGroup.patchValue({
18169
+ caseLinks: caseFieldValue
18170
+ });
18171
+ // Replace the caseLinks control in caseEditForm.controls.data
18172
+ const dataFormGroup = this.caseEditForm.controls.data;
18173
+ if (dataFormGroup) {
18174
+ // Remove the existing caseLinks control (if it exists)
18175
+ if (dataFormGroup.contains('caseLinks')) {
18176
+ dataFormGroup.removeControl('caseLinks');
18177
+ }
18178
+ // Add the new control with the replacement value
18179
+ dataFormGroup.addControl('caseLinks', new FormControl(caseFieldValue || []));
18101
18180
  }
18102
- this.formGroup.value.caseLinks = this.linkedCasesService.caseFieldValue;
18103
- this.caseEditForm.controls['data'] = new FormGroup({ caseLinks: new FormControl(this.linkedCasesService.caseFieldValue || []) });
18181
+ // Set the updated form in the caseEditDataService
18104
18182
  this.caseEditDataService.setCaseEditForm(this.caseEditForm);
18105
18183
  }
18106
18184
  isAtFinalPage() {
@@ -18117,11 +18195,11 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
18117
18195
  }
18118
18196
  getLinkedCases() {
18119
18197
  this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe((caseView) => {
18120
- const caseViewFiltered = caseView.tabs.filter(tab => {
18198
+ const caseViewFiltered = caseView.tabs.filter((tab) => {
18121
18199
  return tab.fields.some(({ field_type }) => field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink');
18122
18200
  });
18123
18201
  if (caseViewFiltered) {
18124
- const caseLinkFieldValue = caseViewFiltered.map(filtered => filtered.fields?.length > 0 && filtered.fields.filter(field => field.id === 'caseLinks')[0].value);
18202
+ const caseLinkFieldValue = caseViewFiltered.map((filtered) => filtered.fields?.length > 0 && filtered.fields.filter((field) => field.id === 'caseLinks')[0].value);
18125
18203
  this.linkedCasesService.caseFieldValue = caseLinkFieldValue.length ? caseLinkFieldValue[0] : [];
18126
18204
  this.linkedCasesService.getAllLinkedCaseInformation();
18127
18205
  }
@@ -18161,7 +18239,7 @@ class WriteLinkedCasesFieldComponent extends AbstractFieldWriteComponent {
18161
18239
  type: Component,
18162
18240
  args: [{ selector: 'ccd-write-linked-cases-field', template: "<div class=\"form-group govuk-!-margin-bottom-2\" [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group\" [ngSwitch]=\"linkedCasesPage\">\n <ng-container *ngSwitchCase=\"linkedCasesPages.BEFORE_YOU_START\">\n <ccd-linked-cases-before-you-start\n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\"></ccd-linked-cases-before-you-start>\n </ng-container>\n <ng-container *ngSwitchCase=\"linkedCasesPages.NO_LINKED_CASES\">\n <ccd-no-linked-cases\n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\"></ccd-no-linked-cases>\n </ng-container>\n <ng-container *ngSwitchCase=\"linkedCasesPages.LINK_CASE\">\n <ccd-link-cases\n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\"></ccd-link-cases>\n </ng-container>\n <ng-container *ngSwitchCase=\"linkedCasesPages.UNLINK_CASE\">\n <ccd-unlink-cases\n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\"></ccd-unlink-cases>\n </ng-container>\n <ng-container *ngSwitchCase=\"linkedCasesPages.CHECK_YOUR_ANSWERS\">\n <ccd-linked-cases-check-your-answers\n (linkedCasesStateEmitter)=\"onLinkedCasesStateEmitted($event)\"></ccd-linked-cases-check-your-answers>\n </ng-container>\n </div>\n</div>\n" }]
18163
18241
  }], () => [{ type: AbstractAppConfig }, { type: CommonDataService }, { type: CasesService }, { type: LinkedCasesService }, { type: CaseEditDataService }], null); })();
18164
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteLinkedCasesFieldComponent, { className: "WriteLinkedCasesFieldComponent", filePath: "lib/shared/components/palette/linked-cases/write-linked-cases-field.component.ts", lineNumber: 19 }); })();
18242
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteLinkedCasesFieldComponent, { className: "WriteLinkedCasesFieldComponent", filePath: "lib/shared/components/palette/linked-cases/write-linked-cases-field.component.ts", lineNumber: 18 }); })();
18165
18243
 
18166
18244
  function ReadMoneyGbpFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
18167
18245
  i0.ɵɵelementContainerStart(0);
@@ -19548,10 +19626,8 @@ function QualifyingQuestionDetailComponent_ng_container_0_Template(rf, ctx) { if
19548
19626
  i0.ɵɵtext(5);
19549
19627
  i0.ɵɵpipe(6, "rpxTranslate");
19550
19628
  i0.ɵɵelementEnd();
19551
- i0.ɵɵelementStart(7, "div", 3);
19552
- i0.ɵɵelement(8, "ccd-markdown", 4);
19553
- i0.ɵɵpipe(9, "rpxTranslate");
19554
- i0.ɵɵelementEnd();
19629
+ i0.ɵɵelement(7, "ccd-markdown", 3);
19630
+ i0.ɵɵpipe(8, "rpxTranslate");
19555
19631
  i0.ɵɵelementContainerEnd();
19556
19632
  } if (rf & 2) {
19557
19633
  const ctx_r0 = i0.ɵɵnextContext();
@@ -19559,25 +19635,25 @@ function QualifyingQuestionDetailComponent_ng_container_0_Template(rf, ctx) { if
19559
19635
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 3, "Are you contacting us about any of the following:"), " ");
19560
19636
  i0.ɵɵadvance(3);
19561
19637
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 5, ctx_r0.qualifyingQuestion.name), " ");
19562
- i0.ɵɵadvance(3);
19563
- i0.ɵɵproperty("content", i0.ɵɵpipeBind1(9, 7, ctx_r0.qualifyingQuestion.markdown));
19638
+ i0.ɵɵadvance(2);
19639
+ i0.ɵɵproperty("content", i0.ɵɵpipeBind1(8, 7, ctx_r0.qualifyingQuestion.markdown));
19564
19640
  } }
19565
19641
  class QualifyingQuestionDetailComponent {
19566
19642
  qualifyingQuestion;
19567
19643
  static ɵfac = function QualifyingQuestionDetailComponent_Factory(t) { return new (t || QualifyingQuestionDetailComponent)(); };
19568
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QualifyingQuestionDetailComponent, selectors: [["ccd-qualifying-question-detail"]], inputs: { qualifyingQuestion: "qualifyingQuestion" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "govuk-caption-l"], [1, "govuk-heading-l"], [1, "qm-qualifying-question"], [3, "content"]], template: function QualifyingQuestionDetailComponent_Template(rf, ctx) { if (rf & 1) {
19569
- i0.ɵɵtemplate(0, QualifyingQuestionDetailComponent_ng_container_0_Template, 10, 9, "ng-container", 0);
19644
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QualifyingQuestionDetailComponent, selectors: [["ccd-qualifying-question-detail"]], inputs: { qualifyingQuestion: "qualifyingQuestion" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "govuk-caption-l"], [1, "govuk-heading-l"], [3, "content"]], template: function QualifyingQuestionDetailComponent_Template(rf, ctx) { if (rf & 1) {
19645
+ i0.ɵɵtemplate(0, QualifyingQuestionDetailComponent_ng_container_0_Template, 9, 9, "ng-container", 0);
19570
19646
  } if (rf & 2) {
19571
19647
  i0.ɵɵproperty("ngIf", ctx.qualifyingQuestion == null ? null : ctx.qualifyingQuestion.markdown);
19572
- } }, dependencies: [i5.NgIf, MarkdownComponent, i1.RpxTranslatePipe], styles: [".qm-qualifying-question[_ngcontent-%COMP%] .markdown[_ngcontent-%COMP%]{font-size:19px}"] });
19648
+ } }, dependencies: [i5.NgIf, MarkdownComponent, i1.RpxTranslatePipe], encapsulation: 2 });
19573
19649
  }
19574
19650
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QualifyingQuestionDetailComponent, [{
19575
19651
  type: Component,
19576
- args: [{ selector: 'ccd-qualifying-question-detail', template: "<ng-container *ngIf=\"qualifyingQuestion?.markdown\">\n <span class=\"govuk-caption-l\">\n {{ 'Are you contacting us about any of the following:' | rpxTranslate }}\n </span>\n <h1 class=\"govuk-heading-l\">\n {{ qualifyingQuestion.name | rpxTranslate }}\n </h1>\n <div class=\"qm-qualifying-question\">\n <ccd-markdown\n [content]=\"qualifyingQuestion.markdown | rpxTranslate\">\n </ccd-markdown>\n </div>\n</ng-container>\n", styles: [".qm-qualifying-question .markdown{font-size:19px}\n"] }]
19652
+ args: [{ selector: 'ccd-qualifying-question-detail', template: "<ng-container *ngIf=\"qualifyingQuestion?.markdown\">\n <span class=\"govuk-caption-l\">\n {{ 'Are you contacting us about any of the following:' | rpxTranslate }}\n </span>\n <h1 class=\"govuk-heading-l\">\n {{ qualifyingQuestion.name | rpxTranslate }}\n </h1>\n <ccd-markdown\n [content]=\"qualifyingQuestion.markdown | rpxTranslate\">\n </ccd-markdown>\n</ng-container>\n" }]
19577
19653
  }], null, { qualifyingQuestion: [{
19578
19654
  type: Input
19579
19655
  }] }); })();
19580
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QualifyingQuestionDetailComponent, { className: "QualifyingQuestionDetailComponent", filePath: "lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-detail/qualifying-question-detail.component.ts", lineNumber: 9 }); })();
19656
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QualifyingQuestionDetailComponent, { className: "QualifyingQuestionDetailComponent", filePath: "lib/shared/components/palette/query-management/components/qualifying-questions/qualifying-question-detail/qualifying-question-detail.component.ts", lineNumber: 8 }); })();
19581
19657
 
19582
19658
  var RaiseQueryErrorMessage;
19583
19659
  (function (RaiseQueryErrorMessage) {
@@ -21255,8 +21331,8 @@ class QueryWriteDateInputComponent {
21255
21331
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteDateInputComponent, { className: "QueryWriteDateInputComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-date-input/query-write-date-input.component.ts", lineNumber: 15 }); })();
21256
21332
 
21257
21333
  const _c0$C = a0 => ({ "govuk-form-group--error": a0 });
21258
- function QueryWriteRaiseQueryComponent_p_22_Template(rf, ctx) { if (rf & 1) {
21259
- i0.ɵɵelementStart(0, "p", 26)(1, "span", 27);
21334
+ function QueryWriteRaiseQueryComponent_div_11_p_11_Template(rf, ctx) { if (rf & 1) {
21335
+ i0.ɵɵelementStart(0, "p", 27)(1, "span", 28);
21260
21336
  i0.ɵɵtext(2);
21261
21337
  i0.ɵɵpipe(3, "rpxTranslate");
21262
21338
  i0.ɵɵelementEnd();
@@ -21264,14 +21340,14 @@ function QueryWriteRaiseQueryComponent_p_22_Template(rf, ctx) { if (rf & 1) {
21264
21340
  i0.ɵɵpipe(5, "rpxTranslate");
21265
21341
  i0.ɵɵelementEnd();
21266
21342
  } if (rf & 2) {
21267
- const ctx_r0 = i0.ɵɵnextContext();
21343
+ const ctx_r0 = i0.ɵɵnextContext(2);
21268
21344
  i0.ɵɵadvance(2);
21269
21345
  i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
21270
21346
  i0.ɵɵadvance(2);
21271
21347
  i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, ctx_r0.raiseQueryErrorMessage.QUERY_SUBJECT), " ");
21272
21348
  } }
21273
- function QueryWriteRaiseQueryComponent_p_32_Template(rf, ctx) { if (rf & 1) {
21274
- i0.ɵɵelementStart(0, "p", 28)(1, "span", 27);
21349
+ function QueryWriteRaiseQueryComponent_div_11_p_21_Template(rf, ctx) { if (rf & 1) {
21350
+ i0.ɵɵelementStart(0, "p", 29)(1, "span", 28);
21275
21351
  i0.ɵɵtext(2);
21276
21352
  i0.ɵɵpipe(3, "rpxTranslate");
21277
21353
  i0.ɵɵelementEnd();
@@ -21279,14 +21355,14 @@ function QueryWriteRaiseQueryComponent_p_32_Template(rf, ctx) { if (rf & 1) {
21279
21355
  i0.ɵɵpipe(5, "rpxTranslate");
21280
21356
  i0.ɵɵelementEnd();
21281
21357
  } if (rf & 2) {
21282
- const ctx_r0 = i0.ɵɵnextContext();
21358
+ const ctx_r0 = i0.ɵɵnextContext(2);
21283
21359
  i0.ɵɵadvance(2);
21284
21360
  i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
21285
21361
  i0.ɵɵadvance(2);
21286
21362
  i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, ctx_r0.raiseQueryErrorMessage.QUERY_BODY), " ");
21287
21363
  } }
21288
- function QueryWriteRaiseQueryComponent_p_41_Template(rf, ctx) { if (rf & 1) {
21289
- i0.ɵɵelementStart(0, "p", 29)(1, "span", 27);
21364
+ function QueryWriteRaiseQueryComponent_div_11_p_30_Template(rf, ctx) { if (rf & 1) {
21365
+ i0.ɵɵelementStart(0, "p", 30)(1, "span", 28);
21290
21366
  i0.ɵɵtext(2);
21291
21367
  i0.ɵɵpipe(3, "rpxTranslate");
21292
21368
  i0.ɵɵelementEnd();
@@ -21294,14 +21370,14 @@ function QueryWriteRaiseQueryComponent_p_41_Template(rf, ctx) { if (rf & 1) {
21294
21370
  i0.ɵɵpipe(5, "rpxTranslate");
21295
21371
  i0.ɵɵelementEnd();
21296
21372
  } if (rf & 2) {
21297
- const ctx_r0 = i0.ɵɵnextContext();
21373
+ const ctx_r0 = i0.ɵɵnextContext(2);
21298
21374
  i0.ɵɵadvance(2);
21299
21375
  i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
21300
21376
  i0.ɵɵadvance(2);
21301
21377
  i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, ctx_r0.raiseQueryErrorMessage.QUERY_HEARING_RELATED), " ");
21302
21378
  } }
21303
- function QueryWriteRaiseQueryComponent_ng_container_53_p_7_Template(rf, ctx) { if (rf & 1) {
21304
- i0.ɵɵelementStart(0, "p", 35)(1, "span", 27);
21379
+ function QueryWriteRaiseQueryComponent_div_11_ng_container_42_p_7_Template(rf, ctx) { if (rf & 1) {
21380
+ i0.ɵɵelementStart(0, "p", 36)(1, "span", 28);
21305
21381
  i0.ɵɵtext(2);
21306
21382
  i0.ɵɵpipe(3, "rpxTranslate");
21307
21383
  i0.ɵɵelementEnd();
@@ -21309,24 +21385,24 @@ function QueryWriteRaiseQueryComponent_ng_container_53_p_7_Template(rf, ctx) { i
21309
21385
  i0.ɵɵpipe(5, "rpxTranslate");
21310
21386
  i0.ɵɵelementEnd();
21311
21387
  } if (rf & 2) {
21312
- const ctx_r0 = i0.ɵɵnextContext(2);
21388
+ const ctx_r0 = i0.ɵɵnextContext(3);
21313
21389
  i0.ɵɵadvance(2);
21314
21390
  i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
21315
21391
  i0.ɵɵadvance(2);
21316
21392
  i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(5, 4, ctx_r0.raiseQueryErrorMessage.QUERY_HEARING_DATE), " ");
21317
21393
  } }
21318
- function QueryWriteRaiseQueryComponent_ng_container_53_Template(rf, ctx) { if (rf & 1) {
21394
+ function QueryWriteRaiseQueryComponent_div_11_ng_container_42_Template(rf, ctx) { if (rf & 1) {
21319
21395
  i0.ɵɵelementContainerStart(0);
21320
- i0.ɵɵelementStart(1, "div", 30)(2, "fieldset", 31)(3, "legend")(4, "label", 32);
21396
+ i0.ɵɵelementStart(1, "div", 31)(2, "fieldset", 32)(3, "legend")(4, "label", 33);
21321
21397
  i0.ɵɵtext(5);
21322
21398
  i0.ɵɵpipe(6, "rpxTranslate");
21323
21399
  i0.ɵɵelementEnd()();
21324
- i0.ɵɵtemplate(7, QueryWriteRaiseQueryComponent_ng_container_53_p_7_Template, 6, 6, "p", 33);
21325
- i0.ɵɵelement(8, "ccd-query-write-date-input", 34);
21400
+ i0.ɵɵtemplate(7, QueryWriteRaiseQueryComponent_div_11_ng_container_42_p_7_Template, 6, 6, "p", 34);
21401
+ i0.ɵɵelement(8, "ccd-query-write-date-input", 35);
21326
21402
  i0.ɵɵelementEnd()();
21327
21403
  i0.ɵɵelementContainerEnd();
21328
21404
  } if (rf & 2) {
21329
- const ctx_r0 = i0.ɵɵnextContext();
21405
+ const ctx_r0 = i0.ɵɵnextContext(2);
21330
21406
  i0.ɵɵadvance();
21331
21407
  i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$C, ctx_r0.submitted && ctx_r0.formGroup.get("isHearingRelated").value === true && ctx_r0.formGroup.get("hearingDate").value === null));
21332
21408
  i0.ɵɵadvance(4);
@@ -21334,13 +21410,101 @@ function QueryWriteRaiseQueryComponent_ng_container_53_Template(rf, ctx) { if (r
21334
21410
  i0.ɵɵadvance(2);
21335
21411
  i0.ɵɵproperty("ngIf", ctx_r0.submitted && ctx_r0.formGroup.get("isHearingRelated").value === true && ctx_r0.formGroup.get("hearingDate").value === null);
21336
21412
  } }
21413
+ function QueryWriteRaiseQueryComponent_div_11_Template(rf, ctx) { if (rf & 1) {
21414
+ i0.ɵɵelementStart(0, "div", 5)(1, "div", 6)(2, "div")(3, "div", 7)(4, "div", 8)(5, "label", 9);
21415
+ i0.ɵɵtext(6);
21416
+ i0.ɵɵpipe(7, "rpxTranslate");
21417
+ i0.ɵɵelementEnd()();
21418
+ i0.ɵɵelementStart(8, "div", 10);
21419
+ i0.ɵɵtext(9);
21420
+ i0.ɵɵpipe(10, "rpxTranslate");
21421
+ i0.ɵɵelementEnd();
21422
+ i0.ɵɵtemplate(11, QueryWriteRaiseQueryComponent_div_11_p_11_Template, 6, 6, "p", 11);
21423
+ i0.ɵɵelement(12, "input", 12);
21424
+ i0.ɵɵelementEnd()();
21425
+ i0.ɵɵelementStart(13, "div", 7)(14, "div", 8)(15, "label", 13);
21426
+ i0.ɵɵtext(16);
21427
+ i0.ɵɵpipe(17, "rpxTranslate");
21428
+ i0.ɵɵelementEnd()();
21429
+ i0.ɵɵelementStart(18, "div", 14);
21430
+ i0.ɵɵtext(19);
21431
+ i0.ɵɵpipe(20, "rpxTranslate");
21432
+ i0.ɵɵelementEnd();
21433
+ i0.ɵɵtemplate(21, QueryWriteRaiseQueryComponent_div_11_p_21_Template, 6, 6, "p", 15);
21434
+ i0.ɵɵelementStart(22, "textarea", 16);
21435
+ i0.ɵɵtext(23, " ");
21436
+ i0.ɵɵelementEnd()();
21437
+ i0.ɵɵelementStart(24, "div", 7)(25, "fieldset", 17)(26, "legend")(27, "label", 18);
21438
+ i0.ɵɵtext(28);
21439
+ i0.ɵɵpipe(29, "rpxTranslate");
21440
+ i0.ɵɵelementEnd()();
21441
+ i0.ɵɵtemplate(30, QueryWriteRaiseQueryComponent_div_11_p_30_Template, 6, 6, "p", 19);
21442
+ i0.ɵɵelementStart(31, "div", 20)(32, "div", 21);
21443
+ i0.ɵɵelement(33, "input", 22);
21444
+ i0.ɵɵelementStart(34, "label", 23);
21445
+ i0.ɵɵtext(35);
21446
+ i0.ɵɵpipe(36, "rpxTranslate");
21447
+ i0.ɵɵelementEnd()();
21448
+ i0.ɵɵelementStart(37, "div", 21);
21449
+ i0.ɵɵelement(38, "input", 24);
21450
+ i0.ɵɵelementStart(39, "label", 25);
21451
+ i0.ɵɵtext(40);
21452
+ i0.ɵɵpipe(41, "rpxTranslate");
21453
+ i0.ɵɵelementEnd()()()();
21454
+ i0.ɵɵtemplate(42, QueryWriteRaiseQueryComponent_div_11_ng_container_42_Template, 9, 7, "ng-container", 26);
21455
+ i0.ɵɵelementEnd()()();
21456
+ } if (rf & 2) {
21457
+ let tmp_6_0;
21458
+ const ctx_r0 = i0.ɵɵnextContext();
21459
+ i0.ɵɵadvance();
21460
+ i0.ɵɵproperty("formGroup", ctx_r0.formGroup);
21461
+ i0.ɵɵadvance(2);
21462
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(43, _c0$C, ctx_r0.submitted && ctx_r0.formGroup.get("subject").hasError("required")));
21463
+ i0.ɵɵadvance(3);
21464
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 25, "Query subject"), " ");
21465
+ i0.ɵɵadvance(3);
21466
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 27, "The subject should be a summary of your query"), " ");
21467
+ i0.ɵɵadvance(2);
21468
+ i0.ɵɵproperty("ngIf", ctx_r0.submitted && ctx_r0.formGroup.get("subject").hasError("required"));
21469
+ i0.ɵɵadvance();
21470
+ i0.ɵɵclassProp("govuk-input--error", ctx_r0.submitted && ((tmp_6_0 = ctx_r0.formGroup.get("subject")) == null ? null : tmp_6_0.hasError("required")));
21471
+ i0.ɵɵproperty("formControlName", "subject");
21472
+ i0.ɵɵadvance();
21473
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(45, _c0$C, ctx_r0.submitted && ctx_r0.formGroup.get("body").hasError("required")));
21474
+ i0.ɵɵadvance(3);
21475
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(17, 29, "Query detail"), " ");
21476
+ i0.ɵɵadvance(3);
21477
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20, 31, "Include as many details as possible so case workers can respond to your query"), " ");
21478
+ i0.ɵɵadvance(2);
21479
+ i0.ɵɵproperty("ngIf", ctx_r0.submitted && ctx_r0.formGroup.get("body").hasError("required"));
21480
+ i0.ɵɵadvance();
21481
+ i0.ɵɵclassProp("govuk-textarea--error", ctx_r0.submitted && ctx_r0.formGroup.get("body").hasError("required"));
21482
+ i0.ɵɵproperty("formControlName", "body");
21483
+ i0.ɵɵadvance(2);
21484
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(47, _c0$C, ctx_r0.submitted && ctx_r0.formGroup.get("isHearingRelated").hasError("required")));
21485
+ i0.ɵɵadvance(4);
21486
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(29, 33, "Is the query hearing related?"), " ");
21487
+ i0.ɵɵadvance(2);
21488
+ i0.ɵɵproperty("ngIf", ctx_r0.submitted && ctx_r0.formGroup.get("isHearingRelated").hasError("required"));
21489
+ i0.ɵɵadvance(3);
21490
+ i0.ɵɵproperty("checked", ctx_r0.formGroup.get("isHearingRelated").value === true)("value", true);
21491
+ i0.ɵɵadvance(2);
21492
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(36, 35, "Is the query hearing related?", null, "Yes"), " ");
21493
+ i0.ɵɵadvance(3);
21494
+ i0.ɵɵproperty("checked", ctx_r0.formGroup.get("isHearingRelated").value === false)("value", false);
21495
+ i0.ɵɵadvance(2);
21496
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(41, 39, "Is the query hearing related?", null, "No"), " ");
21497
+ i0.ɵɵadvance(2);
21498
+ i0.ɵɵproperty("ngIf", ctx_r0.formGroup.get("isHearingRelated").value);
21499
+ } }
21337
21500
  class QueryWriteRaiseQueryComponent {
21338
21501
  formGroup;
21339
21502
  submitted;
21340
21503
  caseDetails;
21504
+ showForm;
21341
21505
  raiseQueryErrorMessage = RaiseQueryErrorMessage;
21342
21506
  static ɵfac = function QueryWriteRaiseQueryComponent_Factory(t) { return new (t || QueryWriteRaiseQueryComponent)(); };
21343
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRaiseQueryComponent, selectors: [["ccd-query-write-raise-query"]], inputs: { formGroup: "formGroup", submitted: "submitted", caseDetails: "caseDetails" }, decls: 54, vars: 56, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [3, "caseDetails"], [1, "govuk-!-margin-bottom-4"], [3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper"], ["for", "subject", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "subject-hint", 1, "govuk-hint"], ["id", "subject-error", "class", "govuk-error-message", 4, "ngIf"], ["type", "text", "name", "subject", "id", "subject", 1, "govuk-input", 3, "formControlName"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-hint", 1, "govuk-hint"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], [1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "isHearingRelated-error", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--inline"], [1, "govuk-radios__item"], ["id", "isHearingRelated-yes", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-yes", 1, "govuk-label", "govuk-radios__label"], ["id", "isHearingRelated-no", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-no", 1, "govuk-label", "govuk-radios__label"], [4, "ngIf"], ["id", "subject-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "body-error", 1, "govuk-error-message"], ["id", "isHearingRelated-error", 1, "govuk-error-message"], [1, "govuk-radios__conditional", "govuk-!-margin-top-1", 3, "ngClass"], ["role", "group", 1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--s"], ["id", "hearingDate-error", "class", "govuk-error-message", 4, "ngIf"], ["formControlName", "hearingDate"], ["id", "hearingDate-error", 1, "govuk-error-message"]], template: function QueryWriteRaiseQueryComponent_Template(rf, ctx) { if (rf & 1) {
21507
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRaiseQueryComponent, selectors: [["ccd-query-write-raise-query"]], inputs: { formGroup: "formGroup", submitted: "submitted", caseDetails: "caseDetails", showForm: "showForm" }, decls: 12, vars: 8, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-4"], [3, "caseDetails"], ["class", "govuk-!-margin-bottom-4", 4, "ngIf"], [1, "govuk-!-margin-bottom-4"], [3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], [1, "govuk-label-wrapper"], ["for", "subject", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "subject-hint", 1, "govuk-hint"], ["id", "subject-error", "class", "govuk-error-message", 4, "ngIf"], ["type", "text", "name", "subject", "id", "subject", 1, "govuk-input", 3, "formControlName"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-hint", 1, "govuk-hint"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], [1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "isHearingRelated-error", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", 1, "govuk-radios", "govuk-radios--inline"], [1, "govuk-radios__item"], ["id", "isHearingRelated-yes", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-yes", 1, "govuk-label", "govuk-radios__label"], ["id", "isHearingRelated-no", "name", "isHearingRelated", "type", "radio", "formControlName", "isHearingRelated", 1, "govuk-radios__input", 3, "checked", "value"], ["for", "isHearingRelated-no", 1, "govuk-label", "govuk-radios__label"], [4, "ngIf"], ["id", "subject-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["id", "body-error", 1, "govuk-error-message"], ["id", "isHearingRelated-error", 1, "govuk-error-message"], [1, "govuk-radios__conditional", "govuk-!-margin-top-1", 3, "ngClass"], ["role", "group", 1, "govuk-fieldset"], [1, "govuk-label", "govuk-label--s"], ["id", "hearingDate-error", "class", "govuk-error-message", 4, "ngIf"], ["formControlName", "hearingDate"], ["id", "hearingDate-error", 1, "govuk-error-message"]], template: function QueryWriteRaiseQueryComponent_Template(rf, ctx) { if (rf & 1) {
21344
21508
  i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "div", 1);
21345
21509
  i0.ɵɵtext(3);
21346
21510
  i0.ɵɵpipe(4, "rpxTranslate");
@@ -21353,112 +21517,35 @@ class QueryWriteRaiseQueryComponent {
21353
21517
  i0.ɵɵelement(9, "ccd-query-case-details-header", 3);
21354
21518
  i0.ɵɵelementEnd();
21355
21519
  i0.ɵɵelement(10, "hr");
21356
- i0.ɵɵelementStart(11, "div", 4)(12, "div", 5)(13, "div")(14, "div", 6)(15, "div", 7)(16, "label", 8);
21357
- i0.ɵɵtext(17);
21358
- i0.ɵɵpipe(18, "rpxTranslate");
21359
- i0.ɵɵelementEnd()();
21360
- i0.ɵɵelementStart(19, "div", 9);
21361
- i0.ɵɵtext(20);
21362
- i0.ɵɵpipe(21, "rpxTranslate");
21363
- i0.ɵɵelementEnd();
21364
- i0.ɵɵtemplate(22, QueryWriteRaiseQueryComponent_p_22_Template, 6, 6, "p", 10);
21365
- i0.ɵɵelement(23, "input", 11);
21366
- i0.ɵɵelementEnd()();
21367
- i0.ɵɵelementStart(24, "div", 6)(25, "div", 7)(26, "label", 12);
21368
- i0.ɵɵtext(27);
21369
- i0.ɵɵpipe(28, "rpxTranslate");
21370
- i0.ɵɵelementEnd()();
21371
- i0.ɵɵelementStart(29, "div", 13);
21372
- i0.ɵɵtext(30);
21373
- i0.ɵɵpipe(31, "rpxTranslate");
21520
+ i0.ɵɵtemplate(11, QueryWriteRaiseQueryComponent_div_11_Template, 43, 49, "div", 4);
21374
21521
  i0.ɵɵelementEnd();
21375
- i0.ɵɵtemplate(32, QueryWriteRaiseQueryComponent_p_32_Template, 6, 6, "p", 14);
21376
- i0.ɵɵelementStart(33, "textarea", 15);
21377
- i0.ɵɵtext(34, " ");
21378
- i0.ɵɵelementEnd()();
21379
- i0.ɵɵelementStart(35, "div", 6)(36, "fieldset", 16)(37, "legend")(38, "label", 17);
21380
- i0.ɵɵtext(39);
21381
- i0.ɵɵpipe(40, "rpxTranslate");
21382
- i0.ɵɵelementEnd()();
21383
- i0.ɵɵtemplate(41, QueryWriteRaiseQueryComponent_p_41_Template, 6, 6, "p", 18);
21384
- i0.ɵɵelementStart(42, "div", 19)(43, "div", 20);
21385
- i0.ɵɵelement(44, "input", 21);
21386
- i0.ɵɵelementStart(45, "label", 22);
21387
- i0.ɵɵtext(46);
21388
- i0.ɵɵpipe(47, "rpxTranslate");
21389
- i0.ɵɵelementEnd()();
21390
- i0.ɵɵelementStart(48, "div", 20);
21391
- i0.ɵɵelement(49, "input", 23);
21392
- i0.ɵɵelementStart(50, "label", 24);
21393
- i0.ɵɵtext(51);
21394
- i0.ɵɵpipe(52, "rpxTranslate");
21395
- i0.ɵɵelementEnd()()()();
21396
- i0.ɵɵtemplate(53, QueryWriteRaiseQueryComponent_ng_container_53_Template, 9, 7, "ng-container", 25);
21397
- i0.ɵɵelementEnd()()()();
21398
21522
  } if (rf & 2) {
21399
- let tmp_8_0;
21400
21523
  i0.ɵɵadvance(3);
21401
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 28, "Raise a query"));
21524
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 4, "Raise a query"));
21402
21525
  i0.ɵɵadvance(3);
21403
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 30, "Enter query details"));
21526
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 6, "Enter query details"));
21404
21527
  i0.ɵɵadvance(3);
21405
21528
  i0.ɵɵproperty("caseDetails", ctx.caseDetails);
21406
- i0.ɵɵadvance(3);
21407
- i0.ɵɵproperty("formGroup", ctx.formGroup);
21408
- i0.ɵɵadvance(2);
21409
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(50, _c0$C, ctx.submitted && ctx.formGroup.get("subject").hasError("required")));
21410
- i0.ɵɵadvance(3);
21411
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(18, 32, "Query subject"), " ");
21412
- i0.ɵɵadvance(3);
21413
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(21, 34, "The subject should be a summary of your query"), " ");
21414
- i0.ɵɵadvance(2);
21415
- i0.ɵɵproperty("ngIf", ctx.submitted && ctx.formGroup.get("subject").hasError("required"));
21416
- i0.ɵɵadvance();
21417
- i0.ɵɵclassProp("govuk-input--error", ctx.submitted && ((tmp_8_0 = ctx.formGroup.get("subject")) == null ? null : tmp_8_0.hasError("required")));
21418
- i0.ɵɵproperty("formControlName", "subject");
21419
- i0.ɵɵadvance();
21420
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(52, _c0$C, ctx.submitted && ctx.formGroup.get("body").hasError("required")));
21421
- i0.ɵɵadvance(3);
21422
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(28, 36, "Query detail"), " ");
21423
- i0.ɵɵadvance(3);
21424
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(31, 38, "Include as many details as possible so case workers can respond to your query"), " ");
21425
- i0.ɵɵadvance(2);
21426
- i0.ɵɵproperty("ngIf", ctx.submitted && ctx.formGroup.get("body").hasError("required"));
21427
- i0.ɵɵadvance();
21428
- i0.ɵɵclassProp("govuk-textarea--error", ctx.submitted && ctx.formGroup.get("body").hasError("required"));
21429
- i0.ɵɵproperty("formControlName", "body");
21430
- i0.ɵɵadvance(2);
21431
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(54, _c0$C, ctx.submitted && ctx.formGroup.get("isHearingRelated").hasError("required")));
21432
- i0.ɵɵadvance(4);
21433
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(40, 40, "Is the query hearing related?"), " ");
21434
- i0.ɵɵadvance(2);
21435
- i0.ɵɵproperty("ngIf", ctx.submitted && ctx.formGroup.get("isHearingRelated").hasError("required"));
21436
- i0.ɵɵadvance(3);
21437
- i0.ɵɵproperty("checked", ctx.formGroup.get("isHearingRelated").value === true)("value", true);
21438
21529
  i0.ɵɵadvance(2);
21439
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(47, 42, "Is the query hearing related?", null, "Yes"), " ");
21440
- i0.ɵɵadvance(3);
21441
- i0.ɵɵproperty("checked", ctx.formGroup.get("isHearingRelated").value === false)("value", false);
21442
- i0.ɵɵadvance(2);
21443
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind3(52, 46, "Is the query hearing related?", null, "No"), " ");
21444
- i0.ɵɵadvance(2);
21445
- i0.ɵɵproperty("ngIf", ctx.formGroup.get("isHearingRelated").value);
21530
+ i0.ɵɵproperty("ngIf", ctx.showForm);
21446
21531
  } }, encapsulation: 2 });
21447
21532
  }
21448
21533
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRaiseQueryComponent, [{
21449
21534
  type: Component,
21450
- args: [{ selector: 'ccd-query-write-raise-query', 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\"></ccd-query-case-details-header>\n </div>\n\n <hr>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <div [formGroup]=\"formGroup\">\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')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_SUBJECT | rpxTranslate }}\n </p>\n <input [formControlName]=\"'subject'\" type=\"text\" name=\"subject\"\n class=\"govuk-input\" id=\"subject\"\n [class.govuk-input--error]=\"submitted && formGroup.get('subject')?.hasError('required')\"\n />\n </div>\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 <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </label>\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 <label class=\"govuk-label govuk-label--s\">\n {{ 'What is the date of the hearing?' | rpxTranslate }}\n </label>\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" }]
21535
+ args: [{ selector: 'ccd-query-write-raise-query', 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\"></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-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')\">\n <span class=\"govuk-visually-hidden\">{{ 'Error:' | rpxTranslate }} </span>{{ raiseQueryErrorMessage.QUERY_SUBJECT | rpxTranslate }}\n </p>\n <input [formControlName]=\"'subject'\" type=\"text\" name=\"subject\"\n class=\"govuk-input\" id=\"subject\"\n [class.govuk-input--error]=\"submitted && formGroup.get('subject')?.hasError('required')\"\n />\n </div>\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 <label class=\"govuk-label govuk-label--m govuk-!-font-weight-bold\">\n {{ 'Is the query hearing related?' | rpxTranslate }}\n </label>\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 <label class=\"govuk-label govuk-label--s\">\n {{ 'What is the date of the hearing?' | rpxTranslate }}\n </label>\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" }]
21451
21536
  }], null, { formGroup: [{
21452
21537
  type: Input
21453
21538
  }], submitted: [{
21454
21539
  type: Input
21455
21540
  }], caseDetails: [{
21456
21541
  type: Input
21542
+ }], showForm: [{
21543
+ type: Input
21457
21544
  }] }); })();
21458
21545
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRaiseQueryComponent, { className: "QueryWriteRaiseQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-raise-query/query-write-raise-query.component.ts", lineNumber: 8 }); })();
21459
21546
 
21460
- function QueryWriteRespondToQueryComponent_p_23_Template(rf, ctx) { if (rf & 1) {
21461
- i0.ɵɵelementStart(0, "p", 14)(1, "span", 15);
21547
+ function QueryWriteRespondToQueryComponent_div_12_p_11_Template(rf, ctx) { if (rf & 1) {
21548
+ i0.ɵɵelementStart(0, "p", 15)(1, "span", 16);
21462
21549
  i0.ɵɵtext(2);
21463
21550
  i0.ɵɵpipe(3, "rpxTranslate");
21464
21551
  i0.ɵɵelementEnd();
@@ -21466,18 +21553,51 @@ function QueryWriteRespondToQueryComponent_p_23_Template(rf, ctx) { if (rf & 1)
21466
21553
  i0.ɵɵpipe(5, "rpxTranslate");
21467
21554
  i0.ɵɵelementEnd();
21468
21555
  } if (rf & 2) {
21469
- const ctx_r0 = i0.ɵɵnextContext();
21556
+ const ctx_r0 = i0.ɵɵnextContext(2);
21470
21557
  i0.ɵɵadvance(2);
21471
21558
  i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(3, 2, "Error:"), " ");
21472
21559
  i0.ɵɵadvance(2);
21473
21560
  i0.ɵɵtextInterpolate1("", ctx_r0.queryCreateContext === ctx_r0.queryCreateContextEnum.RESPOND ? ctx_r0.raiseQueryErrorMessages.RESPOND_QUERY_BODY : i0.ɵɵpipeBind1(5, 4, ctx_r0.raiseQueryErrorMessages.QUERY_BODY), " ");
21474
21561
  } }
21562
+ function QueryWriteRespondToQueryComponent_div_12_Template(rf, ctx) { if (rf & 1) {
21563
+ i0.ɵɵelementStart(0, "div", 7)(1, "div")(2, "h1", 8);
21564
+ i0.ɵɵtext(3);
21565
+ i0.ɵɵpipe(4, "rpxTranslate");
21566
+ i0.ɵɵelementEnd();
21567
+ i0.ɵɵelementStart(5, "div", 9)(6, "div", 10)(7, "div", 11)(8, "label", 12);
21568
+ i0.ɵɵtext(9);
21569
+ i0.ɵɵpipe(10, "rpxTranslate");
21570
+ i0.ɵɵelementEnd()();
21571
+ i0.ɵɵtemplate(11, QueryWriteRespondToQueryComponent_div_12_p_11_Template, 6, 6, "p", 13);
21572
+ i0.ɵɵelementStart(12, "textarea", 14);
21573
+ i0.ɵɵtext(13, " ");
21574
+ i0.ɵɵelementEnd()()()()();
21575
+ } if (rf & 2) {
21576
+ let tmp_3_0;
21577
+ let tmp_5_0;
21578
+ let tmp_6_0;
21579
+ const ctx_r0 = i0.ɵɵnextContext();
21580
+ i0.ɵɵadvance(3);
21581
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.queryCreateContext === ctx_r0.queryCreateContextEnum.RESPOND ? "Respond to a query" : i0.ɵɵpipeBind1(4, 9, "Ask a follow-up question"), " ");
21582
+ i0.ɵɵadvance(2);
21583
+ i0.ɵɵproperty("formGroup", ctx_r0.formGroup);
21584
+ i0.ɵɵadvance();
21585
+ i0.ɵɵclassProp("govuk-form-group--error", ctx_r0.submitted && ((tmp_3_0 = ctx_r0.formGroup.get("body")) == null ? null : tmp_3_0.hasError("required")));
21586
+ i0.ɵɵadvance(3);
21587
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.queryCreateContext === ctx_r0.queryCreateContextEnum.RESPOND ? "Response detail" : i0.ɵɵpipeBind1(10, 11, "Query Body"), " ");
21588
+ i0.ɵɵadvance(2);
21589
+ i0.ɵɵproperty("ngIf", ctx_r0.submitted && ((tmp_5_0 = ctx_r0.formGroup.get("body")) == null ? null : tmp_5_0.hasError("required")));
21590
+ i0.ɵɵadvance();
21591
+ i0.ɵɵclassProp("govuk-textarea--error", ctx_r0.submitted && ((tmp_6_0 = ctx_r0.formGroup.get("body")) == null ? null : tmp_6_0.hasError("required")));
21592
+ i0.ɵɵproperty("formControlName", "body");
21593
+ } }
21475
21594
  class QueryWriteRespondToQueryComponent {
21476
21595
  caseNotifier;
21477
21596
  queryItem;
21478
21597
  formGroup;
21479
21598
  queryCreateContext;
21480
21599
  submitted = false;
21600
+ showForm;
21481
21601
  queryCreateContextEnum = QueryCreateContext;
21482
21602
  raiseQueryErrorMessages = RaiseQueryErrorMessage;
21483
21603
  caseId;
@@ -21492,7 +21612,7 @@ class QueryWriteRespondToQueryComponent {
21492
21612
  });
21493
21613
  }
21494
21614
  static ɵfac = function QueryWriteRespondToQueryComponent_Factory(t) { return new (t || QueryWriteRespondToQueryComponent)(i0.ɵɵdirectiveInject(CaseNotifier)); };
21495
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRespondToQueryComponent, selectors: [["ccd-query-write-respond-to-query"]], inputs: { queryItem: "queryItem", formGroup: "formGroup", queryCreateContext: "queryCreateContext", submitted: "submitted" }, decls: 26, vars: 21, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-0"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], [3, "query"], [1, "query-respond"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group", "body-textarea"], [1, "govuk-label-wrapper"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], ["id", "body-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"]], template: function QueryWriteRespondToQueryComponent_Template(rf, ctx) { if (rf & 1) {
21615
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryWriteRespondToQueryComponent, selectors: [["ccd-query-write-respond-to-query"]], inputs: { queryItem: "queryItem", formGroup: "formGroup", queryCreateContext: "queryCreateContext", submitted: "submitted", showForm: "showForm" }, decls: 13, vars: 9, consts: [[1, "govuk-!-margin-bottom-6"], [1, "govuk-caption-l"], [1, "govuk-heading-l", "govuk-!-margin-bottom-0"], [1, "govuk-!-margin-bottom-4"], [3, "caseDetails"], [3, "query"], ["class", "query-respond", 4, "ngIf"], [1, "query-respond"], [1, "govuk-heading-m"], [3, "formGroup"], [1, "govuk-form-group", "body-textarea"], [1, "govuk-label-wrapper"], ["for", "body", 1, "govuk-label", "govuk-label--m", "govuk-!-font-weight-bold"], ["id", "body-error", "class", "govuk-error-message", 4, "ngIf"], ["id", "body", "name", "body", "rows", "5", "aria-describedby", "body-hint body-error", 1, "govuk-textarea", 3, "formControlName"], ["id", "body-error", 1, "govuk-error-message"], [1, "govuk-visually-hidden"]], template: function QueryWriteRespondToQueryComponent_Template(rf, ctx) { if (rf & 1) {
21496
21616
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 0)(2, "div", 1);
21497
21617
  i0.ɵɵtext(3);
21498
21618
  i0.ɵɵpipe(4, "rpxTranslate");
@@ -21507,48 +21627,23 @@ class QueryWriteRespondToQueryComponent {
21507
21627
  i0.ɵɵelementStart(10, "div");
21508
21628
  i0.ɵɵelement(11, "ccd-query-details", 5);
21509
21629
  i0.ɵɵelementEnd()();
21510
- i0.ɵɵelementStart(12, "div", 6)(13, "div")(14, "h1", 7);
21511
- i0.ɵɵtext(15);
21512
- i0.ɵɵpipe(16, "rpxTranslate");
21513
- i0.ɵɵelementEnd();
21514
- i0.ɵɵelementStart(17, "div", 8)(18, "div", 9)(19, "div", 10)(20, "label", 11);
21515
- i0.ɵɵtext(21);
21516
- i0.ɵɵpipe(22, "rpxTranslate");
21517
- i0.ɵɵelementEnd()();
21518
- i0.ɵɵtemplate(23, QueryWriteRespondToQueryComponent_p_23_Template, 6, 6, "p", 12);
21519
- i0.ɵɵelementStart(24, "textarea", 13);
21520
- i0.ɵɵtext(25, " ");
21521
- i0.ɵɵelementEnd()()()()();
21630
+ i0.ɵɵtemplate(12, QueryWriteRespondToQueryComponent_div_12_Template, 14, 13, "div", 6);
21522
21631
  } if (rf & 2) {
21523
- let tmp_6_0;
21524
- let tmp_8_0;
21525
- let tmp_9_0;
21526
21632
  i0.ɵɵadvance(3);
21527
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 13, "Respond to a query"));
21633
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, "Respond to a query"));
21528
21634
  i0.ɵɵadvance(3);
21529
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 15, "Query details"));
21635
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 7, "Query details"));
21530
21636
  i0.ɵɵadvance(3);
21531
21637
  i0.ɵɵproperty("caseDetails", ctx.caseDetails);
21532
21638
  i0.ɵɵadvance(2);
21533
21639
  i0.ɵɵproperty("query", ctx.queryItem);
21534
- i0.ɵɵadvance(4);
21535
- i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND ? "Respond to a query" : i0.ɵɵpipeBind1(16, 17, "Ask a follow-up question"), " ");
21536
- i0.ɵɵadvance(2);
21537
- i0.ɵɵproperty("formGroup", ctx.formGroup);
21538
21640
  i0.ɵɵadvance();
21539
- i0.ɵɵclassProp("govuk-form-group--error", ctx.submitted && ((tmp_6_0 = ctx.formGroup.get("body")) == null ? null : tmp_6_0.hasError("required")));
21540
- i0.ɵɵadvance(3);
21541
- i0.ɵɵtextInterpolate1(" ", ctx.queryCreateContext === ctx.queryCreateContextEnum.RESPOND ? "Response detail" : i0.ɵɵpipeBind1(22, 19, "Query Body"), " ");
21542
- i0.ɵɵadvance(2);
21543
- i0.ɵɵproperty("ngIf", ctx.submitted && ((tmp_8_0 = ctx.formGroup.get("body")) == null ? null : tmp_8_0.hasError("required")));
21544
- i0.ɵɵadvance();
21545
- i0.ɵɵclassProp("govuk-textarea--error", ctx.submitted && ((tmp_9_0 = ctx.formGroup.get("body")) == null ? null : tmp_9_0.hasError("required")));
21546
- i0.ɵɵproperty("formControlName", "body");
21641
+ i0.ɵɵproperty("ngIf", ctx.showForm);
21547
21642
  } }, styles: [".query-respond[_ngcontent-%COMP%]{width:100%;max-width:720px}"] });
21548
21643
  }
21549
21644
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryWriteRespondToQueryComponent, [{
21550
21645
  type: Component,
21551
- args: [{ selector: 'ccd-query-write-respond-to-query', template: "<div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Respond to a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-0\">{{ 'Query details' | rpxTranslate }}</h1>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <div>\n <ccd-query-details [query]=\"queryItem\"></ccd-query-details>\n </div>\n</div>\n\n<div class=\"query-respond\">\n <div>\n <h1 class=\"govuk-heading-m\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Respond to a query' : 'Ask a follow-up question' | rpxTranslate }}\n </h1>\n\n <div [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group body-textarea\"\n [class.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 {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query Body' | rpxTranslate }}\n </label>\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>{{ queryCreateContext === queryCreateContextEnum.RESPOND ? raiseQueryErrorMessages.RESPOND_QUERY_BODY : raiseQueryErrorMessages.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\" class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body')?.hasError('required')\" id=\"body\"\n name=\"body\" rows=\"5\" aria-describedby=\"body-hint body-error\">\n </textarea>\n </div>\n </div>\n </div>\n</div>\n", styles: [".query-respond{width:100%;max-width:720px}\n"] }]
21646
+ args: [{ selector: 'ccd-query-write-respond-to-query', template: "<div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-!-margin-bottom-6\">\n <div class=\"govuk-caption-l\">{{ 'Respond to a query' | rpxTranslate }}</div>\n <h1 class=\"govuk-heading-l govuk-!-margin-bottom-0\">{{ 'Query details' | rpxTranslate }}</h1>\n </div>\n\n <div class=\"govuk-!-margin-bottom-4\">\n <ccd-query-case-details-header [caseDetails]=\"caseDetails\"></ccd-query-case-details-header>\n </div>\n\n <div>\n <ccd-query-details [query]=\"queryItem\"></ccd-query-details>\n </div>\n</div>\n\n<div class=\"query-respond\" *ngIf=\"showForm\">\n <div>\n <h1 class=\"govuk-heading-m\">\n {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Respond to a query' : 'Ask a follow-up question' | rpxTranslate }}\n </h1>\n\n <div [formGroup]=\"formGroup\">\n <div class=\"govuk-form-group body-textarea\"\n [class.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 {{ queryCreateContext === queryCreateContextEnum.RESPOND ? 'Response detail' : 'Query Body' | rpxTranslate }}\n </label>\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>{{ queryCreateContext === queryCreateContextEnum.RESPOND ? raiseQueryErrorMessages.RESPOND_QUERY_BODY : raiseQueryErrorMessages.QUERY_BODY | rpxTranslate }}\n </p>\n <textarea [formControlName]=\"'body'\" class=\"govuk-textarea\"\n [class.govuk-textarea--error]=\"submitted && formGroup.get('body')?.hasError('required')\" id=\"body\"\n name=\"body\" rows=\"5\" aria-describedby=\"body-hint body-error\">\n </textarea>\n </div>\n </div>\n </div>\n</div>\n", styles: [".query-respond{width:100%;max-width:720px}\n"] }]
21552
21647
  }], () => [{ type: CaseNotifier }], { queryItem: [{
21553
21648
  type: Input
21554
21649
  }], formGroup: [{
@@ -21557,6 +21652,8 @@ class QueryWriteRespondToQueryComponent {
21557
21652
  type: Input
21558
21653
  }], submitted: [{
21559
21654
  type: Input
21655
+ }], showForm: [{
21656
+ type: Input
21560
21657
  }] }); })();
21561
21658
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryWriteRespondToQueryComponent, { className: "QueryWriteRespondToQueryComponent", filePath: "lib/shared/components/palette/query-management/components/query-write/query-write-respond-to-query/query-write-respond-to-query.component.ts", lineNumber: 14 }); })();
21562
21659
 
@@ -22043,7 +22140,7 @@ class WriteTextFieldComponent extends AbstractFieldWriteComponent {
22043
22140
 
22044
22141
  class UnsupportedFieldComponent {
22045
22142
  static ɵfac = function UnsupportedFieldComponent_Factory(t) { return new (t || UnsupportedFieldComponent)(); };
22046
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UnsupportedFieldComponent, selectors: [["ng-component"]], decls: 2, vars: 0, template: function UnsupportedFieldComponent_Template(rf, ctx) { if (rf & 1) {
22143
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UnsupportedFieldComponent, selectors: [["ccd-unsupported-field"]], decls: 2, vars: 0, template: function UnsupportedFieldComponent_Template(rf, ctx) { if (rf & 1) {
22047
22144
  i0.ɵɵelementStart(0, "em");
22048
22145
  i0.ɵɵtext(1, "Field type not supported");
22049
22146
  i0.ɵɵelementEnd();
@@ -22052,10 +22149,11 @@ class UnsupportedFieldComponent {
22052
22149
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UnsupportedFieldComponent, [{
22053
22150
  type: Component,
22054
22151
  args: [{
22152
+ selector: 'ccd-unsupported-field',
22055
22153
  template: `<em>Field type not supported</em>`
22056
22154
  }]
22057
22155
  }], null, null); })();
22058
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UnsupportedFieldComponent, { className: "UnsupportedFieldComponent", filePath: "lib/shared/components/palette/unsupported-field.component.ts", lineNumber: 6 }); })();
22156
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UnsupportedFieldComponent, { className: "UnsupportedFieldComponent", filePath: "lib/shared/components/palette/unsupported-field.component.ts", lineNumber: 7 }); })();
22059
22157
 
22060
22158
  function WaysToPayFieldComponent_ccpay_payment_lib_0_Template(rf, ctx) { if (rf & 1) {
22061
22159
  i0.ɵɵelement(0, "ccpay-payment-lib", 1);
@@ -23093,10 +23191,9 @@ function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template(rf, c
23093
23191
  i0.ɵɵelementStart(7, "span", 17);
23094
23192
  i0.ɵɵtext(8);
23095
23193
  i0.ɵɵpipe(9, "ccdDate");
23096
- i0.ɵɵpipe(10, "date");
23097
23194
  i0.ɵɵelementEnd()();
23098
- i0.ɵɵelementStart(11, "div", 18)(12, "ccd-case-file-view-folder-document-actions", 19);
23099
- i0.ɵɵlistener("changeFolderAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_changeFolderAction_12_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("changeFolder", node_r2)); })("openInANewTabAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_openInANewTabAction_12_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("openInANewTab", node_r2)); })("downloadAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_downloadAction_12_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("download", node_r2)); })("printAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_printAction_12_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("print", node_r2)); });
23195
+ i0.ɵɵelementStart(10, "div", 18)(11, "ccd-case-file-view-folder-document-actions", 19);
23196
+ i0.ɵɵlistener("changeFolderAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_changeFolderAction_11_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("changeFolder", node_r2)); })("openInANewTabAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_openInANewTabAction_11_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("openInANewTab", node_r2)); })("downloadAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_downloadAction_11_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("download", node_r2)); })("printAction", function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template_ccd_case_file_view_folder_document_actions_printAction_11_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.triggerDocumentAction("print", node_r2)); });
23100
23197
  i0.ɵɵelementEnd()()()();
23101
23198
  } if (rf & 2) {
23102
23199
  const node_r2 = ctx.$implicit;
@@ -23106,8 +23203,8 @@ function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template(rf, c
23106
23203
  i0.ɵɵadvance(4);
23107
23204
  i0.ɵɵtextInterpolate1(" ", node_r2.name, " ");
23108
23205
  i0.ɵɵadvance(3);
23109
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(10, 8, i0.ɵɵpipeBind2(9, 5, node_r2.upload_timestamp, "local"), "dd MMM YYYY HH:mm"));
23110
- i0.ɵɵadvance(4);
23206
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind3(9, 5, node_r2.upload_timestamp, "local", "dd MMM YYYY HH:mm"));
23207
+ i0.ɵɵadvance(3);
23111
23208
  i0.ɵɵproperty("allowMoving", ctx_r2.allowMoving);
23112
23209
  } }
23113
23210
  function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template(rf, ctx) { if (rf & 1) {
@@ -23140,7 +23237,7 @@ function CaseFileViewFolderComponent_div_8_Template(rf, ctx) { if (rf & 1) {
23140
23237
  i0.ɵɵelementStart(0, "div", 7);
23141
23238
  i0.ɵɵtemplate(1, CaseFileViewFolderComponent_div_8_div_1_Template, 2, 0, "div", 8);
23142
23239
  i0.ɵɵelementStart(2, "div")(3, "cdk-tree", 9);
23143
- i0.ɵɵtemplate(4, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template, 13, 11, "cdk-nested-tree-node", 10)(5, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template, 10, 6, "cdk-nested-tree-node", 11);
23240
+ i0.ɵɵtemplate(4, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template, 12, 9, "cdk-nested-tree-node", 10)(5, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template, 10, 6, "cdk-nested-tree-node", 11);
23144
23241
  i0.ɵɵelementEnd()()();
23145
23242
  } if (rf & 2) {
23146
23243
  const ctx_r2 = i0.ɵɵnextContext();
@@ -23396,11 +23493,11 @@ class CaseFileViewFolderComponent {
23396
23493
  i0.ɵɵtextInterpolate1("Documents (", ctx.documentCount, ")");
23397
23494
  i0.ɵɵadvance(3);
23398
23495
  i0.ɵɵproperty("ngIf", ctx.documentTreeData);
23399
- } }, dependencies: [i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, i7.CdkNestedTreeNode, i7.CdkTreeNodeDef, i7.CdkTreeNodeToggle, i7.CdkTree, i7.CdkTreeNodeOutlet, CaseFileViewFolderSortComponent, CaseFileViewFolderDocumentActionsComponent, i5.DatePipe, DatePipe], styles: ["[_nghost-%COMP%]{display:flex;height:100%;flex-direction:column}[_nghost-%COMP%] .document-tree-container[_ngcontent-%COMP%]{flex:1 0}.document-filter-container[_ngcontent-%COMP%]{border-bottom:2px solid #C9C9C9}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%]{padding:10px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%] .document-search[_ngcontent-%COMP%]{background:url(/assets/images/icon-search-black.svg) no-repeat right #fff;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container[_ngcontent-%COMP%] .documents-title[_ngcontent-%COMP%]{height:30%;margin-left:8px;font-weight:700}.document-tree-container[_ngcontent-%COMP%]{padding:4px;overflow-x:hidden;overflow-y:scroll}.document-tree-container__node[_ngcontent-%COMP%]{display:block}.document-tree-container__node[_ngcontent-%COMP%] .document-tree-container__node[_ngcontent-%COMP%]{padding-left:40px}.document-tree-container[_ngcontent-%COMP%] .document-tree-invisible[_ngcontent-%COMP%]{display:none}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-button{display:none}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-track-piece{background:#eee}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#ccc}.document-folders-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #C9C9C9;padding:10px}.document-folders-header__title[_ngcontent-%COMP%]{font-weight:700}.node[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:10px;background:none;border:0;cursor:pointer;white-space:nowrap}.node--selected[_ngcontent-%COMP%]{background:#fff2cc}.node__icon[_ngcontent-%COMP%]{position:relative;display:inline-block}.node__count[_ngcontent-%COMP%]{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.875rem;padding-top:4px}.node__iconImg[_ngcontent-%COMP%]{display:block;height:30px;width:30px}.node__name[_ngcontent-%COMP%]{margin-left:6px;font-size:1rem;overflow:hidden;text-overflow:ellipsis}.node__document-options[_ngcontent-%COMP%]{margin-left:auto;margin-right:0}.node__document-upload-timestamp[_ngcontent-%COMP%]{font-size:.8rem;float:left;padding-left:10px}"] });
23496
+ } }, dependencies: [i5.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.FormControlName, i7.CdkNestedTreeNode, i7.CdkTreeNodeDef, i7.CdkTreeNodeToggle, i7.CdkTree, i7.CdkTreeNodeOutlet, CaseFileViewFolderSortComponent, CaseFileViewFolderDocumentActionsComponent, DatePipe], styles: ["[_nghost-%COMP%]{display:flex;height:100%;flex-direction:column}[_nghost-%COMP%] .document-tree-container[_ngcontent-%COMP%]{flex:1 0}.document-filter-container[_ngcontent-%COMP%]{border-bottom:2px solid #C9C9C9}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%]{padding:10px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%] .document-search[_ngcontent-%COMP%]{background:url(/assets/images/icon-search-black.svg) no-repeat right #fff;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container[_ngcontent-%COMP%] .documents-title[_ngcontent-%COMP%]{height:30%;margin-left:8px;font-weight:700}.document-tree-container[_ngcontent-%COMP%]{padding:4px;overflow-x:hidden;overflow-y:scroll}.document-tree-container__node[_ngcontent-%COMP%]{display:block}.document-tree-container__node[_ngcontent-%COMP%] .document-tree-container__node[_ngcontent-%COMP%]{padding-left:40px}.document-tree-container[_ngcontent-%COMP%] .document-tree-invisible[_ngcontent-%COMP%]{display:none}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-button{display:none}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-track-piece{background:#eee}.document-tree-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#ccc}.document-folders-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #C9C9C9;padding:10px}.document-folders-header__title[_ngcontent-%COMP%]{font-weight:700}.node[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:10px;background:none;border:0;cursor:pointer;white-space:nowrap}.node--selected[_ngcontent-%COMP%]{background:#fff2cc}.node__icon[_ngcontent-%COMP%]{position:relative;display:inline-block}.node__count[_ngcontent-%COMP%]{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.875rem;padding-top:4px}.node__iconImg[_ngcontent-%COMP%]{display:block;height:30px;width:30px}.node__name[_ngcontent-%COMP%]{margin-left:6px;font-size:1rem;overflow:hidden;text-overflow:ellipsis}.node__document-options[_ngcontent-%COMP%]{margin-left:auto;margin-right:0}.node__document-upload-timestamp[_ngcontent-%COMP%]{font-size:.8rem;float:left;padding-left:10px}"] });
23400
23497
  }
23401
23498
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
23402
23499
  type: Component,
23403
- args: [{ selector: 'ccd-case-file-view-folder', template: "<div class=\"document-filter-container\">\n <div class=\"form-group document-filter\" [formGroup]=\"documentFilterFormGroup\">\n <input class=\"form-control document-search\"\n type=\"search\"\n id=\"document-search\"\n name=\"documentSearchFormControl\"\n formControlName=\"documentSearchFormControl\"\n placeholder=\"Search by document name\"\n aria-label=\"Search by document name\">\n </div>\n</div>\n\n<div class=\"document-folders-header\">\n <div class=\"document-folders-header__title\">Documents ({{ documentCount }})</div>\n <div>\n <ccd-case-file-view-folder-sort\n (sortAscending)=\"sortDataSourceAscending($event)\"\n (sortDescending)=\"sortDataSourceDescending($event)\"\n ></ccd-case-file-view-folder-sort>\n </div>\n</div>\n\n<div class=\"document-tree-container\" *ngIf=\"documentTreeData\">\n <div *ngIf=\"!nestedDataSource || nestedDataSource.length === 0\">\n No results found\n </div>\n <div>\n <cdk-tree [dataSource]=\"nestedDataSource\" [treeControl]=\"nestedTreeControl\">\n <!-- document -->\n <cdk-nested-tree-node class=\"document-tree-container__node document-tree-container__node--document\" *cdkTreeNodeDef=\"let node\">\n <button class=\"node\" (click)=\"selectedNodeItem = node; clickedDocument.emit(node)\"\n [class.node--selected]=\"selectedNodeItem?.name === node.name\">\n <div class=\"node__icon\" disabled>\n <img src=\"/assets/img/case-file-view/case-file-view-document.svg\" class=\"node__iconImg\" alt=\"Document icon\">\n </div>\n <span class=\"node__name node-name-document\">\n {{node.name}}\n <br>\n <span class=\"node__document-upload-timestamp\">{{node.upload_timestamp | ccdDate : 'local' | date:\"dd MMM YYYY HH:mm\"}}</span>\n </span>\n <div class=\"node__document-options\">\n <ccd-case-file-view-folder-document-actions\n (changeFolderAction)=\"triggerDocumentAction('changeFolder', node)\"\n (openInANewTabAction)=\"triggerDocumentAction('openInANewTab', node)\"\n (downloadAction)=\"triggerDocumentAction('download', node)\"\n (printAction)=\"triggerDocumentAction('print', node)\"\n [allowMoving]=\"allowMoving\"\n >\n </ccd-case-file-view-folder-document-actions>\n </div>\n </button>\n </cdk-nested-tree-node>\n <!-- folder-->\n <cdk-nested-tree-node class=\"document-tree-container__node document-tree-container__folder\" *cdkTreeNodeDef=\"let node; when: nestedChildren\">\n <button class=\"node\" cdkTreeNodeToggle>\n <div class=\"node__icon\" [attr.aria-label]=\"'toggle ' + node.name\" >\n <img class=\"node__iconImg\"\n [src]=\"nestedTreeControl.isExpanded(node) ? '/assets/images/folder-open.png' : '/assets/images/folder.png'\" alt=\"Folder icon\">\n <span class=\"node__count\">{{node.childDocumentCount}}</span>\n </div>\n <span class=\"node__name node__name--folder\">{{node.name}}</span>\n </button>\n\n <div [class.document-tree-invisible]=\"!nestedTreeControl.isExpanded(node)\">\n <ng-container cdkTreeNodeOutlet></ng-container>\n </div>\n </cdk-nested-tree-node>\n </cdk-tree>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column}:host .document-tree-container{flex:1 0}.document-filter-container{border-bottom:2px solid #C9C9C9}.document-filter-container .document-filter{padding:10px}.document-filter-container .document-filter .document-search{background:url(/assets/images/icon-search-black.svg) no-repeat right #fff;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container .documents-title{height:30%;margin-left:8px;font-weight:700}.document-tree-container{padding:4px;overflow-x:hidden;overflow-y:scroll}.document-tree-container__node{display:block}.document-tree-container__node .document-tree-container__node{padding-left:40px}.document-tree-container .document-tree-invisible{display:none}.document-tree-container::-webkit-scrollbar{width:7px}.document-tree-container::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.document-tree-container::-webkit-scrollbar-button{display:none}.document-tree-container::-webkit-scrollbar-track-piece{background:#eee}.document-tree-container::-webkit-scrollbar-thumb{background:#ccc}.document-folders-header{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #C9C9C9;padding:10px}.document-folders-header__title{font-weight:700}.node{display:flex;align-items:center;width:100%;padding:10px;background:none;border:0;cursor:pointer;white-space:nowrap}.node--selected{background:#fff2cc}.node__icon{position:relative;display:inline-block}.node__count{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.875rem;padding-top:4px}.node__iconImg{display:block;height:30px;width:30px}.node__name{margin-left:6px;font-size:1rem;overflow:hidden;text-overflow:ellipsis}.node__document-options{margin-left:auto;margin-right:0}.node__document-upload-timestamp{font-size:.8rem;float:left;padding-left:10px}\n"] }]
23500
+ args: [{ selector: 'ccd-case-file-view-folder', template: "<div class=\"document-filter-container\">\n <div class=\"form-group document-filter\" [formGroup]=\"documentFilterFormGroup\">\n <input class=\"form-control document-search\"\n type=\"search\"\n id=\"document-search\"\n name=\"documentSearchFormControl\"\n formControlName=\"documentSearchFormControl\"\n placeholder=\"Search by document name\"\n aria-label=\"Search by document name\">\n </div>\n</div>\n\n<div class=\"document-folders-header\">\n <div class=\"document-folders-header__title\">Documents ({{ documentCount }})</div>\n <div>\n <ccd-case-file-view-folder-sort\n (sortAscending)=\"sortDataSourceAscending($event)\"\n (sortDescending)=\"sortDataSourceDescending($event)\"\n ></ccd-case-file-view-folder-sort>\n </div>\n</div>\n\n<div class=\"document-tree-container\" *ngIf=\"documentTreeData\">\n <div *ngIf=\"!nestedDataSource || nestedDataSource.length === 0\">\n No results found\n </div>\n <div>\n <cdk-tree [dataSource]=\"nestedDataSource\" [treeControl]=\"nestedTreeControl\">\n <!-- document -->\n <cdk-nested-tree-node class=\"document-tree-container__node document-tree-container__node--document\" *cdkTreeNodeDef=\"let node\">\n <button class=\"node\" (click)=\"selectedNodeItem = node; clickedDocument.emit(node)\"\n [class.node--selected]=\"selectedNodeItem?.name === node.name\">\n <div class=\"node__icon\" disabled>\n <img src=\"/assets/img/case-file-view/case-file-view-document.svg\" class=\"node__iconImg\" alt=\"Document icon\">\n </div>\n <span class=\"node__name node-name-document\">\n {{node.name}}\n <br>\n <span class=\"node__document-upload-timestamp\">{{node.upload_timestamp | ccdDate : 'local' :'dd MMM YYYY HH:mm'}}</span>\n </span>\n <div class=\"node__document-options\">\n <ccd-case-file-view-folder-document-actions\n (changeFolderAction)=\"triggerDocumentAction('changeFolder', node)\"\n (openInANewTabAction)=\"triggerDocumentAction('openInANewTab', node)\"\n (downloadAction)=\"triggerDocumentAction('download', node)\"\n (printAction)=\"triggerDocumentAction('print', node)\"\n [allowMoving]=\"allowMoving\"\n >\n </ccd-case-file-view-folder-document-actions>\n </div>\n </button>\n </cdk-nested-tree-node>\n <!-- folder-->\n <cdk-nested-tree-node class=\"document-tree-container__node document-tree-container__folder\" *cdkTreeNodeDef=\"let node; when: nestedChildren\">\n <button class=\"node\" cdkTreeNodeToggle>\n <div class=\"node__icon\" [attr.aria-label]=\"'toggle ' + node.name\" >\n <img class=\"node__iconImg\"\n [src]=\"nestedTreeControl.isExpanded(node) ? '/assets/images/folder-open.png' : '/assets/images/folder.png'\" alt=\"Folder icon\">\n <span class=\"node__count\">{{node.childDocumentCount}}</span>\n </div>\n <span class=\"node__name node__name--folder\">{{node.name}}</span>\n </button>\n\n <div [class.document-tree-invisible]=\"!nestedTreeControl.isExpanded(node)\">\n <ng-container cdkTreeNodeOutlet></ng-container>\n </div>\n </cdk-nested-tree-node>\n </cdk-tree>\n </div>\n</div>\n", styles: [":host{display:flex;height:100%;flex-direction:column}:host .document-tree-container{flex:1 0}.document-filter-container{border-bottom:2px solid #C9C9C9}.document-filter-container .document-filter{padding:10px}.document-filter-container .document-filter .document-search{background:url(/assets/images/icon-search-black.svg) no-repeat right #fff;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container .documents-title{height:30%;margin-left:8px;font-weight:700}.document-tree-container{padding:4px;overflow-x:hidden;overflow-y:scroll}.document-tree-container__node{display:block}.document-tree-container__node .document-tree-container__node{padding-left:40px}.document-tree-container .document-tree-invisible{display:none}.document-tree-container::-webkit-scrollbar{width:7px}.document-tree-container::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;border-radius:9999px;background-color:#aaa}.document-tree-container::-webkit-scrollbar-button{display:none}.document-tree-container::-webkit-scrollbar-track-piece{background:#eee}.document-tree-container::-webkit-scrollbar-thumb{background:#ccc}.document-folders-header{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #C9C9C9;padding:10px}.document-folders-header__title{font-weight:700}.node{display:flex;align-items:center;width:100%;padding:10px;background:none;border:0;cursor:pointer;white-space:nowrap}.node--selected{background:#fff2cc}.node__icon{position:relative;display:inline-block}.node__count{color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.875rem;padding-top:4px}.node__iconImg{display:block;height:30px;width:30px}.node__name{margin-left:6px;font-size:1rem;overflow:hidden;text-overflow:ellipsis}.node__document-options{margin-left:auto;margin-right:0}.node__document-upload-timestamp{font-size:.8rem;float:left;padding-left:10px}\n"] }]
23404
23501
  }], () => [{ type: WindowService }, { type: i1$1.Router }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: AbstractAppConfig }], { categoriesAndDocuments: [{
23405
23502
  type: Input
23406
23503
  }], allowMoving: [{
@@ -27412,7 +27509,7 @@ function EventLogTableComponent_tr_20_div_3_Template(rf, ctx) { if (rf & 1) {
27412
27509
  i0.ɵɵproperty("ngIf", event_r2.state_id !== "Draft");
27413
27510
  } }
27414
27511
  function EventLogTableComponent_tr_20_div_4_a_1_Template(rf, ctx) { if (rf & 1) {
27415
- i0.ɵɵelementStart(0, "a", 18);
27512
+ i0.ɵɵelementStart(0, "a", 19);
27416
27513
  i0.ɵɵtext(1);
27417
27514
  i0.ɵɵpipe(2, "rpxTranslate");
27418
27515
  i0.ɵɵelementEnd();
@@ -27424,14 +27521,29 @@ function EventLogTableComponent_tr_20_div_4_a_1_Template(rf, ctx) { if (rf & 1)
27424
27521
  i0.ɵɵadvance();
27425
27522
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 4, event_r2.event_name));
27426
27523
  } }
27524
+ function EventLogTableComponent_tr_20_div_4_span_2_Template(rf, ctx) { if (rf & 1) {
27525
+ i0.ɵɵelementStart(0, "span", 20);
27526
+ i0.ɵɵtext(1);
27527
+ i0.ɵɵpipe(2, "rpxTranslate");
27528
+ i0.ɵɵelementEnd();
27529
+ } if (rf & 2) {
27530
+ const event_r2 = i0.ɵɵnextContext(2).$implicit;
27531
+ const ctx_r2 = i0.ɵɵnextContext();
27532
+ i0.ɵɵattribute("aria-label", ctx_r2.getAriaLabelforLink(event_r2));
27533
+ i0.ɵɵadvance();
27534
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, event_r2.event_name));
27535
+ } }
27427
27536
  function EventLogTableComponent_tr_20_div_4_Template(rf, ctx) { if (rf & 1) {
27428
27537
  i0.ɵɵelementStart(0, "div");
27429
- i0.ɵɵtemplate(1, EventLogTableComponent_tr_20_div_4_a_1_Template, 3, 8, "a", 17);
27538
+ i0.ɵɵtemplate(1, EventLogTableComponent_tr_20_div_4_a_1_Template, 3, 8, "a", 17)(2, EventLogTableComponent_tr_20_div_4_span_2_Template, 3, 4, "span", 18);
27430
27539
  i0.ɵɵelementEnd();
27431
27540
  } if (rf & 2) {
27432
27541
  const event_r2 = i0.ɵɵnextContext().$implicit;
27542
+ const ctx_r2 = i0.ɵɵnextContext();
27433
27543
  i0.ɵɵadvance();
27434
- i0.ɵɵproperty("ngIf", event_r2.state_id !== "Draft");
27544
+ i0.ɵɵproperty("ngIf", event_r2.state_id !== "Draft" && !ctx_r2.isUserExternal);
27545
+ i0.ɵɵadvance();
27546
+ i0.ɵɵproperty("ngIf", ctx_r2.isUserExternal);
27435
27547
  } }
27436
27548
  function EventLogTableComponent_tr_20_span_5_Template(rf, ctx) { if (rf & 1) {
27437
27549
  i0.ɵɵelementStart(0, "span");
@@ -27443,10 +27555,10 @@ function EventLogTableComponent_tr_20_span_5_Template(rf, ctx) { if (rf & 1) {
27443
27555
  i0.ɵɵtextInterpolate(event_r2.event_name);
27444
27556
  } }
27445
27557
  function EventLogTableComponent_tr_20_div_6_Template(rf, ctx) { if (rf & 1) {
27446
- i0.ɵɵelementStart(0, "div", 19)(1, "a", 20);
27447
- i0.ɵɵelement(2, "img", 21);
27558
+ i0.ɵɵelementStart(0, "div", 21)(1, "a", 22);
27559
+ i0.ɵɵelement(2, "img", 23);
27448
27560
  i0.ɵɵelementEnd();
27449
- i0.ɵɵelementStart(3, "span", 22);
27561
+ i0.ɵɵelementStart(3, "span", 24);
27450
27562
  i0.ɵɵtext(4);
27451
27563
  i0.ɵɵelementEnd()();
27452
27564
  } if (rf & 2) {
@@ -27464,7 +27576,7 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) { if (rf & 1) {
27464
27576
  i0.ɵɵlistener("click", function EventLogTableComponent_tr_20_Template_tr_click_0_listener() { const event_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.select(event_r2)); })("keyup", function EventLogTableComponent_tr_20_Template_tr_keyup_0_listener() { const event_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.select(event_r2)); });
27465
27577
  i0.ɵɵelementStart(1, "td");
27466
27578
  i0.ɵɵelementContainerStart(2, 5);
27467
- i0.ɵɵtemplate(3, EventLogTableComponent_tr_20_div_3_Template, 2, 1, "div", 6)(4, EventLogTableComponent_tr_20_div_4_Template, 2, 1, "div", 7);
27579
+ i0.ɵɵtemplate(3, EventLogTableComponent_tr_20_div_3_Template, 2, 1, "div", 6)(4, EventLogTableComponent_tr_20_div_4_Template, 3, 2, "div", 7);
27468
27580
  i0.ɵɵelementContainerEnd();
27469
27581
  i0.ɵɵtemplate(5, EventLogTableComponent_tr_20_span_5_Template, 2, 1, "span", 8)(6, EventLogTableComponent_tr_20_div_6_Template, 5, 3, "div", 9);
27470
27582
  i0.ɵɵelementEnd();
@@ -27508,13 +27620,19 @@ function EventLogTableComponent_tr_20_Template(rf, ctx) { if (rf & 1) {
27508
27620
  i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(18, 21, event_r2.user_first_name), " ", i0.ɵɵpipeBind1(19, 23, event_r2.user_last_name), "");
27509
27621
  } }
27510
27622
  class EventLogTableComponent {
27623
+ sessionStorage;
27511
27624
  events;
27512
27625
  selected;
27513
27626
  onSelect = new EventEmitter();
27514
27627
  onCaseHistory = new EventEmitter();
27515
27628
  isPartOfCaseTimeline = false;
27629
+ isUserExternal;
27630
+ constructor(sessionStorage) {
27631
+ this.sessionStorage = sessionStorage;
27632
+ }
27516
27633
  ngOnInit() {
27517
27634
  this.isPartOfCaseTimeline = this.onCaseHistory.observers.length > 0;
27635
+ this.isUserExternal = JSON.parse(this.sessionStorage.getItem('userDetails')).roles.includes('pui-case-manager');
27518
27636
  }
27519
27637
  select(event) {
27520
27638
  this.selected = event;
@@ -27554,8 +27672,8 @@ class EventLogTableComponent {
27554
27672
  getAriaLabelforLink(event) {
27555
27673
  return `press enter key to open event ${event.event_name} link in separate window`;
27556
27674
  }
27557
- static ɵfac = function EventLogTableComponent_Factory(t) { return new (t || EventLogTableComponent)(); };
27558
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventLogTableComponent, selectors: [["ccd-event-log-table"]], inputs: { events: "events", selected: "selected" }, outputs: { onSelect: "onSelect", onCaseHistory: "onCaseHistory" }, decls: 21, vars: 13, consts: [[1, "EventLogTable"], [1, "heading-h2"], [1, "text-16"], ["tabindex", "0", 3, "ngClass", "click", "keyup", 4, "ngFor", "ngForOf"], ["tabindex", "0", 3, "click", "keyup", "ngClass"], [3, "ngSwitch"], ["id", "case-timeline", 4, "ngSwitchCase"], [4, "ngSwitchCase"], [4, "ngIf"], ["class", "tooltip", 4, "ngIf"], ["tabindex", "0", 3, "keydown.enter"], [1, "tooltip", "text-16"], [1, "tooltiptext"], ["tabindex", "0"], ["id", "case-timeline"], ["class", "text-16 event-link", 3, "click", 4, "ngIf"], [1, "text-16", "event-link", 3, "click"], ["class", "text-16 event-link", 3, "routerLink", "target", 4, "ngIf"], [1, "text-16", "event-link", 3, "routerLink", "target"], [1, "tooltip"], ["target", "_blank", "rel", "noopener", 3, "href"], ["alt", "document image", "src", "data:image/png;base64,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", 1, "doc-img"], [1, "tooltiptext", "doc-tooltip"]], template: function EventLogTableComponent_Template(rf, ctx) { if (rf & 1) {
27675
+ static ɵfac = function EventLogTableComponent_Factory(t) { return new (t || EventLogTableComponent)(i0.ɵɵdirectiveInject(SessionStorageService)); };
27676
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventLogTableComponent, selectors: [["ccd-event-log-table"]], inputs: { events: "events", selected: "selected" }, outputs: { onSelect: "onSelect", onCaseHistory: "onCaseHistory" }, decls: 21, vars: 13, consts: [[1, "EventLogTable"], [1, "heading-h2"], [1, "text-16"], ["tabindex", "0", 3, "ngClass", "click", "keyup", 4, "ngFor", "ngForOf"], ["tabindex", "0", 3, "click", "keyup", "ngClass"], [3, "ngSwitch"], ["id", "case-timeline", 4, "ngSwitchCase"], [4, "ngSwitchCase"], [4, "ngIf"], ["class", "tooltip", 4, "ngIf"], ["tabindex", "0", 3, "keydown.enter"], [1, "tooltip", "text-16"], [1, "tooltiptext"], ["tabindex", "0"], ["id", "case-timeline"], ["class", "text-16 event-link", 3, "click", 4, "ngIf"], [1, "text-16", "event-link", 3, "click"], ["class", "text-16 event-link", 3, "routerLink", "target", 4, "ngIf"], ["class", "text-16 event-link", 4, "ngIf"], [1, "text-16", "event-link", 3, "routerLink", "target"], [1, "text-16", "event-link"], [1, "tooltip"], ["target", "_blank", "rel", "noopener", 3, "href"], ["alt", "document image", "src", "data:image/png;base64,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", 1, "doc-img"], [1, "tooltiptext", "doc-tooltip"]], template: function EventLogTableComponent_Template(rf, ctx) { if (rf & 1) {
27559
27677
  i0.ɵɵelementStart(0, "table", 0)(1, "caption")(2, "h2", 1);
27560
27678
  i0.ɵɵtext(3);
27561
27679
  i0.ɵɵpipe(4, "rpxTranslate");
@@ -27590,8 +27708,8 @@ class EventLogTableComponent {
27590
27708
  }
27591
27709
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogTableComponent, [{
27592
27710
  type: Component,
27593
- args: [{ selector: 'ccd-event-log-table', template: "<table class=\"EventLogTable\">\n <caption><h2 class=\"heading-h2\">{{'History' | rpxTranslate}}</h2></caption>\n <thead>\n <tr>\n <th><span class=\"text-16\">{{'Event' | rpxTranslate}}</span></th>\n <th><span class=\"text-16\">{{'Date' | rpxTranslate}}</span></th>\n <th><span class=\"text-16\">{{'Author' | rpxTranslate}}</span></th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let event of events\" (click)=\"select(event)\" (keyup)=\"select(event)\" [ngClass]=\"{'EventLogTable-Selected': selected === event}\" tabindex=\"0\" attr.aria-label=\"{{getAriaLabelforRow(event)}}\">\n <td>\n <ng-container [ngSwitch]=\"isPartOfCaseTimeline\">\n <div id=\"case-timeline\" *ngSwitchCase=\"true\">\n <a (click)=\"caseHistoryClicked(event.id)\"\n *ngIf=\"event.state_id !== 'Draft'\" class=\"text-16 event-link\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">{{event.event_name | rpxTranslate}}</a>\n </div>\n <div *ngSwitchCase=\"false\">\n <a [routerLink]=\"['./', 'event', event.id, 'history']\"\n [target]=\"'_blank'\"\n *ngIf=\"event.state_id !== 'Draft'\" class=\"text-16 event-link\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">{{event.event_name | rpxTranslate}}</a>\n </div>\n </ng-container>\n <span *ngIf=\"event.state_id === 'Draft'\">{{event.event_name}}</span>\n <div class=\"tooltip\" *ngIf=\"significantItemExist(event)\">\n <a href=\"{{getSignificantItemUrl(event)}}\" target=\"_blank\" rel=\"noopener\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">\n <img class=\"doc-img\" alt=\"document image\" src=\"data:image/png;base64,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\"/>\n </a>\n <span class=\"tooltiptext doc-tooltip\">{{getSignificantItemDesc(event)}}</span>\n </div>\n </td>\n <td tabindex=\"0\" attr.aria-label=\"{{getAriaLabelforColumn(event)}}\" (keydown.enter)=\"select(event)\"><div class=\"tooltip text-16\">{{event.timestamp | ccdDate : 'local'}}\n <span class=\"tooltiptext\">{{'Local:' | rpxTranslate}} {{event.timestamp | ccdDate : 'local'}}</span>\n </div></td>\n <td tabindex=\"0\"><span class=\"text-16\">{{event.user_first_name | titlecase}} {{event.user_last_name | uppercase}}</span></td>\n </tr>\n </tbody>\n</table>\n", styles: ["#case-timeline a{cursor:pointer;text-decoration:underline;color:#005ea5}#case-timeline a:hover{color:#2b8cc4}#case-timeline a:visited{color:#4c2c92}.EventLogTable tbody>tr td:first-child{padding-left:10px}.EventLogTable tbody>tr.EventLogTable-Selected{border-left:8px solid #005ea5;background-color:#f8f8f8}.EventLogTable tbody>tr.EventLogTable-Selected td:first-child{padding-left:6px}.EventLogTable tbody>tr:not(.EventLogTable-Selected):hover{border-left:8px solid #2b8cc4;background-color:#f8f8f8;cursor:pointer;cursor:hand}.EventLogTable tbody>tr:not(.EventLogTable-Selected):hover td:first-child{padding-left:6px}.EventLogTable tbody>tr .event-link{float:left;padding-right:8px}.EventLogTable tbody>tr .doc-img{width:16px;float:left}.EventLogTable tbody>tr .doc-tooltip{left:35%;bottom:7px}.EventLogTable tbody>tr .doc-tooltip:after{border-color:transparent}\n"] }]
27594
- }], null, { events: [{
27711
+ args: [{ selector: 'ccd-event-log-table', template: "<table class=\"EventLogTable\">\n <caption><h2 class=\"heading-h2\">{{'History' | rpxTranslate}}</h2></caption>\n <thead>\n <tr>\n <th><span class=\"text-16\">{{'Event' | rpxTranslate}}</span></th>\n <th><span class=\"text-16\">{{'Date' | rpxTranslate}}</span></th>\n <th><span class=\"text-16\">{{'Author' | rpxTranslate}}</span></th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let event of events\" (click)=\"select(event)\" (keyup)=\"select(event)\" [ngClass]=\"{'EventLogTable-Selected': selected === event}\" tabindex=\"0\" attr.aria-label=\"{{getAriaLabelforRow(event)}}\">\n <td>\n <ng-container [ngSwitch]=\"isPartOfCaseTimeline\">\n <div id=\"case-timeline\" *ngSwitchCase=\"true\">\n <a (click)=\"caseHistoryClicked(event.id)\"\n *ngIf=\"event.state_id !== 'Draft'\" class=\"text-16 event-link\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">{{event.event_name | rpxTranslate}}</a>\n </div>\n <div *ngSwitchCase=\"false\">\n <a [routerLink]=\"['./', 'event', event.id, 'history']\"\n [target]=\"'_blank'\"\n *ngIf=\"event.state_id !== 'Draft' && !isUserExternal\" class=\"text-16 event-link\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">{{event.event_name | rpxTranslate}}</a>\n <span *ngIf=\"isUserExternal\" class=\"text-16 event-link\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">{{event.event_name | rpxTranslate}}</span>\n </div>\n </ng-container>\n <span *ngIf=\"event.state_id === 'Draft'\">{{event.event_name}}</span>\n <div class=\"tooltip\" *ngIf=\"significantItemExist(event)\">\n <a href=\"{{getSignificantItemUrl(event)}}\" target=\"_blank\" rel=\"noopener\" attr.aria-label=\"{{getAriaLabelforLink(event)}}\">\n <img class=\"doc-img\" alt=\"document image\" src=\"data:image/png;base64,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\"/>\n </a>\n <span class=\"tooltiptext doc-tooltip\">{{getSignificantItemDesc(event)}}</span>\n </div>\n </td>\n <td tabindex=\"0\" attr.aria-label=\"{{getAriaLabelforColumn(event)}}\" (keydown.enter)=\"select(event)\"><div class=\"tooltip text-16\">{{event.timestamp | ccdDate : 'local'}}\n <span class=\"tooltiptext\">{{'Local:' | rpxTranslate}} {{event.timestamp | ccdDate : 'local'}}</span>\n </div></td>\n <td tabindex=\"0\"><span class=\"text-16\">{{event.user_first_name | titlecase}} {{event.user_last_name | uppercase}}</span></td>\n </tr>\n </tbody>\n</table>\n", styles: ["#case-timeline a{cursor:pointer;text-decoration:underline;color:#005ea5}#case-timeline a:hover{color:#2b8cc4}#case-timeline a:visited{color:#4c2c92}.EventLogTable tbody>tr td:first-child{padding-left:10px}.EventLogTable tbody>tr.EventLogTable-Selected{border-left:8px solid #005ea5;background-color:#f8f8f8}.EventLogTable tbody>tr.EventLogTable-Selected td:first-child{padding-left:6px}.EventLogTable tbody>tr:not(.EventLogTable-Selected):hover{border-left:8px solid #2b8cc4;background-color:#f8f8f8;cursor:pointer;cursor:hand}.EventLogTable tbody>tr:not(.EventLogTable-Selected):hover td:first-child{padding-left:6px}.EventLogTable tbody>tr .event-link{float:left;padding-right:8px}.EventLogTable tbody>tr .doc-img{width:16px;float:left}.EventLogTable tbody>tr .doc-tooltip{left:35%;bottom:7px}.EventLogTable tbody>tr .doc-tooltip:after{border-color:transparent}\n"] }]
27712
+ }], () => [{ type: SessionStorageService }], { events: [{
27595
27713
  type: Input
27596
27714
  }], selected: [{
27597
27715
  type: Input
@@ -27600,7 +27718,7 @@ class EventLogTableComponent {
27600
27718
  }], onCaseHistory: [{
27601
27719
  type: Output
27602
27720
  }] }); })();
27603
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EventLogTableComponent, { className: "EventLogTableComponent", filePath: "lib/shared/components/palette/history/event-log/event-log-table.component.ts", lineNumber: 10 }); })();
27721
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EventLogTableComponent, { className: "EventLogTableComponent", filePath: "lib/shared/components/palette/history/event-log/event-log-table.component.ts", lineNumber: 11 }); })();
27604
27722
 
27605
27723
  function EventLogComponent_ccd_event_log_table_3_Template(rf, ctx) { if (rf & 1) {
27606
27724
  const _r1 = i0.ɵɵgetCurrentView();
@@ -31683,20 +31801,19 @@ class CaseHistoryService {
31683
31801
  function CaseHistoryComponent_div_0_ng_container_57_ng_container_6_tr_4_Template(rf, ctx) { if (rf & 1) {
31684
31802
  i0.ɵɵelementStart(0, "tr")(1, "th", 14)(2, "div", 15);
31685
31803
  i0.ɵɵtext(3);
31686
- i0.ɵɵelementEnd()();
31687
- i0.ɵɵelementStart(4, "td");
31688
- i0.ɵɵelement(5, "ccd-field-read", 16);
31804
+ i0.ɵɵelementEnd();
31805
+ i0.ɵɵelement(4, "ccd-field-read", 16);
31689
31806
  i0.ɵɵelementEnd()();
31690
31807
  } if (rf & 2) {
31691
31808
  const field_r1 = i0.ɵɵnextContext().$implicit;
31692
31809
  const ctx_r1 = i0.ɵɵnextContext(3);
31693
31810
  i0.ɵɵadvance(3);
31694
31811
  i0.ɵɵtextInterpolate(field_r1.label);
31695
- i0.ɵɵadvance(2);
31812
+ i0.ɵɵadvance();
31696
31813
  i0.ɵɵproperty("caseField", field_r1)("caseReference", ctx_r1.caseHistory.case_id);
31697
31814
  } }
31698
31815
  function CaseHistoryComponent_div_0_ng_container_57_ng_container_6_tr_5_Template(rf, ctx) { if (rf & 1) {
31699
- i0.ɵɵelementStart(0, "tr", 17)(1, "td", 18);
31816
+ i0.ɵɵelementStart(0, "tr", 17)(1, "th");
31700
31817
  i0.ɵɵelement(2, "ccd-field-read", 16);
31701
31818
  i0.ɵɵelementEnd()();
31702
31819
  } if (rf & 2) {
@@ -31710,7 +31827,7 @@ function CaseHistoryComponent_div_0_ng_container_57_ng_container_6_Template(rf,
31710
31827
  i0.ɵɵelementStart(1, "div", 10);
31711
31828
  i0.ɵɵelementContainerStart(2, 11);
31712
31829
  i0.ɵɵpipe(3, "ccdIsCompound");
31713
- i0.ɵɵtemplate(4, CaseHistoryComponent_div_0_ng_container_57_ng_container_6_tr_4_Template, 6, 3, "tr", 12)(5, CaseHistoryComponent_div_0_ng_container_57_ng_container_6_tr_5_Template, 3, 2, "tr", 13);
31830
+ i0.ɵɵtemplate(4, CaseHistoryComponent_div_0_ng_container_57_ng_container_6_tr_4_Template, 5, 3, "tr", 12)(5, CaseHistoryComponent_div_0_ng_container_57_ng_container_6_tr_5_Template, 3, 2, "tr", 13);
31714
31831
  i0.ɵɵelementContainerEnd();
31715
31832
  i0.ɵɵelementEnd();
31716
31833
  i0.ɵɵelementContainerEnd();
@@ -31902,7 +32019,7 @@ class CaseHistoryComponent {
31902
32019
  .filter(tab => ShowCondition.getInstance(tab.show_condition).matchByContextFields(tab.fields));
31903
32020
  }
31904
32021
  static ɵfac = function CaseHistoryComponent_Factory(t) { return new (t || CaseHistoryComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(CaseHistoryService)); };
31905
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseHistoryComponent, selectors: [["ccd-case-history"]], inputs: { event: "event" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "grid-row"], [1, "column-full"], [3, "caseDetails"], [1, "heading-h2"], ["aria-describedby", "event details table", 1, "EventDetails"], [4, "ngFor", "ngForOf"], [1, "caseHistorySection"], [1, "heading-h3"], [1, "CaseHistory", 3, "id"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["id", "case-viewer-label-header"], [1, "case-viewer-label"], [3, "caseField", "caseReference"], [1, "compound-field"], ["colspan", "2"]], template: function CaseHistoryComponent_Template(rf, ctx) { if (rf & 1) {
32022
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseHistoryComponent, selectors: [["ccd-case-history"]], inputs: { event: "event" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "grid-row"], [1, "column-full"], [3, "caseDetails"], [1, "heading-h2"], ["aria-describedby", "event details table", 1, "EventDetails"], [4, "ngFor", "ngForOf"], [1, "caseHistorySection"], [1, "heading-h3"], [1, "CaseHistory", 3, "id"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["id", "case-viewer-label-header"], [1, "case-viewer-label"], [3, "caseField", "caseReference"], [1, "compound-field"]], template: function CaseHistoryComponent_Template(rf, ctx) { if (rf & 1) {
31906
32023
  i0.ɵɵtemplate(0, CaseHistoryComponent_div_0_Template, 58, 44, "div", 0);
31907
32024
  } if (rf & 2) {
31908
32025
  i0.ɵɵproperty("ngIf", ctx.isDataLoaded());
@@ -31910,7 +32027,7 @@ class CaseHistoryComponent {
31910
32027
  }
31911
32028
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseHistoryComponent, [{
31912
32029
  type: Component,
31913
- args: [{ selector: 'ccd-case-history', template: "<div *ngIf=\"isDataLoaded()\">\n <div class=\"grid-row\">\n <div class=\"column-full\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n </div>\n </div>\n <div class=\"grid-row\">\n <div class=\"column-full\">\n <div>\n <h2 class=\"heading-h2\">{{'Event Details' | rpxTranslate}}</h2>\n <table class=\"EventDetails\" aria-describedby=\"event details table\">\n <tbody>\n <tr>\n <th>{{'Date' | rpxTranslate}}</th>\n <td>{{caseHistory.event.timestamp | ccdDate : 'local'}}</td>\n </tr>\n <tr>\n <th>{{'Author' | rpxTranslate}}</th>\n <td>{{caseHistory.event.user_first_name | titlecase}} {{caseHistory.event.user_last_name | uppercase}}</td>\n </tr>\n <tr>\n <th>{{'End state' | rpxTranslate}}</th>\n <td>{{caseHistory.event.state_name}}</td>\n </tr>\n <tr>\n <th>{{'Event' | rpxTranslate}}</th>\n <td>{{caseHistory.event.event_name}}</td>\n </tr>\n <tr>\n <th>{{'Summary' | rpxTranslate}}</th>\n <td>{{caseHistory.event.summary | ccdDash}}</td>\n </tr>\n <tr>\n <th>{{'Comment' | rpxTranslate}}</th>\n <td>{{caseHistory.event.comment | ccdDash}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n <div>\n <h2 class=\"heading-h2\">{{'Case Details' | rpxTranslate}}</h2>\n <ng-container *ngFor=\"let tab of tabs\">\n <div class=\"caseHistorySection\">\n <h3 class=\"heading-h3\">{{tab.label}}</h3>\n <table class=\"CaseHistory\" id=\"{{tab.id}}\" [attr.aria-describedby]=\"'case history table' | rpxTranslate\">\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"tab.fields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th id=\"case-viewer-label-header\">\n <div class=\"case-viewer-label\">{{field.label}}</div>\n </th>\n <td>\n <ccd-field-read [caseField]=\"field\" [caseReference]=\"caseHistory.case_id\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <td colspan=\"2\">\n <ccd-field-read [caseField]=\"field\" [caseReference]=\"caseHistory.case_id\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </table>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n", styles: [".CaseHistory th,.CaseHistory td{border-bottom:none}.caseHistorySection{margin-top:40px}.EventDetails th,.EventDetails td{border-bottom:none}th{width:1%;white-space:nowrap;vertical-align:top}.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}\n"] }]
32030
+ args: [{ selector: 'ccd-case-history', template: "<div *ngIf=\"isDataLoaded()\">\n <div class=\"grid-row\">\n <div class=\"column-full\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n </div>\n </div>\n <div class=\"grid-row\">\n <div class=\"column-full\">\n <div>\n <h2 class=\"heading-h2\">{{'Event Details' | rpxTranslate}}</h2>\n <table class=\"EventDetails\" aria-describedby=\"event details table\">\n <tbody>\n <tr>\n <th>{{'Date' | rpxTranslate}}</th>\n <td>{{caseHistory.event.timestamp | ccdDate : 'local'}}</td>\n </tr>\n <tr>\n <th>{{'Author' | rpxTranslate}}</th>\n <td>{{caseHistory.event.user_first_name | titlecase}} {{caseHistory.event.user_last_name | uppercase}}</td>\n </tr>\n <tr>\n <th>{{'End state' | rpxTranslate}}</th>\n <td>{{caseHistory.event.state_name}}</td>\n </tr>\n <tr>\n <th>{{'Event' | rpxTranslate}}</th>\n <td>{{caseHistory.event.event_name}}</td>\n </tr>\n <tr>\n <th>{{'Summary' | rpxTranslate}}</th>\n <td>{{caseHistory.event.summary | ccdDash}}</td>\n </tr>\n <tr>\n <th>{{'Comment' | rpxTranslate}}</th>\n <td>{{caseHistory.event.comment | ccdDash}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n <div>\n <h2 class=\"heading-h2\">{{'Case Details' | rpxTranslate}}</h2>\n <ng-container *ngFor=\"let tab of tabs\">\n <div class=\"caseHistorySection\">\n <h3 class=\"heading-h3\">{{tab.label}}</h3>\n <table class=\"CaseHistory\" id=\"{{tab.id}}\" [attr.aria-describedby]=\"'case history table' | rpxTranslate\">\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"tab.fields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th id=\"case-viewer-label-header\">\n <div class=\"case-viewer-label\">{{field.label}}</div>\n <ccd-field-read [caseField]=\"field\" [caseReference]=\"caseHistory.case_id\"></ccd-field-read>\n </th>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <th>\n <ccd-field-read [caseField]=\"field\" [caseReference]=\"caseHistory.case_id\"></ccd-field-read>\n </th>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </table>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n", styles: [".CaseHistory th,.CaseHistory td{border-bottom:none}.caseHistorySection{margin-top:40px}.EventDetails th,.EventDetails td{border-bottom:none}th{width:1%;white-space:nowrap;vertical-align:top}.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}\n"] }]
31914
32031
  }], () => [{ type: i1$1.ActivatedRoute }, { type: AlertService }, { type: OrderService }, { type: CaseNotifier }, { type: CaseHistoryService }], { event: [{
31915
32032
  type: Input
31916
32033
  }] }); })();
@@ -34292,7 +34409,6 @@ class EventStartGuard {
34292
34409
  sessionStorageService;
34293
34410
  abstractConfig;
34294
34411
  cookieService;
34295
- static CLIENT_CONTEXT = 'clientContext';
34296
34412
  constructor(workAllocationService, router, sessionStorageService, abstractConfig, cookieService) {
34297
34413
  this.workAllocationService = workAllocationService;
34298
34414
  this.router = router;
@@ -34313,7 +34429,7 @@ class EventStartGuard {
34313
34429
  const caseInfoStr = this.sessionStorageService.getItem('caseInfo');
34314
34430
  const languageCookie = this.cookieService.getCookie('exui-preferred-language');
34315
34431
  const currentLanguage = !!languageCookie && languageCookie !== '' ? languageCookie : 'en';
34316
- const preClientContext = this.sessionStorageService.getItem(EventStartGuard.CLIENT_CONTEXT);
34432
+ const preClientContext = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
34317
34433
  if (!preClientContext) {
34318
34434
  // creates client context for language if not already existing
34319
34435
  const storeClientContext = {
@@ -34323,7 +34439,7 @@ class EventStartGuard {
34323
34439
  }
34324
34440
  }
34325
34441
  };
34326
- this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
34442
+ this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
34327
34443
  }
34328
34444
  else {
34329
34445
  const clientContextObj = JSON.parse(preClientContext);
@@ -34337,7 +34453,7 @@ class EventStartGuard {
34337
34453
  }
34338
34454
  }
34339
34455
  };
34340
- this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(clientContextAddLanguage));
34456
+ this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(clientContextAddLanguage));
34341
34457
  }
34342
34458
  }
34343
34459
  if (caseInfoStr) {
@@ -34355,7 +34471,7 @@ class EventStartGuard {
34355
34471
  }
34356
34472
  return of(false);
34357
34473
  }
34358
- checkTaskInEventNotRequired(payload, caseId, taskId) {
34474
+ checkTaskInEventNotRequired(payload, caseId, taskId, eventId, userId) {
34359
34475
  if (!payload || !payload.tasks) {
34360
34476
  return true;
34361
34477
  }
@@ -34385,55 +34501,18 @@ class EventStartGuard {
34385
34501
  else {
34386
34502
  task = tasksAssignedToUser[0];
34387
34503
  }
34388
- const currentLanguage = this.cookieService.getCookie('exui-preferred-language');
34389
- // if one task assigned to user, allow user to complete event
34390
- const storeClientContext = {
34391
- client_context: {
34392
- user_task: {
34393
- task_data: task,
34394
- complete_task: true
34395
- },
34396
- user_language: {
34397
- language: currentLanguage
34398
- }
34399
- }
34400
- };
34401
- this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
34504
+ this.setClientContextStorage(task, caseId, eventId, userId);
34402
34505
  return true;
34403
34506
  }
34404
34507
  }
34405
- removeTaskFromSessionStorage() {
34406
- this.sessionStorageService.removeItem(EventStartGuard.CLIENT_CONTEXT);
34407
- }
34408
34508
  checkForTasks(payload, caseId, eventId, taskId, userId) {
34409
34509
  if (taskId && payload?.tasks?.length > 0) {
34410
34510
  const task = payload.tasks.find((t) => t.id == taskId);
34411
34511
  if (task) {
34412
- // Store task to session
34413
- const taskEventCompletionInfo = {
34414
- caseId: caseId,
34415
- eventId: eventId,
34416
- userId: userId,
34417
- taskId: task.id,
34418
- createdTimestamp: Date.now()
34419
- };
34420
- const currentLanguage = this.cookieService.getCookie('exui-preferred-language');
34421
- const storeClientContext = {
34422
- client_context: {
34423
- user_task: {
34424
- task_data: task,
34425
- complete_task: true
34426
- },
34427
- user_language: {
34428
- language: currentLanguage
34429
- }
34430
- }
34431
- };
34432
- this.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
34433
- this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
34512
+ this.setClientContextStorage(task, caseId, eventId, userId);
34434
34513
  }
34435
34514
  else {
34436
- this.removeTaskFromSessionStorage();
34515
+ removeTaskFromClientContext(this.sessionStorageService);
34437
34516
  }
34438
34517
  }
34439
34518
  if (payload.task_required_for_event) {
@@ -34448,9 +34527,34 @@ class EventStartGuard {
34448
34527
  return of(false);
34449
34528
  }
34450
34529
  else {
34451
- return of(this.checkTaskInEventNotRequired(payload, caseId, taskId));
34530
+ return of(this.checkTaskInEventNotRequired(payload, caseId, taskId, eventId, userId));
34452
34531
  }
34453
34532
  }
34533
+ // EXUI-2743 - Make taskEventCompletionInfo always available in session storage with client context
34534
+ setClientContextStorage(task, caseId, eventId, userId) {
34535
+ // Store task to session
34536
+ const taskEventCompletionInfo = {
34537
+ caseId: caseId,
34538
+ eventId: eventId,
34539
+ userId: userId,
34540
+ taskId: task.id,
34541
+ createdTimestamp: Date.now()
34542
+ };
34543
+ const currentLanguage = this.cookieService.getCookie('exui-preferred-language');
34544
+ const storeClientContext = {
34545
+ client_context: {
34546
+ user_task: {
34547
+ task_data: task,
34548
+ complete_task: true
34549
+ },
34550
+ user_language: {
34551
+ language: currentLanguage
34552
+ }
34553
+ }
34554
+ };
34555
+ this.sessionStorageService.setItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO, JSON.stringify(taskEventCompletionInfo));
34556
+ this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
34557
+ }
34454
34558
  static ɵfac = function EventStartGuard_Factory(t) { return new (t || EventStartGuard)(i0.ɵɵinject(WorkAllocationService), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(SessionStorageService), i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(ReadCookieService)); };
34455
34559
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventStartGuard, factory: EventStartGuard.ɵfac });
34456
34560
  }
@@ -34612,7 +34716,6 @@ class EventStartStateMachineService {
34612
34716
  }
34613
34717
  }
34614
34718
  };
34615
- context.sessionStorageService.setItem('clientContext', JSON.stringify(clientContext));
34616
34719
  let userInfo;
34617
34720
  const userInfoStr = context.sessionStorageService.getItem('userDetails');
34618
34721
  if (userInfoStr) {
@@ -34626,7 +34729,9 @@ class EventStartStateMachineService {
34626
34729
  taskId: task.id,
34627
34730
  createdTimestamp: Date.now()
34628
34731
  };
34629
- context.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
34732
+ context.sessionStorageService.setItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO, JSON.stringify(taskEventCompletionInfo));
34733
+ // EXUI-2668 - Only add client context when taskEventCompletionInfo is set - stops auto completing incorrect tasks
34734
+ context.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(clientContext));
34630
34735
  // Allow user to perform the event
34631
34736
  context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
34632
34737
  }
@@ -37043,10 +37148,10 @@ function SearchResultComponent_table_0_div_7_Template(rf, ctx) { if (rf & 1) {
37043
37148
  i0.ɵɵadvance(4);
37044
37149
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 4, "Reset case selection"));
37045
37150
  } }
37046
- function SearchResultComponent_table_0_th_10_Template(rf, ctx) { if (rf & 1) {
37151
+ function SearchResultComponent_table_0_td_10_Template(rf, ctx) { if (rf & 1) {
37047
37152
  const _r3 = i0.ɵɵgetCurrentView();
37048
- i0.ɵɵelementStart(0, "th", 21)(1, "div", 22)(2, "input", 23);
37049
- i0.ɵɵlistener("change", function SearchResultComponent_table_0_th_10_Template_input_change_2_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.selectAll()); });
37153
+ i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 23);
37154
+ 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()); });
37050
37155
  i0.ɵɵelementEnd();
37051
37156
  i0.ɵɵelement(3, "label", 24);
37052
37157
  i0.ɵɵelementEnd()();
@@ -37054,6 +37159,8 @@ function SearchResultComponent_table_0_th_10_Template(rf, ctx) { if (rf & 1) {
37054
37159
  const ctx_r0 = i0.ɵɵnextContext(2);
37055
37160
  i0.ɵɵadvance(2);
37056
37161
  i0.ɵɵproperty("checked", ctx_r0.allOnPageSelected())("disabled", !ctx_r0.canAnyBeShared());
37162
+ i0.ɵɵadvance();
37163
+ i0.ɵɵattribute("aria-labelledby", "select-all");
37057
37164
  } }
37058
37165
  function SearchResultComponent_table_0_th_11_div_5_Template(rf, ctx) { if (rf & 1) {
37059
37166
  const _r6 = i0.ɵɵgetCurrentView();
@@ -37091,10 +37198,10 @@ function SearchResultComponent_table_0_th_12_Template(rf, ctx) { if (rf & 1) {
37091
37198
  } }
37092
37199
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template(rf, ctx) { if (rf & 1) {
37093
37200
  const _r7 = i0.ɵɵgetCurrentView();
37094
- i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 33);
37201
+ i0.ɵɵelementStart(0, "td", 34)(1, "div", 22)(2, "input", 35);
37095
37202
  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)); });
37096
37203
  i0.ɵɵelementEnd();
37097
- i0.ɵɵelement(3, "label", 34);
37204
+ i0.ɵɵelement(3, "label", 36);
37098
37205
  i0.ɵɵelementEnd()();
37099
37206
  } if (rf & 2) {
37100
37207
  const result_r8 = i0.ɵɵnextContext().$implicit;
@@ -37105,9 +37212,10 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template(rf, ct
37105
37212
  i0.ɵɵproperty("checked", ctx_r0.isSelected(result_r8))("disabled", !ctx_r0.canBeShared(result_r8));
37106
37213
  i0.ɵɵadvance();
37107
37214
  i0.ɵɵpropertyInterpolate1("for", "select-", result_r8.case_id, "");
37215
+ i0.ɵɵattribute("aria-labelledby", "select-" + result_r8.case_id);
37108
37216
  } }
37109
37217
  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) {
37110
- i0.ɵɵelement(0, "ccd-field-read", 42);
37218
+ i0.ɵɵelement(0, "ccd-field-read", 44);
37111
37219
  } if (rf & 2) {
37112
37220
  const col_r9 = i0.ɵɵnextContext(3).$implicit;
37113
37221
  const result_r8 = i0.ɵɵnextContext().$implicit;
@@ -37122,8 +37230,8 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_containe
37122
37230
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(1, 1, result_r8.case_id));
37123
37231
  } }
37124
37232
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
37125
- i0.ɵɵelementContainerStart(0, 40);
37126
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template, 1, 4, "ccd-field-read", 41)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_ng_template_2_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
37233
+ i0.ɵɵelementContainerStart(0, 42);
37234
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template, 1, 4, "ccd-field-read", 43)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_ng_template_2_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
37127
37235
  i0.ɵɵelementContainerEnd();
37128
37236
  } if (rf & 2) {
37129
37237
  const case_reference_r10 = i0.ɵɵreference(3);
@@ -37134,9 +37242,9 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_containe
37134
37242
  i0.ɵɵproperty("ngIf", ctx_r0.draftPrefixOrGet(col_r9, result_r8))("ngIfElse", case_reference_r10);
37135
37243
  } }
37136
37244
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_Template(rf, ctx) { if (rf & 1) {
37137
- i0.ɵɵelementStart(0, "a", 38);
37245
+ i0.ɵɵelementStart(0, "a", 40);
37138
37246
  i0.ɵɵpipe(1, "ccdCaseReference");
37139
- i0.ɵɵtemplate(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_Template, 4, 2, "ng-container", 39);
37247
+ i0.ɵɵtemplate(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_Template, 4, 2, "ng-container", 41);
37140
37248
  i0.ɵɵelementEnd();
37141
37249
  } if (rf & 2) {
37142
37250
  const result_r8 = i0.ɵɵnextContext(2).$implicit;
@@ -37147,8 +37255,8 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_Template(rf
37147
37255
  i0.ɵɵproperty("ngIf", !ctx_r0.hideRows);
37148
37256
  } }
37149
37257
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_div_2_Template(rf, ctx) { if (rf & 1) {
37150
- i0.ɵɵelementStart(0, "div", 40);
37151
- i0.ɵɵelement(1, "ccd-field-read", 42);
37258
+ i0.ɵɵelementStart(0, "div", 42);
37259
+ i0.ɵɵelement(1, "ccd-field-read", 44);
37152
37260
  i0.ɵɵelementEnd();
37153
37261
  } if (rf & 2) {
37154
37262
  const col_r9 = i0.ɵɵnextContext().$implicit;
@@ -37159,8 +37267,8 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_div_2_Template(
37159
37267
  i0.ɵɵproperty("caseField", result_r8.columns[col_r9.case_field_id])("contextFields", result_r8.hydrated_case_fields)("elementsToSubstitute", i0.ɵɵpureFunction0(5, _c1));
37160
37268
  } }
37161
37269
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template(rf, ctx) { if (rf & 1) {
37162
- i0.ɵɵelementStart(0, "td", 35);
37163
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_Template, 3, 6, "a", 36)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_div_2_Template, 2, 6, "div", 37);
37270
+ i0.ɵɵelementStart(0, "td", 37);
37271
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_Template, 3, 6, "a", 38)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_div_2_Template, 2, 6, "div", 39);
37164
37272
  i0.ɵɵelementEnd();
37165
37273
  } if (rf & 2) {
37166
37274
  const colIndex_r11 = ctx.index;
@@ -37171,7 +37279,7 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template(rf, ct
37171
37279
  } }
37172
37280
  function SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template(rf, ctx) { if (rf & 1) {
37173
37281
  i0.ɵɵelementStart(0, "td")(1, "div");
37174
- i0.ɵɵelement(2, "ccd-activity", 43);
37282
+ i0.ɵɵelement(2, "ccd-activity", 45);
37175
37283
  i0.ɵɵelementEnd()();
37176
37284
  } if (rf & 2) {
37177
37285
  const result_r8 = i0.ɵɵnextContext().$implicit;
@@ -37183,7 +37291,7 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template(rf, ct
37183
37291
  } }
37184
37292
  function SearchResultComponent_table_0_ng_container_14_tr_1_Template(rf, ctx) { if (rf & 1) {
37185
37293
  i0.ɵɵelementStart(0, "tr");
37186
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template, 4, 8, "td", 9)(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template, 3, 2, "td", 32)(3, SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template, 3, 4, "td", 1);
37294
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template, 4, 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);
37187
37295
  i0.ɵɵelementEnd();
37188
37296
  } if (rf & 2) {
37189
37297
  const ctx_r0 = i0.ɵɵnextContext(3);
@@ -37206,10 +37314,10 @@ function SearchResultComponent_table_0_ng_container_14_Template(rf, ctx) { if (r
37206
37314
  } }
37207
37315
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ctx) { if (rf & 1) {
37208
37316
  const _r12 = i0.ɵɵgetCurrentView();
37209
- i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 44);
37317
+ i0.ɵɵelementStart(0, "td", 34)(1, "div", 22)(2, "input", 46);
37210
37318
  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)); });
37211
37319
  i0.ɵɵelementEnd();
37212
- i0.ɵɵelement(3, "label", 34);
37320
+ i0.ɵɵelement(3, "label", 36);
37213
37321
  i0.ɵɵelementEnd()();
37214
37322
  } if (rf & 2) {
37215
37323
  const result_r13 = i0.ɵɵnextContext().$implicit;
@@ -37220,9 +37328,10 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ct
37220
37328
  i0.ɵɵproperty("checked", ctx_r0.isSelected(result_r13))("disabled", !ctx_r0.canBeShared(result_r13));
37221
37329
  i0.ɵɵadvance();
37222
37330
  i0.ɵɵpropertyInterpolate1("for", "select-", result_r13.case_id, "");
37331
+ i0.ɵɵattribute("aria-labelledby", "select-" + result_r13.case_id);
37223
37332
  } }
37224
37333
  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) {
37225
- i0.ɵɵelement(0, "ccd-field-read", 42);
37334
+ i0.ɵɵelement(0, "ccd-field-read", 44);
37226
37335
  } if (rf & 2) {
37227
37336
  const col_r14 = i0.ɵɵnextContext(3).$implicit;
37228
37337
  const result_r13 = i0.ɵɵnextContext().$implicit;
@@ -37237,8 +37346,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_containe
37237
37346
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(1, 1, result_r13.case_id));
37238
37347
  } }
37239
37348
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
37240
- i0.ɵɵelementContainerStart(0, 40);
37241
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template, 1, 4, "ccd-field-read", 41)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_ng_template_2_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
37349
+ i0.ɵɵelementContainerStart(0, 42);
37350
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_ccd_field_read_1_Template, 1, 4, "ccd-field-read", 43)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_ng_template_2_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
37242
37351
  i0.ɵɵelementContainerEnd();
37243
37352
  } if (rf & 2) {
37244
37353
  const case_reference_r15 = i0.ɵɵreference(3);
@@ -37249,9 +37358,9 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_containe
37249
37358
  i0.ɵɵproperty("ngIf", ctx_r0.draftPrefixOrGet(col_r14, result_r13))("ngIfElse", case_reference_r15);
37250
37359
  } }
37251
37360
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_Template(rf, ctx) { if (rf & 1) {
37252
- i0.ɵɵelementStart(0, "a", 38);
37361
+ i0.ɵɵelementStart(0, "a", 40);
37253
37362
  i0.ɵɵpipe(1, "ccdCaseReference");
37254
- i0.ɵɵtemplate(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_Template, 4, 2, "ng-container", 39);
37363
+ i0.ɵɵtemplate(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_Template, 4, 2, "ng-container", 41);
37255
37364
  i0.ɵɵelementEnd();
37256
37365
  } if (rf & 2) {
37257
37366
  const result_r13 = i0.ɵɵnextContext(2).$implicit;
@@ -37262,8 +37371,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_Template(rf
37262
37371
  i0.ɵɵproperty("ngIf", !ctx_r0.hideRows);
37263
37372
  } }
37264
37373
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_div_2_Template(rf, ctx) { if (rf & 1) {
37265
- i0.ɵɵelementStart(0, "div", 40);
37266
- i0.ɵɵelement(1, "ccd-field-read", 42);
37374
+ i0.ɵɵelementStart(0, "div", 42);
37375
+ i0.ɵɵelement(1, "ccd-field-read", 44);
37267
37376
  i0.ɵɵelementEnd();
37268
37377
  } if (rf & 2) {
37269
37378
  const col_r14 = i0.ɵɵnextContext().$implicit;
@@ -37274,8 +37383,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_div_2_Template(
37274
37383
  i0.ɵɵproperty("caseField", result_r13.columns[col_r14.case_field_id])("contextFields", result_r13.hydrated_case_fields)("elementsToSubstitute", i0.ɵɵpureFunction0(5, _c1));
37275
37384
  } }
37276
37385
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template(rf, ctx) { if (rf & 1) {
37277
- i0.ɵɵelementStart(0, "td", 35);
37278
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_Template, 3, 6, "a", 36)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_div_2_Template, 2, 6, "div", 37);
37386
+ i0.ɵɵelementStart(0, "td", 37);
37387
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_Template, 3, 6, "a", 38)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_div_2_Template, 2, 6, "div", 39);
37279
37388
  i0.ɵɵelementEnd();
37280
37389
  } if (rf & 2) {
37281
37390
  const colIndex_r16 = ctx.index;
@@ -37286,7 +37395,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template(rf, ct
37286
37395
  } }
37287
37396
  function SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template(rf, ctx) { if (rf & 1) {
37288
37397
  i0.ɵɵelementStart(0, "td")(1, "div");
37289
- i0.ɵɵelement(2, "ccd-activity", 43);
37398
+ i0.ɵɵelement(2, "ccd-activity", 45);
37290
37399
  i0.ɵɵelementEnd()();
37291
37400
  } if (rf & 2) {
37292
37401
  const result_r13 = i0.ɵɵnextContext().$implicit;
@@ -37298,7 +37407,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template(rf, ct
37298
37407
  } }
37299
37408
  function SearchResultComponent_table_0_ng_container_15_tr_1_Template(rf, ctx) { if (rf & 1) {
37300
37409
  i0.ɵɵelementStart(0, "tr");
37301
- i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template, 4, 8, "td", 9)(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template, 3, 2, "td", 32)(3, SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template, 3, 4, "td", 1);
37410
+ i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template, 4, 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);
37302
37411
  i0.ɵɵelementEnd();
37303
37412
  } if (rf & 2) {
37304
37413
  const ctx_r0 = i0.ɵɵnextContext(3);
@@ -37328,7 +37437,7 @@ function SearchResultComponent_table_0_Template(rf, ctx) { if (rf & 1) {
37328
37437
  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);
37329
37438
  i0.ɵɵelementEnd();
37330
37439
  i0.ɵɵelementStart(8, "thead")(9, "tr", 8);
37331
- i0.ɵɵtemplate(10, SearchResultComponent_table_0_th_10_Template, 4, 2, "th", 9)(11, SearchResultComponent_table_0_th_11_Template, 6, 5, "th", 10)(12, SearchResultComponent_table_0_th_12_Template, 2, 0, "th", 11);
37440
+ i0.ɵɵtemplate(10, SearchResultComponent_table_0_td_10_Template, 4, 3, "td", 9)(11, SearchResultComponent_table_0_th_11_Template, 6, 5, "th", 10)(12, SearchResultComponent_table_0_th_12_Template, 2, 0, "th", 11);
37332
37441
  i0.ɵɵelementEnd()();
37333
37442
  i0.ɵɵelementStart(13, "tbody");
37334
37443
  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);
@@ -37356,7 +37465,7 @@ function SearchResultComponent_table_0_Template(rf, ctx) { if (rf & 1) {
37356
37465
  } }
37357
37466
  function SearchResultComponent_ccd_pagination_1_Template(rf, ctx) { if (rf & 1) {
37358
37467
  const _r17 = i0.ɵɵgetCurrentView();
37359
- i0.ɵɵelementStart(0, "ccd-pagination", 45);
37468
+ i0.ɵɵelementStart(0, "ccd-pagination", 47);
37360
37469
  i0.ɵɵlistener("pageChange", function SearchResultComponent_ccd_pagination_1_Template_ccd_pagination_pageChange_0_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.goToPage($event)); });
37361
37470
  i0.ɵɵelementEnd();
37362
37471
  } if (rf & 2) {
@@ -37364,7 +37473,7 @@ function SearchResultComponent_ccd_pagination_1_Template(rf, ctx) { if (rf & 1)
37364
37473
  i0.ɵɵproperty("visibilityLabel", ctx_r0.hideRows ? "hidden" : "visible")("autoHide", true)("maxSize", 8)("screenReaderPaginationLabel", "Pagination")("screenReaderPageLabel", ctx_r0.page)("screenReaderCurrentLabel", "You're on page");
37365
37474
  } }
37366
37475
  function SearchResultComponent_div_2_Template(rf, ctx) { if (rf & 1) {
37367
- i0.ɵɵelementStart(0, "div", 46);
37476
+ i0.ɵɵelementStart(0, "div", 48);
37368
37477
  i0.ɵɵpipe(1, "rpxTranslate");
37369
37478
  i0.ɵɵtext(2);
37370
37479
  i0.ɵɵpipe(3, "rpxTranslate");
@@ -37715,7 +37824,7 @@ class SearchResultComponent {
37715
37824
  // eslint-disable-next-line @typescript-eslint/no-empty-function
37716
37825
  noop() { }
37717
37826
  static ɵfac = function SearchResultComponent_Factory(t) { return new (t || SearchResultComponent)(i0.ɵɵdirectiveInject(SearchResultViewItemComparatorFactory), i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(ActivityService), i0.ɵɵdirectiveInject(CaseReferencePipe), i0.ɵɵdirectiveInject(PlaceholderService), i0.ɵɵdirectiveInject(BrowserService), i0.ɵɵdirectiveInject(SessionStorageService)); };
37718
- 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" }, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 3, consts: [["case_reference", ""], [4, "ngIf"], [3, "visibilityLabel", "autoHide", "maxSize", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel", "pageChange", 4, "ngIf"], ["class", "notification", 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", "scope", "col", 4, "ngIf"], ["class", "search-result-column-header", 4, "ngFor", "ngForOf"], ["style", "width: 110px;", 4, "ngIf"], [1, "govuk-warning-text", "pagination-limit-warning"], ["aria-hidden", "true", 1, "govuk-warning-text__icon"], [1, "govuk-warning-text__text"], [1, "govuk-warning-text__assistive"], [1, "pagination-top"], ["id", "search-result-summary__text", 1, "text-16"], [1, "govuk-!-font-weight-bold"], [1, "reset-selection"], ["href", "javascript:void(0)", 1, "search-result-reset-link", 3, "click"], ["scope", "col", 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"], [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", "javascript:void(0)", 1, "sort-widget", 3, "click", "innerHTML"], [2, "width", "110px"], [4, "ngFor", "ngForOf"], ["class", "search-result-column-cell", "scope", "row", 4, "ngFor", "ngForOf"], ["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"], [1, "notification"]], template: function SearchResultComponent_Template(rf, ctx) { if (rf & 1) {
37827
+ 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" }, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 3, consts: [["case_reference", ""], [4, "ngIf"], [3, "visibilityLabel", "autoHide", "maxSize", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel", "pageChange", 4, "ngIf"], ["class", "notification", 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-warning-text__assistive"], [1, "pagination-top"], ["id", "search-result-summary__text", 1, "text-16"], [1, "govuk-!-font-weight-bold"], [1, "reset-selection"], ["href", "javascript:void(0)", 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", "javascript:void(0)", 1, "sort-widget", 3, "click", "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"], [1, "notification"]], template: function SearchResultComponent_Template(rf, ctx) { if (rf & 1) {
37719
37828
  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, 4, 6, "div", 3);
37720
37829
  } if (rf & 2) {
37721
37830
  i0.ɵɵproperty("ngIf", ctx.hasResults() || ctx.hasDrafts());
@@ -37727,7 +37836,7 @@ class SearchResultComponent {
37727
37836
  }
37728
37837
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
37729
37838
  type: Component,
37730
- args: [{ selector: 'ccd-search-result', 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-warning-text__assistive\">{{'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=\"javascript:void(0)\" (click)=\"clearSelection()\">{{'Reset case selection' | rpxTranslate}}</a></span>\n </div>\n </caption>\n <thead>\n <tr scope=\"row\">\n <th *ngIf=\"selectionEnabled\" class=\"govuk-table__checkbox\" scope=\"col\">\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\">\n </label>\n </div>\n </th>\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')\">\n <div>\n <div class=\"search-result-column-label\" (click)=\"sort(col)\" (keyup)=\"noop()\">\n {{col.label | rpxTranslate}}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" href=\"javascript:void(0)\"></a>\n </div>\n </div>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\">&ZeroWidthSpace;</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 }}\">\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 }}\">\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\"\n[attr.aria-describedby]=\"'No cases found. Try using different filters.' | rpxTranslate\">\n{{'No cases found. Try using different filters.' | rpxTranslate}}\n</div>\n", styles: ["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"] }]
37839
+ args: [{ selector: 'ccd-search-result', 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-warning-text__assistive\">{{'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=\"javascript:void(0)\" (click)=\"clearSelection()\">{{'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 {{col.label | rpxTranslate}}\n </div>\n <div *ngIf=\"comparator(col)\" class=\"search-result-column-sort\">\n <a (click)=\"sort(col)\" class=\"sort-widget\" [innerHTML]=\"sortWidget(col)\" href=\"javascript:void(0)\"></a>\n </div>\n </div>\n </th>\n <th *ngIf=\"activityEnabled()\" style=\"width: 110px;\" scope=\"col\">&ZeroWidthSpace;</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\"\n[attr.aria-describedby]=\"'No cases found. Try using different filters.' | rpxTranslate\">\n{{'No cases found. Try using different filters.' | rpxTranslate}}\n</div>\n", styles: ["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"] }]
37731
37840
  }], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }], { caseLinkUrlTemplate: [{
37732
37841
  type: Input
37733
37842
  }], jurisdiction: [{