From fbc6f1b538ffcc18c50576d52c73ac5ab9135bce Mon Sep 17 00:00:00 2001 From: ksprabin Date: Wed, 24 Jan 2024 16:58:23 -0800 Subject: [PATCH] EMBCESSMOD-4655 --- .../support-details/support-details.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-details/support-details.component.ts b/responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-details/support-details.component.ts index 0a0c40ae6..c1edf882f 100644 --- a/responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-details/support-details.component.ts +++ b/responders/src/UI/embc-responder/src/app/feature-components/wizard/support-components/support-details/support-details.component.ts @@ -19,7 +19,7 @@ import { SupportDetailsService } from './support-details.service'; import { MatDialog } from '@angular/material/dialog'; import { DialogComponent } from 'src/app/shared/components/dialog/dialog.component'; import { InformationDialogComponent } from 'src/app/shared/components/dialog-components/information-dialog/information-dialog.component'; -import { Support, SupportSubCategory } from 'src/app/core/api/models'; +import { Support, SupportStatus, SupportSubCategory } from 'src/app/core/api/models'; import { EvacueeSessionService } from 'src/app/core/services/evacuee-session.service'; import { AlertService } from 'src/app/shared/components/alert/alert.service'; import { ReferralCreationService } from '../../step-supports/referral-creation.service'; @@ -399,9 +399,9 @@ export class SupportDetailsComponent implements OnInit, OnDestroy { this.supportDetailsForm.markAllAsTouched(); return; } - - let existingSupports = this.existingSupports; - + + let existingSupports = this.existingSupports.filter((x) => x.status !== SupportStatus.Cancelled.toString()); + if (this.editFlag) { existingSupports = existingSupports.filter( (s) => s !== this.stepSupportsService.selectedSupportDetail