ui changes for lock
This commit is contained in:
parent
0dbd652cf3
commit
efc0db5500
|
@ -2,6 +2,7 @@ package eu.eudat.query;
|
||||||
|
|
||||||
import eu.eudat.authorization.AuthorizationFlags;
|
import eu.eudat.authorization.AuthorizationFlags;
|
||||||
import eu.eudat.commons.enums.LockTargetType;
|
import eu.eudat.commons.enums.LockTargetType;
|
||||||
|
import eu.eudat.convention.ConventionService;
|
||||||
import eu.eudat.data.LockEntity;
|
import eu.eudat.data.LockEntity;
|
||||||
import eu.eudat.model.Lock;
|
import eu.eudat.model.Lock;
|
||||||
import gr.cite.tools.data.query.FieldResolver;
|
import gr.cite.tools.data.query.FieldResolver;
|
||||||
|
@ -35,6 +36,8 @@ public class LockQuery extends QueryBase<LockEntity> {
|
||||||
|
|
||||||
private EnumSet<AuthorizationFlags> authorize = EnumSet.of(AuthorizationFlags.None);
|
private EnumSet<AuthorizationFlags> authorize = EnumSet.of(AuthorizationFlags.None);
|
||||||
|
|
||||||
|
private ConventionService conventionService;
|
||||||
|
|
||||||
public LockQuery like(String value) {
|
public LockQuery like(String value) {
|
||||||
this.like = value;
|
this.like = value;
|
||||||
return this;
|
return this;
|
||||||
|
@ -135,7 +138,8 @@ public class LockQuery extends QueryBase<LockEntity> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LockQuery() {
|
public LockQuery(ConventionService conventionService) {
|
||||||
|
this.conventionService = conventionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -152,7 +156,12 @@ public class LockQuery extends QueryBase<LockEntity> {
|
||||||
protected <X, Y> Predicate applyFilters(QueryContext<X, Y> queryContext) {
|
protected <X, Y> Predicate applyFilters(QueryContext<X, Y> queryContext) {
|
||||||
List<Predicate> predicates = new ArrayList<>();
|
List<Predicate> predicates = new ArrayList<>();
|
||||||
if (this.like != null && !this.like.isEmpty()) {
|
if (this.like != null && !this.like.isEmpty()) {
|
||||||
predicates.add(queryContext.CriteriaBuilder.like(queryContext.Root.get(LockEntity._id), this.like));
|
this.like = this.like.replaceAll("%", "");
|
||||||
|
if (this.conventionService.isValidUUID(like)){
|
||||||
|
CriteriaBuilder.In<UUID> inClause = queryContext.CriteriaBuilder.in(queryContext.Root.get(LockEntity._id));
|
||||||
|
inClause.value(UUID.fromString(this.like));
|
||||||
|
predicates.add(inClause);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (this.ids != null) {
|
if (this.ids != null) {
|
||||||
CriteriaBuilder.In<UUID> inClause = queryContext.CriteriaBuilder.in(queryContext.Root.get(LockEntity._id));
|
CriteriaBuilder.In<UUID> inClause = queryContext.CriteriaBuilder.in(queryContext.Root.get(LockEntity._id));
|
||||||
|
|
|
@ -231,7 +231,7 @@
|
||||||
|
|
||||||
|
|
||||||
<li class="list-inline-item">
|
<li class="list-inline-item">
|
||||||
<mat-checkbox class="fieldset-checkbox-action-description-template-editor" [formControl]="this.form.get('hasCommentField')" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELDSET.INCLUDE-COMMENT-FIELD' | translate">{{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELDSET.COMMENT-FIELD' | translate}}</mat-checkbox>
|
<mat-checkbox class="fieldset-checkbox-action-description-template-editor" [formControl]="this.form.get('hasCommentField')" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELDSET.INCLUDE-COMMENT-FIELD' | translate" [disabled]="viewOnly">{{'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELDSET.COMMENT-FIELD' | translate}}</mat-checkbox>
|
||||||
<mat-error *ngIf="form.get('hasCommentField').hasError('backendError')">{{form.get('hasCommentField').getError('backendError').message}}</mat-error>
|
<mat-error *ngIf="form.get('hasCommentField').hasError('backendError')">{{form.get('hasCommentField').getError('backendError').message}}</mat-error>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-inline-item">
|
<li class="list-inline-item">
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<ul class="list-unstyled list-inline d-flex align-items-center">
|
<ul class="list-unstyled list-inline d-flex align-items-center">
|
||||||
<li class="list-inline-item">
|
<li class="list-inline-item">
|
||||||
<mat-slide-toggle class="field-toggler" [checked]="isRequired" (change)="toggleRequired($event)" labelPosition="before" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELD.MAKE-IT-REQUIRED' | translate" [disabled]="!fieldType">
|
<mat-slide-toggle class="field-toggler" [checked]="isRequired" (change)="toggleRequired($event)" labelPosition="before" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELD.MAKE-IT-REQUIRED' | translate" [disabled]="!fieldType || form.disabled">
|
||||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="fieldType === descriptionTemplateFieldTypeEnum.FREE_TEXT" class="list-inline-item">
|
<li *ngIf="fieldType === descriptionTemplateFieldTypeEnum.FREE_TEXT" class="list-inline-item">
|
||||||
<mat-slide-toggle class="field-toggler" [checked]="isURL" (change)="toggleURL($event)" labelPosition="before" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELD.MAKE-IT-REQUIRED' | translate" [disabled]="!fieldType">
|
<mat-slide-toggle class="field-toggler" [checked]="isURL" (change)="toggleURL($event)" labelPosition="before" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.ACTIONS.FIELD.MAKE-IT-REQUIRED' | translate" [disabled]="!fieldType || form.disabled">
|
||||||
{{'GENERAL.VALIDATION.URL.LABEL' | translate}}
|
{{'GENERAL.VALIDATION.URL.LABEL' | translate}}
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -119,7 +119,7 @@
|
||||||
<td>{{usersMap.get(user?.get('userId')?.value)?.name}}</td>
|
<td>{{usersMap.get(user?.get('userId')?.value)?.name}}</td>
|
||||||
<td>{{enumUtils.toUserDescriptionTemplateRoleString(user?.get('role')?.value)}}</td>
|
<td>{{enumUtils.toUserDescriptionTemplateRoleString(user?.get('role')?.value)}}</td>
|
||||||
<td>
|
<td>
|
||||||
<button mat-button class="delete-btn" (click)="verifyAndRemoveUser(i)" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-REMOVE-USER'| translate"><mat-icon>person_remove</mat-icon></button>
|
<button [disabled]="formGroup.disabled" mat-button class="delete-btn" (click)="verifyAndRemoveUser(i)" [matTooltip]="'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-REMOVE-USER'| translate"><mat-icon>person_remove</mat-icon></button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr *ngIf="formGroup.get('users')?.controls?.length === 0">
|
<tr *ngIf="formGroup.get('users')?.controls?.length === 0">
|
||||||
|
@ -141,7 +141,7 @@
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
<mat-form-field class="full-width basic-info-input">
|
<mat-form-field class="full-width basic-info-input">
|
||||||
<mat-label>{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS' | translate}}</mat-label>
|
<mat-label>{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS' | translate}}</mat-label>
|
||||||
<app-single-auto-complete [required]="false" [formControl]="userFormControl" (optionSelected)="addUser($event)" placeholder="{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS' | translate}}" [configuration]="userService.singleAutocompleteConfiguration">
|
<app-single-auto-complete [disabled]="formGroup.disabled" [required]="false" [formControl]="userFormControl" (optionSelected)="addUser($event)" placeholder="{{'DESCRIPTION-TEMPLATE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS' | translate}}" [configuration]="userService.singleAutocompleteConfiguration">
|
||||||
</app-single-auto-complete>
|
</app-single-auto-complete>
|
||||||
<mat-error *ngIf="formGroup.get('type').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
<mat-error *ngIf="formGroup.get('type').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
|
@ -163,7 +163,7 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
|
||||||
this.isDeleted = data ? data.isActive === IsActive.Inactive : false;
|
this.isDeleted = data ? data.isActive === IsActive.Inactive : false;
|
||||||
this.buildForm();
|
this.buildForm();
|
||||||
|
|
||||||
if (data && data.id) this.checkLock(data.id, LockTargetType.DescriptionTemplate);
|
if (data && data.id) this.checkLock(data.id, LockTargetType.DescriptionTemplate, 'DESCRIPTION-TEMPLATE-EDITOR.LOCKED-DIALOG.TITLE', 'DESCRIPTION-TEMPLATE-EDITOR.LOCKED-DIALOG.MESSAGE');
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.steps = this.stepper.steps;
|
this.steps = this.stepper.steps;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col"></div>
|
<div class="col"></div>
|
||||||
<div class="col-auto" *ngIf="!isNew">
|
<div class="col-auto" *ngIf="!isNew">
|
||||||
<button mat-button class="action-btn" type="button" (click)="delete()">
|
<button [disabled]="!isLockedByUser" mat-button class="action-btn" type="button" (click)="delete()">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
{{'DMP-BLUEPRINT-EDITOR.ACTIONS.DELETE' | translate}}
|
{{'DMP-BLUEPRINT-EDITOR.ACTIONS.DELETE' | translate}}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -180,7 +180,7 @@ export class DmpBlueprintEditorComponent extends BaseEditor<DmpBlueprintEditorMo
|
||||||
this.isDeleted = data ? data.isActive === IsActive.Inactive : false;
|
this.isDeleted = data ? data.isActive === IsActive.Inactive : false;
|
||||||
this.buildForm();
|
this.buildForm();
|
||||||
|
|
||||||
if (data && data.id) this.checkLock(data.id, LockTargetType.DmpBlueprint);
|
if (data && data.id) this.checkLock(data.id, LockTargetType.DmpBlueprint, 'DMP-BLUEPRINT-EDITOR.LOCKED-DIALOG.TITLE', 'DMP-BLUEPRINT-EDITOR.LOCKED-DIALOG.MESSAGE');
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error('Could not parse dmpBlueprint item: ' + data + error);
|
this.logger.error('Could not parse dmpBlueprint item: ' + data + error);
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-divider *ngIf="formGroup.get('id').value && (!viewOnly || (!lockStatus && !viewOnly) || lockStatus || (hasReversableStatus() && !lockStatus))" [vertical]="true" class="ml-2 mr-2"></mat-divider>
|
<mat-divider *ngIf="formGroup.get('id').value && (!viewOnly || (isLockedByUser && !viewOnly) || !isLockedByUser || (hasReversableStatus() && isLockedByUser))" [vertical]="true" class="ml-2 mr-2"></mat-divider>
|
||||||
|
|
||||||
<div *ngIf="isDirty() && !viewOnly" class="col-auto d-flex align-items-center pr-0">
|
<div *ngIf="isDirty() && !viewOnly" class="col-auto d-flex align-items-center pr-0">
|
||||||
<button [disabled]="saving" type="button" mat-raised-button class="description-discard-btn" (click)="discardChanges()">
|
<button [disabled]="saving" type="button" mat-raised-button class="description-discard-btn" (click)="discardChanges()">
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto d-flex align-items-center">
|
<div class="col-auto d-flex align-items-center">
|
||||||
<button [disabled]="saving" *ngIf="!lockStatus && !viewOnly && hasReversableStatus() == false" mat-raised-button class="description-save-btn mr-2" type="button">
|
<button [disabled]="saving" *ngIf="isLockedByUser && !viewOnly && hasReversableStatus() == false" mat-raised-button class="description-save-btn mr-2" type="button">
|
||||||
<span class="d-flex flex-row row">
|
<span class="d-flex flex-row row">
|
||||||
<span (click)="!saving?formSubmit():null" class="col">{{ 'DESCRIPTION-EDITOR.ACTIONS.SAVE' | translate }}</span>
|
<span (click)="!saving?formSubmit():null" class="col">{{ 'DESCRIPTION-EDITOR.ACTIONS.SAVE' | translate }}</span>
|
||||||
<mat-divider [vertical]="true"></mat-divider>
|
<mat-divider [vertical]="true"></mat-divider>
|
||||||
|
@ -73,9 +73,9 @@
|
||||||
<button [disabled]="saving" mat-menu-item (click)="save()" type="button">{{ 'DESCRIPTION-EDITOR.ACTIONS.SAVE-AND-CONTINUE' | translate }}</button>
|
<button [disabled]="saving" mat-menu-item (click)="save()" type="button">{{ 'DESCRIPTION-EDITOR.ACTIONS.SAVE-AND-CONTINUE' | translate }}</button>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
|
||||||
<button [disabled]="saving" *ngIf="!lockStatus && !viewOnly && hasReversableStatus() == false" mat-raised-button class="description-save-btn mr-2" type="button" (click)="finalize()">{{ 'DESCRIPTION-EDITOR.ACTIONS.FINALIZE' | translate }}</button>
|
<button [disabled]="saving" *ngIf="isLockedByUser && !viewOnly && hasReversableStatus() == false" mat-raised-button class="description-save-btn mr-2" type="button" (click)="finalize()">{{ 'DESCRIPTION-EDITOR.ACTIONS.FINALIZE' | translate }}</button>
|
||||||
<button [disabled]="saving" *ngIf="lockStatus" mat-raised-button disabled class="description-save-btn cursor-default" type="button">{{ 'DMP-OVERVIEW.LOCKED' | translate}}</button>
|
<button [disabled]="saving" *ngIf="!isLockedByUser" mat-raised-button disabled class="description-save-btn cursor-default" type="button">{{ 'DMP-OVERVIEW.LOCKED' | translate}}</button>
|
||||||
<button [disabled]="saving" *ngIf="hasReversableStatus() && !lockStatus" mat-raised-button class="description-save-btn mr-2" (click)="reverse()" type="button">{{ 'DESCRIPTION-EDITOR.ACTIONS.REVERSE' | translate }}</button>
|
<button [disabled]="saving" *ngIf="hasReversableStatus() && isLockedByUser" mat-raised-button class="description-save-btn mr-2" (click)="reverse()" type="button">{{ 'DESCRIPTION-EDITOR.ACTIONS.REVERSE' | translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
<div>{{'DESCRIPTION-EDITOR.TOC.NEXT' | translate}}</div>
|
<div>{{'DESCRIPTION-EDITOR.TOC.NEXT' | translate}}</div>
|
||||||
<span class="material-icons">chevron_right</span>
|
<span class="material-icons">chevron_right</span>
|
||||||
</div>
|
</div>
|
||||||
<button [disabled]="saving" (click)="save(saveAnd.addNew)" *ngIf="(step === maxStep) && !lockStatus && formGroup.get('descriptionTemplateId').value && !viewOnly" mat-raised-button type="button" class="col-auto stepper-btn add-description-btn ml-auto">
|
<button [disabled]="saving" (click)="save(saveAnd.addNew)" *ngIf="(step === maxStep) && isLockedByUser && formGroup.get('descriptionTemplateId').value && !viewOnly" mat-raised-button type="button" class="col-auto stepper-btn add-description-btn ml-auto">
|
||||||
{{ 'DESCRIPTION-EDITOR.ACTIONS.SAVE-AND-ADD-NEW' | translate }}
|
{{ 'DESCRIPTION-EDITOR.ACTIONS.SAVE-AND-ADD-NEW' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -195,7 +195,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
||||||
|
|
||||||
//Regular Editor case
|
//Regular Editor case
|
||||||
if (itemId != null && newDmpId == null) {
|
if (itemId != null && newDmpId == null) {
|
||||||
this.checkLock(this.item.id, LockTargetType.Description);
|
this.checkLock(this.item.id, LockTargetType.Description, 'DESCRIPTION-EDITOR.LOCKED-DIALOG.TITLE', 'DESCRIPTION-EDITOR.LOCKED-DIALOG.MESSAGE');
|
||||||
|
|
||||||
} else if (dmpId != null && dmpSectionId != null) {
|
} else if (dmpId != null && dmpSectionId != null) {
|
||||||
this.isNew = true;
|
this.isNew = true;
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
{{'DESCRIPTION-OVERVIEW.PUBLIC' | translate}}
|
{{'DESCRIPTION-OVERVIEW.PUBLIC' | translate}}
|
||||||
</div>
|
</div>
|
||||||
<span *ngIf="description.status === descriptionStatusEnum.Finalized && description.dmp.accessType === dmpAccessTypeEnum.Public" class="ml-2 mr-2">.</span>
|
<span *ngIf="description.status === descriptionStatusEnum.Finalized && description.dmp.accessType === dmpAccessTypeEnum.Public" class="ml-2 mr-2">.</span>
|
||||||
<div *ngIf="lockStatus" class="d-flex flex-row">
|
<div *ngIf="isLocked" class="d-flex flex-row">
|
||||||
<mat-icon class="status-icon">lock_outline</mat-icon>
|
<mat-icon class="status-icon">lock_outline</mat-icon>
|
||||||
{{'DESCRIPTION-OVERVIEW.LOCKED' | translate}}
|
{{'DESCRIPTION-OVERVIEW.LOCKED' | translate}}
|
||||||
</div>
|
</div>
|
||||||
<span *ngIf="lockStatus" class="ml-2 mr-2">.</span>
|
<span *ngIf="isLocked" class="ml-2 mr-2">.</span>
|
||||||
<div class="d-flex mr-2">{{'DESCRIPTION-OVERVIEW.EDITED' | translate}} :
|
<div class="d-flex mr-2">{{'DESCRIPTION-OVERVIEW.EDITED' | translate}} :
|
||||||
{{description.updatedAt | dateTimeCultureFormatter: "d MMMM y"}}
|
{{description.updatedAt | dateTimeCultureFormatter: "d MMMM y"}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,13 +39,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-4 pb-3">
|
<div class="row mb-4 pb-3">
|
||||||
<button *ngIf="canEdit && isDraftDescription(description) && !lockStatus" (click)="editClicked(description)" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above">
|
<button *ngIf="canEdit && isDraftDescription(description) && !isLocked" (click)="editClicked(description)" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above">
|
||||||
<mat-icon class="mat-mini-fab-icon">create</mat-icon>
|
<mat-icon class="mat-mini-fab-icon">create</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="canEdit" (click)="openCopyToDmpDialog()" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
|
<button *ngIf="canEdit" (click)="openCopyToDmpDialog()" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
|
||||||
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>
|
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="canDelete && !lockStatus" (click)="deleteClicked()" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.DELETE' | translate}}" matTooltipPosition="above">
|
<button *ngIf="canDelete && !isLocked" (click)="deleteClicked()" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.DELETE' | translate}}" matTooltipPosition="above">
|
||||||
<mat-icon class="mat-mini-fab-icon">delete</mat-icon>
|
<mat-icon class="mat-mini-fab-icon">delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-lg-4 p-0">
|
<div class="col-md-4 col-lg-4 p-0">
|
||||||
<div class="frame mb-3 pt-4 pl-3 pr-5 pb-1" *ngIf="isAuthenticated()">
|
<div class="frame mb-3 pt-4 pl-3 pr-5 pb-1" *ngIf="isAuthenticated()">
|
||||||
<div *ngIf="canFinalize && isDraftDescription(description) && !lockStatus">
|
<div *ngIf="canFinalize && isDraftDescription(description) && !isLocked">
|
||||||
<div class="row ml-0 mr-0 pl-4 d-flex align-items-center" (click)="finalize(description)">
|
<div class="row ml-0 mr-0 pl-4 d-flex align-items-center" (click)="finalize(description)">
|
||||||
<button mat-mini-fab class="finalize-btn">
|
<button mat-mini-fab class="finalize-btn">
|
||||||
<mat-icon class="mat-mini-fab-icon check-icon">check</mat-icon>
|
<mat-icon class="mat-mini-fab-icon check-icon">check</mat-icon>
|
||||||
|
|
|
@ -35,6 +35,8 @@ import { DescriptionCopyDialogComponent } from '../description-copy-dialog/descr
|
||||||
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
||||||
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
import { DescriptionValidationOutput } from '@app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component';
|
import { DescriptionValidationOutput } from '@app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component';
|
||||||
|
import { LockService } from '@app/core/services/lock/lock.service';
|
||||||
|
import { PopupNotificationDialogComponent } from '@app/library/notification/popup/popup-notification.component';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -52,7 +54,7 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
|
||||||
hasPublishButton: boolean = true;
|
hasPublishButton: boolean = true;
|
||||||
// breadCrumbs: Observable<BreadcrumbItem[]> = observableOf();
|
// breadCrumbs: Observable<BreadcrumbItem[]> = observableOf();
|
||||||
expand = false;
|
expand = false;
|
||||||
lockStatus: Boolean;
|
isLocked: Boolean;
|
||||||
descriptionStatusEnum = DescriptionStatus;
|
descriptionStatusEnum = DescriptionStatus;
|
||||||
dmpAccessTypeEnum = DmpAccessType;
|
dmpAccessTypeEnum = DmpAccessType;
|
||||||
dmpStatusEnum = DmpStatus;
|
dmpStatusEnum = DmpStatus;
|
||||||
|
@ -82,6 +84,7 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
|
||||||
public fileTransformerService: FileTransformerService,
|
public fileTransformerService: FileTransformerService,
|
||||||
private referenceTypeService: ReferenceTypeService,
|
private referenceTypeService: ReferenceTypeService,
|
||||||
private fb: UntypedFormBuilder,
|
private fb: UntypedFormBuilder,
|
||||||
|
private lockService: LockService
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
@ -160,19 +163,18 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
|
||||||
}
|
}
|
||||||
|
|
||||||
checkLockStatus(id: Guid) {
|
checkLockStatus(id: Guid) {
|
||||||
// TODO: add this
|
this.lockService.checkLockStatus(id).pipe(takeUntil(this._destroyed))
|
||||||
// this.lockService.checkLockStatus(id).pipe(takeUntil(this._destroyed))
|
.subscribe(lockStatus => {
|
||||||
// .subscribe(lockStatus => {
|
this.isLocked = lockStatus.status;
|
||||||
// this.lockStatus = lockStatus
|
if (this.isLocked) {
|
||||||
// if (lockStatus) {
|
this.dialog.open(PopupNotificationDialogComponent, {
|
||||||
// this.dialog.open(PopupNotificationDialogComponent, {
|
data: {
|
||||||
// data: {
|
title: this.language.instant('DESCRIPTION-OVERVIEW.LOCKED-DIALOG.TITLE'),
|
||||||
// title: this.language.instant('DESCRIPTION-OVERVIEW.LOCKED-DIALOG.TITLE'),
|
message: this.language.instant('DESCRIPTION-OVERVIEW.LOCKED-DIALOG.MESSAGE')
|
||||||
// message: this.language.instant('DESCRIPTION-OVERVIEW.LOCKED-DIALOG.MESSAGE')
|
}, maxWidth: '30em'
|
||||||
// }, maxWidth: '30em'
|
});
|
||||||
// });
|
}
|
||||||
// }
|
});
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onFetchingDeletedCallbackError(redirectRoot: string) {
|
onFetchingDeletedCallbackError(redirectRoot: string) {
|
||||||
|
|
|
@ -90,12 +90,12 @@
|
||||||
<li *ngFor="let description of descriptionsInSection(section.id); let descriptionIndex = index" (click)="editDescription(description.id, false)" class="active-description">
|
<li *ngFor="let description of descriptionsInSection(section.id); let descriptionIndex = index" (click)="editDescription(description.id, false)" class="active-description">
|
||||||
<div class="d-flex flex-direction-row">
|
<div class="d-flex flex-direction-row">
|
||||||
<div class="label" matTooltip="{{description.label}}">{{'DMP-EDITOR.DESCRIPTION' | translate}}: {{ description.label }}</div>
|
<div class="label" matTooltip="{{description.label}}">{{'DMP-EDITOR.DESCRIPTION' | translate}}: {{ description.label }}</div>
|
||||||
<mat-icon *ngIf="description.status !== descriptionStatusEnum.Finalized && canDeleteSection(section.id)" class="ml-2 mr-2 remove-description size-16" matTooltip="{{'DMP-EDITOR.ACTIONS.DELETE' | translate}}" (click)="$event.stopPropagation(); removeDescription(description.id)">close</mat-icon>
|
<mat-icon *ngIf="description.status !== descriptionStatusEnum.Finalized && canDeleteSection(section.id)" [ngClass]="{'drag-handle-disabled': formGroup.disabled}" class="ml-2 mr-2 remove-description size-16" matTooltip="{{'DMP-EDITOR.ACTIONS.DELETE' | translate}}" (click)="$event.stopPropagation(); removeDescription(description.id)">close</mat-icon>
|
||||||
<mat-icon *ngIf="description.status === descriptionStatusEnum.Finalized" class="ml-2 mr-2 status-icon check-icon size-16" matTooltip="{{'TYPES.DESCRIPTION-STATUS.FINALISED' | translate}}">check</mat-icon>
|
<mat-icon *ngIf="description.status === descriptionStatusEnum.Finalized" class="ml-2 mr-2 status-icon check-icon size-16" matTooltip="{{'TYPES.DESCRIPTION-STATUS.FINALISED' | translate}}">check</mat-icon>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
<ul *ngIf="item.id && section.hasTemplates && canEditSection(section.id)" class="add-description-option">
|
<ul *ngIf="item.id && section.hasTemplates && canEditSection(section.id) && !formGroup.disabled" class="add-description-option">
|
||||||
<li>
|
<li>
|
||||||
<a class="add-description-action" [routerLink]="['/descriptions/edit/' + item.id + '/' + section.id]">
|
<a class="add-description-action" [routerLink]="['/descriptions/edit/' + item.id + '/' + section.id]">
|
||||||
<mat-icon>add</mat-icon>{{'DMP-EDITOR.ACTIONS.ADD-DESCRIPTION-IN-SECTION' | translate}}
|
<mat-icon>add</mat-icon>{{'DMP-EDITOR.ACTIONS.ADD-DESCRIPTION-IN-SECTION' | translate}}
|
||||||
|
@ -215,7 +215,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<button mat-icon-button class="action-list-icon" matTooltip="{{'DMP-EDITOR.ACTIONS1.REMOVE-CONTACT' | translate}}" (click)="removeContact(contactIndex)" [disabled]="formGroup.disabled">
|
<button [disabled]="formGroup.disabled" mat-icon-button class="action-list-icon" matTooltip="{{'DMP-EDITOR.ACTIONS1.REMOVE-CONTACT' | translate}}" (click)="removeContact(contactIndex)" [disabled]="formGroup.disabled">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -198,7 +198,7 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.item.id != null) {
|
if (this.item.id != null) {
|
||||||
this.checkLock(this.item.id, LockTargetType.Dmp);
|
this.checkLock(this.item.id, LockTargetType.Dmp, 'DMP-EDITOR.LOCKED-DIALOG.TITLE', 'DMP-EDITOR.LOCKED-DIALOG.MESSAGE');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error('Could not parse Dmp item: ' + data + error);
|
this.logger.error('Could not parse Dmp item: ' + data + error);
|
||||||
|
|
|
@ -16,13 +16,13 @@
|
||||||
<p class="ml-0 mb-0 label2-txt">
|
<p class="ml-0 mb-0 label2-txt">
|
||||||
{{ enumUtils.toDmpUserRolesString(dmpService.getCurrentUserRolesInDmp(dmp?.dmpUsers)) }}
|
{{ enumUtils.toDmpUserRolesString(dmpService.getCurrentUserRolesInDmp(dmp?.dmpUsers)) }}
|
||||||
</div>
|
</div>
|
||||||
<span *ngIf="isUserDmpRelated() && (isPublishedDmp() || lockStatus)" class="ml-2 mr-2">.</span>
|
<span *ngIf="isUserDmpRelated() && (isPublishedDmp() || isLocked)" class="ml-2 mr-2">.</span>
|
||||||
<div *ngIf="isPublishedDmp()" class="d-flex flex-row">
|
<div *ngIf="isPublishedDmp()" class="d-flex flex-row">
|
||||||
<mat-icon class="status-icon">public</mat-icon>
|
<mat-icon class="status-icon">public</mat-icon>
|
||||||
{{'DMP-OVERVIEW.PUBLIC' | translate}}
|
{{'DMP-OVERVIEW.PUBLIC' | translate}}
|
||||||
</div>
|
</div>
|
||||||
<span *ngIf="isPublishedDmp() && lockStatus" class="ml-2 mr-2">.</span>
|
<span *ngIf="isPublishedDmp() && isLocked" class="ml-2 mr-2">.</span>
|
||||||
<div *ngIf="lockStatus" class="d-flex flex-row">
|
<div *ngIf="isLocked" class="d-flex flex-row">
|
||||||
<mat-icon class="status-icon">lock_outline</mat-icon>
|
<mat-icon class="status-icon">lock_outline</mat-icon>
|
||||||
{{'DMP-OVERVIEW.LOCKED' | translate}}
|
{{'DMP-OVERVIEW.LOCKED' | translate}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,14 +43,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- <button *ngIf="isDraftDmp(dmp) && isDmpOwner(dmp) && !lockStatus" (click)="editClicked(dmp)" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above"> -->
|
<!-- <button *ngIf="isDraftDmp(dmp) && isDmpOwner(dmp) && !isLocked" (click)="editClicked(dmp)" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above"> -->
|
||||||
<button *ngIf="canEditDmp() && !lockStatus" (click)="editClicked()" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above">
|
<button *ngIf="canEditDmp() && !isLocked" (click)="editClicked()" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.EDIT' | translate}}" matTooltipPosition="above">
|
||||||
<mat-icon class="mat-mini-fab-icon">create</mat-icon>
|
<mat-icon class="mat-mini-fab-icon">create</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="canCloneDmp()" (click)="cloneClicked()" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
|
<button *ngIf="canCloneDmp()" (click)="cloneClicked()" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.CLONE' | translate}}" matTooltipPosition="above">
|
||||||
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>
|
<mat-icon class="mat-mini-fab-icon">content_copy</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="canDeleteDmp() && !lockStatus" (click)="deleteClicked()" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.DELETE' | translate}}" matTooltipPosition="above">
|
<button *ngIf="canDeleteDmp() && !isLocked" (click)="deleteClicked()" mat-mini-fab class="mr-3 d-flex justify-content-center align-items-center" matTooltip="{{'DMP-OVERVIEW.ACTIONS.DELETE' | translate}}" matTooltipPosition="above">
|
||||||
<mat-icon class="mat-mini-fab-icon">delete</mat-icon>
|
<mat-icon class="mat-mini-fab-icon">delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
<span class="material-icons">horizontal_rule</span>
|
<span class="material-icons">horizontal_rule</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-2 add-description-txt" *ngIf="!lockStatus">
|
<div class="row mt-2 add-description-txt" *ngIf="!isLocked">
|
||||||
<a class="add-description-btn" *ngIf="canEditDmp()" [routerLink]="['/plans/edit/' + dmp.id]" target="_blank">
|
<a class="add-description-btn" *ngIf="canEditDmp()" [routerLink]="['/plans/edit/' + dmp.id]" target="_blank">
|
||||||
<mat-icon>add</mat-icon>
|
<mat-icon>add</mat-icon>
|
||||||
{{'DMP-OVERVIEW.ACTIONS.ADD-DESCRIPTION' | translate}}
|
{{'DMP-OVERVIEW.ACTIONS.ADD-DESCRIPTION' | translate}}
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="frame mb-3 pt-4 pl-3 pr-5 pb-1" *ngIf="isAuthenticated()">
|
<div class="frame mb-3 pt-4 pl-3 pr-5 pb-1" *ngIf="isAuthenticated()">
|
||||||
<div *ngIf="isDraftDmp() && canFinalizeDmp() && !lockStatus">
|
<div *ngIf="isDraftDmp() && canFinalizeDmp() && !isLocked">
|
||||||
<div class="row ml-0 mr-0 pl-4 d-flex align-items-center" (click)="finalize(dmp)">
|
<div class="row ml-0 mr-0 pl-4 d-flex align-items-center" (click)="finalize(dmp)">
|
||||||
<button mat-mini-fab class="finalize-btn">
|
<button mat-mini-fab class="finalize-btn">
|
||||||
<mat-icon class="mat-mini-fab-icon">check</mat-icon>
|
<mat-icon class="mat-mini-fab-icon">check</mat-icon>
|
||||||
|
|
|
@ -63,7 +63,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
hasPublishButton: boolean = true;
|
hasPublishButton: boolean = true;
|
||||||
// breadCrumbs: Observable<BreadcrumbItem[]> = observableOf();
|
// breadCrumbs: Observable<BreadcrumbItem[]> = observableOf();
|
||||||
// isUserOwner: boolean;
|
// isUserOwner: boolean;
|
||||||
lockStatus: Boolean;
|
isLocked: Boolean;
|
||||||
textMessage: any;
|
textMessage: any;
|
||||||
pastVersions: Dmp[]; //TODO: get these from the backend
|
pastVersions: Dmp[]; //TODO: get these from the backend
|
||||||
selectedModel: EntityDoi;
|
selectedModel: EntityDoi;
|
||||||
|
@ -709,8 +709,8 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
checkLockStatus(id: Guid) {
|
checkLockStatus(id: Guid) {
|
||||||
this.lockService.checkLockStatus(Guid.parse(id.toString())).pipe(takeUntil(this._destroyed))
|
this.lockService.checkLockStatus(Guid.parse(id.toString())).pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(lockStatus => {
|
.subscribe(lockStatus => {
|
||||||
this.lockStatus = lockStatus.status;
|
this.isLocked = lockStatus.status;
|
||||||
if (this.lockStatus) {
|
if (this.isLocked) {
|
||||||
this.dialog.open(PopupNotificationDialogComponent, {
|
this.dialog.open(PopupNotificationDialogComponent, {
|
||||||
data: {
|
data: {
|
||||||
title: this.language.instant('DMP-OVERVIEW.LOCKED-DIALOG.TITLE'),
|
title: this.language.instant('DMP-OVERVIEW.LOCKED-DIALOG.TITLE'),
|
||||||
|
|
|
@ -736,6 +736,10 @@
|
||||||
"CONFIRM-NO": "No, keep them.",
|
"CONFIRM-NO": "No, keep them.",
|
||||||
"REMOVE-SUCCESS": "Invalid visibility rules were removed successfully."
|
"REMOVE-SUCCESS": "Invalid visibility rules were removed successfully."
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"LOCKED-DIALOG": {
|
||||||
|
"TITLE": "Description Template is locked",
|
||||||
|
"MESSAGE": "Somebody else is modifying the description template at this moment. You may view the description template but you cannot make any changes. If you would like to modify it please come back later."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"GRANT-LISTING": {
|
"GRANT-LISTING": {
|
||||||
|
@ -1041,8 +1045,8 @@
|
||||||
"NEGATIVE": "No"
|
"NEGATIVE": "No"
|
||||||
},
|
},
|
||||||
"LOCKED-DIALOG": {
|
"LOCKED-DIALOG": {
|
||||||
"TITLE": "Dataset is locked",
|
"TITLE": "Description is locked",
|
||||||
"MESSAGE": "Somebody else is modifying the dataset at this moment. If you would like to modify or view it, please come back later."
|
"MESSAGE": "Somebody else is modifying the description at this moment. If you would like to modify or view it, please come back later."
|
||||||
},
|
},
|
||||||
"FINALISE-POPUP": {
|
"FINALISE-POPUP": {
|
||||||
"MESSAGE": "You will be directed to Dataset Editor where you can finalize the selected dataset. Would you like to proceed?",
|
"MESSAGE": "You will be directed to Dataset Editor where you can finalize the selected dataset. Would you like to proceed?",
|
||||||
|
@ -1125,6 +1129,10 @@
|
||||||
},
|
},
|
||||||
"MESSAGES":{
|
"MESSAGES":{
|
||||||
"MISSING-FIELDS": "There are some required fields left unfilled. Please check the DMP and make sure that all required questions are answered and URLs are provided with valid input. (Missing fields are marked in red color)"
|
"MISSING-FIELDS": "There are some required fields left unfilled. Please check the DMP and make sure that all required questions are answered and URLs are provided with valid input. (Missing fields are marked in red color)"
|
||||||
|
},
|
||||||
|
"LOCKED-DIALOG": {
|
||||||
|
"TITLE": "Description is locked",
|
||||||
|
"MESSAGE": "Somebody else is modifying the description at this moment. You may view the description but you cannot make any changes. If you would like to modify it please come back later."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"DESCRIPTION-COPY-DIALOG": {
|
"DESCRIPTION-COPY-DIALOG": {
|
||||||
|
@ -1824,6 +1832,10 @@
|
||||||
"MESSAGE": "Would you like to delete this DMP template?",
|
"MESSAGE": "Would you like to delete this DMP template?",
|
||||||
"CONFIRM-BUTTON": "Yes, delete",
|
"CONFIRM-BUTTON": "Yes, delete",
|
||||||
"CANCEL-BUTTON": "No"
|
"CANCEL-BUTTON": "No"
|
||||||
|
},
|
||||||
|
"LOCKED-DIALOG": {
|
||||||
|
"TITLE": "Dmp Blueprint is locked",
|
||||||
|
"MESSAGE": "Somebody else is modifying the dmp blueprint at this moment. You may view the dmp blueprint but you cannot make any changes. If you would like to modify it please come back later."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"GRANT-EDITOR": {
|
"GRANT-EDITOR": {
|
||||||
|
@ -2020,7 +2032,7 @@
|
||||||
"SAVE": "Save",
|
"SAVE": "Save",
|
||||||
"CANCEL": "Cancel"
|
"CANCEL": "Cancel"
|
||||||
},
|
},
|
||||||
"LOCKED1": {
|
"LOCKED-DIALOG": {
|
||||||
"TITLE": "DMP is locked",
|
"TITLE": "DMP is locked",
|
||||||
"MESSAGE": "Somebody else is modifying the DMP at this moment. You may view the dataset but you cannot make any changes."
|
"MESSAGE": "Somebody else is modifying the DMP at this moment. You may view the dataset but you cannot make any changes."
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ export abstract class BaseEditor<EditorModelType extends BaseEditorModel, Entity
|
||||||
isNew = true;
|
isNew = true;
|
||||||
isDeleted = false;
|
isDeleted = false;
|
||||||
isLocked: Boolean = false;
|
isLocked: Boolean = false;
|
||||||
|
isLockedByUser: Boolean = false;
|
||||||
formGroup: UntypedFormGroup = null;
|
formGroup: UntypedFormGroup = null;
|
||||||
lookupParams: any;
|
lookupParams: any;
|
||||||
|
|
||||||
|
@ -171,7 +172,7 @@ export abstract class BaseEditor<EditorModelType extends BaseEditorModel, Entity
|
||||||
// Lock
|
// Lock
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
protected checkLock(itemId: Guid, targetType: LockTargetType) {
|
protected checkLock(itemId: Guid, targetType: LockTargetType, title: string, message: string) {
|
||||||
if (itemId != null) {
|
if (itemId != null) {
|
||||||
this.isNew = false;
|
this.isNew = false;
|
||||||
// check if locked.
|
// check if locked.
|
||||||
|
@ -181,10 +182,12 @@ export abstract class BaseEditor<EditorModelType extends BaseEditorModel, Entity
|
||||||
this.formGroup.disable();
|
this.formGroup.disable();
|
||||||
this.dialog.open(PopupNotificationDialogComponent, {
|
this.dialog.open(PopupNotificationDialogComponent, {
|
||||||
data: {
|
data: {
|
||||||
title: this.language.instant('DATASET-WIZARD.LOCKED.TITLE'),
|
title: this.language.instant(title),
|
||||||
message: this.language.instant('DATASET-WIZARD.LOCKED.MESSAGE')
|
message: this.language.instant(message)
|
||||||
}, maxWidth: '30em'
|
}, maxWidth: '30em'
|
||||||
});
|
});
|
||||||
|
} else{
|
||||||
|
this.isLockedByUser = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.isLocked && !isNullOrUndefined(this.authService.currentAccountIsAuthenticated())) {
|
if (!this.isLocked && !isNullOrUndefined(this.authService.currentAccountIsAuthenticated())) {
|
||||||
|
|
Loading…
Reference in New Issue