@hmcts/ccd-case-ui-toolkit 6.19.6-rc2 → 6.19.6-restricted-case-access
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/bundles/hmcts-ccd-case-ui-toolkit.umd.js +12 -6
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/shared/components/case-editor/case-edit/case-edit.component.js +4 -2
- package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +10 -6
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +12 -6
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -10205,7 +10205,9 @@
|
|
|
10205
10205
|
rawFormValueData[key] = parentField.formatted_value[caseField.id];
|
|
10206
10206
|
}
|
|
10207
10207
|
else {
|
|
10208
|
-
|
|
10208
|
+
if (!(caseField.hidden && caseField.retain_hidden_value)) {
|
|
10209
|
+
rawFormValueData[key] = caseField.formatted_value;
|
|
10210
|
+
}
|
|
10209
10211
|
}
|
|
10210
10212
|
}
|
|
10211
10213
|
}
|
|
@@ -31062,7 +31064,7 @@
|
|
|
31062
31064
|
else {
|
|
31063
31065
|
console.info('getAndCacheCaseView - Path B.');
|
|
31064
31066
|
return this.caseNotifier.fetchAndRefresh(cid)
|
|
31065
|
-
.pipe(operators.catchError(function (error) { return _this.processErrorInCaseFetch(error); }))
|
|
31067
|
+
.pipe(operators.catchError(function (error) { return _this.processErrorInCaseFetch(error, cid); }))
|
|
31066
31068
|
.toPromise();
|
|
31067
31069
|
}
|
|
31068
31070
|
}
|
|
@@ -31075,9 +31077,9 @@
|
|
|
31075
31077
|
_this.caseNotifier.cachedCaseView = classTransformer.plainToClassFromExist(new CaseView(), caseView);
|
|
31076
31078
|
_this.caseNotifier.announceCase(_this.caseNotifier.cachedCaseView);
|
|
31077
31079
|
return _this.caseNotifier.cachedCaseView;
|
|
31078
|
-
}), operators.catchError(function (error) { return _this.processErrorInCaseFetch(error); })).toPromise();
|
|
31080
|
+
}), operators.catchError(function (error) { return _this.processErrorInCaseFetch(error, cid); })).toPromise();
|
|
31079
31081
|
};
|
|
31080
|
-
CaseResolver.prototype.processErrorInCaseFetch = function (error) {
|
|
31082
|
+
CaseResolver.prototype.processErrorInCaseFetch = function (error, caseReference) {
|
|
31081
31083
|
console.error('!!! processErrorInCaseFetch !!!');
|
|
31082
31084
|
console.error(error);
|
|
31083
31085
|
// TODO Should be logged to remote logging infrastructure
|
|
@@ -31085,12 +31087,16 @@
|
|
|
31085
31087
|
this.router.navigate(['/search/noresults']);
|
|
31086
31088
|
return rxjs.of(null);
|
|
31087
31089
|
}
|
|
31088
|
-
console.error(error);
|
|
31089
31090
|
if (CaseResolver.EVENT_REGEX.test(this.previousUrl) && error.status === 404) {
|
|
31090
31091
|
this.router.navigate(['/list/case']);
|
|
31091
31092
|
return rxjs.of(null);
|
|
31092
31093
|
}
|
|
31093
|
-
|
|
31094
|
+
// Error 403, navigate to restricted case access page
|
|
31095
|
+
if (error.status === 403) {
|
|
31096
|
+
this.router.navigate(["/cases/restricted-case-access/" + caseReference]);
|
|
31097
|
+
return rxjs.of(null);
|
|
31098
|
+
}
|
|
31099
|
+
if (error.status !== 401) {
|
|
31094
31100
|
this.router.navigate(['/error']);
|
|
31095
31101
|
}
|
|
31096
31102
|
this.goToDefaultPage();
|