@hmcts/ccd-case-ui-toolkit 7.3.38-exui-4089 → 7.3.38-exui-4090

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.
@@ -993,11 +993,11 @@ class NotificationBannerComponent {
993
993
  i0.ɵɵtemplate(0, NotificationBannerComponent_div_0_Template, 14, 10, "div", 0);
994
994
  } if (rf & 2) {
995
995
  i0.ɵɵproperty("ngIf", ctx.notificationBannerConfig);
996
- } }, dependencies: [i5.NgClass, i5.NgIf, i5.NgSwitch, i5.NgSwitchCase], styles: [".govuk-notification-banner[_ngcontent-%COMP%] .govuk-notification-banner__content[_ngcontent-%COMP%] .govuk-notification-banner__heading[_ngcontent-%COMP%]{margin-left:0;max-width:fit-content}.govuk-notification-banner[_ngcontent-%COMP%] .govuk-notification-banner__content[_ngcontent-%COMP%] .govuk-notification-banner__heading[_ngcontent-%COMP%] .govuk-notification-banner__link[_ngcontent-%COMP%]{margin-left:10px}.notification-banner-information[_ngcontent-%COMP%], .notification-banner-error[_ngcontent-%COMP%]{background-color:#d4351c;border:5px solid #d4351c}.notification-banner-warning[_ngcontent-%COMP%]{background-color:#912b88;border:5px solid #912b88}.notification-banner-success[_ngcontent-%COMP%]{background-color:#006435;border:5px solid #006435}"] });
996
+ } }, dependencies: [i5.NgClass, i5.NgIf, i5.NgSwitch, i5.NgSwitchCase], styles: [".govuk-notification-banner[_ngcontent-%COMP%] .govuk-notification-banner__content[_ngcontent-%COMP%] .govuk-notification-banner__heading[_ngcontent-%COMP%]{margin-left:0;max-width:900px}.govuk-notification-banner[_ngcontent-%COMP%] .govuk-notification-banner__content[_ngcontent-%COMP%] .govuk-notification-banner__heading[_ngcontent-%COMP%] .govuk-notification-banner__link[_ngcontent-%COMP%]{margin-left:10px}.notification-banner-information[_ngcontent-%COMP%], .notification-banner-error[_ngcontent-%COMP%]{background-color:#d4351c;border:5px solid #d4351c}.notification-banner-warning[_ngcontent-%COMP%]{background-color:#912b88;border:5px solid #912b88}.notification-banner-success[_ngcontent-%COMP%]{background-color:#006435;border:5px solid #006435}"] });
997
997
  }
998
998
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NotificationBannerComponent, [{
999
999
  type: Component,
1000
- args: [{ selector: 'ccd-notification-banner', standalone: false, template: "<div *ngIf=\"notificationBannerConfig\"\n class=\"govuk-notification-banner\"\n [ngClass]=\"notificationBannerConfig.headerClass\"\n role=\"region\"\n aria-labelledby=\"govuk-notification-banner-title\"\n data-module=\"govuk-notification-banner\">\n\n <div class=\"govuk-notification-banner__header\">\n <h2 class=\"govuk-notification-banner__title\" id=\"govuk-notification-banner-title\">\n {{notificationBannerConfig.headingText}}\n </h2>\n </div>\n <div class=\"govuk-notification-banner__content\">\n <p class=\"govuk-notification-banner__heading\">\n <ng-container [ngSwitch]=\"notificationBannerConfig.bannerType\">\n <ng-container *ngSwitchCase=\"notificationBannerType.WARNING\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"36\" width=\"36\">\n <path d=\"M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z\"></path>\n </svg>\n </ng-container>\n <ng-container *ngSwitchCase=\"notificationBannerType.ERROR\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"36\" width=\"36\">\n <path d=\"M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z\"></path>\n </svg>\n </ng-container>\n <ng-container *ngSwitchCase=\"notificationBannerType.SUCCESS\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"36\" width=\"36\">\n <path d=\"M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z\"></path>\n </svg>\n </ng-container>\n <ng-container *ngSwitchCase=\"notificationBannerType.INFORMATION\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"36\" width=\"36\">\n <path d=\"M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z\"></path>\n </svg>\n </ng-container>\n </ng-container>\n {{notificationBannerConfig.description}}\n <a *ngIf=\"notificationBannerConfig.showLink && !notificationBannerConfig.triggerOutputEvent\"\n class=\"govuk-notification-banner__link\"\n href=\"{{notificationBannerConfig.linkUrl}}\">{{notificationBannerConfig.linkText}}</a>\n <a *ngIf=\"notificationBannerConfig.showLink && notificationBannerConfig.triggerOutputEvent\"\n class=\"govuk-notification-banner__link\"\n href=\"#\"\n (click)=\"onLinkClick(notificationBannerConfig.triggerOutputEventText); $event.preventDefault()\">{{notificationBannerConfig.linkText}}</a>\n </p>\n </div>\n</div>\n", styles: [".govuk-notification-banner .govuk-notification-banner__content .govuk-notification-banner__heading{margin-left:0;max-width:fit-content}.govuk-notification-banner .govuk-notification-banner__content .govuk-notification-banner__heading .govuk-notification-banner__link{margin-left:10px}.notification-banner-information,.notification-banner-error{background-color:#d4351c;border:5px solid #d4351c}.notification-banner-warning{background-color:#912b88;border:5px solid #912b88}.notification-banner-success{background-color:#006435;border:5px solid #006435}\n"] }]
1000
+ args: [{ selector: 'ccd-notification-banner', standalone: false, template: "<div *ngIf=\"notificationBannerConfig\"\n class=\"govuk-notification-banner\"\n [ngClass]=\"notificationBannerConfig.headerClass\"\n role=\"region\"\n aria-labelledby=\"govuk-notification-banner-title\"\n data-module=\"govuk-notification-banner\">\n\n <div class=\"govuk-notification-banner__header\">\n <h2 class=\"govuk-notification-banner__title\" id=\"govuk-notification-banner-title\">\n {{notificationBannerConfig.headingText}}\n </h2>\n </div>\n <div class=\"govuk-notification-banner__content\">\n <p class=\"govuk-notification-banner__heading\">\n <ng-container [ngSwitch]=\"notificationBannerConfig.bannerType\">\n <ng-container *ngSwitchCase=\"notificationBannerType.WARNING\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"36\" width=\"36\">\n <path d=\"M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z\"></path>\n </svg>\n </ng-container>\n <ng-container *ngSwitchCase=\"notificationBannerType.ERROR\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"36\" width=\"36\">\n <path d=\"M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z\"></path>\n </svg>\n </ng-container>\n <ng-container *ngSwitchCase=\"notificationBannerType.SUCCESS\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"36\" width=\"36\">\n <path d=\"M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z\"></path>\n </svg>\n </ng-container>\n <ng-container *ngSwitchCase=\"notificationBannerType.INFORMATION\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"36\" width=\"36\">\n <path d=\"M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z\"></path>\n </svg>\n </ng-container>\n </ng-container>\n {{notificationBannerConfig.description}}\n <a *ngIf=\"notificationBannerConfig.showLink && !notificationBannerConfig.triggerOutputEvent\"\n class=\"govuk-notification-banner__link\"\n href=\"{{notificationBannerConfig.linkUrl}}\">{{notificationBannerConfig.linkText}}</a>\n <a *ngIf=\"notificationBannerConfig.showLink && notificationBannerConfig.triggerOutputEvent\"\n class=\"govuk-notification-banner__link\"\n href=\"#\"\n (click)=\"onLinkClick(notificationBannerConfig.triggerOutputEventText); $event.preventDefault()\">{{notificationBannerConfig.linkText}}</a>\n </p>\n </div>\n</div>\n", styles: [".govuk-notification-banner .govuk-notification-banner__content .govuk-notification-banner__heading{margin-left:0;max-width:900px}.govuk-notification-banner .govuk-notification-banner__content .govuk-notification-banner__heading .govuk-notification-banner__link{margin-left:10px}.notification-banner-information,.notification-banner-error{background-color:#d4351c;border:5px solid #d4351c}.notification-banner-warning{background-color:#912b88;border:5px solid #912b88}.notification-banner-success{background-color:#006435;border:5px solid #006435}\n"] }]
1001
1001
  }], null, { notificationBannerConfig: [{
1002
1002
  type: Input
1003
1003
  }], linkClicked: [{
@@ -13357,6 +13357,54 @@ class CaseFileViewFieldComponent {
13357
13357
  }], () => [{ type: i0.ElementRef }, { type: i1$1.ActivatedRoute }, { type: CaseFileViewService }, { type: DocumentManagementService }, { type: LoadingService }, { type: SessionStorageService }, { type: WindowService }, { type: CaseNotifier }, { type: AbstractAppConfig }], null); })();
13358
13358
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseFileViewFieldComponent, { className: "CaseFileViewFieldComponent", filePath: "lib/shared/components/palette/case-file-view/case-file-view-field.component.ts", lineNumber: 18 }); })();
13359
13359
 
13360
+ const PVP_FLAG_CODE = 'PF0021';
13361
+ const PVP_DISPLAY_TEXT = 'POTENTIALLY VIOLENT PERSON';
13362
+ function isPvpFlag(flagDetail) {
13363
+ return flagDetail?.flagCode === PVP_FLAG_CODE;
13364
+ }
13365
+ function hasPvpFlag(flagsWithFormGroupPath) {
13366
+ return !!flagsWithFormGroupPath?.flags?.details?.some(isPvpFlag);
13367
+ }
13368
+ function isActivePvpFlag(flagDetail) {
13369
+ return isPvpFlag(flagDetail) && flagDetail?.status === CaseFlagStatus.ACTIVE;
13370
+ }
13371
+ function hasActivePvpFlag(flagsWithFormGroupPath) {
13372
+ return !!flagsWithFormGroupPath?.flags?.details?.some(isActivePvpFlag);
13373
+ }
13374
+ function prioritisePvpFlags(flagDetails = []) {
13375
+ const activePvpFlags = [];
13376
+ const remainingFlags = [];
13377
+ flagDetails.forEach((flagDetail) => {
13378
+ if (isActivePvpFlag(flagDetail)) {
13379
+ activePvpFlags.push(flagDetail);
13380
+ }
13381
+ else {
13382
+ remainingFlags.push(flagDetail);
13383
+ }
13384
+ });
13385
+ return [...activePvpFlags, ...remainingFlags];
13386
+ }
13387
+ function prioritisePvpParties(partyFlagsData = []) {
13388
+ const pvpParties = [];
13389
+ const nonPvpParties = [];
13390
+ partyFlagsData.forEach((partyFlags) => {
13391
+ const prioritisedPartyFlags = {
13392
+ ...partyFlags,
13393
+ flags: {
13394
+ ...partyFlags.flags,
13395
+ details: partyFlags?.flags?.details ? prioritisePvpFlags(partyFlags.flags.details) : partyFlags?.flags?.details
13396
+ }
13397
+ };
13398
+ if (hasActivePvpFlag(prioritisedPartyFlags)) {
13399
+ pvpParties.push(prioritisedPartyFlags);
13400
+ }
13401
+ else {
13402
+ nonPvpParties.push(prioritisedPartyFlags);
13403
+ }
13404
+ });
13405
+ return [...pvpParties, ...nonPvpParties];
13406
+ }
13407
+
13360
13408
  function ReadCaseFlagFieldComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
13361
13409
  const _r1 = i0.ɵɵgetCurrentView();
13362
13410
  i0.ɵɵelementContainerStart(0);
@@ -13523,6 +13571,8 @@ class ReadCaseFlagFieldComponent extends AbstractFieldReadComponent {
13523
13571
  this.partyLevelCaseFlagData.filter((f) => !f.flags.groupId).forEach((f) => uniquePartyData.push(f));
13524
13572
  this.partyLevelCaseFlagData = uniquePartyData;
13525
13573
  }
13574
+ // Prioritise PVP flags (PF0021) for display, keeping existing non-PVP ordering stable.
13575
+ this.partyLevelCaseFlagData = prioritisePvpParties(this.partyLevelCaseFlagData);
13526
13576
  // There will be only one case-level flags instance containing all case-level flag details
13527
13577
  this.caseLevelCaseFlagData = this.flagsData.find((instance) => instance.pathToFlagsFormGroup === this.caseLevelCaseFlagsFieldId);
13528
13578
  }
@@ -13625,7 +13675,7 @@ class ReadCaseFlagFieldComponent extends AbstractFieldReadComponent {
13625
13675
  type: Component,
13626
13676
  args: [{ selector: 'ccd-read-case-flag-field', standalone: false, template: "<ng-container *ngIf=\"context === paletteContext.CHECK_YOUR_ANSWER\">\n <ccd-case-flag-summary-list\n [flagForSummaryDisplay]=\"flagForSummaryDisplay\"\n [displayContextParameter]=\"displayContextParameter\"\n (changeButtonEmitter)=\"navigateBackToForm($event)\">\n </ccd-case-flag-summary-list>\n</ng-container>\n\n<ng-container *ngIf=\"context !== paletteContext.CHECK_YOUR_ANSWER\">\n <ng-container [ngSwitch]=\"displayContextParameter\">\n <ng-container *ngSwitchCase=\"caseFlagDisplayContextParameter.READ_EXTERNAL\">\n <h2 id=\"read-case-flag-title\" class=\"govuk-heading-l\">\n {{ 'Support requested' | rpxTranslate }}\n </h2>\n\n <div *ngFor=\"let flagData of partyLevelCaseFlagData\">\n <ccd-case-flag-table *ngIf=\"flagData.flags.partyName\"\n [tableCaption]=\"''\"\n [flagData]=\"flagData\"\n [firstColumnHeader]=\"flagData.flags.partyName\"\n [caseFlagsExternalUser]=\"caseFlagsExternalUser\"\n ></ccd-case-flag-table>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <h2 id=\"read-case-flag-title\" class=\"govuk-heading-l\">\n {{ 'Case flags' | rpxTranslate }}\n </h2>\n\n <div *ngFor=\"let flagData of partyLevelCaseFlagData\">\n <ccd-case-flag-table *ngIf=\"flagData.flags.partyName\"\n [tableCaption]=\"flagData.flags.partyName\"\n [flagData]=\"flagData\"\n [firstColumnHeader]=\"'Party level flags' | rpxTranslate\"\n ></ccd-case-flag-table>\n </div>\n <div *ngIf=\"caseLevelCaseFlagData\">\n <ccd-case-flag-table\n [tableCaption]=\"'Case level flags' | rpxTranslate\"\n [flagData]=\"caseLevelCaseFlagData\"\n [firstColumnHeader]=\"'Case flags' | rpxTranslate\"\n ></ccd-case-flag-table>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [".govuk-heading-l{margin-top:30px}\n"] }]
13627
13677
  }], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: CaseFlagStateService }], null); })();
13628
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadCaseFlagFieldComponent, { className: "ReadCaseFlagFieldComponent", filePath: "lib/shared/components/palette/case-flag/read-case-flag-field.component.ts", lineNumber: 17 }); })();
13678
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadCaseFlagFieldComponent, { className: "ReadCaseFlagFieldComponent", filePath: "lib/shared/components/palette/case-flag/read-case-flag-field.component.ts", lineNumber: 18 }); })();
13629
13679
 
13630
13680
  function WriteCaseFlagFieldComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
13631
13681
  const _r1 = i0.ɵɵgetCurrentView();
@@ -26351,8 +26401,33 @@ function CaseFlagTableComponent_table_0_tr_19_Template(rf, ctx) { if (rf & 1) {
26351
26401
  i0.ɵɵadvance(2);
26352
26402
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "None"));
26353
26403
  } }
26354
- function CaseFlagTableComponent_table_0_tbody_20_tr_1_div_15_Template(rf, ctx) { if (rf & 1) {
26355
- i0.ɵɵelementStart(0, "div")(1, "span", 23);
26404
+ function CaseFlagTableComponent_table_0_tbody_20_tr_1_div_2_Template(rf, ctx) { if (rf & 1) {
26405
+ i0.ɵɵelementStart(0, "div");
26406
+ i0.ɵɵnamespaceSVG();
26407
+ i0.ɵɵelementStart(1, "svg", 23);
26408
+ i0.ɵɵelement(2, "path", 24);
26409
+ i0.ɵɵelementEnd();
26410
+ i0.ɵɵnamespaceHTML();
26411
+ i0.ɵɵelementStart(3, "div");
26412
+ i0.ɵɵtext(4);
26413
+ i0.ɵɵelementEnd()();
26414
+ } if (rf & 2) {
26415
+ const ctx_r0 = i0.ɵɵnextContext(4);
26416
+ i0.ɵɵadvance(4);
26417
+ i0.ɵɵtextInterpolate(ctx_r0.pvpDisplayText);
26418
+ } }
26419
+ function CaseFlagTableComponent_table_0_tbody_20_tr_1_div_3_Template(rf, ctx) { if (rf & 1) {
26420
+ i0.ɵɵelementStart(0, "div");
26421
+ i0.ɵɵtext(1);
26422
+ i0.ɵɵpipe(2, "flagFieldDisplay");
26423
+ i0.ɵɵelementEnd();
26424
+ } if (rf & 2) {
26425
+ const flagDetail_r2 = i0.ɵɵnextContext().$implicit;
26426
+ i0.ɵɵadvance();
26427
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, flagDetail_r2, "name"));
26428
+ } }
26429
+ function CaseFlagTableComponent_table_0_tbody_20_tr_1_div_14_Template(rf, ctx) { if (rf & 1) {
26430
+ i0.ɵɵelementStart(0, "div")(1, "span", 25);
26356
26431
  i0.ɵɵtext(2);
26357
26432
  i0.ɵɵelementEnd()();
26358
26433
  } if (rf & 2) {
@@ -26360,8 +26435,8 @@ function CaseFlagTableComponent_table_0_tbody_20_tr_1_div_15_Template(rf, ctx) {
26360
26435
  i0.ɵɵadvance(2);
26361
26436
  i0.ɵɵtextInterpolate1("Update Reason: ", flagDetail_r2.flagUpdateComment);
26362
26437
  } }
26363
- function CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_23_Template(rf, ctx) { if (rf & 1) {
26364
- i0.ɵɵelementStart(0, "strong", 24);
26438
+ function CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_22_Template(rf, ctx) { if (rf & 1) {
26439
+ i0.ɵɵelementStart(0, "strong", 26);
26365
26440
  i0.ɵɵtext(1);
26366
26441
  i0.ɵɵpipe(2, "rpxTranslate");
26367
26442
  i0.ɵɵelementEnd();
@@ -26369,8 +26444,8 @@ function CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_23_Template(rf, ctx
26369
26444
  i0.ɵɵadvance();
26370
26445
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Active"));
26371
26446
  } }
26372
- function CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_24_Template(rf, ctx) { if (rf & 1) {
26373
- i0.ɵɵelementStart(0, "strong", 25);
26447
+ function CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_23_Template(rf, ctx) { if (rf & 1) {
26448
+ i0.ɵɵelementStart(0, "strong", 27);
26374
26449
  i0.ɵɵtext(1);
26375
26450
  i0.ɵɵpipe(2, "rpxTranslate");
26376
26451
  i0.ɵɵelementEnd();
@@ -26378,8 +26453,8 @@ function CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_24_Template(rf, ctx
26378
26453
  i0.ɵɵadvance();
26379
26454
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Inactive"));
26380
26455
  } }
26381
- function CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_25_Template(rf, ctx) { if (rf & 1) {
26382
- i0.ɵɵelementStart(0, "strong", 26);
26456
+ function CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_24_Template(rf, ctx) { if (rf & 1) {
26457
+ i0.ɵɵelementStart(0, "strong", 28);
26383
26458
  i0.ɵɵtext(1);
26384
26459
  i0.ɵɵpipe(2, "rpxTranslate");
26385
26460
  i0.ɵɵelementEnd();
@@ -26387,8 +26462,8 @@ function CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_25_Template(rf, ctx
26387
26462
  i0.ɵɵadvance();
26388
26463
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Requested"));
26389
26464
  } }
26390
- function CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_26_Template(rf, ctx) { if (rf & 1) {
26391
- i0.ɵɵelementStart(0, "strong", 27);
26465
+ function CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_25_Template(rf, ctx) { if (rf & 1) {
26466
+ i0.ɵɵelementStart(0, "strong", 29);
26392
26467
  i0.ɵɵtext(1);
26393
26468
  i0.ɵɵpipe(2, "rpxTranslate");
26394
26469
  i0.ɵɵelementEnd();
@@ -26397,52 +26472,52 @@ function CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_26_Template(rf, ctx
26397
26472
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "Not approved"));
26398
26473
  } }
26399
26474
  function CaseFlagTableComponent_table_0_tbody_20_tr_1_Template(rf, ctx) { if (rf & 1) {
26400
- i0.ɵɵelementStart(0, "tr", 16)(1, "td", 17)(2, "div");
26401
- i0.ɵɵtext(3);
26402
- i0.ɵɵpipe(4, "flagFieldDisplay");
26403
- i0.ɵɵelementEnd();
26404
- i0.ɵɵelementStart(5, "div");
26405
- i0.ɵɵtext(6);
26406
- i0.ɵɵpipe(7, "flagFieldDisplay");
26475
+ i0.ɵɵelementStart(0, "tr", 16)(1, "td", 17);
26476
+ i0.ɵɵtemplate(2, CaseFlagTableComponent_table_0_tbody_20_tr_1_div_2_Template, 5, 1, "div", 11)(3, CaseFlagTableComponent_table_0_tbody_20_tr_1_div_3_Template, 3, 4, "div", 11);
26477
+ i0.ɵɵelementStart(4, "div");
26478
+ i0.ɵɵtext(5);
26479
+ i0.ɵɵpipe(6, "flagFieldDisplay");
26407
26480
  i0.ɵɵelementEnd();
26408
- i0.ɵɵelementStart(8, "div");
26409
- i0.ɵɵtext(9);
26410
- i0.ɵɵpipe(10, "flagFieldDisplay");
26481
+ i0.ɵɵelementStart(7, "div");
26482
+ i0.ɵɵtext(8);
26483
+ i0.ɵɵpipe(9, "flagFieldDisplay");
26411
26484
  i0.ɵɵelementEnd()();
26412
- i0.ɵɵelementStart(11, "td", 17)(12, "div");
26413
- i0.ɵɵtext(13);
26414
- i0.ɵɵpipe(14, "flagFieldDisplay");
26485
+ i0.ɵɵelementStart(10, "td", 17)(11, "div");
26486
+ i0.ɵɵtext(12);
26487
+ i0.ɵɵpipe(13, "flagFieldDisplay");
26415
26488
  i0.ɵɵelementEnd();
26416
- i0.ɵɵtemplate(15, CaseFlagTableComponent_table_0_tbody_20_tr_1_div_15_Template, 3, 1, "div", 11);
26489
+ i0.ɵɵtemplate(14, CaseFlagTableComponent_table_0_tbody_20_tr_1_div_14_Template, 3, 1, "div", 11);
26417
26490
  i0.ɵɵelementEnd();
26418
- i0.ɵɵelementStart(16, "td", 17);
26419
- i0.ɵɵtext(17);
26420
- i0.ɵɵpipe(18, "date");
26491
+ i0.ɵɵelementStart(15, "td", 17);
26492
+ i0.ɵɵtext(16);
26493
+ i0.ɵɵpipe(17, "date");
26421
26494
  i0.ɵɵelementEnd();
26422
- i0.ɵɵelementStart(19, "td", 17);
26423
- i0.ɵɵtext(20);
26424
- i0.ɵɵpipe(21, "date");
26495
+ i0.ɵɵelementStart(18, "td", 17);
26496
+ i0.ɵɵtext(19);
26497
+ i0.ɵɵpipe(20, "date");
26425
26498
  i0.ɵɵelementEnd();
26426
- i0.ɵɵelementStart(22, "td", 18);
26427
- i0.ɵɵtemplate(23, CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_23_Template, 3, 3, "strong", 19)(24, CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_24_Template, 3, 3, "strong", 20)(25, CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_25_Template, 3, 3, "strong", 21)(26, CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_26_Template, 3, 3, "strong", 22);
26499
+ i0.ɵɵelementStart(21, "td", 18);
26500
+ i0.ɵɵtemplate(22, CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_22_Template, 3, 3, "strong", 19)(23, CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_23_Template, 3, 3, "strong", 20)(24, CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_24_Template, 3, 3, "strong", 21)(25, CaseFlagTableComponent_table_0_tbody_20_tr_1_strong_25_Template, 3, 3, "strong", 22);
26428
26501
  i0.ɵɵelementEnd()();
26429
26502
  } if (rf & 2) {
26430
26503
  const flagDetail_r2 = ctx.$implicit;
26431
26504
  const ctx_r0 = i0.ɵɵnextContext(3);
26505
+ i0.ɵɵadvance(2);
26506
+ i0.ɵɵproperty("ngIf", ctx_r0.isActivePvpFlag(flagDetail_r2));
26507
+ i0.ɵɵadvance();
26508
+ i0.ɵɵproperty("ngIf", !ctx_r0.isActivePvpFlag(flagDetail_r2));
26509
+ i0.ɵɵadvance(2);
26510
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(6, 12, flagDetail_r2, "otherDescription"));
26432
26511
  i0.ɵɵadvance(3);
26433
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(4, 11, flagDetail_r2, "name"));
26434
- i0.ɵɵadvance(3);
26435
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(7, 14, flagDetail_r2, "otherDescription"));
26436
- i0.ɵɵadvance(3);
26437
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(10, 17, flagDetail_r2, "subTypeValue"));
26512
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(9, 15, flagDetail_r2, "subTypeValue"));
26438
26513
  i0.ɵɵadvance(4);
26439
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(14, 20, flagDetail_r2, "flagComment"));
26514
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(13, 18, flagDetail_r2, "flagComment"));
26440
26515
  i0.ɵɵadvance(2);
26441
26516
  i0.ɵɵproperty("ngIf", !ctx_r0.caseFlagsExternalUser && (flagDetail_r2.status === ctx_r0.caseFlagStatus.NOT_APPROVED || flagDetail_r2.status === ctx_r0.caseFlagStatus.INACTIVE) && flagDetail_r2.flagUpdateComment);
26442
26517
  i0.ɵɵadvance(2);
26443
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(18, 23, flagDetail_r2.dateTimeCreated, "dd LLL yyyy"));
26518
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(17, 21, flagDetail_r2.dateTimeCreated, "dd LLL yyyy"));
26444
26519
  i0.ɵɵadvance(3);
26445
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(21, 26, flagDetail_r2.dateTimeModified, "dd LLL yyyy"));
26520
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(20, 24, flagDetail_r2.dateTimeModified, "dd LLL yyyy"));
26446
26521
  i0.ɵɵadvance(3);
26447
26522
  i0.ɵɵproperty("ngIf", flagDetail_r2.status === ctx_r0.caseFlagStatus.ACTIVE);
26448
26523
  i0.ɵɵadvance();
@@ -26454,7 +26529,7 @@ function CaseFlagTableComponent_table_0_tbody_20_tr_1_Template(rf, ctx) { if (rf
26454
26529
  } }
26455
26530
  function CaseFlagTableComponent_table_0_tbody_20_Template(rf, ctx) { if (rf & 1) {
26456
26531
  i0.ɵɵelementStart(0, "tbody", 10);
26457
- i0.ɵɵtemplate(1, CaseFlagTableComponent_table_0_tbody_20_tr_1_Template, 27, 29, "tr", 15);
26532
+ i0.ɵɵtemplate(1, CaseFlagTableComponent_table_0_tbody_20_tr_1_Template, 26, 27, "tr", 15);
26458
26533
  i0.ɵɵelementEnd();
26459
26534
  } if (rf & 2) {
26460
26535
  const ctx_r0 = i0.ɵɵnextContext(2);
@@ -26512,11 +26587,18 @@ class CaseFlagTableComponent {
26512
26587
  flagData;
26513
26588
  firstColumnHeader;
26514
26589
  caseFlagsExternalUser = false;
26590
+ pvpDisplayText = PVP_DISPLAY_TEXT;
26515
26591
  get caseFlagStatus() {
26516
26592
  return CaseFlagStatus;
26517
26593
  }
26594
+ isPvpFlag(flagDetail) {
26595
+ return isPvpFlag(flagDetail);
26596
+ }
26597
+ isActivePvpFlag(flagDetail) {
26598
+ return isPvpFlag(flagDetail) && flagDetail?.status === CaseFlagStatus.ACTIVE;
26599
+ }
26518
26600
  static ɵfac = function CaseFlagTableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CaseFlagTableComponent)(); };
26519
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFlagTableComponent, selectors: [["ccd-case-flag-table"]], inputs: { tableCaption: "tableCaption", flagData: "flagData", firstColumnHeader: "firstColumnHeader", caseFlagsExternalUser: "caseFlagsExternalUser" }, standalone: false, decls: 1, vars: 1, consts: [["class", "govuk-table", 4, "ngIf"], [1, "govuk-table"], ["class", "govuk-table__caption govuk-table__caption--l", 4, "ngIf"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header", "col-party-name"], ["scope", "col", 1, "govuk-table__header", "col-comments"], ["scope", "col", 1, "govuk-table__header", "col-creation-date"], ["scope", "col", 1, "govuk-table__header", "col-last-modified"], ["scope", "col", 1, "govuk-table__header", "col-flag-status"], [1, "govuk-table__body"], [4, "ngIf"], ["class", "govuk-table__body", 4, "ngIf"], [1, "govuk-table__caption", "govuk-table__caption--l"], ["colspan", "5"], ["scope", "row", "class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["scope", "row", 1, "govuk-table__row"], [1, "govuk-table__cell"], [1, "govuk-table__cell", "cell-flag-status"], ["class", "govuk-tag govuk-tag--turquoise", 4, "ngIf"], ["class", "govuk-tag govuk-tag--grey", 4, "ngIf"], ["class", "govuk-tag govuk-tag--yellow", 4, "ngIf"], ["class", "govuk-tag govuk-tag--red", 4, "ngIf"], [1, "govuk-!-font-weight-bold"], [1, "govuk-tag", "govuk-tag--turquoise"], [1, "govuk-tag", "govuk-tag--grey"], [1, "govuk-tag", "govuk-tag--yellow"], [1, "govuk-tag", "govuk-tag--red"]], template: function CaseFlagTableComponent_Template(rf, ctx) { if (rf & 1) {
26601
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseFlagTableComponent, selectors: [["ccd-case-flag-table"]], inputs: { tableCaption: "tableCaption", flagData: "flagData", firstColumnHeader: "firstColumnHeader", caseFlagsExternalUser: "caseFlagsExternalUser" }, standalone: false, decls: 1, vars: 1, consts: [["class", "govuk-table", 4, "ngIf"], [1, "govuk-table"], ["class", "govuk-table__caption govuk-table__caption--l", 4, "ngIf"], [1, "govuk-table__head"], [1, "govuk-table__row"], ["scope", "col", 1, "govuk-table__header", "col-party-name"], ["scope", "col", 1, "govuk-table__header", "col-comments"], ["scope", "col", 1, "govuk-table__header", "col-creation-date"], ["scope", "col", 1, "govuk-table__header", "col-last-modified"], ["scope", "col", 1, "govuk-table__header", "col-flag-status"], [1, "govuk-table__body"], [4, "ngIf"], ["class", "govuk-table__body", 4, "ngIf"], [1, "govuk-table__caption", "govuk-table__caption--l"], ["colspan", "5"], ["scope", "row", "class", "govuk-table__row", 4, "ngFor", "ngForOf"], ["scope", "row", 1, "govuk-table__row"], [1, "govuk-table__cell"], [1, "govuk-table__cell", "cell-flag-status"], ["class", "govuk-tag govuk-tag--turquoise", 4, "ngIf"], ["class", "govuk-tag govuk-tag--grey", 4, "ngIf"], ["class", "govuk-tag govuk-tag--yellow", 4, "ngIf"], ["class", "govuk-tag govuk-tag--red", 4, "ngIf"], ["fill", "currentColor", "role", "presentation", "aria-hidden", "true", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], [1, "govuk-!-font-weight-bold"], [1, "govuk-tag", "govuk-tag--turquoise"], [1, "govuk-tag", "govuk-tag--grey"], [1, "govuk-tag", "govuk-tag--yellow"], [1, "govuk-tag", "govuk-tag--red"]], template: function CaseFlagTableComponent_Template(rf, ctx) { if (rf & 1) {
26520
26602
  i0.ɵɵtemplate(0, CaseFlagTableComponent_table_0_Template, 21, 16, "table", 0);
26521
26603
  } if (rf & 2) {
26522
26604
  i0.ɵɵproperty("ngIf", ctx.flagData);
@@ -26524,7 +26606,7 @@ class CaseFlagTableComponent {
26524
26606
  }
26525
26607
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFlagTableComponent, [{
26526
26608
  type: Component,
26527
- args: [{ selector: 'ccd-case-flag-table', standalone: false, template: "<table class=\"govuk-table\" *ngIf=\"flagData\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\" *ngIf=\"tableCaption\">{{tableCaption}}</caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header col-party-name\">{{firstColumnHeader}}</th>\n <th scope=\"col\" class=\"govuk-table__header col-comments\">{{'Comments' | rpxTranslate}}</th>\n <th scope=\"col\" class=\"govuk-table__header col-creation-date\">{{'Creation date' | rpxTranslate}}</th>\n <th scope=\"col\" class=\"govuk-table__header col-last-modified\">{{'Last modified' | rpxTranslate}}</th>\n <th scope=\"col\" class=\"govuk-table__header col-flag-status\">{{'Flag status' | rpxTranslate}}</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr *ngIf=\"!flagData.flags.details || (flagData.flags.details && flagData.flags.details.length === 0)\">\n <td colspan=\"5\">{{'None' | rpxTranslate}}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"flagData.flags.details && flagData.flags.details.length > 0\">\n <tr scope=\"row\" class=\"govuk-table__row\" *ngFor=\"let flagDetail of flagData.flags.details\">\n <td class=\"govuk-table__cell\">\n <div>{{flagDetail | flagFieldDisplay:'name'}}</div>\n <div>{{flagDetail | flagFieldDisplay:'otherDescription'}}</div>\n <div>{{flagDetail | flagFieldDisplay:'subTypeValue'}}</div>\n </td>\n <td class=\"govuk-table__cell\">\n <div>{{flagDetail | flagFieldDisplay:'flagComment'}}</div>\n <div *ngIf=\"!caseFlagsExternalUser &&\n (flagDetail.status === caseFlagStatus.NOT_APPROVED || flagDetail.status === caseFlagStatus.INACTIVE) &&\n flagDetail.flagUpdateComment\">\n <span class=\"govuk-!-font-weight-bold\">Update Reason: {{flagDetail.flagUpdateComment}}</span>\n </div>\n </td>\n <td class=\"govuk-table__cell\">{{flagDetail.dateTimeCreated | date: 'dd LLL yyyy'}}</td>\n <td class=\"govuk-table__cell\">{{flagDetail.dateTimeModified | date: 'dd LLL yyyy'}}</td>\n <td class=\"govuk-table__cell cell-flag-status\">\n <strong *ngIf=\"flagDetail.status === caseFlagStatus.ACTIVE\" class=\"govuk-tag govuk-tag--turquoise\">{{'Active' | rpxTranslate}}</strong>\n <strong *ngIf=\"flagDetail.status === caseFlagStatus.INACTIVE\" class=\"govuk-tag govuk-tag--grey\">{{'Inactive' | rpxTranslate}}</strong>\n <strong *ngIf=\"flagDetail.status === caseFlagStatus.REQUESTED\" class=\"govuk-tag govuk-tag--yellow\">{{'Requested' | rpxTranslate}}</strong>\n <strong *ngIf=\"flagDetail.status === caseFlagStatus.NOT_APPROVED\" class=\"govuk-tag govuk-tag--red\">{{'Not approved' | rpxTranslate}}</strong>\n </td>\n </tr>\n </tbody>\n</table>\n", styles: [".govuk-table .govuk-table__caption{margin-top:10px}.govuk-table .govuk-table__head .govuk-table__row .col-party-name{width:24%}.govuk-table .govuk-table__head .govuk-table__row .col-comments{width:42%}.govuk-table .govuk-table__head .govuk-table__row .col-creation-date,.govuk-table .govuk-table__head .govuk-table__row .col-last-modified{width:12%}.govuk-table .govuk-table__head .govuk-table__row .col-flag-status{width:10%}.govuk-table .govuk-table__body .govuk-table__row .cell-flag-status{white-space:nowrap}\n"] }]
26609
+ args: [{ selector: 'ccd-case-flag-table', standalone: false, template: "<table class=\"govuk-table\" *ngIf=\"flagData\">\n <caption class=\"govuk-table__caption govuk-table__caption--l\" *ngIf=\"tableCaption\">{{tableCaption}}</caption>\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th scope=\"col\" class=\"govuk-table__header col-party-name\">{{firstColumnHeader}}</th>\n <th scope=\"col\" class=\"govuk-table__header col-comments\">{{'Comments' | rpxTranslate}}</th>\n <th scope=\"col\" class=\"govuk-table__header col-creation-date\">{{'Creation date' | rpxTranslate}}</th>\n <th scope=\"col\" class=\"govuk-table__header col-last-modified\">{{'Last modified' | rpxTranslate}}</th>\n <th scope=\"col\" class=\"govuk-table__header col-flag-status\">{{'Flag status' | rpxTranslate}}</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr *ngIf=\"!flagData.flags.details || (flagData.flags.details && flagData.flags.details.length === 0)\">\n <td colspan=\"5\">{{'None' | rpxTranslate}}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"flagData.flags.details && flagData.flags.details.length > 0\">\n <tr scope=\"row\" class=\"govuk-table__row\" *ngFor=\"let flagDetail of flagData.flags.details\">\n <td class=\"govuk-table__cell\">\n <div *ngIf=\"isActivePvpFlag(flagDetail)\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" aria-hidden=\"true\" focusable=\"false\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n <path d=\"M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z\"></path>\n </svg>\n <div>{{pvpDisplayText}}</div>\n </div>\n <div *ngIf=\"!isActivePvpFlag(flagDetail)\">{{flagDetail | flagFieldDisplay:'name'}}</div>\n <div>{{flagDetail | flagFieldDisplay:'otherDescription'}}</div>\n <div>{{flagDetail | flagFieldDisplay:'subTypeValue'}}</div>\n </td>\n <td class=\"govuk-table__cell\">\n <div>{{flagDetail | flagFieldDisplay:'flagComment'}}</div>\n <div *ngIf=\"!caseFlagsExternalUser &&\n (flagDetail.status === caseFlagStatus.NOT_APPROVED || flagDetail.status === caseFlagStatus.INACTIVE) &&\n flagDetail.flagUpdateComment\">\n <span class=\"govuk-!-font-weight-bold\">Update Reason: {{flagDetail.flagUpdateComment}}</span>\n </div>\n </td>\n <td class=\"govuk-table__cell\">{{flagDetail.dateTimeCreated | date: 'dd LLL yyyy'}}</td>\n <td class=\"govuk-table__cell\">{{flagDetail.dateTimeModified | date: 'dd LLL yyyy'}}</td>\n <td class=\"govuk-table__cell cell-flag-status\">\n <strong *ngIf=\"flagDetail.status === caseFlagStatus.ACTIVE\" class=\"govuk-tag govuk-tag--turquoise\">{{'Active' | rpxTranslate}}</strong>\n <strong *ngIf=\"flagDetail.status === caseFlagStatus.INACTIVE\" class=\"govuk-tag govuk-tag--grey\">{{'Inactive' | rpxTranslate}}</strong>\n <strong *ngIf=\"flagDetail.status === caseFlagStatus.REQUESTED\" class=\"govuk-tag govuk-tag--yellow\">{{'Requested' | rpxTranslate}}</strong>\n <strong *ngIf=\"flagDetail.status === caseFlagStatus.NOT_APPROVED\" class=\"govuk-tag govuk-tag--red\">{{'Not approved' | rpxTranslate}}</strong>\n </td>\n </tr>\n </tbody>\n</table>\n", styles: [".govuk-table .govuk-table__caption{margin-top:10px}.govuk-table .govuk-table__head .govuk-table__row .col-party-name{width:24%}.govuk-table .govuk-table__head .govuk-table__row .col-comments{width:42%}.govuk-table .govuk-table__head .govuk-table__row .col-creation-date,.govuk-table .govuk-table__head .govuk-table__row .col-last-modified{width:12%}.govuk-table .govuk-table__head .govuk-table__row .col-flag-status{width:10%}.govuk-table .govuk-table__body .govuk-table__row .cell-flag-status{white-space:nowrap}\n"] }]
26528
26610
  }], null, { tableCaption: [{
26529
26611
  type: Input
26530
26612
  }], flagData: [{
@@ -26534,7 +26616,7 @@ class CaseFlagTableComponent {
26534
26616
  }], caseFlagsExternalUser: [{
26535
26617
  type: Input
26536
26618
  }] }); })();
26537
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseFlagTableComponent, { className: "CaseFlagTableComponent", filePath: "lib/shared/components/palette/case-flag/components/case-flag-table/case-flag-table.component.ts", lineNumber: 11 }); })();
26619
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseFlagTableComponent, { className: "CaseFlagTableComponent", filePath: "lib/shared/components/palette/case-flag/components/case-flag-table/case-flag-table.component.ts", lineNumber: 12 }); })();
26538
26620
 
26539
26621
  const _c0$s = a0 => ({ "form-group-error": a0 });
26540
26622
  function ManageCaseFlagsComponent_div_7_Template(rf, ctx) { if (rf & 1) {
@@ -36132,8 +36214,6 @@ class CaseFullAccessViewComponent {
36132
36214
  activeCaseFlags = false;
36133
36215
  caseFlagsExternalUser = false;
36134
36216
  caseFlagsReadExternalMode = '#ARGUMENT(READ,EXTERNAL)';
36135
- potentiallyViolentPersonFlagCode = 'PF0021';
36136
- potentiallyViolentPersonFlagPrefix = 'POTENTIALLY VIOLENT PERSON.';
36137
36217
  subs = [];
36138
36218
  eventId;
36139
36219
  isEventButtonClicked = false;
@@ -36455,12 +36535,8 @@ class CaseFullAccessViewComponent {
36455
36535
  return FieldsUtils.countActiveFlagsInCaseField(active, caseFlag);
36456
36536
  }, 0);
36457
36537
  if (activeCaseFlags > 0) {
36458
- const hasActivePotentiallyViolentPersonFlag = this.hasActivePotentiallyViolentPersonFlag(caseFlagsTab.fields);
36459
- const baseDescription = activeCaseFlags > 1
36538
+ const description = activeCaseFlags > 1
36460
36539
  ? `There are ${activeCaseFlags} active flags on this case.` : 'There is 1 active flag on this case.';
36461
- const description = hasActivePotentiallyViolentPersonFlag
36462
- ? `${this.potentiallyViolentPersonFlagPrefix} ${baseDescription}`
36463
- : baseDescription;
36464
36540
  // Initialise and display notification banner
36465
36541
  this.notificationBannerConfig = {
36466
36542
  bannerType: NotificationBannerType.INFORMATION,
@@ -36477,55 +36553,6 @@ class CaseFullAccessViewComponent {
36477
36553
  }
36478
36554
  return false;
36479
36555
  }
36480
- hasActivePotentiallyViolentPersonFlag(caseFields) {
36481
- return caseFields
36482
- .filter((caseField) => !FieldsUtils.isFlagLauncherCaseField(caseField) && caseField.value)
36483
- .some((caseField) => this.hasActivePotentiallyViolentPersonFlagInCaseField(caseField));
36484
- }
36485
- hasActivePotentiallyViolentPersonFlagInCaseField(caseField, currentValue) {
36486
- const fieldType = caseField.field_type;
36487
- const value = caseField.value ? caseField.value : currentValue;
36488
- if (fieldType.type === 'Complex') {
36489
- return this.hasActivePotentiallyViolentPersonFlagInComplexField(caseField, value);
36490
- }
36491
- if (fieldType.type === 'Collection') {
36492
- return this.hasActivePotentiallyViolentPersonFlagInCollectionField(caseField, value);
36493
- }
36494
- return false;
36495
- }
36496
- hasActivePotentiallyViolentPersonFlagInComplexField(caseField, value) {
36497
- if (FieldsUtils.isFlagsCaseField(caseField)) {
36498
- return this.hasActivePotentiallyViolentPersonFlagInFlagsValue(value);
36499
- }
36500
- const complexFields = caseField.field_type.complex_fields;
36501
- if (!complexFields || !value || !FieldsUtils.isNonEmptyObject(value)) {
36502
- return false;
36503
- }
36504
- return complexFields.some((subField) => this.hasActivePotentiallyViolentPersonFlagInCaseField(subField, value[subField.id]));
36505
- }
36506
- hasActivePotentiallyViolentPersonFlagInCollectionField(caseField, value) {
36507
- if (!value || !Array.isArray(value)) {
36508
- return false;
36509
- }
36510
- const collectionFieldType = caseField.field_type.collection_field_type;
36511
- if (FieldsUtils.isFlagsFieldType(collectionFieldType)) {
36512
- return value.some((item) => this.hasActivePotentiallyViolentPersonFlagInFlagsValue(item.value));
36513
- }
36514
- if (collectionFieldType.type !== 'Complex' || !collectionFieldType.complex_fields) {
36515
- return false;
36516
- }
36517
- return value.some((item) => collectionFieldType.complex_fields.some((subField) => this.hasActivePotentiallyViolentPersonFlagInCaseField(subField, item.value?.[subField.id])));
36518
- }
36519
- hasActivePotentiallyViolentPersonFlagInFlagsValue(value) {
36520
- if (!value || !FieldsUtils.isNonEmptyObject(value) || !value.details || !Array.isArray(value.details)) {
36521
- return false;
36522
- }
36523
- return value.details.some((detail) => {
36524
- const detailValue = detail?.value ?? detail;
36525
- return detailValue?.flagCode === this.potentiallyViolentPersonFlagCode
36526
- && detailValue?.status === CaseFlagStatus.ACTIVE;
36527
- });
36528
- }
36529
36556
  /**
36530
36557
  * Indicates that a CaseField is to be displayed without a label, as is expected for all ComponentLauncher-type
36531
36558
  * fields.
@@ -36637,7 +36664,7 @@ class CaseFullAccessViewComponent {
36637
36664
  type: ViewChild,
36638
36665
  args: ['tabGroup', { static: false }]
36639
36666
  }] }); })();
36640
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseFullAccessViewComponent, { className: "CaseFullAccessViewComponent", filePath: "lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.ts", lineNumber: 48 }); })();
36667
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CaseFullAccessViewComponent, { className: "CaseFullAccessViewComponent", filePath: "lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.ts", lineNumber: 47 }); })();
36641
36668
 
36642
36669
  class PrintUrlPipe {
36643
36670
  appConfig;