diff --git a/backend/core/src/main/java/org/opencdmp/query/utils/QueryUtilsServiceImpl.java b/backend/core/src/main/java/org/opencdmp/query/utils/QueryUtilsServiceImpl.java index 443f8b447..794f4d08c 100644 --- a/backend/core/src/main/java/org/opencdmp/query/utils/QueryUtilsServiceImpl.java +++ b/backend/core/src/main/java/org/opencdmp/query/utils/QueryUtilsServiceImpl.java @@ -108,8 +108,7 @@ public class QueryUtilsServiceImpl implements QueryUtilsService { .keyPathFunc((subQueryRoot) -> subQueryRoot.get(PlanUserEntity._planId)) .filterFunc((subQueryRoot, cb) -> userId != null ? cb.and( - cb.equal(subQueryRoot.get(PlanUserEntity._userId), userId), - cb.equal(subQueryRoot.get(PlanUserEntity._isActive), IsActive.Active) + cb.equal(subQueryRoot.get(PlanUserEntity._userId), userId) ) : cb.or() //Creates a false query ) )); diff --git a/backend/core/src/main/java/org/opencdmp/service/plan/PlanServiceImpl.java b/backend/core/src/main/java/org/opencdmp/service/plan/PlanServiceImpl.java index 342c6f8ca..d6d6d93b6 100644 --- a/backend/core/src/main/java/org/opencdmp/service/plan/PlanServiceImpl.java +++ b/backend/core/src/main/java/org/opencdmp/service/plan/PlanServiceImpl.java @@ -1298,6 +1298,7 @@ public class PlanServiceImpl implements PlanService { PlanEntity data = this.entityManager.find(PlanEntity.class, model.getPlanId(), true); if (data == null) throw new MyNotFoundException(this.messageSource.getMessage("General_ItemNotFound", new Object[]{model.getId(), Plan.class.getSimpleName()}, LocaleContextHolder.getLocale())); + if (data.getIsActive().equals(IsActive.Inactive)) throw new MyApplicationException("Plan is not Active"); List existingUsers = this.queryFactory.query(PlanUserQuery.class) .planIds(model.getPlanId()).ids(model.getId()).userRoles(model.getRole()) .collect(); @@ -1668,7 +1669,7 @@ public class PlanServiceImpl implements PlanService { } else if (currentStatusEntity != null && currentStatusEntity.getInternalStatus()!= null && !currentStatusEntity.getInternalStatus().equals(DescriptionStatus.Finalized)) { // description to be canceled description.setStatusId(canceledStatusEntity.getId()); - this.deleterFactory.deleter(DescriptionDeleter.class).delete(List.of(description), true); + this.deleterFactory.deleter(DescriptionDeleter.class).delete(List.of(description), false); } } } diff --git a/frontend/src/app/core/services/plan/plan.service.ts b/frontend/src/app/core/services/plan/plan.service.ts index 26971d564..1c677266b 100644 --- a/frontend/src/app/core/services/plan/plan.service.ts +++ b/frontend/src/app/core/services/plan/plan.service.ts @@ -276,11 +276,15 @@ export class PlanService { // // - getCurrentUserRolesInPlan(planUsers: PlanUser[]): PlanUserRole[] { + getCurrentUserRolesInPlan(planUsers: PlanUser[], isDeletedPlan: boolean = false): PlanUserRole[] { const principalId: Guid = this.authService.userId(); let planUserRoles: PlanUserRole[] = null; if (principalId) { - planUserRoles = planUsers.filter(element => element.isActive == IsActive.Active && element?.user?.id === principalId).map(x => x.role); + if (isDeletedPlan) { + planUserRoles = planUsers.filter(element => element?.user?.id === principalId).map(x => x.role); + } else { + planUserRoles = planUsers.filter(element => element.isActive == IsActive.Active && element?.user?.id === principalId).map(x => x.role); + } } return planUserRoles; } diff --git a/frontend/src/app/ui/description/editor/description-editor.component.html b/frontend/src/app/ui/description/editor/description-editor.component.html index 3236cc668..d39c94bc3 100644 --- a/frontend/src/app/ui/description/editor/description-editor.component.html +++ b/frontend/src/app/ui/description/editor/description-editor.component.html @@ -27,7 +27,7 @@
-
+
+ +
+ {{ 'DESCRIPTION-LISTING.FILTERS.IS-ACTIVE' | translate }} +
+
+
{{ 'DESCRIPTION-LISTING.FILTERS.RELATED-TENANT.NAME' | translate}}
diff --git a/frontend/src/app/ui/description/listing/filtering/description-filter.component.ts b/frontend/src/app/ui/description/listing/filtering/description-filter.component.ts index bc9a9bdfc..0aba25c8b 100644 --- a/frontend/src/app/ui/description/listing/filtering/description-filter.component.ts +++ b/frontend/src/app/ui/description/listing/filtering/description-filter.component.ts @@ -81,6 +81,7 @@ export class DescriptionFilterComponent extends BaseCriteriaComponent({ statusId: new FormControl(filters?.statusId), + isActive: new FormControl(filters?.isActive), viewOnlyTenant: new FormControl(filters.viewOnlyTenant), role: new FormControl(filters.role), descriptionTemplates: new FormControl(filters.descriptionTemplates), @@ -114,6 +115,7 @@ export class DescriptionFilterComponent extends BaseCriteriaComponent, + isActive: FormControl, viewOnlyTenant: FormControl, role: FormControl, descriptionTemplates: FormControl, diff --git a/frontend/src/app/ui/description/listing/listing-item/description-listing-item.component.html b/frontend/src/app/ui/description/listing/listing-item/description-listing-item.component.html index 9ae60f621..db5efb0cc 100644 --- a/frontend/src/app/ui/description/listing/listing-item/description-listing-item.component.html +++ b/frontend/src/app/ui/description/listing/listing-item/description-listing-item.component.html @@ -18,7 +18,7 @@
{{description.label}}
{{description.label}}
- {{ enumUtils.toPlanUserRolesString(planService.getCurrentUserRolesInPlan(description?.plan?.planUsers)) }} + {{ enumUtils.toPlanUserRolesString(planService.getCurrentUserRolesInPlan(description?.plan?.planUsers, isDeleted)) }} . public{{'DESCRIPTION-LISTING.STATES.PUBLIC' | translate}} done{{ description.status.name }} @@ -38,7 +38,7 @@ diff --git a/frontend/src/app/ui/description/listing/listing-item/description-listing-item.component.ts b/frontend/src/app/ui/description/listing/listing-item/description-listing-item.component.ts index 25e3878e7..8a3d255d6 100644 --- a/frontend/src/app/ui/description/listing/listing-item/description-listing-item.component.ts +++ b/frontend/src/app/ui/description/listing/listing-item/description-listing-item.component.ts @@ -93,15 +93,15 @@ export class DescriptionListingItemComponent extends BaseComponent implements On } this.canDelete = !this.isPublic && (this.authService.hasPermission(AppPermission.DeleteDescription) || - this.description.authorizationFlags?.some(x => x === AppPermission.DeleteDescription)) && this.description.belongsToCurrentTenant != false; + this.description.authorizationFlags?.some(x => x === AppPermission.DeleteDescription)) && !this.isDeleted &&this.description.belongsToCurrentTenant != false; this.canEdit = !this.isPublic && (this.authService.hasPermission(AppPermission.EditDescription) || this.description.authorizationFlags?.some(x => x === AppPermission.EditDescription)) && this.description.belongsToCurrentTenant != false; this.canInvitePlanUsers = !this.isPublic && (this.authService.hasPermission(AppPermission.InvitePlanUsers) || - this.description.authorizationFlags?.some(x => x === AppPermission.InvitePlanUsers)) && this.description.belongsToCurrentTenant != false; + this.description.authorizationFlags?.some(x => x === AppPermission.InvitePlanUsers)) && !this.isDeleted && this.description.belongsToCurrentTenant != false; - this.canExport = this.description.authorizationFlags?.some(x => x === AppPermission.ExportDescription) || this.authentication.hasPermission(AppPermission.ExportDescription) && + this.canExport = this.description.authorizationFlags?.some(x => x === AppPermission.ExportDescription) || this.authentication.hasPermission(AppPermission.ExportDescription) && !this.isDeleted && this.description.status?.definition?.availableActions?.filter(x => x === DescriptionStatusAvailableActionType.Export).length > 0; } @@ -111,7 +111,7 @@ export class DescriptionListingItemComponent extends BaseComponent implements On isUserPlanRelated() { const principalId: Guid = this.authService.userId(); - return this.description.plan.planUsers?.some(x => (x.user.id === principalId)); + return this.description.plan?.planUsers?.some(x => (x.user.id === principalId)); } public isAuthenticated(): boolean { diff --git a/frontend/src/app/ui/description/overview/description-overview.component.html b/frontend/src/app/ui/description/overview/description-overview.component.html index 50f552ae6..b10ab9bea 100644 --- a/frontend/src/app/ui/description/overview/description-overview.component.html +++ b/frontend/src/app/ui/description/overview/description-overview.component.html @@ -130,7 +130,7 @@
- +
diff --git a/frontend/src/app/ui/description/overview/description-overview.component.ts b/frontend/src/app/ui/description/overview/description-overview.component.ts index d1e6ddc47..fcf532a24 100644 --- a/frontend/src/app/ui/description/overview/description-overview.component.ts +++ b/frontend/src/app/ui/description/overview/description-overview.component.ts @@ -78,10 +78,10 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni canAnnotate = false; canInvitePlanUsers = false; availableStatusesTransitions: DescriptionStatus[]; - canAssignPlanUsers(): boolean { + get canAssignPlanUsers(): boolean { const authorizationFlags = !this.isPublicView ? (this.description?.plan as Plan)?.authorizationFlags : []; - return (authorizationFlags?.some(x => x === AppPermission.AssignPlanUsers) || this.authentication.hasPermission(AppPermission.AssignPlanUsers)) && - !this.isPublicView && this.description?.belongsToCurrentTenant && this.description?.plan?.status?.internalStatus != PlanStatusEnum.Finalized; + return (authorizationFlags?.some(x => x === AppPermission.InvitePlanUsers) || this.authentication.hasPermission(AppPermission.InvitePlanUsers)) && + !this.isPublicView && this.description?.belongsToCurrentTenant && this.isActive && (this.description?.plan?.status?.internalStatus == null || this.description?.plan?.status?.internalStatus != PlanStatusEnum.Finalized); } authorFocus: string; @@ -142,7 +142,7 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni this.description = data; this.getAvailableStatuses(this.description.id); - this.description.plan.planUsers = this.isActive ? data.plan.planUsers.filter(x => x.isActive === IsActive.Active) : data.plan.planUsers; + this.description.plan.planUsers = this.isActive || this.description.plan.isActive === IsActive.Active ? data.plan.planUsers.filter(x => x.isActive === IsActive.Active) : data.plan.planUsers; this.researchers = this.referenceService.getReferencesForTypes(this.description?.plan?.planReferences, [this.referenceTypeService.getResearcherReferenceType()]); this.checkLockStatus(this.description.id); this.canDelete = this.isActive && (this.authService.hasPermission(AppPermission.DeleteDescription) || @@ -587,6 +587,7 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni [nameof(x => x.plan), nameof(x => x.id)].join('.'), [nameof(x => x.plan), nameof(x => x.label)].join('.'), [nameof(x => x.plan), nameof(x => x.accessType)].join('.'), + [nameof(x => x.plan), nameof(x => x.isActive)].join('.'), [nameof(x => x.plan), nameof(x => x.status), nameof(x => x.id)].join('.'), [nameof(x => x.plan), nameof(x => x.status), nameof(x => x.name)].join('.'), [nameof(x => x.plan), nameof(x => x.status), nameof(x => x.internalStatus)].join('.'), diff --git a/frontend/src/app/ui/plan/listing/filtering/plan-filter-dialog/plan-filter-dialog.component.ts b/frontend/src/app/ui/plan/listing/filtering/plan-filter-dialog/plan-filter-dialog.component.ts index 737947110..5b778cf15 100644 --- a/frontend/src/app/ui/plan/listing/filtering/plan-filter-dialog/plan-filter-dialog.component.ts +++ b/frontend/src/app/ui/plan/listing/filtering/plan-filter-dialog/plan-filter-dialog.component.ts @@ -5,6 +5,7 @@ import { AnalyticsService } from '@app/core/services/matomo/analytics-service'; import { PlanFilterComponent, PlanListingFilters } from '../plan-filter.component'; import { ReferencesWithType } from '@app/core/query/description.lookup'; import { PlanLookup } from '@app/core/query/plan.lookup'; +import { IsActive } from '@notification-service/core/enum/is-active.enum'; @Component({ selector: 'plan-filter-dialog-component', @@ -36,6 +37,7 @@ export class PlanFilterDialogComponent implements OnInit { private _buildPlanFilters(lookup: PlanLookup, references: ReferencesWithType[]): PlanListingFilters { return { statusId: lookup.statusIds?.[0] ?? null, + isActive: lookup.isActive?.[0] == IsActive.Active ?? false, viewOnlyTenant: lookup.tenantSubQuery?.codes?.length > 0, descriptionTemplates: lookup.planDescriptionTemplateSubQuery?.descriptionTemplateGroupIds ? lookup.planDescriptionTemplateSubQuery?.descriptionTemplateGroupIds : [], planBlueprints: lookup.planBlueprintSubQuery?.ids ?? [], diff --git a/frontend/src/app/ui/plan/listing/filtering/plan-filter.component.html b/frontend/src/app/ui/plan/listing/filtering/plan-filter.component.html index 2236cf09e..7b92c0daf 100644 --- a/frontend/src/app/ui/plan/listing/filtering/plan-filter.component.html +++ b/frontend/src/app/ui/plan/listing/filtering/plan-filter.component.html @@ -17,6 +17,12 @@
+ +
+ {{ 'PLAN-LISTING.FILTERS.IS-ACTIVE' | translate }} +
+
+
{{ 'PLAN-LISTING.FILTERS.RELATED-TENANT.NAME' | translate}}
diff --git a/frontend/src/app/ui/plan/listing/filtering/plan-filter.component.ts b/frontend/src/app/ui/plan/listing/filtering/plan-filter.component.ts index 202fcbf55..b064ae708 100644 --- a/frontend/src/app/ui/plan/listing/filtering/plan-filter.component.ts +++ b/frontend/src/app/ui/plan/listing/filtering/plan-filter.component.ts @@ -79,6 +79,7 @@ export class PlanFilterComponent extends BaseCriteriaComponent({ statusId: new FormControl(filters?.statusId), + isActive: new FormControl(filters?.isActive), descriptionTemplates: new FormControl(filters?.descriptionTemplates), planBlueprints: new FormControl(filters?.planBlueprints), role: new FormControl(filters?.role), @@ -110,6 +111,7 @@ export class PlanFilterComponent extends BaseCriteriaComponent, + isActive: FormControl, viewOnlyTenant: FormControl, descriptionTemplates: FormControl, planBlueprints: FormControl, diff --git a/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.html b/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.html index d5af1acf4..170be805f 100644 --- a/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.html +++ b/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.html @@ -15,7 +15,7 @@
{{plan.label}}
- {{ enumUtils.toPlanUserRolesString(planService.getCurrentUserRolesInPlan(plan?.planUsers)) }} + {{ enumUtils.toPlanUserRolesString(planService.getCurrentUserRolesInPlan(plan?.planUsers, isDeleted)) }} . public{{'TYPES.PLAN-VISIBILITY.PUBLIC' | translate}} done{{ plan.status.name }} diff --git a/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.ts b/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.ts index 939f27dd7..68293bae0 100644 --- a/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.ts +++ b/frontend/src/app/ui/plan/listing/listing-item/plan-listing-item.component.ts @@ -30,6 +30,7 @@ import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/ import { RouterUtilsService } from '@app/core/services/router/router-utils.service'; import { Tenant } from '@app/core/model/tenant/tenant'; import { PlanStatusAvailableActionType } from '@app/core/common/enum/plan-status-available-action-type'; +import { IsActive } from '@notification-service/core/enum/is-active.enum'; @Component({ selector: 'app-plan-listing-item-component', @@ -45,6 +46,7 @@ export class PlanListingItemComponent extends BaseComponent implements OnInit { @Input() tenants: Tenant[] = []; @Output() onClick: EventEmitter = new EventEmitter(); + isDeleted: boolean; isDraft: boolean; isFinalized: boolean; isPublished: boolean; @@ -52,15 +54,15 @@ export class PlanListingItemComponent extends BaseComponent implements OnInit { fileTransformerEntityTypeEnum = FileTransformerEntityType; get canEditPlan(): boolean { - return (this.isDraft) && (this.plan.authorizationFlags?.some(x => x === AppPermission.EditPlan) || this.authentication.hasPermission(AppPermission.EditPlan)) && !this.isPublic && this.plan.belongsToCurrentTenant != false; + return (this.isDraft) && (this.plan.authorizationFlags?.some(x => x === AppPermission.EditPlan) || this.authentication.hasPermission(AppPermission.EditPlan)) && !this.isDeleted && !this.isPublic && this.plan.belongsToCurrentTenant != false; } get canCreateNewVersion(): boolean { - return (this.plan.authorizationFlags?.some(x => x === AppPermission.CreateNewVersionPlan) || this.authentication.hasPermission(AppPermission.CreateNewVersionPlan)) && this.plan.versionStatus === PlanVersionStatus.Current && !this.isPublic && this.plan.belongsToCurrentTenant != false; + return (this.plan.authorizationFlags?.some(x => x === AppPermission.CreateNewVersionPlan) || this.authentication.hasPermission(AppPermission.CreateNewVersionPlan)) && !this.isDeleted && this.plan.versionStatus === PlanVersionStatus.Current && !this.isPublic && this.plan.belongsToCurrentTenant != false; } get canDeletePlan(): boolean { - return (this.plan.authorizationFlags?.some(x => x === AppPermission.DeletePlan) || this.authentication.hasPermission(AppPermission.DeletePlan)) && !this.isPublic && this.plan.belongsToCurrentTenant != false && this.isDraftPlan; + return (this.plan.authorizationFlags?.some(x => x === AppPermission.DeletePlan) || this.authentication.hasPermission(AppPermission.DeletePlan)) && !this.isPublic && !this.isDeleted &&this.plan.belongsToCurrentTenant != false && this.isNotFinalizedPlan; } get canClonePlan(): boolean { @@ -68,28 +70,28 @@ export class PlanListingItemComponent extends BaseComponent implements OnInit { } get canFinalizePlan(): boolean { - return (this.plan.authorizationFlags?.some(x => x === AppPermission.FinalizePlan) || this.authentication.hasPermission(AppPermission.FinalizePlan)) && !this.isPublic && this.plan.belongsToCurrentTenant != false; + return (this.plan.authorizationFlags?.some(x => x === AppPermission.FinalizePlan) || this.authentication.hasPermission(AppPermission.FinalizePlan)) && !this.isDeleted && !this.isPublic && this.plan.belongsToCurrentTenant != false; } get canExportPlan(): boolean { - return this.plan.authorizationFlags?.some(x => x === AppPermission.ExportPlan) || this.authentication.hasPermission(AppPermission.ExportPlan) && + return (this.plan.authorizationFlags?.some(x => x === AppPermission.ExportPlan) || this.authentication.hasPermission(AppPermission.ExportPlan)) && this.isPublic && this.plan.status?.definition?.availableActions?.filter(x => x === PlanStatusAvailableActionType.Export).length > 0;; } get canInvitePlanUsers(): boolean { - return (this.plan.authorizationFlags?.some(x => x === AppPermission.InvitePlanUsers) || this.authentication.hasPermission(AppPermission.InvitePlanUsers)) && !this.isPublic && this.plan.belongsToCurrentTenant != false; + return (this.plan.authorizationFlags?.some(x => x === AppPermission.InvitePlanUsers) || this.authentication.hasPermission(AppPermission.InvitePlanUsers)) && !this.isDeleted && !this.isPublic && this.plan.belongsToCurrentTenant != false; } get canAssignPlanUsers(): boolean { - return (this.plan.authorizationFlags?.some(x => x === AppPermission.AssignPlanUsers) || this.authentication.hasPermission(AppPermission.AssignPlanUsers)) && !this.isPublic && this.plan.belongsToCurrentTenant != false; + return (this.plan.authorizationFlags?.some(x => x === AppPermission.AssignPlanUsers) || this.authentication.hasPermission(AppPermission.AssignPlanUsers)) && !this.isDeleted && !this.isPublic && this.plan.belongsToCurrentTenant != false; } get showActionsMenu(): boolean { - return this.isAuthenticated() && (this.canCreateNewVersion || this.showAllVersionsAction || this.canDeletePlan) + return this.isAuthenticated() && (this.canCreateNewVersion || this.showAllVersionsAction || this.canDeletePlan) && !this.isDeleted; } - get isDraftPlan(): boolean { - return this.plan.status?.internalStatus == PlanStatusEnum.Draft; + get isNotFinalizedPlan(): boolean { + return this.plan.status?.internalStatus == null || this.plan.status?.internalStatus != PlanStatusEnum.Finalized; } constructor( @@ -125,6 +127,9 @@ export class PlanListingItemComponent extends BaseComponent implements OnInit { this.isPublished = false; if (this.plan.status.internalStatus === PlanStatusEnum.Finalized && this.plan.accessType === PlanAccessType.Public) { this.isPublished = true } } + if (this.plan.isActive != IsActive.Active) { + this.isDeleted = true; + } } public isAuthenticated(): boolean { diff --git a/frontend/src/app/ui/plan/listing/plan-listing.component.ts b/frontend/src/app/ui/plan/listing/plan-listing.component.ts index 5d1397934..617d109f8 100644 --- a/frontend/src/app/ui/plan/listing/plan-listing.component.ts +++ b/frontend/src/app/ui/plan/listing/plan-listing.component.ts @@ -219,7 +219,12 @@ export class PlanListingComponent extends BaseListingComponent(x => x.id), nameof(x => x.label), nameof(x => x.description), + nameof(x => x.isActive), [nameof(x => x.status), nameof(x => x.id)].join('.'), [nameof(x => x.status), nameof(x => x.name)].join('.'), diff --git a/frontend/src/app/ui/plan/overview/plan-overview.component.html b/frontend/src/app/ui/plan/overview/plan-overview.component.html index 0d978be71..3e7f3945e 100644 --- a/frontend/src/app/ui/plan/overview/plan-overview.component.html +++ b/frontend/src/app/ui/plan/overview/plan-overview.component.html @@ -19,7 +19,7 @@
{{ plan.label }}
.
-
- +
@@ -247,7 +247,7 @@
diff --git a/frontend/src/app/ui/plan/overview/plan-overview.component.ts b/frontend/src/app/ui/plan/overview/plan-overview.component.ts index 2dd923f4c..e0ea6fe67 100644 --- a/frontend/src/app/ui/plan/overview/plan-overview.component.ts +++ b/frontend/src/app/ui/plan/overview/plan-overview.component.ts @@ -139,7 +139,7 @@ export class PlanOverviewComponent extends BaseComponent implements OnInit { this.getAvailableStatuses(this.plan.id); this.plan.planUsers = this.isActive ? data?.planUsers?.filter((x) => x.isActive === IsActive.Active) : data?.planUsers; this.plan.otherPlanVersions = data.otherPlanVersions?.filter(x => x.isActive === IsActive.Active) || null; - if (this.plan.descriptions) { + if (this.plan.descriptions && this.isActive) { if (this.plan.status?.internalStatus == PlanStatusEnum.Finalized) { this.plan.descriptions = data.descriptions.filter(x => x.isActive === IsActive.Active && x.status?.internalStatus === DescriptionStatusEnum.Finalized); } else { @@ -327,7 +327,8 @@ export class PlanOverviewComponent extends BaseComponent implements OnInit { canAssignPlanUsers(): boolean { const authorizationFlags = !this.isPublicView ? (this.plan as Plan).authorizationFlags : []; - return (authorizationFlags?.some(x => x === AppPermission.AssignPlanUsers) || this.authentication.hasPermission(AppPermission.AssignPlanUsers)) && this.isPublicView == false && this.plan.belongsToCurrentTenant != false; + return (authorizationFlags?.some(x => x === AppPermission.AssignPlanUsers) || this.authentication.hasPermission(AppPermission.AssignPlanUsers)) && this.isPublicView == false && this.plan.belongsToCurrentTenant != false && + (this.plan.status.internalStatus == null || this.plan.status.internalStatus != PlanStatusEnum.Finalized); } canDepositPlan(): boolean { diff --git a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html index 623524554..8cfdabdac 100644 --- a/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html +++ b/frontend/src/app/ui/plan/plan-editor-blueprint/plan-editor.component.html @@ -9,7 +9,7 @@
{{(canEdit ? 'PLAN-EDITOR.TITLE-EDIT' : 'PLAN-EDITOR.TITLE-PREVIEW') | translate}}
{{ formGroup.get('label').value }} ({{'PLAN-EDITOR.UNSAVED-CHANGES' | translate}})
-
+