@hmcts/rpx-xui-common-lib 1.7.22 → 1.7.23-caa-selected-cases-list-status-column-width
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-rpx-xui-common-lib.umd.js +261 -48
- package/bundles/hmcts-rpx-xui-common-lib.umd.js.map +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js.map +1 -1
- package/esm2015/hmcts-rpx-xui-common-lib.js +2 -2
- package/esm2015/lib/components/search-judicials/search-judicials.component.js +2 -2
- package/esm2015/lib/components/selected-case/selected-case.component.js +7 -10
- package/esm2015/lib/components/selected-case-confirm/selected-case-confirm.component.js +1 -1
- package/esm2015/lib/components/selected-case-list/selected-case-list.component.js +9 -3
- package/esm2015/lib/components/share-case/share-case.component.js +194 -15
- package/esm2015/lib/models/case-share.model.js +8 -1
- package/esm2015/lib/models/index.js +2 -2
- package/esm2015/lib/models/person.model.js +3 -1
- package/esm2015/lib/services/case-sharing-state/case-sharing-state.service.js +39 -15
- package/esm2015/public-api.js +2 -2
- package/esm5/hmcts-rpx-xui-common-lib.js +2 -2
- package/esm5/lib/components/search-judicials/search-judicials.component.js +2 -2
- package/esm5/lib/components/selected-case/selected-case.component.js +7 -13
- package/esm5/lib/components/selected-case-confirm/selected-case-confirm.component.js +1 -1
- package/esm5/lib/components/selected-case-list/selected-case-list.component.js +9 -3
- package/esm5/lib/components/share-case/share-case.component.js +227 -15
- package/esm5/lib/models/case-share.model.js +8 -1
- package/esm5/lib/models/index.js +2 -2
- package/esm5/lib/models/person.model.js +3 -1
- package/esm5/lib/services/case-sharing-state/case-sharing-state.service.js +40 -16
- package/esm5/public-api.js +2 -2
- package/fesm2015/hmcts-rpx-xui-common-lib.js +230 -50
- package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/fesm5/hmcts-rpx-xui-common-lib.js +265 -55
- package/fesm5/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
- package/lib/components/selected-case/selected-case.component.d.ts +1 -1
- package/lib/components/selected-case-list/selected-case-list.component.d.ts +1 -0
- package/lib/components/share-case/share-case.component.d.ts +37 -2
- package/lib/models/case-share.model.d.ts +5 -0
- package/lib/models/person.model.d.ts +2 -0
- package/lib/services/case-sharing-state/case-sharing-state.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1934,29 +1934,50 @@
|
|
|
1934
1934
|
return newSharedCases;
|
|
1935
1935
|
};
|
|
1936
1936
|
/**
|
|
1937
|
-
* @param {?} caseId
|
|
1938
1937
|
* @param {?} user
|
|
1938
|
+
* @param {?=} caseId
|
|
1939
1939
|
* @return {?}
|
|
1940
1940
|
*/
|
|
1941
1941
|
CaseSharingStateService.prototype.requestUnshare = /**
|
|
1942
|
-
* @param {?} caseId
|
|
1943
1942
|
* @param {?} user
|
|
1943
|
+
* @param {?=} caseId
|
|
1944
1944
|
* @return {?}
|
|
1945
1945
|
*/
|
|
1946
|
-
function (
|
|
1946
|
+
function (user, caseId) {
|
|
1947
1947
|
var e_2, _a;
|
|
1948
1948
|
/** @type {?} */
|
|
1949
1949
|
var newSharedCases = [];
|
|
1950
1950
|
try {
|
|
1951
1951
|
for (var _b = __values(this.caseState), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1952
1952
|
var sharedCase = _c.value;
|
|
1953
|
-
|
|
1953
|
+
// If no caseId, then request unshare from all shared cases
|
|
1954
|
+
if (caseId === undefined || sharedCase.caseId === caseId) {
|
|
1954
1955
|
if (!sharedCase.pendingUnshares) {
|
|
1955
1956
|
sharedCase.pendingUnshares = [];
|
|
1956
1957
|
}
|
|
1957
1958
|
/** @type {?} */
|
|
1958
1959
|
var newPendingUnshares = sharedCase.pendingUnshares.slice();
|
|
1959
|
-
|
|
1960
|
+
// If the user is pending shared access, just remove them from pendingShares
|
|
1961
|
+
/** @type {?} */
|
|
1962
|
+
var newPendingShares = void 0;
|
|
1963
|
+
/** @type {?} */
|
|
1964
|
+
var indexOfPreviouslyAddedUser = -1;
|
|
1965
|
+
if (sharedCase.pendingShares) {
|
|
1966
|
+
indexOfPreviouslyAddedUser = sharedCase.pendingShares.findIndex(( /**
|
|
1967
|
+
* @param {?} u
|
|
1968
|
+
* @return {?}
|
|
1969
|
+
*/function (u) { return u.idamId === user.idamId; }));
|
|
1970
|
+
if (indexOfPreviouslyAddedUser > -1) {
|
|
1971
|
+
newPendingShares = sharedCase.pendingShares.slice();
|
|
1972
|
+
newPendingShares.splice(indexOfPreviouslyAddedUser, 1);
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
// If the user does not exist in pendingShares, and already has shared access (i.e. exists in sharedWith),
|
|
1976
|
+
// request removal of shared access
|
|
1977
|
+
if (indexOfPreviouslyAddedUser === -1 && sharedCase.sharedWith && sharedCase.sharedWith.findIndex(( /**
|
|
1978
|
+
* @param {?} u
|
|
1979
|
+
* @return {?}
|
|
1980
|
+
*/function (u) { return u.idamId === user.idamId; })) > -1) {
|
|
1960
1981
|
if (!newPendingUnshares.some(( /**
|
|
1961
1982
|
* @param {?} u
|
|
1962
1983
|
* @return {?}
|
|
@@ -1964,11 +1985,10 @@
|
|
|
1964
1985
|
newPendingUnshares.push(user);
|
|
1965
1986
|
}
|
|
1966
1987
|
}
|
|
1967
|
-
else {
|
|
1968
|
-
newPendingUnshares.push(user);
|
|
1969
|
-
}
|
|
1970
1988
|
/** @type {?} */
|
|
1971
|
-
var newSharedCase = __assign({}, sharedCase, { pendingUnshares: newPendingUnshares }
|
|
1989
|
+
var newSharedCase = __assign({}, sharedCase, { pendingUnshares: newPendingUnshares }, (newPendingShares && {
|
|
1990
|
+
pendingShares: newPendingShares
|
|
1991
|
+
}));
|
|
1972
1992
|
newSharedCases.push(newSharedCase);
|
|
1973
1993
|
}
|
|
1974
1994
|
else {
|
|
@@ -1990,7 +2010,7 @@
|
|
|
1990
2010
|
}
|
|
1991
2011
|
}
|
|
1992
2012
|
this.subject.next(newSharedCases);
|
|
1993
|
-
return;
|
|
2013
|
+
return newSharedCases;
|
|
1994
2014
|
};
|
|
1995
2015
|
/**
|
|
1996
2016
|
* @param {?} caseId
|
|
@@ -2066,11 +2086,13 @@
|
|
|
2066
2086
|
* @return {?}
|
|
2067
2087
|
*/
|
|
2068
2088
|
function (caseId) {
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
this.caseState.
|
|
2072
|
-
|
|
2073
|
-
|
|
2089
|
+
if (this.caseState.length > 1) {
|
|
2090
|
+
for (var i = 0, l = this.caseState.length; i < l; i++) {
|
|
2091
|
+
if (this.caseState[i].caseId === caseId) {
|
|
2092
|
+
this.caseState.splice(i, 1);
|
|
2093
|
+
this.subject.next(this.caseState);
|
|
2094
|
+
return;
|
|
2095
|
+
}
|
|
2074
2096
|
}
|
|
2075
2097
|
}
|
|
2076
2098
|
};
|
|
@@ -2156,7 +2178,7 @@
|
|
|
2156
2178
|
SelectedCaseConfirmComponent.decorators = [
|
|
2157
2179
|
{ type: i0.Component, args: [{
|
|
2158
2180
|
selector: 'xuilib-selected-case-confirm',
|
|
2159
|
-
template: "<div id=\"user-access-block-{{ sharedCase.caseId }}\" *ngIf=\"showUserAccessBlock()\">\n <h2 class=\"govuk-heading-m case-share-confirm__title\">{{ sharedCase.caseTitle }}</h2>\n <div class=\"case-share-confirm__caption-area\">\n <div class=\"govuk-caption-m case-share-confirm__caption\">\n {{ sharedCase.caseId }}\n </div>\n <a [routerLink]=\"changeLink\" class=\"case-share-confirm__change-link govuk-link govuk-!-font-size-19\">Change</a>\n </div>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Name</th>\n <th class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Email address</th>\n <th class=\"govuk-table__header govuk-table-column-actions\" scope=\"col\">Actions</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let user of sharedCase.pendingShares; trackBy: trackByUserId\">\n <td class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n <span class=\"hmcts-badge\">To be added</span>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngFor=\"let user of sharedCase.pendingUnshares; trackBy: trackByUserId\">\n <td class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n <span class=\"hmcts-badge hmcts-badge--red\">
|
|
2181
|
+
template: "<div id=\"user-access-block-{{ sharedCase.caseId }}\" *ngIf=\"showUserAccessBlock()\">\n <h2 class=\"govuk-heading-m case-share-confirm__title\">{{ sharedCase.caseTitle }}</h2>\n <div class=\"case-share-confirm__caption-area\">\n <div class=\"govuk-caption-m case-share-confirm__caption\">\n {{ sharedCase.caseId }}\n </div>\n <a [routerLink]=\"changeLink\" class=\"case-share-confirm__change-link govuk-link govuk-!-font-size-19\">Change</a>\n </div>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Name</th>\n <th class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Email address</th>\n <th class=\"govuk-table__header govuk-table-column-actions\" scope=\"col\">Actions</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let user of sharedCase.pendingShares; trackBy: trackByUserId\">\n <td class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n <span class=\"hmcts-badge\">To be added</span>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngFor=\"let user of sharedCase.pendingUnshares; trackBy: trackByUserId\">\n <td class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n <span class=\"hmcts-badge hmcts-badge--red\">To be removed</span>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n",
|
|
2160
2182
|
styles: [".case-share-confirm__title{margin-bottom:0}.case-share-confirm__caption-area{border-bottom:1px solid #b1b4b6;padding-bottom:10px;display:inline-block;width:100%;clear:both}.case-share-confirm__caption{float:left}.case-share-confirm__change-link{float:right}.govuk-table-column-header{width:45%}.govuk-table-column-actions{width:10%}"]
|
|
2161
2183
|
}] }
|
|
2162
2184
|
];
|
|
@@ -2199,7 +2221,10 @@
|
|
|
2199
2221
|
this.shareCases$.subscribe(( /**
|
|
2200
2222
|
* @param {?} shareCases
|
|
2201
2223
|
* @return {?}
|
|
2202
|
-
*/function (shareCases) {
|
|
2224
|
+
*/function (shareCases) {
|
|
2225
|
+
_this.shareCases = shareCases;
|
|
2226
|
+
_this.caseCount = _this.shareCases.length;
|
|
2227
|
+
}));
|
|
2203
2228
|
};
|
|
2204
2229
|
/**
|
|
2205
2230
|
* @param {?} sharedCase
|
|
@@ -2211,6 +2236,7 @@
|
|
|
2211
2236
|
*/
|
|
2212
2237
|
function (sharedCase) {
|
|
2213
2238
|
this.unselect.emit(sharedCase);
|
|
2239
|
+
this.caseCount = this.shareCases.length;
|
|
2214
2240
|
};
|
|
2215
2241
|
/**
|
|
2216
2242
|
* @param {?} event
|
|
@@ -2237,7 +2263,7 @@
|
|
|
2237
2263
|
SelectedCaseListComponent.decorators = [
|
|
2238
2264
|
{ type: i0.Component, args: [{
|
|
2239
2265
|
selector: 'xuilib-selected-case-list',
|
|
2240
|
-
template: "<ng-container *ngIf=\"!toConfirm\">\n <xuilib-selected-case\n *ngFor=\"let sharedCase of (shareCases$ | async); trackBy: trackByCaseId\"\n [sharedCase]=\"sharedCase\"\n [removeUserFromCaseToggleOn]=\"removeUserFromCaseToggleOn\"\n (unselect)=\"onUnselect($event)\"\n (synchronizeStore)=\"onSynchronizeStore($event)\"\n >\n </xuilib-selected-case>\n</ng-container>\n\n<ng-container *ngIf=\"toConfirm\">\n <xuilib-selected-case-confirm\n *ngFor=\"let sharedCase of (shareCases$ | async); trackBy: trackByCaseId\"\n [sharedCase]=\"sharedCase\"\n [changeLink]=\"changeLink\">\n </xuilib-selected-case-confirm>\n</ng-container>\n",
|
|
2266
|
+
template: "<ng-container *ngIf=\"!toConfirm\">\n <xuilib-selected-case\n *ngFor=\"let sharedCase of (shareCases$ | async); trackBy: trackByCaseId\"\n [sharedCase]=\"sharedCase\"\n [caseCount]=\"caseCount\"\n [removeUserFromCaseToggleOn]=\"removeUserFromCaseToggleOn\"\n (unselect)=\"onUnselect($event)\"\n (synchronizeStore)=\"onSynchronizeStore($event)\"\n >\n </xuilib-selected-case>\n</ng-container>\n\n<ng-container *ngIf=\"toConfirm\">\n <xuilib-selected-case-confirm\n *ngFor=\"let sharedCase of (shareCases$ | async); trackBy: trackByCaseId\"\n [sharedCase]=\"sharedCase\"\n [changeLink]=\"changeLink\">\n </xuilib-selected-case-confirm>\n</ng-container>\n",
|
|
2241
2267
|
styles: [""]
|
|
2242
2268
|
}] }
|
|
2243
2269
|
];
|
|
@@ -2301,15 +2327,6 @@
|
|
|
2301
2327
|
this.combinedSortedShares = this.combineAndSortShares(sharedWith, pendingShares);
|
|
2302
2328
|
}
|
|
2303
2329
|
};
|
|
2304
|
-
/**
|
|
2305
|
-
* @return {?}
|
|
2306
|
-
*/
|
|
2307
|
-
SelectedCaseComponent.prototype.onUnselect = /**
|
|
2308
|
-
* @return {?}
|
|
2309
|
-
*/
|
|
2310
|
-
function () {
|
|
2311
|
-
this.unselect.emit(this.sharedCase);
|
|
2312
|
-
};
|
|
2313
2330
|
/**
|
|
2314
2331
|
* @param {?} c
|
|
2315
2332
|
* @return {?}
|
|
@@ -2532,7 +2549,7 @@
|
|
|
2532
2549
|
* @return {?}
|
|
2533
2550
|
*/
|
|
2534
2551
|
function (user, sharedCase) {
|
|
2535
|
-
this.stateService.requestUnshare(sharedCase.caseId
|
|
2552
|
+
this.stateService.requestUnshare(user, sharedCase.caseId);
|
|
2536
2553
|
this.synchronizeStore.emit(this.shareCases);
|
|
2537
2554
|
};
|
|
2538
2555
|
/**
|
|
@@ -2651,8 +2668,8 @@
|
|
|
2651
2668
|
SelectedCaseComponent.decorators = [
|
|
2652
2669
|
{ type: i0.Component, args: [{
|
|
2653
2670
|
selector: 'xuilib-selected-case',
|
|
2654
|
-
template: "<div id=\"{{buildElementId('govuk-accordion__section')}}\" class=\"govuk-accordion__section\">\n <div class=\"govuk-grid-row govuk-case-header\">\n <div class=\"govuk-grid-column-three-quarters\">\n <h3 id=\"{{buildElementId('case-title')}}\" class=\"govuk-case-title\">{{ sharedCase.caseTitle }}</h3>\n <h1 id=\"{{buildElementId('case-id')}}\" class=\"govuk-case-sub-title\">{{ sharedCase.caseId }}</h1>\n </div>\n <div class=\"govuk-grid-column-twenty-percent\">\n <button id=\"{{buildElementId('btn-deselect-case')}}\" class=\"govuk-button hmcts-button--secondary\" (click)=\"onDeselect(sharedCase)\" title=\"Deselect case\">Deselect case</button>\n </div>\n <div class=\"govuk-accordion__section-header govuk-grid-column-five-percent\">\n <div class=\"govuk-accordion__section-heading\">\n <button type=\"button\" id=\"{{buildElementId('accordion-with-summary-sections-heading')}}\"\n aria-controls=\"accordion-with-summary-sections-content-1\" class=\"govuk-accordion__section-button\"\n aria-describedby=\"accordion-with-summary-sections-summary-1\" aria-expanded=\"false\" title=\"Expand or Collapse\">\n <span class=\"govuk-accordion__icon\" aria-hidden=\"true\"></span></button>\n </div>\n </div>\n </div>\n <div id=\"{{buildElementId('accordion-with-summary-sections-content')}}\" class=\"govuk-accordion__section-content\"\n aria-labelledby=\"buildElementId('accordion-with-summary-sections-heading')\" >\n <div class=\"govuk-grid-row\" *ngIf=\"showNoUsersAccessInfo()\">\n <span id=\"{{buildElementId('access-info-no-user')}}\" class=\"govuk-div-align-left\">No users from your organisation currently have access to this case.</span>\n </div>\n <div class=\"govuk-grid-row\" *ngIf=\"showUserHasAccessInfo()\">\n <span id=\"{{buildElementId('access-info-has-users')}}\" class=\"govuk-div-align-left\">Users from your organisation with access to this case.</span>\n </div>\n <table class=\"govuk-table\" *ngIf=\"showUserAccessTable()\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th id=\"{{buildElementId('name-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Name</th>\n <th id=\"{{buildElementId('email-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Email address</th>\n <th id=\"{{buildElementId('action-heading')}}\" class=\"govuk-table__header govuk-table-column-actions\" scope=\"col\">Actions</th>\n <th id=\"{{buildElementId('label-heading')}}\" class=\"govuk-table__header govuk-table-column-label\" scope=\"col\"
|
|
2655
|
-
styles: [".govuk-case-header{border-top:1px solid #bfc1c3}.govuk-case-title{font-family:nta,Arial,sans-serif;font-size:24px;color:#005ea5;font-weight:700;padding-left:0}.govuk-case-sub-title{font-family:nta,Arial,sans-serif;font-size:1rem!important;color:#6f777b;font-weight:400;padding-left:0}.govuk-grid-row{margin-left:0;margin-right:0}.govuk-grid-column-three-quarters{padding-top:5px;padding-left:0}.govuk-grid-column-twenty-percent{box-sizing:border-box;padding-top:10px;width:20%;float:left}.govuk-grid-column-five-percent{box-sizing:border-box;padding-top:15px;width:5%;float:left}.govuk-table-column-header{width:
|
|
2671
|
+
template: "<div id=\"{{buildElementId('govuk-accordion__section')}}\" class=\"govuk-accordion__section\">\n <div class=\"govuk-grid-row govuk-case-header\">\n <div class=\"govuk-grid-column-three-quarters\">\n <h3 id=\"{{buildElementId('case-title')}}\" class=\"govuk-case-title\">{{ sharedCase.caseTitle }}</h3>\n <h1 id=\"{{buildElementId('case-id')}}\" class=\"govuk-case-sub-title\">{{ sharedCase.caseId }}</h1>\n </div>\n <div class=\"govuk-grid-column-twenty-percent\">\n <button *ngIf=\"caseCount > 1\"\n id=\"{{buildElementId('btn-deselect-case')}}\" \n class=\"govuk-button hmcts-button--secondary\" \n (click)=\"onDeselect(sharedCase)\" \n title=\"Deselect case\">Deselect case</button>\n </div>\n <div class=\"govuk-accordion__section-header govuk-grid-column-five-percent\">\n <div class=\"govuk-accordion__section-heading\">\n <button type=\"button\" id=\"{{buildElementId('accordion-with-summary-sections-heading')}}\"\n aria-controls=\"accordion-with-summary-sections-content-1\" class=\"govuk-accordion__section-button\"\n aria-describedby=\"accordion-with-summary-sections-summary-1\" aria-expanded=\"false\" title=\"Expand or Collapse\">\n <span class=\"govuk-accordion__icon\" aria-hidden=\"true\"></span></button>\n </div>\n </div>\n </div>\n <div id=\"{{buildElementId('accordion-with-summary-sections-content')}}\" class=\"govuk-accordion__section-content\"\n aria-labelledby=\"buildElementId('accordion-with-summary-sections-heading')\" >\n <div class=\"govuk-grid-row\" *ngIf=\"showNoUsersAccessInfo()\">\n <span id=\"{{buildElementId('access-info-no-user')}}\" class=\"govuk-div-align-left\">No users from your organisation currently have access to this case.</span>\n </div>\n <div class=\"govuk-grid-row\" *ngIf=\"showUserHasAccessInfo()\">\n <span id=\"{{buildElementId('access-info-has-users')}}\" class=\"govuk-div-align-left\">Users from your organisation with access to this case.</span>\n </div>\n <table class=\"govuk-table\" *ngIf=\"showUserAccessTable()\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th id=\"{{buildElementId('name-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Name</th>\n <th id=\"{{buildElementId('email-heading')}}\" class=\"govuk-table__header govuk-table-column-header\" scope=\"col\">Email address</th>\n <th id=\"{{buildElementId('action-heading')}}\" class=\"govuk-table__header govuk-table-column-actions\" scope=\"col\">Actions</th>\n <th id=\"{{buildElementId('label-heading')}}\" class=\"govuk-table__header govuk-table-column-label\" scope=\"col\">Status</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let user of combinedSortedShares; index as idx; trackBy: trackByUserId\">\n <td id=\"user-full-name-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.firstName + ' ' + user.lastName }}</td>\n <td id=\"user-email-{{ userIdSetter(canCancel(sharedCase.caseId, user) | async, idx) }}\" class=\"govuk-table__cell\">{{ user.email }}</td>\n <td class=\"govuk-table__cell\">\n <a *ngIf=\"canRemove(sharedCase.caseId, user) | async\" (click)=\"onRemove(user, sharedCase)\" href=\"javascript:void(0);\">Remove <span class=\"govuk-visually-hidden\">{{ user.firstName + ' ' + user.lastName }} from case</span></a>\n <a *ngIf=\"canCancel(sharedCase.caseId, user) | async\" (click)=\"onCancel(user, sharedCase)\" href=\"javascript:void(0);\">Cancel <span class=\"govuk-visually-hidden\">adding {{ user.firstName + ' ' + user.lastName }} to case</span></a>\n </td>\n <td class=\"govuk-table__cell\">\n <span *ngIf=\"isToBeRemoved(sharedCase.caseId, user) | async\" class=\"hmcts-badge hmcts-badge--red\">To be removed</span>\n <span *ngIf=\"isToBeAdded(sharedCase.caseId, user) | async\" class=\"hmcts-badge\">To be added</span>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n",
|
|
2672
|
+
styles: [".govuk-case-header{border-top:1px solid #bfc1c3}.govuk-case-title{font-family:nta,Arial,sans-serif;font-size:24px;color:#005ea5;font-weight:700;padding-left:0}.govuk-case-sub-title{font-family:nta,Arial,sans-serif;font-size:1rem!important;color:#6f777b;font-weight:400;padding-left:0}.govuk-grid-row{margin-left:0;margin-right:0}.govuk-grid-column-three-quarters{padding-top:5px;padding-left:0}.govuk-grid-column-twenty-percent{box-sizing:border-box;padding-top:10px;width:20%;float:left}.govuk-grid-column-five-percent{box-sizing:border-box;padding-top:15px;width:5%;float:left}.govuk-table-column-header{width:38%}.govuk-table-column-actions,.govuk-table-column-label{width:12%}.govuk-div-align-left{font-family:nta,Arial,sans-serif;font-size:1.1875rem!important;line-height:1.31579!important;text-align:left;margin-bottom:20px;padding-left:0;color:#0b0c0c}.govuk-accordion__section-header{border-top:0}.govuk-accordion__section-content{padding-top:0}"]
|
|
2656
2673
|
}] }
|
|
2657
2674
|
];
|
|
2658
2675
|
/** @nocollapse */
|
|
@@ -2666,6 +2683,7 @@
|
|
|
2666
2683
|
selectedUser: [{ type: i0.Input }],
|
|
2667
2684
|
opened: [{ type: i0.Input }],
|
|
2668
2685
|
removeUserFromCaseToggleOn: [{ type: i0.Input }],
|
|
2686
|
+
caseCount: [{ type: i0.Input }],
|
|
2669
2687
|
unselect: [{ type: i0.Output }],
|
|
2670
2688
|
synchronizeStore: [{ type: i0.Output }]
|
|
2671
2689
|
};
|
|
@@ -2942,6 +2960,18 @@
|
|
|
2942
2960
|
return ShareCaseConfirmComponent;
|
|
2943
2961
|
}());
|
|
2944
2962
|
|
|
2963
|
+
/**
|
|
2964
|
+
* @fileoverview added by tsickle
|
|
2965
|
+
* Generated from: lib/models/case-share.model.ts
|
|
2966
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2967
|
+
*/
|
|
2968
|
+
/** @enum {string} */
|
|
2969
|
+
var SharedCaseErrorMessages = {
|
|
2970
|
+
OneCaseMustBeSelected: "At least one case must be selected",
|
|
2971
|
+
NoChangesRequested: "You have not requested any changes to case sharing",
|
|
2972
|
+
OnePersonMustBeAssigned: "At least one person must be assigned to each case",
|
|
2973
|
+
};
|
|
2974
|
+
|
|
2945
2975
|
/**
|
|
2946
2976
|
* @fileoverview added by tsickle
|
|
2947
2977
|
* Generated from: lib/components/user-select/user-select.component.ts
|
|
@@ -3063,16 +3093,23 @@
|
|
|
3063
3093
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3064
3094
|
*/
|
|
3065
3095
|
var ShareCaseComponent = /** @class */ (function () {
|
|
3066
|
-
function ShareCaseComponent(stateService) {
|
|
3096
|
+
function ShareCaseComponent(stateService, router) {
|
|
3067
3097
|
this.stateService = stateService;
|
|
3098
|
+
this.router = router;
|
|
3068
3099
|
this.shareCases = []; // cases selected for sharing
|
|
3069
|
-
|
|
3100
|
+
this.continueAllowed = false;
|
|
3101
|
+
this.selectedUserToRemove = null;
|
|
3070
3102
|
this.removeUserFromCaseToggleOn = false;
|
|
3071
3103
|
this.users = []; // users of this organisation the cases can be shared with
|
|
3072
3104
|
// users of this organisation the cases can be shared with
|
|
3073
3105
|
this.confirmLink = '';
|
|
3106
|
+
this.cancelLink = '';
|
|
3107
|
+
this.showRemoveUsers = false;
|
|
3108
|
+
this.fnTitle = '';
|
|
3109
|
+
this.title = '';
|
|
3074
3110
|
this.unselect = new i0.EventEmitter();
|
|
3075
3111
|
this.synchronizeStore = new i0.EventEmitter();
|
|
3112
|
+
this.validationErrors = [];
|
|
3076
3113
|
}
|
|
3077
3114
|
/**
|
|
3078
3115
|
* @return {?}
|
|
@@ -3082,14 +3119,33 @@
|
|
|
3082
3119
|
*/
|
|
3083
3120
|
function () {
|
|
3084
3121
|
var _this = this;
|
|
3085
|
-
this.shareCases
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3122
|
+
this.shareCases$
|
|
3123
|
+
.pipe(operators.tap(( /**
|
|
3124
|
+
* @param {?} sharedCases
|
|
3125
|
+
* @return {?}
|
|
3126
|
+
*/function (sharedCases) {
|
|
3127
|
+
// Update the list of users assigned to at least one case
|
|
3128
|
+
_this.getAssignedUsers(sharedCases.filter(( /**
|
|
3129
|
+
* @param {?} sharedCase
|
|
3130
|
+
* @return {?}
|
|
3131
|
+
*/function (sharedCase) { return sharedCase.sharedWith && sharedCase.sharedWith.length > 0; })));
|
|
3132
|
+
})))
|
|
3133
|
+
.subscribe(( /**
|
|
3134
|
+
* @param {?} shareCases
|
|
3135
|
+
* @return {?}
|
|
3136
|
+
*/function (shareCases) {
|
|
3089
3137
|
_this.shareCases = shareCases;
|
|
3090
3138
|
_this.stateService.setCases(shareCases);
|
|
3139
|
+
// Set the config to be used by the xuilib-gov-uk-error-message component, in particular the element ID to
|
|
3140
|
+
// which the error message is associated
|
|
3141
|
+
if (shareCases) {
|
|
3142
|
+
_this.selectedCasesErrorMessageConfig = {
|
|
3143
|
+
id: shareCases.length > 0 ? 'cases' : 'noCaseDisplay'
|
|
3144
|
+
};
|
|
3145
|
+
}
|
|
3091
3146
|
}));
|
|
3092
3147
|
this.shareCases$ = this.stateService.state;
|
|
3148
|
+
this.shareCaseErrorMessage = { isInvalid: false, messages: [] };
|
|
3093
3149
|
};
|
|
3094
3150
|
/**
|
|
3095
3151
|
* @param {?} c
|
|
@@ -3100,8 +3156,16 @@
|
|
|
3100
3156
|
* @return {?}
|
|
3101
3157
|
*/
|
|
3102
3158
|
function (c) {
|
|
3103
|
-
this.
|
|
3104
|
-
this.stateService.
|
|
3159
|
+
this.validationErrors = [];
|
|
3160
|
+
if (this.stateService.getCases().length === 1) {
|
|
3161
|
+
this.validationErrors.push({ id: 'cases', message: SharedCaseErrorMessages.OneCaseMustBeSelected });
|
|
3162
|
+
this.shareCaseErrorMessage = { isInvalid: true, messages: [SharedCaseErrorMessages.OneCaseMustBeSelected] };
|
|
3163
|
+
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
|
|
3164
|
+
}
|
|
3165
|
+
else {
|
|
3166
|
+
this.unselect.emit(c);
|
|
3167
|
+
this.stateService.removeCase(c.caseId);
|
|
3168
|
+
}
|
|
3105
3169
|
};
|
|
3106
3170
|
/**
|
|
3107
3171
|
* @param {?} event
|
|
@@ -3139,6 +3203,21 @@
|
|
|
3139
3203
|
this.userSelect.clear();
|
|
3140
3204
|
}
|
|
3141
3205
|
this.synchronizeStore.emit(newSharedCases);
|
|
3206
|
+
// Update the list of assigned users (which includes pending users)
|
|
3207
|
+
this.getAssignedUsers(newSharedCases);
|
|
3208
|
+
};
|
|
3209
|
+
/**
|
|
3210
|
+
* @return {?}
|
|
3211
|
+
*/
|
|
3212
|
+
ShareCaseComponent.prototype.removeUser = /**
|
|
3213
|
+
* @return {?}
|
|
3214
|
+
*/
|
|
3215
|
+
function () {
|
|
3216
|
+
if (this.selectedUserToRemove) {
|
|
3217
|
+
/** @type {?} */
|
|
3218
|
+
var newSharedCases = this.stateService.requestUnshare(this.selectedUserToRemove);
|
|
3219
|
+
this.synchronizeStore.emit(newSharedCases);
|
|
3220
|
+
}
|
|
3142
3221
|
};
|
|
3143
3222
|
/**
|
|
3144
3223
|
* @return {?}
|
|
@@ -3150,14 +3229,25 @@
|
|
|
3150
3229
|
return this.selectedUser === null || this.shareCases.length === 0;
|
|
3151
3230
|
};
|
|
3152
3231
|
/**
|
|
3232
|
+
* Function originally used to set disabled state of "Continue" button, now called by the button click handler to
|
|
3233
|
+
* control whether navigation to the confirmation page is allowed. It is prevented if no changes have been made
|
|
3234
|
+
*/
|
|
3235
|
+
/**
|
|
3236
|
+
* Function originally used to set disabled state of "Continue" button, now called by the button click handler to
|
|
3237
|
+
* control whether navigation to the confirmation page is allowed. It is prevented if no changes have been made
|
|
3153
3238
|
* @return {?}
|
|
3154
3239
|
*/
|
|
3155
|
-
ShareCaseComponent.prototype.
|
|
3240
|
+
ShareCaseComponent.prototype.setContinueAllowed = /**
|
|
3241
|
+
* Function originally used to set disabled state of "Continue" button, now called by the button click handler to
|
|
3242
|
+
* control whether navigation to the confirmation page is allowed. It is prevented if no changes have been made
|
|
3156
3243
|
* @return {?}
|
|
3157
3244
|
*/
|
|
3158
3245
|
function () {
|
|
3159
|
-
|
|
3160
|
-
|
|
3246
|
+
var _this = this;
|
|
3247
|
+
// Always start with continueAllowed = false. This covers the scenario where a user might add someone for sharing
|
|
3248
|
+
// a case (so, continueAllowed = true), then removes the same user before trying to continue. This would
|
|
3249
|
+
// erroneously leave continueAllowed as true
|
|
3250
|
+
this.continueAllowed = false;
|
|
3161
3251
|
this.shareCases$.subscribe(( /**
|
|
3162
3252
|
* @param {?} shareCases
|
|
3163
3253
|
* @return {?}
|
|
@@ -3167,11 +3257,11 @@
|
|
|
3167
3257
|
for (var shareCases_1 = __values(shareCases), shareCases_1_1 = shareCases_1.next(); !shareCases_1_1.done; shareCases_1_1 = shareCases_1.next()) {
|
|
3168
3258
|
var caseState = shareCases_1_1.value;
|
|
3169
3259
|
if (caseState.pendingShares && caseState.pendingShares.length > 0) {
|
|
3170
|
-
|
|
3260
|
+
_this.continueAllowed = true;
|
|
3171
3261
|
break;
|
|
3172
3262
|
}
|
|
3173
3263
|
if (caseState.pendingUnshares && caseState.pendingUnshares.length > 0) {
|
|
3174
|
-
|
|
3264
|
+
_this.continueAllowed = true;
|
|
3175
3265
|
break;
|
|
3176
3266
|
}
|
|
3177
3267
|
}
|
|
@@ -3190,7 +3280,6 @@
|
|
|
3190
3280
|
}
|
|
3191
3281
|
}
|
|
3192
3282
|
}));
|
|
3193
|
-
return isDisabled;
|
|
3194
3283
|
};
|
|
3195
3284
|
/**
|
|
3196
3285
|
* @param {?} sharedCase
|
|
@@ -3230,17 +3319,127 @@
|
|
|
3230
3319
|
}
|
|
3231
3320
|
this.stateService.setCases(this.shareCases);
|
|
3232
3321
|
};
|
|
3322
|
+
/**
|
|
3323
|
+
* @return {?}
|
|
3324
|
+
*/
|
|
3325
|
+
ShareCaseComponent.prototype.onContinue = /**
|
|
3326
|
+
* @return {?}
|
|
3327
|
+
*/
|
|
3328
|
+
function () {
|
|
3329
|
+
this.setContinueAllowed();
|
|
3330
|
+
// If continuation is not allowed, set an error message
|
|
3331
|
+
if (!this.continueAllowed) {
|
|
3332
|
+
this.validationErrors = [];
|
|
3333
|
+
this.validationErrors.push({ id: 'cases', message: SharedCaseErrorMessages.NoChangesRequested });
|
|
3334
|
+
this.shareCaseErrorMessage = { isInvalid: true, messages: [SharedCaseErrorMessages.NoChangesRequested] };
|
|
3335
|
+
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
|
|
3336
|
+
}
|
|
3337
|
+
// Navigate to confirmation page only if allowed to continue
|
|
3338
|
+
if (this.continueAllowed) {
|
|
3339
|
+
// Check that no case is left unassigned; a user can be removed only if there is another current user, or if at
|
|
3340
|
+
// least one user is to be added. Prevent navigation to confirmation page if there is at least one case left in
|
|
3341
|
+
// an unassigned state
|
|
3342
|
+
if (this.hasCasesLeftUnassigned(this.shareCases)) {
|
|
3343
|
+
this.validationErrors = [];
|
|
3344
|
+
this.validationErrors.push({ id: 'cases', message: SharedCaseErrorMessages.OnePersonMustBeAssigned });
|
|
3345
|
+
this.shareCaseErrorMessage = { isInvalid: true, messages: [SharedCaseErrorMessages.OnePersonMustBeAssigned] };
|
|
3346
|
+
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
|
|
3347
|
+
}
|
|
3348
|
+
else {
|
|
3349
|
+
this.router.navigate([this.confirmLink]);
|
|
3350
|
+
}
|
|
3351
|
+
}
|
|
3352
|
+
};
|
|
3353
|
+
/**
|
|
3354
|
+
* Gets a unique list of all users that have been assigned, or are pending assigment to, at least one case
|
|
3355
|
+
* @param sharedCases The list of shared cases from which to get users these are shared with, or are to be shared with
|
|
3356
|
+
*/
|
|
3357
|
+
/**
|
|
3358
|
+
* Gets a unique list of all users that have been assigned, or are pending assigment to, at least one case
|
|
3359
|
+
* @param {?} sharedCases The list of shared cases from which to get users these are shared with, or are to be shared with
|
|
3360
|
+
* @return {?}
|
|
3361
|
+
*/
|
|
3362
|
+
ShareCaseComponent.prototype.getAssignedUsers = /**
|
|
3363
|
+
* Gets a unique list of all users that have been assigned, or are pending assigment to, at least one case
|
|
3364
|
+
* @param {?} sharedCases The list of shared cases from which to get users these are shared with, or are to be shared with
|
|
3365
|
+
* @return {?}
|
|
3366
|
+
*/
|
|
3367
|
+
function (sharedCases) {
|
|
3368
|
+
/** @type {?} */
|
|
3369
|
+
var users = [];
|
|
3370
|
+
sharedCases.forEach(( /**
|
|
3371
|
+
* @param {?} sharedCase
|
|
3372
|
+
* @return {?}
|
|
3373
|
+
*/function (sharedCase) {
|
|
3374
|
+
if (sharedCase.sharedWith) {
|
|
3375
|
+
sharedCase.sharedWith.forEach(( /**
|
|
3376
|
+
* @param {?} user
|
|
3377
|
+
* @return {?}
|
|
3378
|
+
*/function (user) {
|
|
3379
|
+
if (!users.some(( /**
|
|
3380
|
+
* @param {?} existingUser
|
|
3381
|
+
* @return {?}
|
|
3382
|
+
*/function (existingUser) { return user.idamId === existingUser.idamId; }))) {
|
|
3383
|
+
users.push(user);
|
|
3384
|
+
}
|
|
3385
|
+
}));
|
|
3386
|
+
}
|
|
3387
|
+
if (sharedCase.pendingShares) {
|
|
3388
|
+
sharedCase.pendingShares.forEach(( /**
|
|
3389
|
+
* @param {?} user
|
|
3390
|
+
* @return {?}
|
|
3391
|
+
*/function (user) {
|
|
3392
|
+
if (!users.some(( /**
|
|
3393
|
+
* @param {?} existingUser
|
|
3394
|
+
* @return {?}
|
|
3395
|
+
*/function (existingUser) { return user.idamId === existingUser.idamId; }))) {
|
|
3396
|
+
users.push(user);
|
|
3397
|
+
}
|
|
3398
|
+
}));
|
|
3399
|
+
}
|
|
3400
|
+
}));
|
|
3401
|
+
this.assignedUsers = users;
|
|
3402
|
+
};
|
|
3403
|
+
/**
|
|
3404
|
+
* Checks if any shared cases have been left unassigned. This occurs if a shared case has a number of pending
|
|
3405
|
+
* unshares equal to the number of current shares, and there are no pending shares.
|
|
3406
|
+
* @param sharedCases The array of shared cases to check
|
|
3407
|
+
* @returns `true` if at least one case has the condition described above; `false` otherwise
|
|
3408
|
+
*/
|
|
3409
|
+
/**
|
|
3410
|
+
* Checks if any shared cases have been left unassigned. This occurs if a shared case has a number of pending
|
|
3411
|
+
* unshares equal to the number of current shares, and there are no pending shares.
|
|
3412
|
+
* @param {?} sharedCases The array of shared cases to check
|
|
3413
|
+
* @return {?} `true` if at least one case has the condition described above; `false` otherwise
|
|
3414
|
+
*/
|
|
3415
|
+
ShareCaseComponent.prototype.hasCasesLeftUnassigned = /**
|
|
3416
|
+
* Checks if any shared cases have been left unassigned. This occurs if a shared case has a number of pending
|
|
3417
|
+
* unshares equal to the number of current shares, and there are no pending shares.
|
|
3418
|
+
* @param {?} sharedCases The array of shared cases to check
|
|
3419
|
+
* @return {?} `true` if at least one case has the condition described above; `false` otherwise
|
|
3420
|
+
*/
|
|
3421
|
+
function (sharedCases) {
|
|
3422
|
+
return sharedCases.some(( /**
|
|
3423
|
+
* @param {?} sharedCase
|
|
3424
|
+
* @return {?}
|
|
3425
|
+
*/function (sharedCase) {
|
|
3426
|
+
return sharedCase.pendingUnshares && sharedCase.sharedWith &&
|
|
3427
|
+
sharedCase.pendingUnshares.length === sharedCase.sharedWith.length &&
|
|
3428
|
+
(!sharedCase.pendingShares || sharedCase.pendingShares.length === 0);
|
|
3429
|
+
}));
|
|
3430
|
+
};
|
|
3233
3431
|
ShareCaseComponent.decorators = [
|
|
3234
3432
|
{ type: i0.Component, args: [{
|
|
3235
3433
|
selector: 'xuilib-share-case',
|
|
3236
|
-
template: "<div id=\"add-user\">\n <label class=\"govuk-label govuk-!-font-weight-bold\" for=\"add-user-input\">
|
|
3237
|
-
styles: [""]
|
|
3434
|
+
template: "<xuilib-hmcts-error-summary\n [errorMessages]=\"validationErrors\"\n [header]=\"'There is a problem'\"\n></xuilib-hmcts-error-summary>\n<h1 *ngIf=\"title\" class=\"govuk-heading-xl govuk-!-margin-top-2\">\n <span *ngIf=\"fnTitle\" class=\"govuk-caption-xl\">{{fnTitle}}</span>\n {{title}}\n</h1>\n<div id=\"add-user\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-!-font-weight-bold\" for=\"add-user-input\">{{addUserLabel}}</label>\n <span id=\"add-user-hint\" class=\"govuk-hint\">\n Search by name or email address. You can share access with as many people as you need.\n </span>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <xuilib-user-select\n id=\"add-user-input\"\n aria-describedby=\"add-user-hint\"\n [users]=\"users\"\n (selected)=\"onSelectedUser($event)\">\n </xuilib-user-select>\n </div>\n <div class=\"govuk-grid-column-one-thirds\">\n <button id=\"btn-add-user\" (click)=\"addUser()\" class=\"govuk-button govuk-button--secondary\" [disabled]=\"isDisabledAdd()\" title=\"Add user to selected cases\">Add</button>\n </div>\n </div>\n <details id=\"add-user-help\" class=\"govuk-details\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span id=\"content-why-can-not-find-email\" class=\"govuk-details__summary-text\">\n Can't find an email address?\n </span>\n </summary>\n <div id=\"content-reason-can-not-find-email\" class=\"govuk-details__text\">\n If you can't find your colleague's email address, they will need to complete their registration. Contact your\n administrator for help.\n </div>\n </details>\n </div>\n <div class=\"govuk-form-group\" *ngIf=\"showRemoveUsers\">\n <label class=\"govuk-label govuk-!-font-weight-bold\" for=\"remove-user-input\">Remove a person from all cases</label>\n <span id=\"remove-user-hint\" class=\"govuk-hint\">\n Select a person to remove them from all selected cases.\n </span>\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <select [(ngModel)]=\"selectedUserToRemove\" class=\"govuk-select\" id=\"remove-user-input\" aria-describedby=\"remove-user-hint\">\n <option [ngValue]=\"null\" selected>Select a person</option>\n <option *ngFor=\"let user of assignedUsers\" [ngValue]=\"user\">{{user.firstName}} {{user.lastName}} - {{user.email}}</option>\n </select>\n </div>\n <div class=\"govuk-grid-column-one-thirds\">\n <button id=\"btn-remove-user\" (click)=\"removeUser()\" class=\"govuk-button govuk-button--secondary\" title=\"Remove user from selected cases\">Remove</button>\n </div>\n </div>\n </div>\n</div>\n\n<div id=\"cases\" [ngClass]=\"{'govuk-form-group--error': shareCaseErrorMessage.messages && shareCaseErrorMessage.messages.length > 0}\">\n <h3 id=\"title-selected-cases\" class=\"govuk-heading-m\">Selected cases</h3>\n <xuilib-gov-uk-error-message [config]=\"selectedCasesErrorMessageConfig\" [errorMessage]=\"shareCaseErrorMessage\"></xuilib-gov-uk-error-message>\n <div *ngIf=\"shareCases && shareCases.length > 0\" class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-with-summary-sections\">\n <xuilib-selected-case-list\n [shareCases$]=\"shareCases$\"\n [removeUserFromCaseToggleOn]=\"removeUserFromCaseToggleOn\"\n (unselect)=\"onUnselect($event)\"\n (synchronizeStore)=\"onSynchronizeStore($event)\"\n >\n </xuilib-selected-case-list>\n </div>\n\n <div id=\"noCaseDisplay\" *ngIf=\"shareCases && shareCases.length === 0\" class=\"govuk-hint\"\n [ngClass]=\"{'govuk-form-group--error': shareCaseErrorMessage.messages && shareCaseErrorMessage.messages.length > 0}\">\n No cases to display.\n </div>\n\n</div>\n\n<div id=\"share-case-nav\" class=\"govuk-button-group\">\n <button id=\"btn-continue\" class=\"govuk-button\" data-module=\"govuk-button\" (click)=\"onContinue()\" title=\"Continue\">Continue</button>\n <button id=\"btn-cancel\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\" title=\"Cancel\" [routerLink]=\"cancelLink\">Cancel</button>\n</div>\n",
|
|
3435
|
+
styles: ["select{width:100%}"]
|
|
3238
3436
|
}] }
|
|
3239
3437
|
];
|
|
3240
3438
|
/** @nocollapse */
|
|
3241
3439
|
ShareCaseComponent.ctorParameters = function () {
|
|
3242
3440
|
return [
|
|
3243
|
-
{ type: CaseSharingStateService }
|
|
3441
|
+
{ type: CaseSharingStateService },
|
|
3442
|
+
{ type: i2$2.Router }
|
|
3244
3443
|
];
|
|
3245
3444
|
};
|
|
3246
3445
|
ShareCaseComponent.propDecorators = {
|
|
@@ -3248,6 +3447,11 @@
|
|
|
3248
3447
|
shareCases$: [{ type: i0.Input }],
|
|
3249
3448
|
users: [{ type: i0.Input }],
|
|
3250
3449
|
confirmLink: [{ type: i0.Input }],
|
|
3450
|
+
cancelLink: [{ type: i0.Input }],
|
|
3451
|
+
addUserLabel: [{ type: i0.Input }],
|
|
3452
|
+
showRemoveUsers: [{ type: i0.Input }],
|
|
3453
|
+
fnTitle: [{ type: i0.Input }],
|
|
3454
|
+
title: [{ type: i0.Input }],
|
|
3251
3455
|
unselect: [{ type: i0.Output }],
|
|
3252
3456
|
synchronizeStore: [{ type: i0.Output }],
|
|
3253
3457
|
userSelect: [{ type: i0.ViewChild, args: [UserSelectComponent,] }]
|
|
@@ -3833,6 +4037,7 @@
|
|
|
3833
4037
|
JUDICIAL: "Judicial",
|
|
3834
4038
|
CASEWORKER: "Legal Ops",
|
|
3835
4039
|
ADMIN: "Admin",
|
|
4040
|
+
CTSC: "CTSC User",
|
|
3836
4041
|
ALL: "All",
|
|
3837
4042
|
};
|
|
3838
4043
|
/** @enum {string} */
|
|
@@ -3840,6 +4045,7 @@
|
|
|
3840
4045
|
JUDICIAL: "JUDICIAL",
|
|
3841
4046
|
CASEWORKER: "LEGAL_OPERATIONS",
|
|
3842
4047
|
ADMIN: "ADMIN",
|
|
4048
|
+
CTSC: "CTSC",
|
|
3843
4049
|
ALL: "ALL",
|
|
3844
4050
|
};
|
|
3845
4051
|
|
|
@@ -3854,6 +4060,12 @@
|
|
|
3854
4060
|
return RadioFilterFieldConfig;
|
|
3855
4061
|
}());
|
|
3856
4062
|
|
|
4063
|
+
/**
|
|
4064
|
+
* @fileoverview added by tsickle
|
|
4065
|
+
* Generated from: lib/models/index.ts
|
|
4066
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4067
|
+
*/
|
|
4068
|
+
|
|
3857
4069
|
/**
|
|
3858
4070
|
* @fileoverview added by tsickle
|
|
3859
4071
|
* Generated from: lib/services/locations/location.service.ts
|
|
@@ -5426,7 +5638,7 @@
|
|
|
5426
5638
|
* @return {?}
|
|
5427
5639
|
*/
|
|
5428
5640
|
function (selectedJudicial) {
|
|
5429
|
-
return selectedJudicial.
|
|
5641
|
+
return selectedJudicial.fullName + " (" + selectedJudicial.emailId + ")";
|
|
5430
5642
|
};
|
|
5431
5643
|
/**
|
|
5432
5644
|
* @param {?} term
|
|
@@ -7935,6 +8147,7 @@
|
|
|
7935
8147
|
exports.dateValidator = dateValidator;
|
|
7936
8148
|
exports.radioGroupValidator = radioGroupValidator;
|
|
7937
8149
|
exports.HmctsSubNavigationComponent = HmctsSubNavigationComponent;
|
|
8150
|
+
exports.SharedCaseErrorMessages = SharedCaseErrorMessages;
|
|
7938
8151
|
exports.BadgeColour = BadgeColour;
|
|
7939
8152
|
exports.DateBadgeColour = DateBadgeColour;
|
|
7940
8153
|
exports.SECONDS_IN_A_DAY = SECONDS_IN_A_DAY;
|