@hmcts/ccd-case-ui-toolkit 7.1.27-sonarCloud-gitub-config-update → 7.1.28-auto-task-completing-fix
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/shared/components/case-editor/case-edit/case-edit.component.mjs +37 -15
- package/esm2022/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.mjs +3 -3
- package/esm2022/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.mjs +13 -1
- 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
- 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
- package/esm2022/lib/shared/components/case-editor/services/cases.service.mjs +4 -3
- package/esm2022/lib/shared/components/case-editor/services/event-completion-state-machine.service.mjs +5 -4
- package/esm2022/lib/shared/components/event-start/event-guard/event-start.guard.mjs +10 -13
- package/esm2022/lib/shared/components/event-start/services/event-start-state-machine.service.mjs +5 -3
- package/esm2022/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.mjs +8 -9
- package/esm2022/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.mjs +2 -2
- package/esm2022/lib/shared/components/palette/document/write-document-field.component.mjs +17 -5
- package/esm2022/lib/shared/components/palette/unsupported-field.component.mjs +4 -3
- package/esm2022/lib/shared/components/palette/utils/date.pipe.mjs +2 -2
- package/esm2022/lib/shared/components/search-result/search-result.component.mjs +39 -35
- package/esm2022/lib/shared/domain/work-allocation/Task.mjs +1 -1
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs +577 -532
- package/fesm2022/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +6 -2
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.d.ts +2 -0
- package/lib/shared/components/case-editor/case-edit-utils/case-edit.utils.d.ts.map +1 -1
- 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
- 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
- package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/event-completion-state-machine.service.d.ts.map +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +0 -2
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
- package/lib/shared/components/event-start/services/event-start-state-machine.service.d.ts.map +1 -1
- package/lib/shared/components/palette/document/write-document-field.component.d.ts +3 -1
- package/lib/shared/components/palette/document/write-document-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/unsupported-field.component.d.ts +1 -1
- package/lib/shared/components/palette/unsupported-field.component.d.ts.map +1 -1
- package/lib/shared/domain/work-allocation/Task.d.ts +1 -0
- package/lib/shared/domain/work-allocation/Task.d.ts.map +1 -1
- 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(
|
|
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);
|
|
@@ -8896,7 +8462,7 @@ class EventCompletionStateMachineService {
|
|
|
8896
8462
|
entryActionForStateCompleteEventAndTask(state, context) {
|
|
8897
8463
|
// Trigger final state to complete processing of state machine
|
|
8898
8464
|
state.trigger(EventCompletionStates.Final);
|
|
8899
|
-
const clientContextStr = context.sessionStorageService.getItem(
|
|
8465
|
+
const clientContextStr = context.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
8900
8466
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8901
8467
|
if (userTask?.task_data) {
|
|
8902
8468
|
context.sessionStorageService.setItem('assignNeeded', 'false');
|
|
@@ -8917,7 +8483,7 @@ class EventCompletionStateMachineService {
|
|
|
8917
8483
|
entryActionForStateTaskUnassigned(state, context) {
|
|
8918
8484
|
// Trigger final state to complete processing of state machine
|
|
8919
8485
|
state.trigger(EventCompletionStates.Final);
|
|
8920
|
-
const clientContextStr = context.sessionStorageService.getItem(
|
|
8486
|
+
const clientContextStr = context.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
8921
8487
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8922
8488
|
if (userTask?.task_data) {
|
|
8923
8489
|
context.sessionStorageService.setItem('assignNeeded', 'true');
|
|
@@ -8955,7 +8521,7 @@ class EventCompletionStateMachineService {
|
|
|
8955
8521
|
this.stateTaskUnassigned.addTransition(EventCompletionStates.Final, this.stateFinal);
|
|
8956
8522
|
}
|
|
8957
8523
|
taskPresentInSessionStorage(context) {
|
|
8958
|
-
const clientContextStr = context.sessionStorageService.getItem(
|
|
8524
|
+
const clientContextStr = context.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
8959
8525
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
8960
8526
|
return !!userTask.task_data;
|
|
8961
8527
|
}
|
|
@@ -9318,8 +8884,11 @@ class CaseEditComponent {
|
|
|
9318
8884
|
workAllocationService;
|
|
9319
8885
|
alertService;
|
|
9320
8886
|
abstractConfig;
|
|
8887
|
+
cookieService;
|
|
9321
8888
|
static ORIGIN_QUERY_PARAM = 'origin';
|
|
9322
8889
|
static ALERT_MESSAGE = 'Page is being refreshed so you will be redirected to the first page of this event.';
|
|
8890
|
+
static CLIENT_CONTEXT = 'clientContext';
|
|
8891
|
+
static TASK_EVENT_COMPLETION_INFO = 'taskEventCompletionInfo';
|
|
9323
8892
|
eventTrigger;
|
|
9324
8893
|
submit;
|
|
9325
8894
|
validate;
|
|
@@ -9343,7 +8912,7 @@ class CaseEditComponent {
|
|
|
9343
8912
|
error;
|
|
9344
8913
|
callbackErrorsSubject = new Subject();
|
|
9345
8914
|
validPageList = [];
|
|
9346
|
-
constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService, abstractConfig) {
|
|
8915
|
+
constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService, workAllocationService, alertService, abstractConfig, cookieService) {
|
|
9347
8916
|
this.fb = fb;
|
|
9348
8917
|
this.caseNotifier = caseNotifier;
|
|
9349
8918
|
this.router = router;
|
|
@@ -9361,6 +8930,7 @@ class CaseEditComponent {
|
|
|
9361
8930
|
this.workAllocationService = workAllocationService;
|
|
9362
8931
|
this.alertService = alertService;
|
|
9363
8932
|
this.abstractConfig = abstractConfig;
|
|
8933
|
+
this.cookieService = cookieService;
|
|
9364
8934
|
}
|
|
9365
8935
|
ngOnInit() {
|
|
9366
8936
|
this.wizard = this.wizardFactory.create(this.eventTrigger);
|
|
@@ -9378,6 +8948,7 @@ class CaseEditComponent {
|
|
|
9378
8948
|
this.route.queryParams.subscribe((params) => {
|
|
9379
8949
|
this.navigationOrigin = params[CaseEditComponent.ORIGIN_QUERY_PARAM];
|
|
9380
8950
|
});
|
|
8951
|
+
removeTaskFromClientContext(this.sessionStorageService);
|
|
9381
8952
|
}
|
|
9382
8953
|
ngOnDestroy() {
|
|
9383
8954
|
/* istanbul ignore else */
|
|
@@ -9467,12 +9038,12 @@ class CaseEditComponent {
|
|
|
9467
9038
|
this.isSubmitting = true;
|
|
9468
9039
|
// We have to run the event completion checks if task in session storage
|
|
9469
9040
|
// and if the task is in session storage, then is it associated to the case
|
|
9470
|
-
const clientContextStr = this.sessionStorageService.getItem(
|
|
9041
|
+
const clientContextStr = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
9471
9042
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
9472
9043
|
const taskInSessionStorage = userTask ? userTask.task_data : null;
|
|
9473
9044
|
let taskEventCompletionInfo;
|
|
9474
9045
|
let userInfo;
|
|
9475
|
-
const taskEventCompletionStr = this.sessionStorageService.getItem(
|
|
9046
|
+
const taskEventCompletionStr = this.sessionStorageService.getItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
|
|
9476
9047
|
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
9477
9048
|
const assignNeeded = this.sessionStorageService.getItem('assignNeeded');
|
|
9478
9049
|
if (taskEventCompletionStr) {
|
|
@@ -9502,7 +9073,7 @@ class CaseEditComponent {
|
|
|
9502
9073
|
taskId: taskInSessionStorage.id,
|
|
9503
9074
|
createdTimestamp: Date.now()
|
|
9504
9075
|
};
|
|
9505
|
-
this.sessionStorageService.setItem(
|
|
9076
|
+
this.sessionStorageService.setItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO, JSON.stringify(taskEventCompletionInfo));
|
|
9506
9077
|
this.isEventCompletionChecksRequired = true;
|
|
9507
9078
|
}
|
|
9508
9079
|
else {
|
|
@@ -9674,8 +9245,9 @@ class CaseEditComponent {
|
|
|
9674
9245
|
}), finalize(() => {
|
|
9675
9246
|
this.loadingService.unregister(loadingSpinnerToken);
|
|
9676
9247
|
// on event completion ensure the previous event clientContext/taskEventCompletionInfo removed
|
|
9677
|
-
|
|
9678
|
-
this.sessionStorageService.removeItem(
|
|
9248
|
+
// Note - Not removeTaskFromClientContext because could interfere with other logic
|
|
9249
|
+
this.sessionStorageService.removeItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
9250
|
+
this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
|
|
9679
9251
|
this.isSubmitting = false;
|
|
9680
9252
|
}))
|
|
9681
9253
|
.subscribe(() => {
|
|
@@ -9703,7 +9275,7 @@ class CaseEditComponent {
|
|
|
9703
9275
|
});
|
|
9704
9276
|
}
|
|
9705
9277
|
postCompleteTaskIfRequired() {
|
|
9706
|
-
const clientContextStr = this.sessionStorageService.getItem(
|
|
9278
|
+
const clientContextStr = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
9707
9279
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
9708
9280
|
const [task, taskToBeCompleted] = userTask ? [userTask.task_data, userTask.complete_task] : [null, false];
|
|
9709
9281
|
const assignNeeded = this.sessionStorageService.getItem('assignNeeded') === 'true';
|
|
@@ -9743,7 +9315,15 @@ class CaseEditComponent {
|
|
|
9743
9315
|
}
|
|
9744
9316
|
if (!taskEventCompletionInfo) {
|
|
9745
9317
|
// if no task event present then there is no task to complete from previous event present
|
|
9746
|
-
|
|
9318
|
+
// EXUI-2668 - Add additional logic to confirm the task is relevant to the event
|
|
9319
|
+
if (this.taskIsForEvent(taskInSessionStorage, eventDetails)) {
|
|
9320
|
+
return true;
|
|
9321
|
+
}
|
|
9322
|
+
else {
|
|
9323
|
+
// client context still needed for language
|
|
9324
|
+
removeTaskFromClientContext(this.sessionStorageService);
|
|
9325
|
+
return false;
|
|
9326
|
+
}
|
|
9747
9327
|
}
|
|
9748
9328
|
else {
|
|
9749
9329
|
if (taskEventCompletionInfo.taskId !== taskInSessionStorage.id) {
|
|
@@ -9753,8 +9333,8 @@ class CaseEditComponent {
|
|
|
9753
9333
|
this.eventDetailsDoNotMatch(taskEventCompletionInfo, eventDetails))
|
|
9754
9334
|
|| this.eventMoreThanDayAgo(taskEventCompletionInfo.createdTimestamp)) {
|
|
9755
9335
|
// if the session storage not related to event, ignore it and remove
|
|
9756
|
-
this.sessionStorageService
|
|
9757
|
-
this.sessionStorageService.removeItem(
|
|
9336
|
+
removeTaskFromClientContext(this.sessionStorageService);
|
|
9337
|
+
this.sessionStorageService.removeItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO);
|
|
9758
9338
|
return false;
|
|
9759
9339
|
}
|
|
9760
9340
|
if (eventDetails.assignNeeded === 'false' && eventDetails.userId !== taskInSessionStorage.assignee) {
|
|
@@ -9796,7 +9376,14 @@ class CaseEditComponent {
|
|
|
9796
9376
|
}
|
|
9797
9377
|
return false;
|
|
9798
9378
|
}
|
|
9799
|
-
|
|
9379
|
+
taskIsForEvent(task, eventDetails) {
|
|
9380
|
+
// EXUI-2668 - Ensure description for task includes event ID
|
|
9381
|
+
// Note - This is a failsafe for an edge case that may never occur again
|
|
9382
|
+
// Description may not include eventId in some cases which may mean task not completed (however this will be easy to check)
|
|
9383
|
+
this.abstractConfig.logMessage(`checking taskIsForEvent: task ID ${task.id}, task description ${task.description}, event name ${eventDetails.eventId}`);
|
|
9384
|
+
return task.case_id === eventDetails.caseId && (task.description && task.description.includes(eventDetails.eventId));
|
|
9385
|
+
}
|
|
9386
|
+
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
9387
|
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
9388
|
i0.ɵɵelement(0, "router-outlet");
|
|
9802
9389
|
} }, 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 +9391,7 @@ class CaseEditComponent {
|
|
|
9804
9391
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditComponent, [{
|
|
9805
9392
|
type: Component,
|
|
9806
9393
|
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: [{
|
|
9394
|
+
}], () => [{ 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
9395
|
type: Input
|
|
9809
9396
|
}], submit: [{
|
|
9810
9397
|
type: Input
|
|
@@ -9819,7 +9406,452 @@ class CaseEditComponent {
|
|
|
9819
9406
|
}], submitted: [{
|
|
9820
9407
|
type: Output
|
|
9821
9408
|
}] }); })();
|
|
9822
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber:
|
|
9409
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditComponent, { className: "CaseEditComponent", filePath: "lib/shared/components/case-editor/case-edit/case-edit.component.ts", lineNumber: 37 }); })();
|
|
9410
|
+
|
|
9411
|
+
function convertNonASCIICharacter(character) {
|
|
9412
|
+
if (character === '£') {
|
|
9413
|
+
// pound sign will be frequently used and works for btoa despite being non-ASCII
|
|
9414
|
+
// note: this could be done for other characters provided they work for btoa()
|
|
9415
|
+
return character;
|
|
9416
|
+
}
|
|
9417
|
+
// Note: Will convert to HTML entity
|
|
9418
|
+
return CaseEditUtils.PREFIX + character.charCodeAt(0) + CaseEditUtils.SUFFIX;
|
|
9419
|
+
}
|
|
9420
|
+
class CaseEditUtils {
|
|
9421
|
+
static PREFIX = '&#';
|
|
9422
|
+
static SUFFIX = ';';
|
|
9423
|
+
convertNonASCIICharacters(rawString) {
|
|
9424
|
+
return rawString ? rawString.replace(/[^\x20-\x7E]/g, function (c) {
|
|
9425
|
+
return convertNonASCIICharacter(c);
|
|
9426
|
+
}) : '';
|
|
9427
|
+
}
|
|
9428
|
+
convertHTMLEntities(editedString) {
|
|
9429
|
+
const revertedCharacterList = editedString.split(CaseEditUtils.PREFIX);
|
|
9430
|
+
let rawString = revertedCharacterList[0];
|
|
9431
|
+
for (let index = 1; index < revertedCharacterList.length; index++) {
|
|
9432
|
+
const currentSection = revertedCharacterList[index];
|
|
9433
|
+
if (!currentSection.includes(CaseEditUtils.SUFFIX)) {
|
|
9434
|
+
return rawString.concat(currentSection);
|
|
9435
|
+
}
|
|
9436
|
+
else {
|
|
9437
|
+
const suffixSplitList = currentSection.split(CaseEditUtils.SUFFIX);
|
|
9438
|
+
const characterCode = Number(suffixSplitList[0]);
|
|
9439
|
+
rawString = rawString.concat(String.fromCharCode(characterCode), suffixSplitList[1]);
|
|
9440
|
+
}
|
|
9441
|
+
}
|
|
9442
|
+
return rawString;
|
|
9443
|
+
}
|
|
9444
|
+
}
|
|
9445
|
+
function removeTaskFromClientContext(sessionStorageService) {
|
|
9446
|
+
if (!sessionStorageService) {
|
|
9447
|
+
return;
|
|
9448
|
+
}
|
|
9449
|
+
const clientContextString = sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
9450
|
+
const clientContext = clientContextString ? JSON.parse(clientContextString) : null;
|
|
9451
|
+
if (clientContext?.client_context?.user_task) {
|
|
9452
|
+
delete clientContext.client_context.user_task;
|
|
9453
|
+
sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(clientContext));
|
|
9454
|
+
}
|
|
9455
|
+
}
|
|
9456
|
+
|
|
9457
|
+
class CasesService {
|
|
9458
|
+
http;
|
|
9459
|
+
appConfig;
|
|
9460
|
+
orderService;
|
|
9461
|
+
errorService;
|
|
9462
|
+
wizardPageFieldToCaseFieldMapper;
|
|
9463
|
+
loadingService;
|
|
9464
|
+
sessionStorageService;
|
|
9465
|
+
retryUtil;
|
|
9466
|
+
// Internal (UI) API
|
|
9467
|
+
static V2_MEDIATYPE_CASE_VIEW = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json';
|
|
9468
|
+
static V2_MEDIATYPE_START_CASE_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-case-trigger.v2+json;charset=UTF-8';
|
|
9469
|
+
static V2_MEDIATYPE_START_EVENT_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8';
|
|
9470
|
+
static V2_MEDIATYPE_START_DRAFT_TRIGGER = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-draft-trigger.v2+json;charset=UTF-8';
|
|
9471
|
+
// External (Data Store) API
|
|
9472
|
+
static V2_MEDIATYPE_CASE_DOCUMENTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.case-documents.v2+json;charset=UTF-8';
|
|
9473
|
+
static V2_MEDIATYPE_CASE_DATA_VALIDATE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8';
|
|
9474
|
+
static V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
|
|
9475
|
+
static V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
|
|
9476
|
+
static PUI_CASE_MANAGER = 'pui-case-manager';
|
|
9477
|
+
get = this.getCaseView;
|
|
9478
|
+
static updateChallengedAccessRequestAttributes(httpClient, caseId, attributesToUpdate) {
|
|
9479
|
+
return httpClient.post(`/api/challenged-access-request/update-attributes`, {
|
|
9480
|
+
caseId,
|
|
9481
|
+
attributesToUpdate
|
|
9482
|
+
});
|
|
9483
|
+
}
|
|
9484
|
+
static updateSpecificAccessRequestAttributes(httpClient, caseId, attributesToUpdate) {
|
|
9485
|
+
return httpClient.post(`/api/specific-access-request/update-attributes`, {
|
|
9486
|
+
caseId,
|
|
9487
|
+
attributesToUpdate
|
|
9488
|
+
});
|
|
9489
|
+
}
|
|
9490
|
+
constructor(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService, retryUtil) {
|
|
9491
|
+
this.http = http;
|
|
9492
|
+
this.appConfig = appConfig;
|
|
9493
|
+
this.orderService = orderService;
|
|
9494
|
+
this.errorService = errorService;
|
|
9495
|
+
this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
|
|
9496
|
+
this.loadingService = loadingService;
|
|
9497
|
+
this.sessionStorageService = sessionStorageService;
|
|
9498
|
+
this.retryUtil = retryUtil;
|
|
9499
|
+
}
|
|
9500
|
+
getCaseView(jurisdictionId, caseTypeId, caseId) {
|
|
9501
|
+
const url = `${this.appConfig.getApiUrl()}/caseworkers/:uid/jurisdictions/${jurisdictionId}/case-types/${caseTypeId}/cases/${caseId}`;
|
|
9502
|
+
const loadingToken = this.loadingService.register();
|
|
9503
|
+
return this.http
|
|
9504
|
+
.get(url)
|
|
9505
|
+
.pipe(catchError(error => {
|
|
9506
|
+
this.errorService.setError(error);
|
|
9507
|
+
return throwError(error);
|
|
9508
|
+
}), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
9509
|
+
}
|
|
9510
|
+
getCaseViewV2(caseId) {
|
|
9511
|
+
const url = `${this.appConfig.getCaseDataUrl()}/internal/cases/${caseId}`;
|
|
9512
|
+
const headers = new HttpHeaders()
|
|
9513
|
+
.set('experimental', 'true')
|
|
9514
|
+
.set('Accept', CasesService.V2_MEDIATYPE_CASE_VIEW)
|
|
9515
|
+
.set('Content-Type', 'application/json');
|
|
9516
|
+
const loadingToken = this.loadingService.register();
|
|
9517
|
+
let http$ = this.http.get(url, { headers, observe: 'body' });
|
|
9518
|
+
const artificialDelay = this.appConfig.getTimeoutsCaseRetrievalArtificialDelay();
|
|
9519
|
+
const timeoutPeriods = this.appConfig.getTimeoutsForCaseRetrieval();
|
|
9520
|
+
console.log(`Timeout periods: ${timeoutPeriods} seconds.`);
|
|
9521
|
+
if (timeoutPeriods && timeoutPeriods.length > 0 && timeoutPeriods[0] > 0) {
|
|
9522
|
+
http$ = this.retryUtil.pipeTimeoutMechanismOn(http$, artificialDelay, timeoutPeriods);
|
|
9523
|
+
}
|
|
9524
|
+
else {
|
|
9525
|
+
console.warn('Skipping to pipe a retry mechanism!');
|
|
9526
|
+
}
|
|
9527
|
+
http$ = this.pipeErrorProcessor(http$);
|
|
9528
|
+
http$ = http$.pipe(finalize(() => this.finalizeGetCaseViewWith(caseId, loadingToken)));
|
|
9529
|
+
return http$;
|
|
9530
|
+
}
|
|
9531
|
+
pipeErrorProcessor(in$) {
|
|
9532
|
+
const out$ = in$.pipe(catchError(error => {
|
|
9533
|
+
console.error(`Error while getting case view with getCaseViewV2! Error type: '${typeof error}, Error name: '${error?.name}'`);
|
|
9534
|
+
console.error(error);
|
|
9535
|
+
this.errorService.setError(error);
|
|
9536
|
+
return throwError(error);
|
|
9537
|
+
}));
|
|
9538
|
+
return out$;
|
|
9539
|
+
}
|
|
9540
|
+
finalizeGetCaseViewWith(caseId, loadingToken) {
|
|
9541
|
+
this.loadingService.unregister(loadingToken);
|
|
9542
|
+
}
|
|
9543
|
+
syncWait(seconds) {
|
|
9544
|
+
const end = Date.now() + seconds * 1000;
|
|
9545
|
+
while (Date.now() < end)
|
|
9546
|
+
continue;
|
|
9547
|
+
}
|
|
9548
|
+
getEventTrigger(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
|
|
9549
|
+
ignoreWarning = undefined !== ignoreWarning ? ignoreWarning : 'false';
|
|
9550
|
+
const url = this.buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning);
|
|
9551
|
+
let headers = new HttpHeaders();
|
|
9552
|
+
headers = headers.set('experimental', 'true');
|
|
9553
|
+
headers = headers.set('Content-Type', 'application/json');
|
|
9554
|
+
headers = this.addClientContextHeader(headers);
|
|
9555
|
+
if (Draft.isDraft(caseId)) {
|
|
9556
|
+
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_DRAFT_TRIGGER);
|
|
9557
|
+
}
|
|
9558
|
+
else if (caseId !== undefined && caseId !== null) {
|
|
9559
|
+
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_EVENT_TRIGGER);
|
|
9560
|
+
}
|
|
9561
|
+
else {
|
|
9562
|
+
headers = headers.set('Accept', CasesService.V2_MEDIATYPE_START_CASE_TRIGGER);
|
|
9563
|
+
}
|
|
9564
|
+
return this.http
|
|
9565
|
+
.get(url, { headers, observe: 'response' })
|
|
9566
|
+
.pipe(map((response) => {
|
|
9567
|
+
this.updateClientContextStorage(response.headers);
|
|
9568
|
+
return FieldsUtils.handleNestedDynamicLists(response.body);
|
|
9569
|
+
}), catchError(error => {
|
|
9570
|
+
this.errorService.setError(error);
|
|
9571
|
+
return throwError(error);
|
|
9572
|
+
}), map((p) => plainToClass(CaseEventTrigger, p)), tap(eventTrigger => this.initialiseEventTrigger(eventTrigger)));
|
|
9573
|
+
}
|
|
9574
|
+
createEvent(caseDetails, eventData) {
|
|
9575
|
+
const caseId = caseDetails.case_id;
|
|
9576
|
+
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/events`;
|
|
9577
|
+
let headers = new HttpHeaders()
|
|
9578
|
+
.set('experimental', 'true')
|
|
9579
|
+
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
9580
|
+
.set('Content-Type', 'application/json');
|
|
9581
|
+
headers = this.addClientContextHeader(headers);
|
|
9582
|
+
return this.http
|
|
9583
|
+
.post(url, eventData, { headers, observe: 'response' })
|
|
9584
|
+
.pipe(map((response) => {
|
|
9585
|
+
this.updateClientContextStorage(response.headers);
|
|
9586
|
+
return response.body;
|
|
9587
|
+
}), catchError(error => {
|
|
9588
|
+
this.errorService.setError(error);
|
|
9589
|
+
return throwError(error);
|
|
9590
|
+
}));
|
|
9591
|
+
}
|
|
9592
|
+
validateCase(ctid, eventData, pageId) {
|
|
9593
|
+
const pageIdString = pageId ? `?pageId=${pageId}` : '';
|
|
9594
|
+
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/validate${pageIdString}`;
|
|
9595
|
+
let headers = new HttpHeaders()
|
|
9596
|
+
.set('experimental', 'true')
|
|
9597
|
+
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
9598
|
+
.set('Content-Type', 'application/json');
|
|
9599
|
+
headers = this.addClientContextHeader(headers);
|
|
9600
|
+
return this.http
|
|
9601
|
+
.post(url, eventData, { headers, observe: 'response' })
|
|
9602
|
+
.pipe(map((response) => {
|
|
9603
|
+
this.updateClientContextStorage(response.headers);
|
|
9604
|
+
return response.body;
|
|
9605
|
+
}), catchError(error => {
|
|
9606
|
+
this.errorService.setError(error);
|
|
9607
|
+
return throwError(error);
|
|
9608
|
+
}));
|
|
9609
|
+
}
|
|
9610
|
+
createCase(ctid, eventData) {
|
|
9611
|
+
let ignoreWarning = 'false';
|
|
9612
|
+
if (eventData.ignore_warning) {
|
|
9613
|
+
ignoreWarning = 'true';
|
|
9614
|
+
}
|
|
9615
|
+
const url = `${this.appConfig.getCaseDataUrl()}/case-types/${ctid}/cases?ignore-warning=${ignoreWarning}`;
|
|
9616
|
+
let headers = new HttpHeaders()
|
|
9617
|
+
.set('experimental', 'true')
|
|
9618
|
+
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
9619
|
+
.set('Content-Type', 'application/json');
|
|
9620
|
+
headers = this.addClientContextHeader(headers);
|
|
9621
|
+
return this.http
|
|
9622
|
+
.post(url, eventData, { headers, observe: 'response' })
|
|
9623
|
+
.pipe(map((response) => {
|
|
9624
|
+
this.updateClientContextStorage(response.headers);
|
|
9625
|
+
return response.body;
|
|
9626
|
+
}), catchError(error => {
|
|
9627
|
+
this.errorService.setError(error);
|
|
9628
|
+
return throwError(error);
|
|
9629
|
+
}));
|
|
9630
|
+
}
|
|
9631
|
+
getPrintDocuments(caseId) {
|
|
9632
|
+
const url = `${this.appConfig.getCaseDataUrl()}/cases/${caseId}/documents`;
|
|
9633
|
+
let headers = new HttpHeaders()
|
|
9634
|
+
.set('experimental', 'true')
|
|
9635
|
+
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
9636
|
+
.set('Content-Type', 'application/json');
|
|
9637
|
+
headers = this.addClientContextHeader(headers);
|
|
9638
|
+
return this.http
|
|
9639
|
+
.get(url, { headers, observe: 'response' })
|
|
9640
|
+
.pipe(map((response) => {
|
|
9641
|
+
this.updateClientContextStorage(response.headers);
|
|
9642
|
+
return response.body.documentResources;
|
|
9643
|
+
}), catchError(error => {
|
|
9644
|
+
this.errorService.setError(error);
|
|
9645
|
+
return throwError(error);
|
|
9646
|
+
}));
|
|
9647
|
+
}
|
|
9648
|
+
buildEventTriggerUrl(caseTypeId, eventTriggerId, caseId, ignoreWarning) {
|
|
9649
|
+
let url = `${this.appConfig.getCaseDataUrl()}/internal`;
|
|
9650
|
+
if (Draft.isDraft(caseId)) {
|
|
9651
|
+
url += `/drafts/${caseId}`
|
|
9652
|
+
+ `/event-trigger`
|
|
9653
|
+
+ `?ignore-warning=${ignoreWarning}`;
|
|
9654
|
+
}
|
|
9655
|
+
else if (caseTypeId === undefined || caseTypeId === null) {
|
|
9656
|
+
url += `/cases/${caseId}`
|
|
9657
|
+
+ `/event-triggers/${eventTriggerId}`
|
|
9658
|
+
+ `?ignore-warning=${ignoreWarning}`;
|
|
9659
|
+
}
|
|
9660
|
+
else {
|
|
9661
|
+
url += `/case-types/${caseTypeId}`
|
|
9662
|
+
+ `/event-triggers/${eventTriggerId}`
|
|
9663
|
+
+ `?ignore-warning=${ignoreWarning}`;
|
|
9664
|
+
}
|
|
9665
|
+
return url;
|
|
9666
|
+
}
|
|
9667
|
+
initialiseEventTrigger(eventTrigger) {
|
|
9668
|
+
if (!eventTrigger.wizard_pages) {
|
|
9669
|
+
eventTrigger.wizard_pages = [];
|
|
9670
|
+
}
|
|
9671
|
+
eventTrigger.wizard_pages.forEach((wizardPage) => {
|
|
9672
|
+
wizardPage.parsedShowCondition = ShowCondition.getInstance(wizardPage.show_condition);
|
|
9673
|
+
wizardPage.case_fields = this.orderService.sort(this.wizardPageFieldToCaseFieldMapper.mapAll(wizardPage.wizard_page_fields, eventTrigger.case_fields));
|
|
9674
|
+
});
|
|
9675
|
+
}
|
|
9676
|
+
getCourtOrHearingCentreName(locationId) {
|
|
9677
|
+
return this.http.post(`/api/locations/getLocationsById`, { locations: [{ locationId }] });
|
|
9678
|
+
}
|
|
9679
|
+
createChallengedAccessRequest(caseId, request) {
|
|
9680
|
+
// Assignment API endpoint
|
|
9681
|
+
const userInfoStr = this.sessionStorageService.getItem('userDetails');
|
|
9682
|
+
const camUtils = new CaseAccessUtils();
|
|
9683
|
+
let userInfo;
|
|
9684
|
+
if (userInfoStr) {
|
|
9685
|
+
userInfo = JSON.parse(userInfoStr);
|
|
9686
|
+
}
|
|
9687
|
+
const roleCategory = userInfo.roleCategory || camUtils.getMappedRoleCategory(userInfo.roles, userInfo.roleCategories);
|
|
9688
|
+
const roleName = camUtils.getAMRoleName('challenged', roleCategory);
|
|
9689
|
+
const beginTime = new Date();
|
|
9690
|
+
const endTime = new Date(new Date().setUTCHours(23, 59, 59, 999));
|
|
9691
|
+
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
9692
|
+
const isNew = true;
|
|
9693
|
+
const payload = camUtils.getAMPayload(id, id, roleName, roleCategory, 'CHALLENGED', caseId, request, beginTime, endTime, isNew);
|
|
9694
|
+
return this.http.post(`/api/challenged-access-request`, payload);
|
|
9695
|
+
}
|
|
9696
|
+
createSpecificAccessRequest(caseId, sar) {
|
|
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('specific', roleCategory);
|
|
9706
|
+
const id = userInfo.id ? userInfo.id : userInfo.uid;
|
|
9707
|
+
const payload = camUtils.getAMPayload(null, id, roleName, roleCategory, 'SPECIFIC', caseId, sar, null, null, true);
|
|
9708
|
+
payload.roleRequest = {
|
|
9709
|
+
...payload.roleRequest,
|
|
9710
|
+
process: 'specific-access',
|
|
9711
|
+
replaceExisting: true,
|
|
9712
|
+
assignerId: payload.requestedRoles[0].actorId,
|
|
9713
|
+
reference: `${caseId}/${roleName}/${payload.requestedRoles[0].actorId}`
|
|
9714
|
+
};
|
|
9715
|
+
payload.requestedRoles[0] = {
|
|
9716
|
+
...payload.requestedRoles[0],
|
|
9717
|
+
roleName: 'specific-access-requested',
|
|
9718
|
+
roleCategory,
|
|
9719
|
+
classification: 'PRIVATE',
|
|
9720
|
+
endTime: new Date(new Date().setDate(new Date().getDate() + 30)),
|
|
9721
|
+
beginTime: null,
|
|
9722
|
+
grantType: 'BASIC',
|
|
9723
|
+
readOnly: true
|
|
9724
|
+
};
|
|
9725
|
+
payload.requestedRoles[0].attributes = {
|
|
9726
|
+
...payload.requestedRoles[0].attributes,
|
|
9727
|
+
requestedRole: roleName,
|
|
9728
|
+
specificAccessReason: sar.specificReason
|
|
9729
|
+
};
|
|
9730
|
+
payload.requestedRoles[0].notes[0] = {
|
|
9731
|
+
...payload.requestedRoles[0].notes[0],
|
|
9732
|
+
userId: payload.requestedRoles[0].actorId
|
|
9733
|
+
};
|
|
9734
|
+
return this.http.post(`/api/specific-access-request`, payload);
|
|
9735
|
+
}
|
|
9736
|
+
getLinkedCases(caseId) {
|
|
9737
|
+
const url = `${this.appConfig.getCaseDataStoreApiUrl()}/${caseId}`;
|
|
9738
|
+
return this.http
|
|
9739
|
+
.get(url)
|
|
9740
|
+
.pipe(catchError(error => throwError(error)));
|
|
9741
|
+
}
|
|
9742
|
+
addClientContextHeader(headers) {
|
|
9743
|
+
const clientContextDetails = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
9744
|
+
if (clientContextDetails) {
|
|
9745
|
+
const caseEditUtils = new CaseEditUtils();
|
|
9746
|
+
// below changes non-ASCII characters
|
|
9747
|
+
const editedClientContext = caseEditUtils.convertNonASCIICharacters(clientContextDetails);
|
|
9748
|
+
const clientContext = window.btoa(editedClientContext);
|
|
9749
|
+
if (clientContext) {
|
|
9750
|
+
headers = headers.set('Client-Context', clientContext);
|
|
9751
|
+
}
|
|
9752
|
+
}
|
|
9753
|
+
return headers;
|
|
9754
|
+
}
|
|
9755
|
+
updateClientContextStorage(headers) {
|
|
9756
|
+
if (headers && headers.get('Client-Context')) {
|
|
9757
|
+
const caseEditUtils = new CaseEditUtils();
|
|
9758
|
+
const clientContextString = window.atob(headers.get('Client-Context'));
|
|
9759
|
+
// below reverts non-ASCII characters
|
|
9760
|
+
const editedClientContextString = caseEditUtils.convertHTMLEntities(clientContextString);
|
|
9761
|
+
this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, editedClientContextString);
|
|
9762
|
+
}
|
|
9763
|
+
}
|
|
9764
|
+
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)); };
|
|
9765
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
|
|
9766
|
+
}
|
|
9767
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CasesService, [{
|
|
9768
|
+
type: Injectable
|
|
9769
|
+
}], () => [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }, { type: RetryUtil }], null); })();
|
|
9770
|
+
|
|
9771
|
+
function CaseCreateComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
9772
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
9773
|
+
i0.ɵɵelementStart(0, "div")(1, "ccd-case-edit", 1);
|
|
9774
|
+
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)); });
|
|
9775
|
+
i0.ɵɵelementEnd()();
|
|
9776
|
+
} if (rf & 2) {
|
|
9777
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
9778
|
+
i0.ɵɵadvance();
|
|
9779
|
+
i0.ɵɵproperty("submit", ctx_r1.submit())("validate", ctx_r1.validate())("saveDraft", ctx_r1.saveDraft())("eventTrigger", ctx_r1.eventTrigger);
|
|
9780
|
+
} }
|
|
9781
|
+
class CaseCreateComponent {
|
|
9782
|
+
casesService;
|
|
9783
|
+
alertService;
|
|
9784
|
+
draftService;
|
|
9785
|
+
eventTriggerService;
|
|
9786
|
+
jurisdiction;
|
|
9787
|
+
caseType;
|
|
9788
|
+
event;
|
|
9789
|
+
cancelled = new EventEmitter();
|
|
9790
|
+
submitted = new EventEmitter();
|
|
9791
|
+
eventTrigger;
|
|
9792
|
+
constructor(casesService, alertService, draftService, eventTriggerService) {
|
|
9793
|
+
this.casesService = casesService;
|
|
9794
|
+
this.alertService = alertService;
|
|
9795
|
+
this.draftService = draftService;
|
|
9796
|
+
this.eventTriggerService = eventTriggerService;
|
|
9797
|
+
}
|
|
9798
|
+
ngOnInit() {
|
|
9799
|
+
this.casesService.getEventTrigger(this.caseType, this.event).toPromise()
|
|
9800
|
+
.then(eventTrigger => {
|
|
9801
|
+
this.eventTrigger = eventTrigger;
|
|
9802
|
+
this.eventTriggerService.announceEventTrigger(eventTrigger);
|
|
9803
|
+
})
|
|
9804
|
+
.catch((error) => {
|
|
9805
|
+
this.alertService.error({ phrase: error.message });
|
|
9806
|
+
return throwError(error);
|
|
9807
|
+
});
|
|
9808
|
+
}
|
|
9809
|
+
submit() {
|
|
9810
|
+
return (sanitizedEditForm) => {
|
|
9811
|
+
sanitizedEditForm.draft_id = this.eventTrigger.case_id;
|
|
9812
|
+
return this.casesService.createCase(this.caseType, sanitizedEditForm);
|
|
9813
|
+
};
|
|
9814
|
+
}
|
|
9815
|
+
validate() {
|
|
9816
|
+
return (sanitizedEditForm, pageId) => this.casesService
|
|
9817
|
+
.validateCase(this.caseType, sanitizedEditForm, pageId);
|
|
9818
|
+
}
|
|
9819
|
+
saveDraft() {
|
|
9820
|
+
if (this.eventTrigger.can_save_draft) {
|
|
9821
|
+
return (caseEventData) => this.draftService.createOrUpdateDraft(this.caseType, this.eventTrigger.case_id, caseEventData);
|
|
9822
|
+
}
|
|
9823
|
+
}
|
|
9824
|
+
emitCancelled(event) {
|
|
9825
|
+
this.cancelled.emit(event);
|
|
9826
|
+
}
|
|
9827
|
+
emitSubmitted(event) {
|
|
9828
|
+
this.submitted.emit(event);
|
|
9829
|
+
}
|
|
9830
|
+
isDataLoaded() {
|
|
9831
|
+
return this.eventTrigger ? true : false;
|
|
9832
|
+
}
|
|
9833
|
+
static ɵfac = function CaseCreateComponent_Factory(t) { return new (t || CaseCreateComponent)(i0.ɵɵdirectiveInject(CasesService), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(DraftService), i0.ɵɵdirectiveInject(EventTriggerService)); };
|
|
9834
|
+
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) {
|
|
9835
|
+
i0.ɵɵtemplate(0, CaseCreateComponent_div_0_Template, 2, 4, "div", 0);
|
|
9836
|
+
} if (rf & 2) {
|
|
9837
|
+
i0.ɵɵproperty("ngIf", ctx.isDataLoaded());
|
|
9838
|
+
} }, encapsulation: 2 });
|
|
9839
|
+
}
|
|
9840
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseCreateComponent, [{
|
|
9841
|
+
type: Component,
|
|
9842
|
+
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>" }]
|
|
9843
|
+
}], () => [{ type: CasesService }, { type: AlertService }, { type: DraftService }, { type: EventTriggerService }], { jurisdiction: [{
|
|
9844
|
+
type: Input
|
|
9845
|
+
}], caseType: [{
|
|
9846
|
+
type: Input
|
|
9847
|
+
}], event: [{
|
|
9848
|
+
type: Input
|
|
9849
|
+
}], cancelled: [{
|
|
9850
|
+
type: Output
|
|
9851
|
+
}], submitted: [{
|
|
9852
|
+
type: Output
|
|
9853
|
+
}] }); })();
|
|
9854
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseCreateComponent, { className: "CaseCreateComponent", filePath: "lib/shared/components/case-editor/case-create/case-create.component.ts", lineNumber: 17 }); })();
|
|
9823
9855
|
|
|
9824
9856
|
function CaseEditConfirmComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
9825
9857
|
i0.ɵɵelement(0, "div");
|
|
@@ -11244,7 +11276,7 @@ class CaseEventCompletionTaskCancelledComponent {
|
|
|
11244
11276
|
}
|
|
11245
11277
|
onContinue() {
|
|
11246
11278
|
// Removes task to complete so event completes without task
|
|
11247
|
-
this.context.sessionStorageService.removeItem(
|
|
11279
|
+
this.context.sessionStorageService.removeItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
11248
11280
|
// may be able to remove this call below since it is now unneccesary
|
|
11249
11281
|
this.notifyEventCompletionCancelled.emit(true);
|
|
11250
11282
|
}
|
|
@@ -11430,7 +11462,7 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
11430
11462
|
}
|
|
11431
11463
|
onContinue() {
|
|
11432
11464
|
// Get task details
|
|
11433
|
-
const clientContextStr = this.sessionStorageService.getItem(
|
|
11465
|
+
const clientContextStr = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
11434
11466
|
const userTask = FieldsUtils.getUserTaskFromClientContext(clientContextStr);
|
|
11435
11467
|
const task = userTask ? userTask.task_data : null;
|
|
11436
11468
|
// not complete_task not utilised here as related to event completion
|
|
@@ -11460,7 +11492,7 @@ class CaseEventCompletionTaskReassignedComponent {
|
|
|
11460
11492
|
}], notifyEventCompletionReassigned: [{
|
|
11461
11493
|
type: Output
|
|
11462
11494
|
}] }); })();
|
|
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:
|
|
11495
|
+
(() => { (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
11496
|
|
|
11465
11497
|
class AddressOption {
|
|
11466
11498
|
description;
|
|
@@ -14247,6 +14279,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14247
14279
|
static UPLOAD_TIMESTAMP = 'upload_timestamp';
|
|
14248
14280
|
static UPLOAD_ERROR_FILE_REQUIRED = 'File required';
|
|
14249
14281
|
static UPLOAD_ERROR_NOT_AVAILABLE = 'Document upload facility is not available at the moment';
|
|
14282
|
+
static UPLOAD_ERROR_INVALID_FORMAT = 'Document format is not supported';
|
|
14250
14283
|
static UPLOAD_WAITING_FILE_STATUS = 'Uploading...';
|
|
14251
14284
|
static ERROR_UPLOADING_FILE = 'Error Uploading File';
|
|
14252
14285
|
fileInput;
|
|
@@ -14324,8 +14357,15 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14324
14357
|
}
|
|
14325
14358
|
}
|
|
14326
14359
|
}
|
|
14327
|
-
fileChangeEvent(fileInput) {
|
|
14328
|
-
|
|
14360
|
+
fileChangeEvent(fileInput, allowedRegex) {
|
|
14361
|
+
let fileTypeRegex;
|
|
14362
|
+
if (allowedRegex) {
|
|
14363
|
+
fileTypeRegex = new RegExp(`(${allowedRegex.replace(/,/g, '|')})`);
|
|
14364
|
+
}
|
|
14365
|
+
if (fileInput.target?.files[0] && !fileInput.target?.files[0]?.name?.match(fileTypeRegex)) {
|
|
14366
|
+
this.invalidFileFormat();
|
|
14367
|
+
}
|
|
14368
|
+
else if (fileInput.target.files[0]) {
|
|
14329
14369
|
this.selectedFile = fileInput.target.files[0];
|
|
14330
14370
|
this.displayFileUploadMessages(WriteDocumentFieldComponent.UPLOAD_WAITING_FILE_STATUS);
|
|
14331
14371
|
const documentUpload = this.buildDocumentUploadData(this.selectedFile);
|
|
@@ -14358,6 +14398,10 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14358
14398
|
}
|
|
14359
14399
|
return false;
|
|
14360
14400
|
}
|
|
14401
|
+
invalidFileFormat() {
|
|
14402
|
+
this.updateDocumentForm(null, null, null);
|
|
14403
|
+
this.displayFileUploadMessages(WriteDocumentFieldComponent.UPLOAD_ERROR_INVALID_FORMAT);
|
|
14404
|
+
}
|
|
14361
14405
|
getUploadedFileName() {
|
|
14362
14406
|
if (this.uploadedDocument) {
|
|
14363
14407
|
return this.uploadedDocument.get(WriteDocumentFieldComponent.DOCUMENT_FILENAME).value;
|
|
@@ -14575,7 +14619,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14575
14619
|
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
14620
|
i0.ɵɵelementEnd();
|
|
14577
14621
|
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)); });
|
|
14622
|
+
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
14623
|
i0.ɵɵelementEnd()()();
|
|
14580
14624
|
i0.ɵɵelementStart(14, "div", 10)(15, "button", 11);
|
|
14581
14625
|
i0.ɵɵlistener("click", function WriteDocumentFieldComponent_Template_button_click_15_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.cancelUpload()); });
|
|
@@ -14609,7 +14653,7 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
14609
14653
|
}
|
|
14610
14654
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDocumentFieldComponent, [{
|
|
14611
14655
|
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" }]
|
|
14656
|
+
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
14657
|
}], () => [{ type: AbstractAppConfig }, { type: CaseNotifier }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: FileUploadStateService }, { type: JurisdictionService }], { fileInput: [{
|
|
14614
14658
|
type: ViewChild,
|
|
14615
14659
|
args: ['fileInput', { static: false }]
|
|
@@ -22041,7 +22085,7 @@ class WriteTextFieldComponent extends AbstractFieldWriteComponent {
|
|
|
22041
22085
|
|
|
22042
22086
|
class UnsupportedFieldComponent {
|
|
22043
22087
|
static ɵfac = function UnsupportedFieldComponent_Factory(t) { return new (t || UnsupportedFieldComponent)(); };
|
|
22044
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UnsupportedFieldComponent, selectors: [["
|
|
22088
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UnsupportedFieldComponent, selectors: [["ccd-unsupported-field"]], decls: 2, vars: 0, template: function UnsupportedFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
22045
22089
|
i0.ɵɵelementStart(0, "em");
|
|
22046
22090
|
i0.ɵɵtext(1, "Field type not supported");
|
|
22047
22091
|
i0.ɵɵelementEnd();
|
|
@@ -22050,10 +22094,11 @@ class UnsupportedFieldComponent {
|
|
|
22050
22094
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UnsupportedFieldComponent, [{
|
|
22051
22095
|
type: Component,
|
|
22052
22096
|
args: [{
|
|
22097
|
+
selector: 'ccd-unsupported-field',
|
|
22053
22098
|
template: `<em>Field type not supported</em>`
|
|
22054
22099
|
}]
|
|
22055
22100
|
}], null, null); })();
|
|
22056
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UnsupportedFieldComponent, { className: "UnsupportedFieldComponent", filePath: "lib/shared/components/palette/unsupported-field.component.ts", lineNumber:
|
|
22101
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UnsupportedFieldComponent, { className: "UnsupportedFieldComponent", filePath: "lib/shared/components/palette/unsupported-field.component.ts", lineNumber: 7 }); })();
|
|
22057
22102
|
|
|
22058
22103
|
function WaysToPayFieldComponent_ccpay_payment_lib_0_Template(rf, ctx) { if (rf & 1) {
|
|
22059
22104
|
i0.ɵɵelement(0, "ccpay-payment-lib", 1);
|
|
@@ -23091,10 +23136,9 @@ function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template(rf, c
|
|
|
23091
23136
|
i0.ɵɵelementStart(7, "span", 17);
|
|
23092
23137
|
i0.ɵɵtext(8);
|
|
23093
23138
|
i0.ɵɵpipe(9, "ccdDate");
|
|
23094
|
-
i0.ɵɵpipe(10, "date");
|
|
23095
23139
|
i0.ɵɵelementEnd()();
|
|
23096
|
-
i0.ɵɵelementStart(
|
|
23097
|
-
i0.ɵɵlistener("changeFolderAction", function
|
|
23140
|
+
i0.ɵɵelementStart(10, "div", 18)(11, "ccd-case-file-view-folder-document-actions", 19);
|
|
23141
|
+
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)); });
|
|
23098
23142
|
i0.ɵɵelementEnd()()()();
|
|
23099
23143
|
} if (rf & 2) {
|
|
23100
23144
|
const node_r2 = ctx.$implicit;
|
|
@@ -23104,8 +23148,8 @@ function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template(rf, c
|
|
|
23104
23148
|
i0.ɵɵadvance(4);
|
|
23105
23149
|
i0.ɵɵtextInterpolate1(" ", node_r2.name, " ");
|
|
23106
23150
|
i0.ɵɵadvance(3);
|
|
23107
|
-
i0.ɵɵtextInterpolate(i0.ɵɵ
|
|
23108
|
-
i0.ɵɵadvance(
|
|
23151
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind3(9, 5, node_r2.upload_timestamp, "local", "dd MMM YYYY HH:mm"));
|
|
23152
|
+
i0.ɵɵadvance(3);
|
|
23109
23153
|
i0.ɵɵproperty("allowMoving", ctx_r2.allowMoving);
|
|
23110
23154
|
} }
|
|
23111
23155
|
function CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_5_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -23138,7 +23182,7 @@ function CaseFileViewFolderComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
23138
23182
|
i0.ɵɵelementStart(0, "div", 7);
|
|
23139
23183
|
i0.ɵɵtemplate(1, CaseFileViewFolderComponent_div_8_div_1_Template, 2, 0, "div", 8);
|
|
23140
23184
|
i0.ɵɵelementStart(2, "div")(3, "cdk-tree", 9);
|
|
23141
|
-
i0.ɵɵtemplate(4, CaseFileViewFolderComponent_div_8_cdk_nested_tree_node_4_Template,
|
|
23185
|
+
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);
|
|
23142
23186
|
i0.ɵɵelementEnd()()();
|
|
23143
23187
|
} if (rf & 2) {
|
|
23144
23188
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
@@ -23394,11 +23438,11 @@ class CaseFileViewFolderComponent {
|
|
|
23394
23438
|
i0.ɵɵtextInterpolate1("Documents (", ctx.documentCount, ")");
|
|
23395
23439
|
i0.ɵɵadvance(3);
|
|
23396
23440
|
i0.ɵɵproperty("ngIf", ctx.documentTreeData);
|
|
23397
|
-
} }, 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,
|
|
23441
|
+
} }, 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}"] });
|
|
23398
23442
|
}
|
|
23399
23443
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
|
|
23400
23444
|
type: Component,
|
|
23401
|
-
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'
|
|
23445
|
+
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"] }]
|
|
23402
23446
|
}], () => [{ type: WindowService }, { type: i1$1.Router }, { type: DocumentManagementService }, { type: i1$3.MatLegacyDialog }, { type: AbstractAppConfig }], { categoriesAndDocuments: [{
|
|
23403
23447
|
type: Input
|
|
23404
23448
|
}], allowMoving: [{
|
|
@@ -29768,7 +29812,7 @@ class CaseEditSubmitComponent {
|
|
|
29768
29812
|
return 'Cancel';
|
|
29769
29813
|
}
|
|
29770
29814
|
static ɵfac = function CaseEditSubmitComponent_Factory(t) { return new (t || CaseEditSubmitComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ProfileNotifier), i0.ɵɵdirectiveInject(FormValidatorsService)); };
|
|
29771
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 23, vars: 21, consts: [["titleBlock", ""], ["idBlock", ""], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], [3, "error"], [3, "callbackErrorsContext", "callbackErrorsSubject"], [1, "check-your-answers", 3, "submit", "formGroup"], [4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group", 3, "ngClass"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["class", "error-message", 4, "ngIf"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], [1, "error-message"], [3, "eventCanBeCompleted", "eventCompletionParams"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"]], template: function CaseEditSubmitComponent_Template(rf, ctx) { if (rf & 1) {
|
|
29815
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseEditSubmitComponent, selectors: [["ccd-case-edit-submit"]], decls: 23, vars: 21, consts: [["titleBlock", ""], ["idBlock", ""], [1, "govuk-heading-l"], [4, "ngIf", "ngIfThen", "ngIfElse"], [3, "error"], [3, "callbackErrorsContext", "callbackErrorsSubject"], [1, "check-your-answers", 3, "submit", "formGroup"], [4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], [1, "form-group", "form-group-related"], ["class", "button button-secondary", "type", "button", 3, "disabled", "click", 4, "ngIf"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["class", "text-16", 4, "ngIf"], ["aria-describedby", "check your answers table", 1, "form-table"], [4, "ngFor", "ngForOf"], [1, "text-16"], ["ccdLabelSubstitutor", "", 3, "caseField", "hidden", "formGroup", "contextFields"], ["class", "valign-top case-field-label", 4, "ngIf"], [1, "form-cell", "case-field-content", "text-16"], [3, "formGroup", "topLevelFormGroup", "caseField", "context", "caseFields"], [1, "valign-top", "case-field-label"], [1, "valign-top", "check-your-answers__change", "case-field-change"], ["href", "javascript:void(0)", 3, "click", 4, "ngIf"], ["aria-describedby", "summary fields table", 1, "summary-fields"], [3, "ngSwitch"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["class", "compound-field", "ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields", 4, "ngSwitchCase"], ["ccdLabelSubstitutor", "", 3, "caseField", "formGroup", "contextFields"], ["id", "summary-field-label"], [1, "form-cell"], [3, "formGroup", "caseField"], ["ccdLabelSubstitutor", "", 1, "compound-field", 3, "caseField", "formGroup", "contextFields"], ["colspan", "2"], [3, "formGroup", "caseField", "caseFields"], ["id", "fieldset-event", "formGroupName", "event"], [2, "display", "none"], [1, "form-group", 3, "ngClass"], ["for", "field-trigger-summary", 1, "form-label"], [1, "form-hint"], ["class", "error-message", 4, "ngIf"], ["type", "text", "id", "field-trigger-summary", "formControlName", "summary", "maxlength", "1024", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], ["for", "field-trigger-description", 1, "form-label"], ["id", "field-trigger-description", "formControlName", "description", "maxlength", "65536", 1, "form-control", "bottom-30", "width-50", 3, "ngClass"], [1, "error-message"], [3, "eventCanBeCompleted", "eventCompletionParams"], ["type", "button", 1, "button", "button-secondary", 3, "click", "disabled"]], template: function CaseEditSubmitComponent_Template(rf, ctx) { if (rf & 1) {
|
|
29772
29816
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
29773
29817
|
i0.ɵɵelementStart(0, "div")(1, "h1", 2);
|
|
29774
29818
|
i0.ɵɵtext(2);
|
|
@@ -29824,7 +29868,7 @@ class CaseEditSubmitComponent {
|
|
|
29824
29868
|
}
|
|
29825
29869
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseEditSubmitComponent, [{
|
|
29826
29870
|
type: Component,
|
|
29827
|
-
args: [{ selector: 'ccd-case-edit-submit', template: "<div>\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n\n <!--Case ID or Title -->\n <div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n <ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: contextFields : editForm.controls['data']\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id)\"\n href=\"javascript:void(0)\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!summary && !summary.valid && (summary.dirty || summary.touched)}\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <span class=\"error-message\" *ngIf=\"summary?.errors && (summary.dirty || summary.touched)\">\n {{summary.errors | ccdFirstError: eventSummaryLabel | rpxTranslate}}\n </span>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\"\n [ngClass]=\"{'govuk-input--error': summary?.errors && (summary.dirty || summary.touched)}\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!description && !description.valid && (description.dirty || description.touched)}\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <span class=\"error-message\" *ngIf=\"description?.errors && (description.dirty || description.touched)\">\n {{description.errors | ccdFirstError: eventDescriptionLabel | rpxTranslate}}\n </span>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n [ngClass]=\"{'govuk-input--error': description?.errors && (description.dirty || description.touched)}\" maxlength=\"65536\"></textarea>\n </div>\n </fieldset>\n </ng-container>\n </div>\n <ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n </ccd-case-event-completion>\n <div class=\"form-group form-group-related\">\n <button *ngIf=\"!caseEdit.isCaseFlagSubmission\" class=\"button button-secondary\" type=\"button\" [disabled]=\"!hasPrevious() || caseEdit.isSubmitting\" (click)=\"previous()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button type=\"submit\" [disabled]=\"isDisabled\" class=\"button\">\n {{triggerText | rpxTranslate}}\n </button>\n </div>\n <p class=\"cancel\">\n <a (click)=\"cancel()\" href=\"javascript:void(0)\" [class.disabled]=\"caseEdit.isSubmitting\">{{getCancelText() | rpxTranslate}}</a>\n </p>\n </form>\n</div>\n\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"] }]
|
|
29871
|
+
args: [{ selector: 'ccd-case-edit-submit', template: "<div>\n <!-- Event trigger name -->\n <h1 class=\"govuk-heading-l\">{{eventTrigger.name | rpxTranslate}}</h1>\n\n <!--Case ID or Title -->\n <div *ngIf=\"getCaseTitle(); then titleBlock; else idBlock\"></div>\n <ng-template #titleBlock>\n <ccd-markdown [content]=\"getCaseTitle() | ccdCaseTitle: contextFields : editForm.controls['data']\"></ccd-markdown>\n </ng-template>\n <ng-template #idBlock>\n <h2 *ngIf=\"getCaseId()\" class=\"heading-h2\">#{{ getCaseId() | ccdCaseReference }}</h2>\n </ng-template>\n\n <ccd-case-edit-generic-errors [error]=\"caseEdit.error\"></ccd-case-edit-generic-errors>\n\n <ccd-callback-errors [callbackErrorsSubject]=\"caseEdit.callbackErrorsSubject\"\n (callbackErrorsContext)=\"callbackErrorsNotify($event)\"></ccd-callback-errors>\n\n <form class=\"check-your-answers\" [formGroup]=\"editForm\" (submit)=\"submit()\">\n <div *ngIf=\"!caseEdit.isEventCompletionChecksRequired\">\n <ng-container *ngIf=\"checkYourAnswerFieldsToDisplayExists()\">\n <h2 class=\"heading-h2\">{{pageTitle | rpxTranslate }}</h2>\n <span class=\"text-16\" *ngIf=\"!caseEdit.isCaseFlagSubmission\">{{'Check the information below carefully.' | rpxTranslate}}</span>\n\n <table class=\"form-table\" aria-describedby=\"check your answers table\">\n <tbody>\n <ng-container *ngFor=\"let page of wizard.pages\">\n <ng-container *ngIf=\"isShown(page)\">\n <ng-container *ngFor=\"let field of page\n | ccdPageFields: editForm\n | ccdReadFieldsFilter: false :undefined :true :allFieldsValues\n | ccdCYAPageLabelFilter\">\n <ng-container *ngIf=\"canShowFieldInCYA(field)\">\n <tr ccdLabelSubstitutor [caseField]=\"field\" [hidden]=\"field.hidden\"\n [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th *ngIf=\"!isLabel(field) && !caseEdit.isCaseFlagSubmission\" class=\"valign-top case-field-label\">\n <span class=\"text-16\">{{field.label | rpxTranslate}}</span>\n </th>\n <td class=\"form-cell case-field-content text-16\" [attr.colspan]=\"isLabel(field) ? '2' : '1'\">\n <ccd-field-read\n [formGroup]=\"editForm.controls['data']\" [topLevelFormGroup]=\"editForm.controls['data']\"\n [caseField]=\"summaryCaseField(field)\" [context]=\"paletteContext\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n <ng-container *ngIf=\"!caseEdit.isCaseFlagSubmission\">\n <td class=\"valign-top check-your-answers__change case-field-change\">\n <a *ngIf=\"isChangeAllowed(field)\" (click)=\"navigateToPage(page.id)\"\n href=\"javascript:void(0)\">\n <span class=\"text-16\" attr.aria-label=\"{{'Change' | rpxTranslate}} {{ field.label | rpxTranslate }}\">\n {{'Change' | rpxTranslate}}\n </span>\n </a>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"readOnlySummaryFieldsToDisplayExists()\">\n\n <table class=\"summary-fields\" aria-describedby=\"summary fields table\">\n <tbody>\n <ng-container *ngFor=\"let field of showSummaryFields\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <th id=\"summary-field-label\">{{field.label}}</th>\n <td class=\"form-cell\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\" ccdLabelSubstitutor [caseField]=\"field\" [formGroup]=\"editForm.controls['data']\" [contextFields]=\"contextFields\">\n <td colspan=\"2\">\n <ccd-field-read [formGroup]=\"editForm.controls['data']\" [caseField]=\"summaryCaseField(field)\" [caseFields]=\"contextFields\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"showEventNotes()\">\n <fieldset id=\"fieldset-event\" formGroupName=\"event\">\n <legend style=\"display: none;\"></legend>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!summary && !summary.valid && (summary.dirty || summary.touched)}\">\n <label for=\"field-trigger-summary\" class=\"form-label\">\n Event summary (optional)\n <span class=\"form-hint\">A few words describing the purpose of the event.</span>\n </label>\n <span class=\"error-message\" *ngIf=\"summary?.errors && (summary.dirty || summary.touched)\">\n {{summary.errors | ccdFirstError: eventSummaryLabel | rpxTranslate}}\n </span>\n <input type=\"text\" id=\"field-trigger-summary\" class=\"form-control bottom-30 width-50\"\n [ngClass]=\"{'govuk-input--error': summary?.errors && (summary.dirty || summary.touched)}\" formControlName=\"summary\" maxlength=\"1024\">\n </div>\n <div class=\"form-group\" [ngClass]=\"{'form-group-error': !!description && !description.valid && (description.dirty || description.touched)}\">\n <label for=\"field-trigger-description\" class=\"form-label\">Event description (optional)</label>\n <span class=\"error-message\" *ngIf=\"description?.errors && (description.dirty || description.touched)\">\n {{description.errors | ccdFirstError: eventDescriptionLabel | rpxTranslate}}\n </span>\n <textarea id=\"field-trigger-description\" class=\"form-control bottom-30 width-50\" formControlName=\"description\"\n [ngClass]=\"{'govuk-input--error': description?.errors && (description.dirty || description.touched)}\" maxlength=\"65536\"></textarea>\n </div>\n </fieldset>\n </ng-container>\n </div>\n <ccd-case-event-completion *ngIf=\"caseEdit.isEventCompletionChecksRequired\"\n [eventCompletionParams]=\"caseEdit.eventCompletionParams\"\n (eventCanBeCompleted)=\"onEventCanBeCompleted($event)\">\n </ccd-case-event-completion>\n <div class=\"form-group form-group-related\">\n <button *ngIf=\"!caseEdit.isCaseFlagSubmission\" class=\"button button-secondary\" type=\"button\" [disabled]=\"!hasPrevious() || caseEdit.isSubmitting\" (click)=\"previous()\">\n {{'Previous' | rpxTranslate}}\n </button>\n <button type=\"submit\" [disabled]=\"isDisabled\" class=\"button\">\n {{triggerText | rpxTranslate}}\n </button>\n </div>\n <p class=\"cancel\">\n <a (click)=\"cancel()\" href=\"javascript:void(0)\" [class.disabled]=\"caseEdit.isSubmitting\">{{getCancelText() | rpxTranslate}}</a>\n </p>\n </form>\n</div>\n\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"] }]
|
|
29828
29872
|
}], () => [{ type: CaseEditComponent }, { type: FieldsUtils }, { type: CaseFieldService }, { type: i1$1.ActivatedRoute }, { type: OrderService }, { type: ProfileNotifier }, { type: FormValidatorsService }], null); })();
|
|
29829
29873
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseEditSubmitComponent, { className: "CaseEditSubmitComponent", filePath: "lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.ts", lineNumber: 27 }); })();
|
|
29830
29874
|
|
|
@@ -34290,7 +34334,6 @@ class EventStartGuard {
|
|
|
34290
34334
|
sessionStorageService;
|
|
34291
34335
|
abstractConfig;
|
|
34292
34336
|
cookieService;
|
|
34293
|
-
static CLIENT_CONTEXT = 'clientContext';
|
|
34294
34337
|
constructor(workAllocationService, router, sessionStorageService, abstractConfig, cookieService) {
|
|
34295
34338
|
this.workAllocationService = workAllocationService;
|
|
34296
34339
|
this.router = router;
|
|
@@ -34311,7 +34354,7 @@ class EventStartGuard {
|
|
|
34311
34354
|
const caseInfoStr = this.sessionStorageService.getItem('caseInfo');
|
|
34312
34355
|
const languageCookie = this.cookieService.getCookie('exui-preferred-language');
|
|
34313
34356
|
const currentLanguage = !!languageCookie && languageCookie !== '' ? languageCookie : 'en';
|
|
34314
|
-
const preClientContext = this.sessionStorageService.getItem(
|
|
34357
|
+
const preClientContext = this.sessionStorageService.getItem(CaseEditComponent.CLIENT_CONTEXT);
|
|
34315
34358
|
if (!preClientContext) {
|
|
34316
34359
|
// creates client context for language if not already existing
|
|
34317
34360
|
const storeClientContext = {
|
|
@@ -34321,7 +34364,7 @@ class EventStartGuard {
|
|
|
34321
34364
|
}
|
|
34322
34365
|
}
|
|
34323
34366
|
};
|
|
34324
|
-
this.sessionStorageService.setItem(
|
|
34367
|
+
this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
34325
34368
|
}
|
|
34326
34369
|
else {
|
|
34327
34370
|
const clientContextObj = JSON.parse(preClientContext);
|
|
@@ -34335,7 +34378,7 @@ class EventStartGuard {
|
|
|
34335
34378
|
}
|
|
34336
34379
|
}
|
|
34337
34380
|
};
|
|
34338
|
-
this.sessionStorageService.setItem(
|
|
34381
|
+
this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(clientContextAddLanguage));
|
|
34339
34382
|
}
|
|
34340
34383
|
}
|
|
34341
34384
|
if (caseInfoStr) {
|
|
@@ -34396,13 +34439,10 @@ class EventStartGuard {
|
|
|
34396
34439
|
}
|
|
34397
34440
|
}
|
|
34398
34441
|
};
|
|
34399
|
-
this.sessionStorageService.setItem(
|
|
34442
|
+
this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
34400
34443
|
return true;
|
|
34401
34444
|
}
|
|
34402
34445
|
}
|
|
34403
|
-
removeTaskFromSessionStorage() {
|
|
34404
|
-
this.sessionStorageService.removeItem(EventStartGuard.CLIENT_CONTEXT);
|
|
34405
|
-
}
|
|
34406
34446
|
checkForTasks(payload, caseId, eventId, taskId, userId) {
|
|
34407
34447
|
if (taskId && payload?.tasks?.length > 0) {
|
|
34408
34448
|
const task = payload.tasks.find((t) => t.id == taskId);
|
|
@@ -34427,11 +34467,11 @@ class EventStartGuard {
|
|
|
34427
34467
|
}
|
|
34428
34468
|
}
|
|
34429
34469
|
};
|
|
34430
|
-
this.sessionStorageService.setItem(
|
|
34431
|
-
this.sessionStorageService.setItem(
|
|
34470
|
+
this.sessionStorageService.setItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO, JSON.stringify(taskEventCompletionInfo));
|
|
34471
|
+
this.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
|
|
34432
34472
|
}
|
|
34433
34473
|
else {
|
|
34434
|
-
this.
|
|
34474
|
+
removeTaskFromClientContext(this.sessionStorageService);
|
|
34435
34475
|
}
|
|
34436
34476
|
}
|
|
34437
34477
|
if (payload.task_required_for_event) {
|
|
@@ -34610,7 +34650,6 @@ class EventStartStateMachineService {
|
|
|
34610
34650
|
}
|
|
34611
34651
|
}
|
|
34612
34652
|
};
|
|
34613
|
-
context.sessionStorageService.setItem('clientContext', JSON.stringify(clientContext));
|
|
34614
34653
|
let userInfo;
|
|
34615
34654
|
const userInfoStr = context.sessionStorageService.getItem('userDetails');
|
|
34616
34655
|
if (userInfoStr) {
|
|
@@ -34624,7 +34663,9 @@ class EventStartStateMachineService {
|
|
|
34624
34663
|
taskId: task.id,
|
|
34625
34664
|
createdTimestamp: Date.now()
|
|
34626
34665
|
};
|
|
34627
|
-
context.sessionStorageService.setItem(
|
|
34666
|
+
context.sessionStorageService.setItem(CaseEditComponent.TASK_EVENT_COMPLETION_INFO, JSON.stringify(taskEventCompletionInfo));
|
|
34667
|
+
// EXUI-2668 - Only add client context when taskEventCompletionInfo is set - stops auto completing incorrect tasks
|
|
34668
|
+
context.sessionStorageService.setItem(CaseEditComponent.CLIENT_CONTEXT, JSON.stringify(clientContext));
|
|
34628
34669
|
// Allow user to perform the event
|
|
34629
34670
|
context.router.navigate([`/cases/case-details/${context.caseId}/trigger/${context.eventId}`], { relativeTo: context.route });
|
|
34630
34671
|
}
|
|
@@ -37041,10 +37082,10 @@ function SearchResultComponent_table_0_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
37041
37082
|
i0.ɵɵadvance(4);
|
|
37042
37083
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 4, "Reset case selection"));
|
|
37043
37084
|
} }
|
|
37044
|
-
function
|
|
37085
|
+
function SearchResultComponent_table_0_td_10_Template(rf, ctx) { if (rf & 1) {
|
|
37045
37086
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
37046
|
-
i0.ɵɵelementStart(0, "
|
|
37047
|
-
i0.ɵɵlistener("change", function
|
|
37087
|
+
i0.ɵɵelementStart(0, "td", 21)(1, "div", 22)(2, "input", 23);
|
|
37088
|
+
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()); });
|
|
37048
37089
|
i0.ɵɵelementEnd();
|
|
37049
37090
|
i0.ɵɵelement(3, "label", 24);
|
|
37050
37091
|
i0.ɵɵelementEnd()();
|
|
@@ -37052,6 +37093,8 @@ function SearchResultComponent_table_0_th_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
37052
37093
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
37053
37094
|
i0.ɵɵadvance(2);
|
|
37054
37095
|
i0.ɵɵproperty("checked", ctx_r0.allOnPageSelected())("disabled", !ctx_r0.canAnyBeShared());
|
|
37096
|
+
i0.ɵɵadvance();
|
|
37097
|
+
i0.ɵɵattribute("aria-labelledby", "select-all");
|
|
37055
37098
|
} }
|
|
37056
37099
|
function SearchResultComponent_table_0_th_11_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
37057
37100
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
@@ -37089,10 +37132,10 @@ function SearchResultComponent_table_0_th_12_Template(rf, ctx) { if (rf & 1) {
|
|
|
37089
37132
|
} }
|
|
37090
37133
|
function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template(rf, ctx) { if (rf & 1) {
|
|
37091
37134
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
37092
|
-
i0.ɵɵelementStart(0, "td",
|
|
37135
|
+
i0.ɵɵelementStart(0, "td", 34)(1, "div", 22)(2, "input", 35);
|
|
37093
37136
|
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)); });
|
|
37094
37137
|
i0.ɵɵelementEnd();
|
|
37095
|
-
i0.ɵɵelement(3, "label",
|
|
37138
|
+
i0.ɵɵelement(3, "label", 36);
|
|
37096
37139
|
i0.ɵɵelementEnd()();
|
|
37097
37140
|
} if (rf & 2) {
|
|
37098
37141
|
const result_r8 = i0.ɵɵnextContext().$implicit;
|
|
@@ -37103,9 +37146,10 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template(rf, ct
|
|
|
37103
37146
|
i0.ɵɵproperty("checked", ctx_r0.isSelected(result_r8))("disabled", !ctx_r0.canBeShared(result_r8));
|
|
37104
37147
|
i0.ɵɵadvance();
|
|
37105
37148
|
i0.ɵɵpropertyInterpolate1("for", "select-", result_r8.case_id, "");
|
|
37149
|
+
i0.ɵɵattribute("aria-labelledby", "select-" + result_r8.case_id);
|
|
37106
37150
|
} }
|
|
37107
37151
|
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) {
|
|
37108
|
-
i0.ɵɵelement(0, "ccd-field-read",
|
|
37152
|
+
i0.ɵɵelement(0, "ccd-field-read", 44);
|
|
37109
37153
|
} if (rf & 2) {
|
|
37110
37154
|
const col_r9 = i0.ɵɵnextContext(3).$implicit;
|
|
37111
37155
|
const result_r8 = i0.ɵɵnextContext().$implicit;
|
|
@@ -37120,8 +37164,8 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_containe
|
|
|
37120
37164
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(1, 1, result_r8.case_id));
|
|
37121
37165
|
} }
|
|
37122
37166
|
function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
37123
|
-
i0.ɵɵelementContainerStart(0,
|
|
37124
|
-
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",
|
|
37167
|
+
i0.ɵɵelementContainerStart(0, 42);
|
|
37168
|
+
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);
|
|
37125
37169
|
i0.ɵɵelementContainerEnd();
|
|
37126
37170
|
} if (rf & 2) {
|
|
37127
37171
|
const case_reference_r10 = i0.ɵɵreference(3);
|
|
@@ -37132,9 +37176,9 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_containe
|
|
|
37132
37176
|
i0.ɵɵproperty("ngIf", ctx_r0.draftPrefixOrGet(col_r9, result_r8))("ngIfElse", case_reference_r10);
|
|
37133
37177
|
} }
|
|
37134
37178
|
function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_Template(rf, ctx) { if (rf & 1) {
|
|
37135
|
-
i0.ɵɵelementStart(0, "a",
|
|
37179
|
+
i0.ɵɵelementStart(0, "a", 40);
|
|
37136
37180
|
i0.ɵɵpipe(1, "ccdCaseReference");
|
|
37137
|
-
i0.ɵɵtemplate(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_Template, 4, 2, "ng-container",
|
|
37181
|
+
i0.ɵɵtemplate(2, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_ng_container_2_Template, 4, 2, "ng-container", 41);
|
|
37138
37182
|
i0.ɵɵelementEnd();
|
|
37139
37183
|
} if (rf & 2) {
|
|
37140
37184
|
const result_r8 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -37145,8 +37189,8 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_Template(rf
|
|
|
37145
37189
|
i0.ɵɵproperty("ngIf", !ctx_r0.hideRows);
|
|
37146
37190
|
} }
|
|
37147
37191
|
function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
37148
|
-
i0.ɵɵelementStart(0, "div",
|
|
37149
|
-
i0.ɵɵelement(1, "ccd-field-read",
|
|
37192
|
+
i0.ɵɵelementStart(0, "div", 42);
|
|
37193
|
+
i0.ɵɵelement(1, "ccd-field-read", 44);
|
|
37150
37194
|
i0.ɵɵelementEnd();
|
|
37151
37195
|
} if (rf & 2) {
|
|
37152
37196
|
const col_r9 = i0.ɵɵnextContext().$implicit;
|
|
@@ -37157,8 +37201,8 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_div_2_Template(
|
|
|
37157
37201
|
i0.ɵɵproperty("caseField", result_r8.columns[col_r9.case_field_id])("contextFields", result_r8.hydrated_case_fields)("elementsToSubstitute", i0.ɵɵpureFunction0(5, _c1));
|
|
37158
37202
|
} }
|
|
37159
37203
|
function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template(rf, ctx) { if (rf & 1) {
|
|
37160
|
-
i0.ɵɵelementStart(0, "td",
|
|
37161
|
-
i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_2_a_1_Template, 3, 6, "a",
|
|
37204
|
+
i0.ɵɵelementStart(0, "td", 37);
|
|
37205
|
+
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);
|
|
37162
37206
|
i0.ɵɵelementEnd();
|
|
37163
37207
|
} if (rf & 2) {
|
|
37164
37208
|
const colIndex_r11 = ctx.index;
|
|
@@ -37169,7 +37213,7 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_2_Template(rf, ct
|
|
|
37169
37213
|
} }
|
|
37170
37214
|
function SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template(rf, ctx) { if (rf & 1) {
|
|
37171
37215
|
i0.ɵɵelementStart(0, "td")(1, "div");
|
|
37172
|
-
i0.ɵɵelement(2, "ccd-activity",
|
|
37216
|
+
i0.ɵɵelement(2, "ccd-activity", 45);
|
|
37173
37217
|
i0.ɵɵelementEnd()();
|
|
37174
37218
|
} if (rf & 2) {
|
|
37175
37219
|
const result_r8 = i0.ɵɵnextContext().$implicit;
|
|
@@ -37181,7 +37225,7 @@ function SearchResultComponent_table_0_ng_container_14_tr_1_td_3_Template(rf, ct
|
|
|
37181
37225
|
} }
|
|
37182
37226
|
function SearchResultComponent_table_0_ng_container_14_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
37183
37227
|
i0.ɵɵelementStart(0, "tr");
|
|
37184
|
-
i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_14_tr_1_td_1_Template, 4,
|
|
37228
|
+
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);
|
|
37185
37229
|
i0.ɵɵelementEnd();
|
|
37186
37230
|
} if (rf & 2) {
|
|
37187
37231
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -37204,10 +37248,10 @@ function SearchResultComponent_table_0_ng_container_14_Template(rf, ctx) { if (r
|
|
|
37204
37248
|
} }
|
|
37205
37249
|
function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ctx) { if (rf & 1) {
|
|
37206
37250
|
const _r12 = i0.ɵɵgetCurrentView();
|
|
37207
|
-
i0.ɵɵelementStart(0, "td",
|
|
37251
|
+
i0.ɵɵelementStart(0, "td", 34)(1, "div", 22)(2, "input", 46);
|
|
37208
37252
|
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)); });
|
|
37209
37253
|
i0.ɵɵelementEnd();
|
|
37210
|
-
i0.ɵɵelement(3, "label",
|
|
37254
|
+
i0.ɵɵelement(3, "label", 36);
|
|
37211
37255
|
i0.ɵɵelementEnd()();
|
|
37212
37256
|
} if (rf & 2) {
|
|
37213
37257
|
const result_r13 = i0.ɵɵnextContext().$implicit;
|
|
@@ -37218,9 +37262,10 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template(rf, ct
|
|
|
37218
37262
|
i0.ɵɵproperty("checked", ctx_r0.isSelected(result_r13))("disabled", !ctx_r0.canBeShared(result_r13));
|
|
37219
37263
|
i0.ɵɵadvance();
|
|
37220
37264
|
i0.ɵɵpropertyInterpolate1("for", "select-", result_r13.case_id, "");
|
|
37265
|
+
i0.ɵɵattribute("aria-labelledby", "select-" + result_r13.case_id);
|
|
37221
37266
|
} }
|
|
37222
37267
|
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) {
|
|
37223
|
-
i0.ɵɵelement(0, "ccd-field-read",
|
|
37268
|
+
i0.ɵɵelement(0, "ccd-field-read", 44);
|
|
37224
37269
|
} if (rf & 2) {
|
|
37225
37270
|
const col_r14 = i0.ɵɵnextContext(3).$implicit;
|
|
37226
37271
|
const result_r13 = i0.ɵɵnextContext().$implicit;
|
|
@@ -37235,8 +37280,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_containe
|
|
|
37235
37280
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(1, 1, result_r13.case_id));
|
|
37236
37281
|
} }
|
|
37237
37282
|
function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
37238
|
-
i0.ɵɵelementContainerStart(0,
|
|
37239
|
-
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",
|
|
37283
|
+
i0.ɵɵelementContainerStart(0, 42);
|
|
37284
|
+
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);
|
|
37240
37285
|
i0.ɵɵelementContainerEnd();
|
|
37241
37286
|
} if (rf & 2) {
|
|
37242
37287
|
const case_reference_r15 = i0.ɵɵreference(3);
|
|
@@ -37247,9 +37292,9 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_containe
|
|
|
37247
37292
|
i0.ɵɵproperty("ngIf", ctx_r0.draftPrefixOrGet(col_r14, result_r13))("ngIfElse", case_reference_r15);
|
|
37248
37293
|
} }
|
|
37249
37294
|
function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_Template(rf, ctx) { if (rf & 1) {
|
|
37250
|
-
i0.ɵɵelementStart(0, "a",
|
|
37295
|
+
i0.ɵɵelementStart(0, "a", 40);
|
|
37251
37296
|
i0.ɵɵpipe(1, "ccdCaseReference");
|
|
37252
|
-
i0.ɵɵtemplate(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_Template, 4, 2, "ng-container",
|
|
37297
|
+
i0.ɵɵtemplate(2, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_ng_container_2_Template, 4, 2, "ng-container", 41);
|
|
37253
37298
|
i0.ɵɵelementEnd();
|
|
37254
37299
|
} if (rf & 2) {
|
|
37255
37300
|
const result_r13 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -37260,8 +37305,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_Template(rf
|
|
|
37260
37305
|
i0.ɵɵproperty("ngIf", !ctx_r0.hideRows);
|
|
37261
37306
|
} }
|
|
37262
37307
|
function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
37263
|
-
i0.ɵɵelementStart(0, "div",
|
|
37264
|
-
i0.ɵɵelement(1, "ccd-field-read",
|
|
37308
|
+
i0.ɵɵelementStart(0, "div", 42);
|
|
37309
|
+
i0.ɵɵelement(1, "ccd-field-read", 44);
|
|
37265
37310
|
i0.ɵɵelementEnd();
|
|
37266
37311
|
} if (rf & 2) {
|
|
37267
37312
|
const col_r14 = i0.ɵɵnextContext().$implicit;
|
|
@@ -37272,8 +37317,8 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_div_2_Template(
|
|
|
37272
37317
|
i0.ɵɵproperty("caseField", result_r13.columns[col_r14.case_field_id])("contextFields", result_r13.hydrated_case_fields)("elementsToSubstitute", i0.ɵɵpureFunction0(5, _c1));
|
|
37273
37318
|
} }
|
|
37274
37319
|
function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template(rf, ctx) { if (rf & 1) {
|
|
37275
|
-
i0.ɵɵelementStart(0, "td",
|
|
37276
|
-
i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_2_a_1_Template, 3, 6, "a",
|
|
37320
|
+
i0.ɵɵelementStart(0, "td", 37);
|
|
37321
|
+
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);
|
|
37277
37322
|
i0.ɵɵelementEnd();
|
|
37278
37323
|
} if (rf & 2) {
|
|
37279
37324
|
const colIndex_r16 = ctx.index;
|
|
@@ -37284,7 +37329,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_2_Template(rf, ct
|
|
|
37284
37329
|
} }
|
|
37285
37330
|
function SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template(rf, ctx) { if (rf & 1) {
|
|
37286
37331
|
i0.ɵɵelementStart(0, "td")(1, "div");
|
|
37287
|
-
i0.ɵɵelement(2, "ccd-activity",
|
|
37332
|
+
i0.ɵɵelement(2, "ccd-activity", 45);
|
|
37288
37333
|
i0.ɵɵelementEnd()();
|
|
37289
37334
|
} if (rf & 2) {
|
|
37290
37335
|
const result_r13 = i0.ɵɵnextContext().$implicit;
|
|
@@ -37296,7 +37341,7 @@ function SearchResultComponent_table_0_ng_container_15_tr_1_td_3_Template(rf, ct
|
|
|
37296
37341
|
} }
|
|
37297
37342
|
function SearchResultComponent_table_0_ng_container_15_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
37298
37343
|
i0.ɵɵelementStart(0, "tr");
|
|
37299
|
-
i0.ɵɵtemplate(1, SearchResultComponent_table_0_ng_container_15_tr_1_td_1_Template, 4,
|
|
37344
|
+
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);
|
|
37300
37345
|
i0.ɵɵelementEnd();
|
|
37301
37346
|
} if (rf & 2) {
|
|
37302
37347
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -37326,7 +37371,7 @@ function SearchResultComponent_table_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
37326
37371
|
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);
|
|
37327
37372
|
i0.ɵɵelementEnd();
|
|
37328
37373
|
i0.ɵɵelementStart(8, "thead")(9, "tr", 8);
|
|
37329
|
-
i0.ɵɵtemplate(10,
|
|
37374
|
+
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);
|
|
37330
37375
|
i0.ɵɵelementEnd()();
|
|
37331
37376
|
i0.ɵɵelementStart(13, "tbody");
|
|
37332
37377
|
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);
|
|
@@ -37354,7 +37399,7 @@ function SearchResultComponent_table_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
37354
37399
|
} }
|
|
37355
37400
|
function SearchResultComponent_ccd_pagination_1_Template(rf, ctx) { if (rf & 1) {
|
|
37356
37401
|
const _r17 = i0.ɵɵgetCurrentView();
|
|
37357
|
-
i0.ɵɵelementStart(0, "ccd-pagination",
|
|
37402
|
+
i0.ɵɵelementStart(0, "ccd-pagination", 47);
|
|
37358
37403
|
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)); });
|
|
37359
37404
|
i0.ɵɵelementEnd();
|
|
37360
37405
|
} if (rf & 2) {
|
|
@@ -37362,7 +37407,7 @@ function SearchResultComponent_ccd_pagination_1_Template(rf, ctx) { if (rf & 1)
|
|
|
37362
37407
|
i0.ɵɵproperty("visibilityLabel", ctx_r0.hideRows ? "hidden" : "visible")("autoHide", true)("maxSize", 8)("screenReaderPaginationLabel", "Pagination")("screenReaderPageLabel", ctx_r0.page)("screenReaderCurrentLabel", "You're on page");
|
|
37363
37408
|
} }
|
|
37364
37409
|
function SearchResultComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
37365
|
-
i0.ɵɵelementStart(0, "div",
|
|
37410
|
+
i0.ɵɵelementStart(0, "div", 48);
|
|
37366
37411
|
i0.ɵɵpipe(1, "rpxTranslate");
|
|
37367
37412
|
i0.ɵɵtext(2);
|
|
37368
37413
|
i0.ɵɵpipe(3, "rpxTranslate");
|
|
@@ -37713,7 +37758,7 @@ class SearchResultComponent {
|
|
|
37713
37758
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
37714
37759
|
noop() { }
|
|
37715
37760
|
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)); };
|
|
37716
|
-
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",
|
|
37761
|
+
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) {
|
|
37717
37762
|
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);
|
|
37718
37763
|
} if (rf & 2) {
|
|
37719
37764
|
i0.ɵɵproperty("ngIf", ctx.hasResults() || ctx.hasDrafts());
|
|
@@ -37725,7 +37770,7 @@ class SearchResultComponent {
|
|
|
37725
37770
|
}
|
|
37726
37771
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
|
|
37727
37772
|
type: Component,
|
|
37728
|
-
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 <
|
|
37773
|
+
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\">​</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"] }]
|
|
37729
37774
|
}], () => [{ type: SearchResultViewItemComparatorFactory }, { type: AbstractAppConfig }, { type: ActivityService }, { type: CaseReferencePipe }, { type: PlaceholderService }, { type: BrowserService }, { type: SessionStorageService }], { caseLinkUrlTemplate: [{
|
|
37730
37775
|
type: Input
|
|
37731
37776
|
}], jurisdiction: [{
|