rename dmp to plan frontend changes

This commit is contained in:
amentis 2024-07-08 14:11:23 +03:00
parent d44d420763
commit 26be07fb17
50 changed files with 144 additions and 144 deletions

View File

@ -45,7 +45,7 @@ const appRoutes: Routes = [
}, },
{ {
path: 'plans', path: 'plans',
loadChildren: () => import('./ui/plan/plan.module').then(m => m.DmpModule), loadChildren: () => import('./ui/plan/plan.module').then(m => m.PlanModule),
data: { data: {
authContext: { authContext: {
permissions: [AppPermission.ViewMyPlanPage] permissions: [AppPermission.ViewMyPlanPage]
@ -59,7 +59,7 @@ const appRoutes: Routes = [
}, },
{ {
path: 'explore-plans', path: 'explore-plans',
loadChildren: () => import('./ui/plan/plan.module').then(m => m.PublicDmpModule), loadChildren: () => import('./ui/plan/plan.module').then(m => m.PublicPlanModule),
data: { data: {
breadcrumb: true, breadcrumb: true,
...BreadcrumbService.generateRouteDataConfiguration({ ...BreadcrumbService.generateRouteDataConfiguration({

View File

@ -34,7 +34,7 @@ export class AnalyticsService {
public static PlanFilterDialog: string = 'DMP Criteria'; public static PlanFilterDialog: string = 'DMP Criteria';
public static PlanListingItem: string = 'DMP Listing Item'; public static PlanListingItem: string = 'DMP Listing Item';
public static StartNewPlanDialog: string = 'Start New DMP Dialog'; public static StartNewPlanDialog: string = 'Start New DMP Dialog';
public static DmpUploadDialog: string = 'DMP Upload Dialog'; public static PlanUploadDialog: string = 'DMP Upload Dialog';
public static PlanOverview: string = 'DMP Overview'; public static PlanOverview: string = 'DMP Overview';
public static FAQ: string = 'FAQ'; public static FAQ: string = 'FAQ';
public static Glossary: string = 'Glossary'; public static Glossary: string = 'Glossary';

View File

@ -167,12 +167,12 @@ export class MaintenanceTasksComponent extends BaseComponent implements OnInit {
.afterClosed() .afterClosed()
.subscribe(confirm => { .subscribe(confirm => {
if (confirm) { if (confirm) {
this.doSendDmpTouchEvents(ev); this.doSendPlanTouchEvents(ev);
} }
}); });
} }
private doSendDmpTouchEvents(ev: Event) { private doSendPlanTouchEvents(ev: Event) {
(ev.target as HTMLButtonElement).disabled = true; (ev.target as HTMLButtonElement).disabled = true;
this.maintenanceService.sendPlanTouchEvents().pipe(takeUntil(this._destroyed)).subscribe( this.maintenanceService.sendPlanTouchEvents().pipe(takeUntil(this._destroyed)).subscribe(
_ => { _ => {

View File

@ -190,7 +190,7 @@ export class PlanBlueprintEditorComponent extends BaseEditor<PlanBlueprintEditor
if (data && data.id) this.checkLock(data.id, LockTargetType.PlanBlueprint, 'PLAN-BLUEPRINT-EDITOR.LOCKED-DIALOG.TITLE', 'PLAN-BLUEPRINT-EDITOR.LOCKED-DIALOG.MESSAGE'); if (data && data.id) this.checkLock(data.id, LockTargetType.PlanBlueprint, 'PLAN-BLUEPRINT-EDITOR.LOCKED-DIALOG.TITLE', 'PLAN-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 planBlueprint item: ' + data + error);
this.uiNotificationService.snackBarNotification(this.language.instant('COMMONS.ERRORS.DEFAULT'), SnackBarNotificationLevel.Error); this.uiNotificationService.snackBarNotification(this.language.instant('COMMONS.ERRORS.DEFAULT'), SnackBarNotificationLevel.Error);
} }
} }

View File

@ -28,7 +28,7 @@ export class DescriptionCopyDialogComponent {
sections: PlanBlueprintDefinitionSection[] = []; sections: PlanBlueprintDefinitionSection[] = [];
descriptionDescriptionTemplateLabel: String; descriptionDescriptionTemplateLabel: String;
planAutoCompleteConfiguration: SingleAutoCompleteConfiguration = { //TODO: add filter to only get DMPs that have connection with the same Description Template group. planAutoCompleteConfiguration: SingleAutoCompleteConfiguration = { //TODO: add filter to only get plans that have connection with the same Description Template group.
initialItems: (data?: any) => this.planService.query(this.buildPlanLookup(null,null,null, this.planDescriptionTemplateLookup)).pipe(map(x => x.items)), initialItems: (data?: any) => this.planService.query(this.buildPlanLookup(null,null,null, this.planDescriptionTemplateLookup)).pipe(map(x => x.items)),
filterFn: (searchQuery: string, data?: any) => this.planService.query(this.buildPlanLookup(searchQuery, null, null, this.planDescriptionTemplateLookup)).pipe(map(x => x.items)), filterFn: (searchQuery: string, data?: any) => this.planService.query(this.buildPlanLookup(searchQuery, null, null, this.planDescriptionTemplateLookup)).pipe(map(x => x.items)),
getSelectedItem: (selectedItem: any) => this.planService.query(this.buildPlanLookup(null, null, [selectedItem])).pipe(map(x => x.items[0])), getSelectedItem: (selectedItem: any) => this.planService.query(this.buildPlanLookup(null, null, [selectedItem])).pipe(map(x => x.items[0])),

View File

@ -86,7 +86,7 @@
<div class="row editor-content"> <div class="row editor-content">
<div style="width: 22em;" class="d-flex flex-column"> <div style="width: 22em;" class="d-flex flex-column">
<div class="stepper-back row"> <div class="stepper-back row">
<div class="col-auto d-flex align-items-center back-to-plan" (click)="backToDmp(this.formGroup.get('planId').value)"> <div class="col-auto d-flex align-items-center back-to-plan" (click)="backToPlan(this.formGroup.get('planId').value)">
<mat-icon class="back-icon pointer">chevron_left</mat-icon> <mat-icon class="back-icon pointer">chevron_left</mat-icon>
<span class="pointer">{{'DESCRIPTION-EDITOR.ACTIONS.BACK-TO' | translate}}</span> <span class="pointer">{{'DESCRIPTION-EDITOR.ACTIONS.BACK-TO' | translate}}</span>
</div> </div>

View File

@ -333,7 +333,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
const planId = this.formGroup.get('planId').value; const planId = this.formGroup.get('planId').value;
this.formGroup = null; this.formGroup = null;
this.backToDmp(planId); this.backToPlan(planId);
}); });
} }
@ -414,7 +414,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
this.formService.validateAllFormFields(this.formGroup); this.formService.validateAllFormFields(this.formGroup);
} }
backToDmp(planId) { backToPlan(planId) {
this.router.navigate([this.routerUtils.generateUrl(['/plans/', 'edit/', planId])]); this.router.navigate([this.routerUtils.generateUrl(['/plans/', 'edit/', planId])]);
} }
@ -756,12 +756,12 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
}); });
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => { dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
if (result) { if (result) {
const dmpUserRemovePersist: DescriptionStatusPersist = { const planUserRemovePersist: DescriptionStatusPersist = {
id: this.formGroup.get('id').value, id: this.formGroup.get('id').value,
status: DescriptionStatus.Draft, status: DescriptionStatus.Draft,
hash: this.formGroup.get('hash').value hash: this.formGroup.get('hash').value
}; };
this.descriptionService.persistStatus(dmpUserRemovePersist, DescriptionEditorEntityResolver.lookupFields()).pipe(takeUntil(this._destroyed)) this.descriptionService.persistStatus(planUserRemovePersist, DescriptionEditorEntityResolver.lookupFields()).pipe(takeUntil(this._destroyed))
.subscribe(data => { .subscribe(data => {
this.isFinalized = false; this.isFinalized = false;
this.refreshData(); this.refreshData();

View File

@ -54,7 +54,7 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
planId: string; planId: string;
status: Number; status: Number;
totalCount: number; totalCount: number;
dmpSearchEnabled = true; plansearchEnabled = true;
listingItems: any[] = []; listingItems: any[] = [];
hasLoadedListingItems: boolean = false; hasLoadedListingItems: boolean = false;
isPublic: boolean = false; isPublic: boolean = false;
@ -391,13 +391,13 @@ export class DescriptionListingComponent extends BaseListingComponent<BaseDescri
lookup.descriptionTemplateSubQuery.ids = descriptionTemplates; lookup.descriptionTemplateSubQuery.ids = descriptionTemplates;
} else lookup.descriptionTemplateSubQuery = null; } else lookup.descriptionTemplateSubQuery = null;
// Dmps // Plans
let plans = formGroup.get("associatedPlanIds")?.value ?? null; let addDmps = plans && plans?.length > 0; let plans = formGroup.get("associatedPlanIds")?.value ?? null; let addPlans = plans && plans?.length > 0;
let roles = formGroup.get("role")?.value !== null ? [formGroup.get("role")?.value] : null; let addRoles = roles && roles?.length > 0; let roles = formGroup.get("role")?.value !== null ? [formGroup.get("role")?.value] : null; let addRoles = roles && roles?.length > 0;
if (addDmps || addRoles) { if (addPlans || addRoles) {
lookup.planSubQuery = DescriptionFilterService.initializePlanLookup(); lookup.planSubQuery = DescriptionFilterService.initializePlanLookup();
if (addDmps) lookup.planSubQuery.ids = plans?.length > 0 ? plans : null; if (addPlans) lookup.planSubQuery.ids = plans?.length > 0 ? plans : null;
if (addRoles) { if (addRoles) {
lookup.planSubQuery.planUserSubQuery = DescriptionFilterService.initializePlanUserLookup(); lookup.planSubQuery.planUserSubQuery = DescriptionFilterService.initializePlanUserLookup();

View File

@ -8,8 +8,8 @@
<div *ngIf="description.status === descriptionStatusEnum.Finalized" class="col-auto description-title">{{description.label}}</div> <div *ngIf="description.status === descriptionStatusEnum.Finalized" class="col-auto description-title">{{description.label}}</div>
<div *ngIf="description.status === descriptionStatusEnum.Draft" class="col-auto description-title-draft">{{description.label}}</div> <div *ngIf="description.status === descriptionStatusEnum.Draft" class="col-auto description-title-draft">{{description.label}}</div>
<div class="description-subtitle"> <div class="description-subtitle">
<span *ngIf="isUserDMPRelated()" class="col-auto">{{ enumUtils.toPlanUserRolesString(planService.getCurrentUserRolesInPlan(description?.plan?.planUsers)) }}</span> <span *ngIf="isUserPlanRelated()" class="col-auto">{{ enumUtils.toPlanUserRolesString(planService.getCurrentUserRolesInPlan(description?.plan?.planUsers)) }}</span>
<span *ngIf="isUserDMPRelated()">.</span> <span *ngIf="isUserPlanRelated()">.</span>
<span class="col-auto" *ngIf="description.status === descriptionStatusEnum.Finalized && description.plan.accessType === planAccessTypeEnum.Public"><span class="material-icons icon-align">public</span>{{'DESCRIPTION-LISTING.STATES.PUBLIC' | translate}}</span> <span class="col-auto" *ngIf="description.status === descriptionStatusEnum.Finalized && description.plan.accessType === planAccessTypeEnum.Public"><span class="material-icons icon-align">public</span>{{'DESCRIPTION-LISTING.STATES.PUBLIC' | translate}}</span>
<span *ngIf="description.status === descriptionStatusEnum.Finalized && description.plan.accessType != planAccessTypeEnum.Public" class="col-auto"><span class="material-icons icon-align">done</span>{{ enumUtils.toDescriptionStatusString(description.status) }}</span> <span *ngIf="description.status === descriptionStatusEnum.Finalized && description.plan.accessType != planAccessTypeEnum.Public" class="col-auto"><span class="material-icons icon-align">done</span>{{ enumUtils.toDescriptionStatusString(description.status) }}</span>
<span *ngIf="description.status === descriptionStatusEnum.Draft" class=" col-auto draft"><span class="material-icons icon-align">create</span>{{ enumUtils.toDescriptionStatusString(description.status) }}</span> <span *ngIf="description.status === descriptionStatusEnum.Draft" class=" col-auto draft"><span class="material-icons icon-align">create</span>{{ enumUtils.toDescriptionStatusString(description.status) }}</span>
@ -26,11 +26,11 @@
<div class="description-card-actions"> <div class="description-card-actions">
<a class="col-auto border-right pointer" *ngIf="fileTransformerService.availableFormatsFor(fileTransformerEntityTypeEnum.Description) && fileTransformerService.availableFormatsFor(fileTransformerEntityTypeEnum.Description).length > 0" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DESCRIPTION-LISTING.ACTIONS.EXPORT' | translate}}</a> <a class="col-auto border-right pointer" *ngIf="fileTransformerService.availableFormatsFor(fileTransformerEntityTypeEnum.Description) && fileTransformerService.availableFormatsFor(fileTransformerEntityTypeEnum.Description).length > 0" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'DESCRIPTION-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="canInvitePlanUsers" (click)="openShareDialog()"><span class="material-icons icon-align pr-2">group_add</span>{{'DESCRIPTION-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a> <a class="col-auto border-right pointer" *ngIf="canInvitePlanUsers" (click)="openShareDialog()"><span class="material-icons icon-align pr-2">group_add</span>{{'DESCRIPTION-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="copyToDmp(description)"><span class="material-icons icon-align pr-2">file_copy</span>{{'DESCRIPTION-LISTING.ACTIONS.COPY-DESCRIPTION' | translate}}</a> <a class="col-auto border-right pointer" *ngIf="isAuthenticated()" (click)="copyToPlan(description)"><span class="material-icons icon-align pr-2">file_copy</span>{{'DESCRIPTION-LISTING.ACTIONS.COPY-DESCRIPTION' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="canDelete" (click)="deleteClicked(description.id)"><span class="material-icons icon-align pr-2">delete</span>{{ 'DESCRIPTION-LISTING.ACTIONS.DELETE' | translate }}</a> <a class="col-auto border-right pointer" *ngIf="canDelete" (click)="deleteClicked(description.id)"><span class="material-icons icon-align pr-2">delete</span>{{ 'DESCRIPTION-LISTING.ACTIONS.DELETE' | translate }}</a>
</div> </div>
<mat-menu #actionsMenu="matMenu"> <mat-menu #actionsMenu="matMenu">
<button *ngIf="isAuthenticated()" mat-menu-item (click)="copyToDmp(description)" class="menu-item"> <button *ngIf="isAuthenticated()" mat-menu-item (click)="copyToPlan(description)" class="menu-item">
<mat-icon>file_copy</mat-icon>{{'DESCRIPTION-LISTING.ACTIONS.COPY-DESCRIPTION' | translate}} <mat-icon>file_copy</mat-icon>{{'DESCRIPTION-LISTING.ACTIONS.COPY-DESCRIPTION' | translate}}
</button> </button>
<button *ngIf="canDelete" mat-menu-item (click)="deleteClicked(description.id)" class="menu-item"> <button *ngIf="canDelete" mat-menu-item (click)="deleteClicked(description.id)" class="menu-item">

View File

@ -109,7 +109,7 @@ export class DescriptionListingItemComponent extends BaseComponent implements On
} }
} }
isUserDMPRelated() { isUserPlanRelated() {
const principalId: Guid = this.authService.userId(); 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));
} }
@ -122,7 +122,7 @@ export class DescriptionListingItemComponent extends BaseComponent implements On
return this.isPublic ? this.routerUtils.generateUrl(['/explore-descriptions/overview/public/', this.description.id.toString()]) : this.routerUtils.generateUrl(['/descriptions/overview/', this.description.id.toString()]); return this.isPublic ? this.routerUtils.generateUrl(['/explore-descriptions/overview/public/', this.description.id.toString()]) : this.routerUtils.generateUrl(['/descriptions/overview/', this.description.id.toString()]);
} }
getDmpLink(): string[] { getPlanLink(): string[] {
return this.isPublic ? [`/explore-plans/overview/public/${this.description.plan.id}`] : [`/plans/edit/${this.description.plan.id}`]; return this.isPublic ? [`/explore-plans/overview/public/${this.description.plan.id}`] : [`/plans/edit/${this.description.plan.id}`];
} }
@ -141,7 +141,7 @@ export class DescriptionListingItemComponent extends BaseComponent implements On
}); });
} }
copyToDmp(description: Description) { copyToPlan(description: Description) {
const formGroup = this.fb.group({ const formGroup = this.fb.group({
planId: this.fb.control(null, Validators.required), planId: this.fb.control(null, Validators.required),
sectionId: this.fb.control(null, Validators.required), sectionId: this.fb.control(null, Validators.required),

View File

@ -57,7 +57,7 @@
</div> </div>
</ng-template> </ng-template>
<div *ngIf="canEdit" class="col-auto pr-0"> <div *ngIf="canEdit" class="col-auto pr-0">
<button (click)="openCopyToDmpDialog()" mat-mini-fab class="mr-3 actions-btn" matTooltip="{{'DESCRIPTION-OVERVIEW.ACTIONS.CLONE' | translate}}" matTooltipPosition="above"> <button (click)="openCopyToPlanDialog()" 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>
</div> </div>
@ -72,7 +72,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 col-lg-7"> <div class="col-12 col-lg-7">
<button class="w-100 plan-btn p-1" (click)="dmpClicked(description.plan)"> <button class="w-100 plan-btn p-1" (click)="planClicked(description.plan)">
<div class="plan-btn-label"> <div class="plan-btn-label">
{{ this.description.plan.label }} {{ this.description.plan.label }}
</div> </div>
@ -213,7 +213,7 @@
</p> </p>
</div> </div>
<div class="col-auto" *ngIf="canInvitePlanUsers && description.plan?.status === planStatusEnum.Draft && planUser.role != planUserRoleEnum.Owner"> <div class="col-auto" *ngIf="canInvitePlanUsers && description.plan?.status === planStatusEnum.Draft && planUser.role != planUserRoleEnum.Owner">
<button (click)="removeUserFromDmp(planUser)" mat-mini-fab matTooltip="{{ 'DESCRIPTION-OVERVIEW.ACTIONS.REMOVE-AUTHOR' | translate}}" matTooltipPosition="above"> <button (click)="removeUserFromPlan(planUser)" mat-mini-fab matTooltip="{{ 'DESCRIPTION-OVERVIEW.ACTIONS.REMOVE-AUTHOR' | 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>

View File

@ -308,7 +308,7 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
}); });
} }
dmpClicked(plan: Plan) { planClicked(plan: Plan) {
if (this.isPublicView) { if (this.isPublicView) {
this.router.navigate([this.routerUtils.generateUrl(['/explore-plans/overview/public/', plan.id.toString()])]); this.router.navigate([this.routerUtils.generateUrl(['/explore-plans/overview/public/', plan.id.toString()])]);
} else { } else {
@ -360,7 +360,7 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
return sections == null ? '' : sections[0].label; return sections == null ? '' : sections[0].label;
} }
openCopyToDmpDialog() { openCopyToPlanDialog() {
const formGroup = this.fb.group({ const formGroup = this.fb.group({
planId: this.fb.control(null, Validators.required), planId: this.fb.control(null, Validators.required),
sectionId: this.fb.control(null, Validators.required), sectionId: this.fb.control(null, Validators.required),
@ -387,7 +387,7 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
}); });
} }
removeUserFromDmp(dmpUser: PlanUser) { removeUserFromPlan(planUser: PlanUser) {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-USER'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-USER'),
@ -398,12 +398,12 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
}); });
dialogRef.afterClosed().subscribe(result => { dialogRef.afterClosed().subscribe(result => {
if (result) { if (result) {
const dmpUserRemovePersist: PlanUserRemovePersist = { const planUserRemovePersist: PlanUserRemovePersist = {
id: dmpUser.id, id: planUser.id,
planId: this.description.plan.id, planId: this.description.plan.id,
role: dmpUser.role role: planUser.role
}; };
this.planService.removeUser(dmpUserRemovePersist).pipe(takeUntil(this._destroyed)) this.planService.removeUser(planUserRemovePersist).pipe(takeUntil(this._destroyed))
.subscribe(data => { .subscribe(data => {
this.reloadPage(); this.reloadPage();
}, (error: any) => this.httpErrorHandlingService.handleBackedRequestError(error)); }, (error: any) => this.httpErrorHandlingService.handleBackedRequestError(error));
@ -465,12 +465,12 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
}); });
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => { dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
if (result) { if (result) {
const dmpUserRemovePersist: DescriptionStatusPersist = { const planUserRemovePersist: DescriptionStatusPersist = {
id: description.id, id: description.id,
status: DescriptionStatus.Draft, status: DescriptionStatus.Draft,
hash: description.hash hash: description.hash
}; };
this.descriptionService.persistStatus(dmpUserRemovePersist).pipe(takeUntil(this._destroyed)) this.descriptionService.persistStatus(planUserRemovePersist).pipe(takeUntil(this._destroyed))
.subscribe(data => { .subscribe(data => {
this.reloadPage(); this.reloadPage();
this.onUpdateCallbackSuccess() this.onUpdateCallbackSuccess()

View File

@ -5,7 +5,7 @@
<mat-divider class="top-divider"></mat-divider> <mat-divider class="top-divider"></mat-divider>
<div class="profile-settings"> <div class="profile-settings">
<a mat-button class="profile mt-2 w-100 ml-0 pl-1 d-inline-block" (click)="navigateToProfile()">{{'USER-DIALOG.USER-PROFILE-SETTINGS' | translate}}</a> <a mat-button class="profile mt-2 w-100 ml-0 pl-1 d-inline-block" (click)="navigateToProfile()">{{'USER-DIALOG.USER-PROFILE-SETTINGS' | translate}}</a>
<a mat-button class="profile mb-2 w-100 ml-0 pl-1 d-inline-block" (click)="navigateToMyDmps()">{{'USER-PROFILE.ASSOCIATED-PLANS' | translate}}</a> <a mat-button class="profile mb-2 w-100 ml-0 pl-1 d-inline-block" (click)="navigateToMyPlans()">{{'USER-PROFILE.ASSOCIATED-PLANS' | translate}}</a>
</div> </div>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<div> <div>

View File

@ -68,7 +68,7 @@ export class UserDialogComponent implements OnInit, OnDestroy {
this.router.navigate([this.routerUtils.generateUrl('/profile')]); this.router.navigate([this.routerUtils.generateUrl('/profile')]);
} }
public navigateToMyDmps() { public navigateToMyPlans() {
this.dialogRef.close(); this.dialogRef.close();
this.router.navigate([this.routerUtils.generateUrl('/plans')]); this.router.navigate([this.routerUtils.generateUrl('/plans')]);
} }

View File

@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { AuthService } from '@app/core/services/auth/auth.service'; import { AuthService } from '@app/core/services/auth/auth.service';
import { DmpInvitationService } from '@app/core/services/plan/plan-invitation.service'; import { PlanInvitationService } from '@app/core/services/plan/plan-invitation.service';
import { BaseComponent } from '@common/base/base.component'; import { BaseComponent } from '@common/base/base.component';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
@ -12,7 +12,7 @@ import { takeUntil } from 'rxjs/operators';
}) })
export class InvitationAcceptedComponent extends BaseComponent implements OnInit { export class InvitationAcceptedComponent extends BaseComponent implements OnInit {
constructor( constructor(
private dmpInvitationService: DmpInvitationService, private planInvitationService: PlanInvitationService,
private route: ActivatedRoute, private route: ActivatedRoute,
private router: Router, private router: Router,
private authentication: AuthService, private authentication: AuthService,
@ -27,7 +27,7 @@ export class InvitationAcceptedComponent extends BaseComponent implements OnInit
const id = params['id']; const id = params['id'];
if(this.isAuthenticated()){ if(this.isAuthenticated()){
this.dmpInvitationService.exchange(id) this.planInvitationService.exchange(id)
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(result => { .subscribe(result => {
this.router.navigate(['plans/edit/' + result]); this.router.navigate(['plans/edit/' + result]);

View File

@ -29,16 +29,16 @@
</div> </div>
<!-- End of Related Dataset Templates Filter --> <!-- End of Related Dataset Templates Filter -->
<!-- Dmp Blueprint Filter --> <!-- Plan Blueprint Filter -->
<div class="col-10"> <div class="col-10">
<h6 class="category-title">{{ 'PLAN-LISTING.FILTERS.ASSOCIATED-PLAN-BLUEPRINTS.NAME' | translate}}</h6> <h6 class="category-title">{{ 'PLAN-LISTING.FILTERS.ASSOCIATED-PLAN-BLUEPRINTS.NAME' | translate}}</h6>
<mat-form-field class="w-100"> <mat-form-field class="w-100">
<mat-label>{{ 'PLAN-LISTING.FILTERS.ASSOCIATED-PLAN-BLUEPRINTS.PLACEHOLDER' | translate }}</mat-label> <mat-label>{{ 'PLAN-LISTING.FILTERS.ASSOCIATED-PLAN-BLUEPRINTS.PLACEHOLDER' | translate }}</mat-label>
<app-multiple-auto-complete [formControl]="formGroup.get('dmpBlueprints')" [configuration]="dmpBlueprintAutoCompleteConfiguration"></app-multiple-auto-complete> <app-multiple-auto-complete [formControl]="formGroup.get('planBlueprints')" [configuration]="planBlueprintAutoCompleteConfiguration"></app-multiple-auto-complete>
</mat-form-field> </mat-form-field>
<hr> <hr>
</div> </div>
<!-- End of Dmp Blueprint Filter --> <!-- End of Plan Blueprint Filter -->
<!-- Role Filter --> <!-- Role Filter -->
<div *ngIf="isAuthenticated()" class="col-10"> <div *ngIf="isAuthenticated()" class="col-10">

View File

@ -41,7 +41,7 @@ export class PlanFilterComponent extends BaseCriteriaComponent implements OnInit
maxFileSize: number = 1048576; maxFileSize: number = 1048576;
descriptionTemplateAutoCompleteConfiguration: MultipleAutoCompleteConfiguration; descriptionTemplateAutoCompleteConfiguration: MultipleAutoCompleteConfiguration;
dmpBlueprintAutoCompleteConfiguration: MultipleAutoCompleteConfiguration; planBlueprintAutoCompleteConfiguration: MultipleAutoCompleteConfiguration;
referenceTypeAutocompleteConfiguration: SingleAutoCompleteConfiguration; referenceTypeAutocompleteConfiguration: SingleAutoCompleteConfiguration;
referenceAutocompleteConfiguration: Map<string, MultipleAutoCompleteConfiguration>; referenceAutocompleteConfiguration: Map<string, MultipleAutoCompleteConfiguration>;
@ -65,7 +65,7 @@ export class PlanFilterComponent extends BaseCriteriaComponent implements OnInit
if (changes['filterFormGroup']) { if (changes['filterFormGroup']) {
this.descriptionTemplateAutoCompleteConfiguration = this.descriptionTemplateService.buildDescriptionTempalteGroupMultipleAutocompleteConfiguration(); this.descriptionTemplateAutoCompleteConfiguration = this.descriptionTemplateService.buildDescriptionTempalteGroupMultipleAutocompleteConfiguration();
this.dmpBlueprintAutoCompleteConfiguration = this.planBlueprintService.multipleAutocompleteConfiguration; this.planBlueprintAutoCompleteConfiguration = this.planBlueprintService.multipleAutocompleteConfiguration;
this.referenceTypeAutocompleteConfiguration = this.getReferenceTypeAutocompleteConfiguration(); this.referenceTypeAutocompleteConfiguration = this.getReferenceTypeAutocompleteConfiguration();
this.referenceAutocompleteConfiguration = new Map<string, MultipleAutoCompleteConfiguration>(); this.referenceAutocompleteConfiguration = new Map<string, MultipleAutoCompleteConfiguration>();

View File

@ -30,7 +30,7 @@
<div class="plan-card-actions"> <div class="plan-card-actions">
<a class="col-auto border-right pointer" *ngIf="canExportPlan() && fileTransformerService.availableFormatsFor(fileTransformerEntityTypeEnum.Dmp).length > 0" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'PLAN-LISTING.ACTIONS.EXPORT' | translate}}</a> <a class="col-auto border-right pointer" *ngIf="canExportPlan() && fileTransformerService.availableFormatsFor(fileTransformerEntityTypeEnum.Dmp).length > 0" [matMenuTriggerFor]="exportMenu"><span class="material-icons icon-align pr-2">open_in_new</span>{{'PLAN-LISTING.ACTIONS.EXPORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="isDraftPlan(plan) && canEditPlan()" [routerLink]="this.routerUtils.generateUrl(['/plans/edit/', plan.id])" target="_blank"><span class="material-icons icon-align">add</span>{{'PLAN-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</a> <a class="col-auto border-right pointer" *ngIf="isDraftPlan(plan) && canEditPlan()" [routerLink]="this.routerUtils.generateUrl(['/plans/edit/', plan.id])" target="_blank"><span class="material-icons icon-align">add</span>{{'PLAN-LISTING.ACTIONS.ADD-DESCRIPTION-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="canInvitePlanUsers()" (click)="inviteToDmp()"><span class="material-icons icon-align pr-2">group_add</span>{{'PLAN-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a> <a class="col-auto border-right pointer" *ngIf="canInvitePlanUsers()" (click)="inviteToPlan()"><span class="material-icons icon-align pr-2">group_add</span>{{'PLAN-LISTING.ACTIONS.INVITE-SHORT' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="canClonePlan()" (click)="cloneClicked()"><span class="material-icons icon-align pr-2">filter_none</span>{{'PLAN-LISTING.ACTIONS.CLONE' | translate}}</a> <a class="col-auto border-right pointer" *ngIf="canClonePlan()" (click)="cloneClicked()"><span class="material-icons icon-align pr-2">filter_none</span>{{'PLAN-LISTING.ACTIONS.CLONE' | translate}}</a>
<a class="col-auto border-right pointer" *ngIf="!isAuthenticated()" (click)="viewVersions(plan)"><span class="material-icons icon-align pr-2">library_books</span>{{'PLAN-LISTING.ACTIONS.VIEW-VERSION' | translate}}</a> <a class="col-auto border-right pointer" *ngIf="!isAuthenticated()" (click)="viewVersions(plan)"><span class="material-icons icon-align pr-2">library_books</span>{{'PLAN-LISTING.ACTIONS.VIEW-VERSION' | translate}}</a>

View File

@ -92,7 +92,7 @@ export class PlanListingItemComponent extends BaseComponent implements OnInit {
return this.authentication.currentAccountIsAuthenticated(); return this.authentication.currentAccountIsAuthenticated();
} }
inviteToDmp() { inviteToPlan() {
const dialogRef = this.dialog.open(PlanInvitationDialogComponent, { const dialogRef = this.dialog.open(PlanInvitationDialogComponent, {
// height: '250px', // height: '250px',
// width: '700px', // width: '700px',

View File

@ -194,7 +194,7 @@ export class PlanListingComponent extends BaseListingComponent<BasePlan, PlanLoo
if (!result) { return []; } if (!result) { return []; }
this.totalCount = result.count; this.totalCount = result.count;
if (this.lookup?.page?.offset === 0) this.listingItems = []; if (this.lookup?.page?.offset === 0) this.listingItems = [];
const plans = this._filterDmp([...result.items]); const plans = this._filterPlan([...result.items]);
this.listingItems.push(...plans); this.listingItems.push(...plans);
this.hasLoadedListingItems = true; this.hasLoadedListingItems = true;
})); }));
@ -365,13 +365,13 @@ export class PlanListingComponent extends BaseListingComponent<BasePlan, PlanLoo
// Blueprints // Blueprints
let dmpBlueprints = formGroup.get("dmpBlueprints")?.value ?? null; let planBlueprints = formGroup.get("planBlueprints")?.value ?? null;
if (dmpBlueprints && dmpBlueprints?.length > 0) { if (planBlueprints && planBlueprints?.length > 0) {
lookup.planBlueprintSubQuery = PlanFilterService.initializePlanBlueprintLookup(); lookup.planBlueprintSubQuery = PlanFilterService.initializePlanBlueprintLookup();
lookup.planBlueprintSubQuery.ids = dmpBlueprints; lookup.planBlueprintSubQuery.ids = planBlueprints;
} else lookup.planBlueprintSubQuery = null; } else lookup.planBlueprintSubQuery = null;
// Dmps // plans
let roles = formGroup.get("role")?.value !== null ? [formGroup.get("role")?.value] : null; let roles = formGroup.get("role")?.value !== null ? [formGroup.get("role")?.value] : null;
if (roles && roles?.length > 0) { if (roles && roles?.length > 0) {
lookup.planUserSubQuery = PlanFilterService.initializePlanUserLookup(); lookup.planUserSubQuery = PlanFilterService.initializePlanUserLookup();
@ -399,7 +399,7 @@ export class PlanListingComponent extends BaseListingComponent<BasePlan, PlanLoo
return (new UntypedFormBuilder()).group({ return (new UntypedFormBuilder()).group({
status: [lookup.statuses?.length > 0 ? lookup.statuses[0] : null], status: [lookup.statuses?.length > 0 ? lookup.statuses[0] : null],
descriptionTemplates: lookup.planDescriptionTemplateSubQuery?.descriptionTemplateGroupIds ? [lookup.planDescriptionTemplateSubQuery?.descriptionTemplateGroupIds] : [], descriptionTemplates: lookup.planDescriptionTemplateSubQuery?.descriptionTemplateGroupIds ? [lookup.planDescriptionTemplateSubQuery?.descriptionTemplateGroupIds] : [],
dmpBlueprints: lookup.planBlueprintSubQuery?.ids ? [lookup.planBlueprintSubQuery?.ids]: [], planBlueprints: lookup.planBlueprintSubQuery?.ids ? [lookup.planBlueprintSubQuery?.ids]: [],
role: lookup.planUserSubQuery?.userRoles ? lookup.planUserSubQuery?.userRoles[0] : null, role: lookup.planUserSubQuery?.userRoles ? lookup.planUserSubQuery?.userRoles[0] : null,
}); });
} }
@ -416,7 +416,7 @@ export class PlanListingComponent extends BaseListingComponent<BasePlan, PlanLoo
return count; return count;
} }
private _filterDmp(plans: BasePlan[]): BasePlan[] { private _filterPlan(plans: BasePlan[]): BasePlan[] {
plans.forEach((plan: BasePlan) => { plans.forEach((plan: BasePlan) => {
plan.descriptions = plan.descriptions?.filter(d => d.isActive == IsActive.Active) ?? []; plan.descriptions = plan.descriptions?.filter(d => d.isActive == IsActive.Active) ?? [];
}) })

View File

@ -7,7 +7,7 @@ import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/serv
import { BaseComponent } from '@common/base/base.component'; import { BaseComponent } from '@common/base/base.component';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { map, takeUntil } from 'rxjs/operators'; import { map, takeUntil } from 'rxjs/operators';
import { DmpNewVersionDialogEditorModel } from './plan-new-version-dialog.editor.model'; import { PlanNewVersionDialogEditorModel } from './plan-new-version-dialog.editor.model';
import { PlanBlueprintService } from '@app/core/services/plan/plan-blueprint.service'; import { PlanBlueprintService } from '@app/core/services/plan/plan-blueprint.service';
import { PlanEditorEntityResolver } from '../plan-editor-blueprint/resolvers/plan-editor-enitity.resolver'; import { PlanEditorEntityResolver } from '../plan-editor-blueprint/resolvers/plan-editor-enitity.resolver';
import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration'; import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration';
@ -33,7 +33,7 @@ import { Description } from '@app/core/model/description/description';
export class NewVersionPlanDialogComponent extends BaseComponent { export class NewVersionPlanDialogComponent extends BaseComponent {
plan: Plan; plan: Plan;
editorModel: DmpNewVersionDialogEditorModel; editorModel: PlanNewVersionDialogEditorModel;
formGroup: UntypedFormGroup; formGroup: UntypedFormGroup;
selectedBlueprintSections: PlanBlueprintDefinitionSection[]; selectedBlueprintSections: PlanBlueprintDefinitionSection[];
@ -110,7 +110,7 @@ export class NewVersionPlanDialogComponent extends BaseComponent {
ngOnInit() { ngOnInit() {
this.selectedBlueprintSections = this.plan.blueprint?.definition?.sections?.filter(x => x.hasTemplates) || null; this.selectedBlueprintSections = this.plan.blueprint?.definition?.sections?.filter(x => x.hasTemplates) || null;
this.editorModel = new DmpNewVersionDialogEditorModel().fromModel(this.plan, this.plan.blueprint); this.editorModel = new PlanNewVersionDialogEditorModel().fromModel(this.plan, this.plan.blueprint);
this.formGroup = this.editorModel.buildForm(); this.formGroup = this.editorModel.buildForm();
} }

View File

@ -6,12 +6,12 @@ import { ValidationErrorModel } from '@common/forms/validation/error-model/valid
import { Validation, ValidationContext } from '@common/forms/validation/validation-context'; import { Validation, ValidationContext } from '@common/forms/validation/validation-context';
import { Guid } from "@common/types/guid"; import { Guid } from "@common/types/guid";
export class DmpNewVersionDialogEditorModel implements NewVersionPlanPersist { export class PlanNewVersionDialogEditorModel implements NewVersionPlanPersist {
id: Guid; id: Guid;
label: string; label: string;
description: String; description: String;
blueprintId: Guid; blueprintId: Guid;
descriptions: NewVersionDmpDescriptionEditorModel[] = []; descriptions: NewVersionPlanDescriptionEditorModel[] = [];
hash?: string; hash?: string;
public validationErrorModel: ValidationErrorModel = new ValidationErrorModel(); public validationErrorModel: ValidationErrorModel = new ValidationErrorModel();
@ -19,7 +19,7 @@ export class DmpNewVersionDialogEditorModel implements NewVersionPlanPersist {
constructor() { } constructor() { }
public fromModel(item: Plan, blueprint: PlanBlueprint, label?: string, description?: string): DmpNewVersionDialogEditorModel { public fromModel(item: Plan, blueprint: PlanBlueprint, label?: string, description?: string): PlanNewVersionDialogEditorModel {
if (item) { if (item) {
this.id = item.id; this.id = item.id;
this.label = label != undefined ? label : item.label; this.label = label != undefined ? label : item.label;
@ -34,14 +34,14 @@ export class DmpNewVersionDialogEditorModel implements NewVersionPlanPersist {
if (item.planDescriptionTemplates?.length > 0 && blueprint.id === item.blueprint.id) { // plan's first blueprint if (item.planDescriptionTemplates?.length > 0 && blueprint.id === item.blueprint.id) { // plan's first blueprint
item.descriptions.forEach(description => { item.descriptions.forEach(description => {
this.descriptions.push(new NewVersionDmpDescriptionEditorModel(this.validationErrorModel).fromModel(description.id, description.planDescriptionTemplate.sectionId)); this.descriptions.push(new NewVersionPlanDescriptionEditorModel(this.validationErrorModel).fromModel(description.id, description.planDescriptionTemplate.sectionId));
}) })
} else { // in case the user changes the blueprint from the dropdown and the new blueprint has prefilled templates } else { // in case the user changes the blueprint from the dropdown and the new blueprint has prefilled templates
const selectedBlueprintSections = blueprint.definition?.sections?.filter(x => x.hasTemplates) || null; const selectedBlueprintSections = blueprint.definition?.sections?.filter(x => x.hasTemplates) || null;
if (selectedBlueprintSections != null){ if (selectedBlueprintSections != null){
item.descriptions.forEach(description => { item.descriptions.forEach(description => {
const matchingSection = selectedBlueprintSections.find(blueprintSection => blueprintSection.descriptionTemplates != null && blueprintSection.descriptionTemplates.map(y => y.descriptionTemplateGroupId).includes(description.descriptionTemplate.groupId)) || null; const matchingSection = selectedBlueprintSections.find(blueprintSection => blueprintSection.descriptionTemplates != null && blueprintSection.descriptionTemplates.map(y => y.descriptionTemplateGroupId).includes(description.descriptionTemplate.groupId)) || null;
this.descriptions.push(new NewVersionDmpDescriptionEditorModel(this.validationErrorModel).fromModel(description.id, matchingSection != null ? matchingSection.id : null)); this.descriptions.push(new NewVersionPlanDescriptionEditorModel(this.validationErrorModel).fromModel(description.id, matchingSection != null ? matchingSection.id : null));
}) })
} }
} }
@ -86,7 +86,7 @@ export class DmpNewVersionDialogEditorModel implements NewVersionPlanPersist {
} }
} }
export class NewVersionDmpDescriptionEditorModel implements NewVersionPlanDescriptionPersist { export class NewVersionPlanDescriptionEditorModel implements NewVersionPlanDescriptionPersist {
descriptionId: Guid; descriptionId: Guid;
blueprintSectionId: Guid; blueprintSectionId: Guid;
@ -96,7 +96,7 @@ export class NewVersionDmpDescriptionEditorModel implements NewVersionPlanDescri
public validationErrorModel: ValidationErrorModel = new ValidationErrorModel() public validationErrorModel: ValidationErrorModel = new ValidationErrorModel()
) { } ) { }
fromModel(descriptionId: Guid, blueprintSectionId: Guid): NewVersionDmpDescriptionEditorModel { fromModel(descriptionId: Guid, blueprintSectionId: Guid): NewVersionPlanDescriptionEditorModel {
this.descriptionId = descriptionId; this.descriptionId = descriptionId;
this.blueprintSectionId = blueprintSectionId; this.blueprintSectionId = blueprintSectionId;
@ -110,7 +110,7 @@ export class NewVersionDmpDescriptionEditorModel implements NewVersionPlanDescri
}): UntypedFormGroup { }): UntypedFormGroup {
let { context = null, disabled = false, rootPath } = params ?? {} let { context = null, disabled = false, rootPath } = params ?? {}
if (context == null) { if (context == null) {
context = NewVersionDmpDescriptionEditorModel.createValidationContext({ context = NewVersionPlanDescriptionEditorModel.createValidationContext({
validationErrorModel: this.validationErrorModel, validationErrorModel: this.validationErrorModel,
rootPath rootPath
}); });

View File

@ -7,7 +7,7 @@ import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/serv
import { BaseComponent } from '@common/base/base.component'; import { BaseComponent } from '@common/base/base.component';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
import { DmpUploadDialogComponent } from '../upload-dialogue/plan-upload-dialog.component'; import { PlanUploadDialogComponent } from '../upload-dialogue/plan-upload-dialog.component';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service'; import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
import { RouterUtilsService } from '@app/core/services/router/router-utils.service'; import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
@ -58,7 +58,7 @@ export class StartNewPlanDialogComponent extends BaseComponent {
} }
uploadFile(event) { uploadFile(event) {
const dialogRef = this.dialog.open(DmpUploadDialogComponent, { const dialogRef = this.dialog.open(PlanUploadDialogComponent, {
width: '528px', width: '528px',
data: { data: {
fileList: FileList, fileList: FileList,

View File

@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { FormattingModule } from '@app/core/formatting.module'; import { FormattingModule } from '@app/core/formatting.module';
import { CommonFormsModule } from '@common/forms/common-forms.module'; import { CommonFormsModule } from '@common/forms/common-forms.module';
import { CommonUiModule } from '@common/ui/common-ui.module'; import { CommonUiModule } from '@common/ui/common-ui.module';
import { DmpUploadDialogModule } from '../upload-dialogue/plan-upload-dialog.module'; import { PlanUploadDialogModule } from '../upload-dialogue/plan-upload-dialog.module';
import { StartNewPlanDialogComponent } from './start-new-plan-dialog.component'; import { StartNewPlanDialogComponent } from './start-new-plan-dialog.component';
@NgModule({ @NgModule({
@ -10,7 +10,7 @@ import { StartNewPlanDialogComponent } from './start-new-plan-dialog.component';
CommonUiModule, CommonUiModule,
CommonFormsModule, CommonFormsModule,
FormattingModule, FormattingModule,
DmpUploadDialogModule PlanUploadDialogModule
], ],
declarations: [ declarations: [
StartNewPlanDialogComponent, StartNewPlanDialogComponent,

View File

@ -6,7 +6,7 @@ import { Guid } from "@common/types/guid";
import { PlanCommonModelConfig, PreprocessingPlanModel } from "@app/core/model/plan/plan-import"; import { PlanCommonModelConfig, PreprocessingPlanModel } from "@app/core/model/plan/plan-import";
import { DescriptionCommonModelConfig, PreprocessingDescriptionModel } from "@app/core/model/description/description-import"; import { DescriptionCommonModelConfig, PreprocessingDescriptionModel } from "@app/core/model/description/description-import";
export class DmpImportRdaConfigEditorModel implements PlanCommonModelConfig{ export class PlanImportRdaConfigEditorModel implements PlanCommonModelConfig{
fileId: Guid; fileId: Guid;
label: string; label: string;
blueprintId: Guid; blueprintId: Guid;
@ -18,7 +18,7 @@ export class DmpImportRdaConfigEditorModel implements PlanCommonModelConfig{
constructor() { } constructor() { }
fromModel(item: PreprocessingPlanModel, fileId: Guid): DmpImportRdaConfigEditorModel { fromModel(item: PreprocessingPlanModel, fileId: Guid): PlanImportRdaConfigEditorModel {
this.fileId = fileId; this.fileId = fileId;
if (item){ if (item){
this.label = item.label + '.json'; this.label = item.label + '.json';

View File

@ -8,7 +8,7 @@ import { PlanService } from '@app/core/services/plan/plan.service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service'; import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
import { BaseComponent } from '@common/base/base.component'; import { BaseComponent } from '@common/base/base.component';
import { map, takeUntil } from 'rxjs/operators'; import { map, takeUntil } from 'rxjs/operators';
import { DmpImportRdaConfigEditorModel } from './plan-common-model-config.editor.model'; import { PlanImportRdaConfigEditorModel } from './plan-common-model-config.editor.model';
import { UntypedFormArray, UntypedFormGroup } from '@angular/forms'; import { UntypedFormArray, UntypedFormGroup } from '@angular/forms';
import { DescriptionTemplateService } from '@app/core/services/description-template/description-template.service'; import { DescriptionTemplateService } from '@app/core/services/description-template/description-template.service';
import { FormService } from '@common/forms/form-service'; import { FormService } from '@common/forms/form-service';
@ -24,9 +24,9 @@ import { TranslateService } from '@ngx-translate/core';
templateUrl: './plan-upload-dialog.component.html', templateUrl: './plan-upload-dialog.component.html',
styleUrls: ['./plan-upload-dialog.component.scss'] styleUrls: ['./plan-upload-dialog.component.scss']
}) })
export class DmpUploadDialogComponent extends BaseComponent { export class PlanUploadDialogComponent extends BaseComponent {
planTitle: string; planTitle: string;
dmpBlueprints: any[] = []; planBlueprints: any[] = [];
files: File[] = []; files: File[] = [];
selectedBlueprintSections: PlanBlueprintDefinitionSection[]; selectedBlueprintSections: PlanBlueprintDefinitionSection[];
formGroup: UntypedFormGroup; formGroup: UntypedFormGroup;
@ -44,7 +44,7 @@ export class DmpUploadDialogComponent extends BaseComponent {
constructor( constructor(
public dialogRef: MatDialogRef<DmpUploadDialogComponent>, public dialogRef: MatDialogRef<PlanUploadDialogComponent>,
private _service: PlanService, private _service: PlanService,
private dialog: MatDialog, private dialog: MatDialog,
private httpClient: HttpClient, private httpClient: HttpClient,
@ -63,7 +63,7 @@ export class DmpUploadDialogComponent extends BaseComponent {
} }
ngOnInit() { ngOnInit() {
this.analyticsService.trackPageView(AnalyticsService.DmpUploadDialog); this.analyticsService.trackPageView(AnalyticsService.PlanUploadDialog);
} }
cancel() { cancel() {
@ -78,7 +78,7 @@ export class DmpUploadDialogComponent extends BaseComponent {
confirm() { confirm() {
this.data.success = true; this.data.success = true;
this.data.planTitle = this.planTitle; this.data.planTitle = this.planTitle;
this.data.planBlueprints = this.dmpBlueprints; this.data.planBlueprint = this.planBlueprints;
if (this.files.length > 0 && this.files[0].type.includes('/json') && this.formGroup){ if (this.files.length > 0 && this.files[0].type.includes('/json') && this.formGroup){
this.formService.removeAllBackEndErrors(this.formGroup); this.formService.removeAllBackEndErrors(this.formGroup);
@ -121,7 +121,7 @@ export class DmpUploadDialogComponent extends BaseComponent {
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe( .subscribe(
(preprocessingData) => { (preprocessingData) => {
this.formGroup = new DmpImportRdaConfigEditorModel().fromModel(preprocessingData, storageFile[0].id,).buildForm(); this.formGroup = new PlanImportRdaConfigEditorModel().fromModel(preprocessingData, storageFile[0].id,).buildForm();
}, },
(error) => this.onCallbackEror(error.error) (error) => this.onCallbackEror(error.error)
); );

View File

@ -3,7 +3,7 @@ import { FormattingModule } from '@app/core/formatting.module';
import { CommonFormsModule } from '@common/forms/common-forms.module'; import { CommonFormsModule } from '@common/forms/common-forms.module';
import { CommonUiModule } from '@common/ui/common-ui.module'; import { CommonUiModule } from '@common/ui/common-ui.module';
import { NgxDropzoneModule } from 'ngx-dropzone'; import { NgxDropzoneModule } from 'ngx-dropzone';
import { DmpUploadDialogComponent } from './plan-upload-dialog.component'; import { PlanUploadDialogComponent } from './plan-upload-dialog.component';
import { ReactiveFormsModule } from '@angular/forms'; import { ReactiveFormsModule } from '@angular/forms';
import { AutoCompleteModule } from '@app/library/auto-complete/auto-complete.module'; import { AutoCompleteModule } from '@app/library/auto-complete/auto-complete.module';
@ -17,10 +17,10 @@ import { AutoCompleteModule } from '@app/library/auto-complete/auto-complete.mod
NgxDropzoneModule NgxDropzoneModule
], ],
declarations: [ declarations: [
DmpUploadDialogComponent, PlanUploadDialogComponent,
], ],
exports: [ exports: [
DmpUploadDialogComponent, PlanUploadDialogComponent,
] ]
}) })
export class DmpUploadDialogModule { } export class PlanUploadDialogModule { }

View File

@ -27,15 +27,15 @@
</div> </div>
<div class="row align-items-center mt-3 mb-4 label-txt"> <div class="row align-items-center mt-3 mb-4 label-txt">
<div *ngIf="isUserDmpRelated()" class="col-auto d-flex"> <div *ngIf="isUserPlanRelated()" class="col-auto d-flex">
<p class="ml-0 mb-0 label2-txt">{{ enumUtils.toPlanUserRolesString(planService.getCurrentUserRolesInPlan(plan?.planUsers)) }} <p class="ml-0 mb-0 label2-txt">{{ enumUtils.toPlanUserRolesString(planService.getCurrentUserRolesInPlan(plan?.planUsers)) }}
</div> </div>
<div *ngIf="isUserDmpRelated() && (isPublishedDmp() || isLocked)" class="col-auto"><span>.</span></div> <div *ngIf="isUserPlanRelated() && (isPublishedPlan() || isLocked)" class="col-auto"><span>.</span></div>
<div *ngIf="isPublishedDmp()" class="col-auto d-flex flex-row"> <div *ngIf="isPublishedPlan()" class="col-auto d-flex flex-row">
<mat-icon class="status-icon">public</mat-icon> <mat-icon class="status-icon">public</mat-icon>
{{'PLAN-OVERVIEW.PUBLIC' | translate}} {{'PLAN-OVERVIEW.PUBLIC' | translate}}
</div> </div>
<div *ngIf="isPublishedDmp() && isLocked" class="col-auto"><span>.</span></div> <div *ngIf="isPublishedPlan() && isLocked" class="col-auto"><span>.</span></div>
<div *ngIf="isLocked" class="col-auto d-flex flex-row"> <div *ngIf="isLocked" class="col-auto d-flex flex-row">
<mat-icon class="status-icon">lock_outline</mat-icon> <mat-icon class="status-icon">lock_outline</mat-icon>
{{'PLAN-OVERVIEW.LOCKED' | translate}} {{'PLAN-OVERVIEW.LOCKED' | translate}}
@ -190,8 +190,8 @@
</div> </div>
</div> </div>
</ng-container> </ng-container>
<app-plan-deposit-dropdown *ngIf="(hasDoi(plan) || moreDeposit()) && isFinalizedDmp(plan) && !this.isPublicView && canDepositPlan(plan) && inputRepos.length > 0" [inputRepos]="inputRepos" [plan]="plan" (outputReposEmitter)="afterDeposit($event)"></app-plan-deposit-dropdown> <app-plan-deposit-dropdown *ngIf="(hasDoi(plan) || moreDeposit()) && isFinalizedPlan(plan) && !this.isPublicView && canDepositPlan(plan) && inputRepos.length > 0" [inputRepos]="inputRepos" [plan]="plan" (outputReposEmitter)="afterDeposit($event)"></app-plan-deposit-dropdown>
<ng-container *ngIf="isFinalizedDmp(plan) && hasDoi(plan) && !isPublishedDmp(plan) && canFinalizePlan(plan)"> <ng-container *ngIf="isFinalizedPlan(plan) && hasDoi(plan) && !isPublishedPlan(plan) && canFinalizePlan(plan)">
<div (click)="reverseFinalization()" class="row mb-3 align-items-center"> <div (click)="reverseFinalization()" class="row mb-3 align-items-center">
<div class="col-auto pr-0"> <div class="col-auto pr-0">
<button mat-mini-fab class="frame-btn"> <button mat-mini-fab class="frame-btn">
@ -215,7 +215,7 @@
</div> </div>
</div> </div>
</ng-container> </ng-container>
<!-- <ng-container *ngIf="canCreateNewVersion()"> <ng-container *ngIf="canCreateNewVersion()">
<div class="row mb-3 align-items-center" (click)="newVersionClicked()"> <div class="row mb-3 align-items-center" (click)="newVersionClicked()">
<div class="col-auto pr-0"> <div class="col-auto pr-0">
<button mat-mini-fab class="frame-btn"> <button mat-mini-fab class="frame-btn">
@ -226,7 +226,7 @@
<p class="mb-0 pl-2 frame-txt">{{ 'PLAN-OVERVIEW.ACTIONS.NEW-VERSION' | translate }}</p> <p class="mb-0 pl-2 frame-txt">{{ 'PLAN-OVERVIEW.ACTIONS.NEW-VERSION' | translate }}</p>
</div> </div>
</div> </div>
</ng-container> --> </ng-container>
<mat-menu #exportMenu="matMenu" xPosition="before"> <mat-menu #exportMenu="matMenu" xPosition="before">
<button mat-menu-item *ngFor='let fileTransformer of fileTransformerService.availableFormatsFor(fileTransformerEntityTypeEnum.Dmp)' (click)="fileTransformerService.exportPlan(plan.id, fileTransformer.repositoryId, fileTransformer.format)"> <button mat-menu-item *ngFor='let fileTransformer of fileTransformerService.availableFormatsFor(fileTransformerEntityTypeEnum.Dmp)' (click)="fileTransformerService.exportPlan(plan.id, fileTransformer.repositoryId, fileTransformer.format)">
<i class="fa pr-2" [ngClass]="fileTransformer.icon ? fileTransformer.icon : 'fa-file-o'"></i> <i class="fa pr-2" [ngClass]="fileTransformer.icon ? fileTransformer.icon : 'fa-file-o'"></i>
@ -267,7 +267,7 @@
</p> </p>
</div> </div>
<div *ngIf="canAssignPlanUsers(plan) && plan.status === planStatusEnum.Draft && planUser.role != planUserRoleEnum.Owner" class="col-auto"> <div *ngIf="canAssignPlanUsers(plan) && plan.status === planStatusEnum.Draft && planUser.role != planUserRoleEnum.Owner" class="col-auto">
<button (click)="removeUserFromDmp(planUser)" mat-mini-fab matTooltip="{{ 'PLAN-OVERVIEW.ACTIONS.REMOVE-AUTHOR' | translate}}" matTooltipPosition="above"> <button (click)="removeUserFromPlan(planUser)" mat-mini-fab matTooltip="{{ 'PLAN-OVERVIEW.ACTIONS.REMOVE-AUTHOR' | 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>

View File

@ -371,7 +371,7 @@ export class PlanOverviewComponent extends BaseComponent implements OnInit {
this.httpErrorHandlingService.handleBackedRequestError(error); this.httpErrorHandlingService.handleBackedRequestError(error);
} }
isUserDmpRelated(): boolean { isUserPlanRelated(): boolean {
const principalId: Guid = this.authentication.userId(); const principalId: Guid = this.authentication.userId();
return this.plan.planUsers?.some(x => (x.user.id === principalId)); return this.plan.planUsers?.some(x => (x.user.id === principalId));
} }
@ -380,11 +380,11 @@ export class PlanOverviewComponent extends BaseComponent implements OnInit {
return this.plan.status == PlanStatus.Draft; return this.plan.status == PlanStatus.Draft;
} }
isFinalizedDmp(plan: Plan) { isFinalizedPlan(plan: Plan) {
return plan.status == PlanStatus.Finalized; return plan.status == PlanStatus.Finalized;
} }
isPublishedDmp() { isPublishedPlan() {
return (this.plan.status == PlanStatus.Finalized && this.plan.accessType === PlanAccessType.Public); return (this.plan.status == PlanStatus.Finalized && this.plan.accessType === PlanAccessType.Public);
} }
@ -510,7 +510,7 @@ export class PlanOverviewComponent extends BaseComponent implements OnInit {
}); });
} }
removeUserFromDmp(dmpUser: PlanUser) { removeUserFromPlan(planUser: PlanUser) {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-USER'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-USER'),
@ -521,12 +521,12 @@ export class PlanOverviewComponent extends BaseComponent implements OnInit {
}); });
dialogRef.afterClosed().subscribe(result => { dialogRef.afterClosed().subscribe(result => {
if (result) { if (result) {
const dmpUserRemovePersist: PlanUserRemovePersist = { const planUserRemovePersist: PlanUserRemovePersist = {
id: dmpUser.id, id: planUser.id,
planId: this.plan.id, planId: this.plan.id,
role: dmpUser.role role: planUser.role
}; };
this.planService.removeUser(dmpUserRemovePersist).pipe(takeUntil(this._destroyed)) this.planService.removeUser(planUserRemovePersist).pipe(takeUntil(this._destroyed))
.subscribe(data => { .subscribe(data => {
this.reloadPage(); this.reloadPage();
this.onUpdateCallbackSuccess() this.onUpdateCallbackSuccess()

View File

@ -9,7 +9,7 @@ import { takeUntil } from 'rxjs/operators';
templateUrl: './plan-form-progress-indication.component.html', templateUrl: './plan-form-progress-indication.component.html',
styleUrls: ['./plan-form-progress-indication.component.scss'] styleUrls: ['./plan-form-progress-indication.component.scss']
}) })
export class DmpFormProgressIndicationComponent extends BaseComponent implements OnInit, OnChanges { export class PlanFormProgressIndicationComponent extends BaseComponent implements OnInit, OnChanges {
@Input() formGroup: UntypedFormGroup; @Input() formGroup: UntypedFormGroup;
@Input() public progressValueAccuracy = 2; @Input() public progressValueAccuracy = 2;

View File

@ -1,7 +1,7 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonFormsModule } from '@common/forms/common-forms.module'; import { CommonFormsModule } from '@common/forms/common-forms.module';
import { CommonUiModule } from '@common/ui/common-ui.module'; import { CommonUiModule } from '@common/ui/common-ui.module';
import { DmpFormProgressIndicationComponent } from './plan-form-progress-indication.component'; import { PlanFormProgressIndicationComponent } from './plan-form-progress-indication.component';
@NgModule({ @NgModule({
imports: [ imports: [
@ -9,10 +9,10 @@ import { DmpFormProgressIndicationComponent } from './plan-form-progress-indicat
CommonFormsModule CommonFormsModule
], ],
declarations: [ declarations: [
DmpFormProgressIndicationComponent PlanFormProgressIndicationComponent
], ],
exports: [ exports: [
DmpFormProgressIndicationComponent PlanFormProgressIndicationComponent
] ]
}) })
export class DmpFormProgressIndicationModule { } export class PlanFormProgressIndicationModule { }

View File

@ -49,7 +49,7 @@ import { Guid } from '@common/types/guid';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { map, takeUntil } from 'rxjs/operators'; import { map, takeUntil } from 'rxjs/operators';
import { PlanContactPrefillDialogComponent } from '../plan-contact-prefill-dialog/plan-contact-prefill-dialog.component'; import { PlanContactPrefillDialogComponent } from '../plan-contact-prefill-dialog/plan-contact-prefill-dialog.component';
import { PlanEditorModel, DmpFieldIndicator } from './plan-editor.model'; import { PlanEditorModel, PlanFieldIndicator } from './plan-editor.model';
import { PlanEditorEntityResolver } from './resolvers/plan-editor-enitity.resolver'; import { PlanEditorEntityResolver } from './resolvers/plan-editor-enitity.resolver';
import { PlanEditorService } from './plan-editor.service'; import { PlanEditorService } from './plan-editor.service';
import { RouterUtilsService } from '@app/core/services/router/router-utils.service'; import { RouterUtilsService } from '@app/core/services/router/router-utils.service';
@ -113,7 +113,7 @@ export class PlanEditorComponent extends BaseEditor<PlanEditorModel, Plan> imple
} }
}; };
sectionToFieldsMap: Map<string, DmpFieldIndicator> = new Map<string, DmpFieldIndicator>(); sectionToFieldsMap: Map<string, PlanFieldIndicator> = new Map<string, PlanFieldIndicator>();
protected get canDelete(): boolean { protected get canDelete(): boolean {
return !this.isDeleted && !this.isNew && (this.hasPermission(this.authService.permissionEnum.DeletePlan) || this.item?.authorizationFlags?.some(x => x === AppPermission.DeletePlan)); return !this.isDeleted && !this.isNew && (this.hasPermission(this.authService.permissionEnum.DeletePlan) || this.item?.authorizationFlags?.some(x => x === AppPermission.DeletePlan));
@ -269,12 +269,12 @@ export class PlanEditorComponent extends BaseEditor<PlanEditorModel, Plan> imple
} }
} }
prepareErrorIndication(): Map<string, DmpFieldIndicator> { prepareErrorIndication(): Map<string, PlanFieldIndicator> {
if (this.selectedBlueprint?.definition == null) return; if (this.selectedBlueprint?.definition == null) return;
const sectionToFieldsMap: Map<string, DmpFieldIndicator> = new Map<string, DmpFieldIndicator>(); const sectionToFieldsMap: Map<string, PlanFieldIndicator> = new Map<string, PlanFieldIndicator>();
this.selectedBlueprint.definition.sections.forEach((section: PlanBlueprintDefinitionSection) => { this.selectedBlueprint.definition.sections.forEach((section: PlanBlueprintDefinitionSection) => {
let value: DmpFieldIndicator = new DmpFieldIndicator(section); let value: PlanFieldIndicator = new PlanFieldIndicator(section);
sectionToFieldsMap.set(section.id.toString(), value); sectionToFieldsMap.set(section.id.toString(), value);
}); });

View File

@ -47,10 +47,10 @@ export class PlanEditorModel extends BaseEditorModel implements PlanPersist {
item.blueprint.definition.sections.forEach(section => { item.blueprint.definition.sections.forEach(section => {
if (section.hasTemplates) { if (section.hasTemplates) {
const sectionTempaltesFromDmp = item.planDescriptionTemplates?.filter(x => x.sectionId == section.id && x.isActive == IsActive.Active) || []; const sectionTemplatesFromPlan = item.planDescriptionTemplates?.filter(x => x.sectionId == section.id && x.isActive == IsActive.Active) || [];
if (sectionTempaltesFromDmp.length > 0) { if (sectionTemplatesFromPlan.length > 0) {
sectionTempaltesFromDmp?.filter(x => x.sectionId == section.id).forEach(planDescriptionTemplate => { sectionTemplatesFromPlan?.filter(x => x.sectionId == section.id).forEach(planDescriptionTemplate => {
this.descriptionTemplates.push(new PlanDescriptionTemplateEditorModel(this.validationErrorModel).fromModel( this.descriptionTemplates.push(new PlanDescriptionTemplateEditorModel(this.validationErrorModel).fromModel(
{ {
sectionId: section.id, sectionId: section.id,
@ -132,7 +132,7 @@ export class PlanEditorModel extends BaseEditorModel implements PlanPersist {
baseValidationArray.push({ key: 'accessType', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'accessType')] }); baseValidationArray.push({ key: 'accessType', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'accessType')] });
baseValidationArray.push({ key: 'descriptionTemplates', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'descriptionTemplates')] }); baseValidationArray.push({ key: 'descriptionTemplates', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'descriptionTemplates')] });
baseValidationArray.push({ key: 'dmpDescriptionValidator', validators: [] }); baseValidationArray.push({ key: 'planDescriptionValidator', validators: [] });
baseValidationArray.push({ key: 'users', validators: [BackendErrorValidator(this.validationErrorModel, `users`)] }); baseValidationArray.push({ key: 'users', validators: [BackendErrorValidator(this.validationErrorModel, `users`)] });
baseValidationArray.push({ key: 'hash', validators: [] }); baseValidationArray.push({ key: 'hash', validators: [] });
@ -233,7 +233,7 @@ export class PlanPropertiesEditorModel implements PlanPropertiesPersist {
context?: ValidationContext, context?: ValidationContext,
disabled?: boolean, disabled?: boolean,
rootPath?: string rootPath?: string
}, planReferences?: PlanReference[], dmpBlueprint?: PlanBlueprint): UntypedFormGroup { }, planReferences?: PlanReference[], planBlueprint?: PlanBlueprint): UntypedFormGroup {
let { context = null, disabled = false, rootPath } = params ?? {} let { context = null, disabled = false, rootPath } = params ?? {}
if (context == null) { if (context == null) {
context = PlanPropertiesEditorModel.createValidationContext({ context = PlanPropertiesEditorModel.createValidationContext({
@ -738,7 +738,7 @@ export class PlanDescriptionTemplateEditorModel implements PlanDescriptionTempla
} }
} }
export class DmpFieldIndicator { export class PlanFieldIndicator {
private _fieldControlNames; private _fieldControlNames;

View File

@ -10,7 +10,7 @@ import { CommonUiModule } from '@common/ui/common-ui.module';
import { PlanUserFieldModule } from '../plan-user-field/plan-user-field.module'; import { PlanUserFieldModule } from '../plan-user-field/plan-user-field.module';
import { PlanEditorComponent } from './plan-editor.component'; import { PlanEditorComponent } from './plan-editor.component';
import { PlanEditorRoutingModule } from './plan-editor.routing'; import { PlanEditorRoutingModule } from './plan-editor.routing';
import { DmpFormProgressIndicationModule } from './form-progress-indication/plan-form-progress-indication.module'; import { PlanFormProgressIndicationModule } from './form-progress-indication/plan-form-progress-indication.module';
import { PlanDeleteDialogModule } from '../plan-delete-dialog/plan-delete-dialog.module'; import { PlanDeleteDialogModule } from '../plan-delete-dialog/plan-delete-dialog.module';
import { PlanContactPrefillDialogModule } from '../plan-contact-prefill-dialog/plan-contact-prefill-dialog.module'; import { PlanContactPrefillDialogModule } from '../plan-contact-prefill-dialog/plan-contact-prefill-dialog.module';
@ -27,7 +27,7 @@ import { PlanContactPrefillDialogModule } from '../plan-contact-prefill-dialog/p
ReferenceFieldModule, ReferenceFieldModule,
DragDropModule, DragDropModule,
PlanUserFieldModule, PlanUserFieldModule,
DmpFormProgressIndicationModule, PlanFormProgressIndicationModule,
PlanContactPrefillDialogModule PlanContactPrefillDialogModule
], ],
declarations: [ declarations: [

View File

@ -1,6 +1,6 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
// import { DmpWizardComponent } from './description-wizard/description-wizard.component'; // import { PlanWizardComponent } from './description-wizard/description-wizard.component';
import { AppPermission } from '@app/core/common/enum/permission.enum'; import { AppPermission } from '@app/core/common/enum/permission.enum';
import { PendingChangesGuard } from '@common/forms/pending-form-changes/pending-form-changes-guard.service'; import { PendingChangesGuard } from '@common/forms/pending-form-changes/pending-form-changes-guard.service';
// import { PlanOverviewComponent } from './overview/description-overview.component'; // import { PlanOverviewComponent } from './overview/description-overview.component';

View File

@ -53,8 +53,8 @@ export class PlanUserFieldComponent extends BaseComponent implements OnInit {
addUser(): void { addUser(): void {
const userArray = this.form.get('users') as FormArray; const userArray = this.form.get('users') as FormArray;
const dmpUser: PlanUserEditorModel = new PlanUserEditorModel(this.validationErrorModel); const planUser: PlanUserEditorModel = new PlanUserEditorModel(this.validationErrorModel);
userArray.push(dmpUser.buildForm({ rootPath: "users[" + userArray.length + "]." })); userArray.push(planUser.buildForm({ rootPath: "users[" + userArray.length + "]." }));
} }
removeUser(userIndex: number): void { removeUser(userIndex: number): void {

View File

@ -1,6 +1,6 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { FormattingModule } from '@app/core/formatting.module'; import { FormattingModule } from '@app/core/formatting.module';
import { DmpRoutingModule, PublicDmpRoutingModule } from '@app/ui/plan/plan.routing'; import { PlanRoutingModule, PublicPlanRoutingModule } from '@app/ui/plan/plan.routing';
import { CommonFormsModule } from '@common/forms/common-forms.module'; import { CommonFormsModule } from '@common/forms/common-forms.module';
import { CommonUiModule } from '@common/ui/common-ui.module'; import { CommonUiModule } from '@common/ui/common-ui.module';
@ -9,25 +9,25 @@ import { CommonUiModule } from '@common/ui/common-ui.module';
CommonUiModule, CommonUiModule,
CommonFormsModule, CommonFormsModule,
FormattingModule, FormattingModule,
DmpRoutingModule, PlanRoutingModule,
], ],
declarations: [ declarations: [
], ],
exports: [ exports: [
] ]
}) })
export class DmpModule { } export class PlanModule { }
@NgModule({ @NgModule({
imports: [ imports: [
CommonUiModule, CommonUiModule,
CommonFormsModule, CommonFormsModule,
FormattingModule, FormattingModule,
PublicDmpRoutingModule, PublicPlanRoutingModule,
], ],
declarations: [ declarations: [
], ],
exports: [ exports: [
] ]
}) })
export class PublicDmpModule { } export class PublicPlanModule { }

View File

@ -74,10 +74,10 @@ const publicRoutes: Routes = [
imports: [RouterModule.forChild(routes)], imports: [RouterModule.forChild(routes)],
exports: [RouterModule] exports: [RouterModule]
}) })
export class DmpRoutingModule { } export class PlanRoutingModule { }
@NgModule({ @NgModule({
imports: [RouterModule.forChild(publicRoutes)], imports: [RouterModule.forChild(publicRoutes)],
exports: [RouterModule] exports: [RouterModule]
}) })
export class PublicDmpRoutingModule { } export class PublicPlanRoutingModule { }

View File

@ -36,7 +36,7 @@ class GroupMenuItem {
}) })
export class SidebarComponent implements OnInit { export class SidebarComponent implements OnInit {
generalItems: GroupMenuItem; generalItems: GroupMenuItem;
dmpItems: GroupMenuItem; planItems: GroupMenuItem;
adminItems: GroupMenuItem; adminItems: GroupMenuItem;
descriptionItems: GroupMenuItem; descriptionItems: GroupMenuItem;
grantItems: GroupMenuItem; grantItems: GroupMenuItem;
@ -81,14 +81,14 @@ export class SidebarComponent implements OnInit {
this.groupMenuItems.push(this.generalItems); this.groupMenuItems.push(this.generalItems);
this.dmpItems = { this.planItems = {
title: 'SIDE-BAR.PLAN', title: 'SIDE-BAR.PLAN',
routes: [], routes: [],
} }
if (this.authentication.hasPermission(AppPermission.ViewMyPlanPage)) this.dmpItems.routes.push({ path: '/plans', title: 'SIDE-BAR.MY-PLANS', icon: 'library_books', routeType: RouteType.System }); if (this.authentication.hasPermission(AppPermission.ViewMyPlanPage)) this.planItems.routes.push({ path: '/plans', title: 'SIDE-BAR.MY-PLANS', icon: 'library_books', routeType: RouteType.System });
if (this.authentication.hasPermission(AppPermission.ViewMyDescriptionPage)) this.dmpItems.routes.push({ path: '/descriptions', title: 'SIDE-BAR.MY-DESCRIPTIONS', icon: 'dns', routeType: RouteType.System }); if (this.authentication.hasPermission(AppPermission.ViewMyDescriptionPage)) this.planItems.routes.push({ path: '/descriptions', title: 'SIDE-BAR.MY-DESCRIPTIONS', icon: 'dns', routeType: RouteType.System });
this.groupMenuItems.push(this.dmpItems); this.groupMenuItems.push(this.planItems);
this.descriptionItems = { this.descriptionItems = {
title: 'SIDE-BAR.DESCRIPTIONS', title: 'SIDE-BAR.DESCRIPTIONS',

View File

@ -355,7 +355,7 @@
"ACTIONS": { "ACTIONS": {
"SEND-USER-TOUCH": "Send user touch events", "SEND-USER-TOUCH": "Send user touch events",
"SEND-TENANT-TOUCH": "Send tenant touch events", "SEND-TENANT-TOUCH": "Send tenant touch events",
"SEND-PLAN-TOUCH": "Send dmp touch events", "SEND-PLAN-TOUCH": "Send plan touch events",
"SEND-DESCRIPTION-TOUCH": "Send description touch events" "SEND-DESCRIPTION-TOUCH": "Send description touch events"
} }
} }

View File

@ -355,7 +355,7 @@
"ACTIONS": { "ACTIONS": {
"SEND-USER-TOUCH": "Send user touch events", "SEND-USER-TOUCH": "Send user touch events",
"SEND-TENANT-TOUCH": "Send tenant touch events", "SEND-TENANT-TOUCH": "Send tenant touch events",
"SEND-PLAN-TOUCH": "Send dmp touch events", "SEND-PLAN-TOUCH": "Send plan touch events",
"SEND-DESCRIPTION-TOUCH": "Send description touch events" "SEND-DESCRIPTION-TOUCH": "Send description touch events"
} }
} }

View File

@ -355,7 +355,7 @@
"ACTIONS": { "ACTIONS": {
"SEND-USER-TOUCH": "Send user touch events", "SEND-USER-TOUCH": "Send user touch events",
"SEND-TENANT-TOUCH": "Send tenant touch events", "SEND-TENANT-TOUCH": "Send tenant touch events",
"SEND-PLAN-TOUCH": "Send dmp touch events", "SEND-PLAN-TOUCH": "Send plan touch events",
"SEND-DESCRIPTION-TOUCH": "Send description touch events" "SEND-DESCRIPTION-TOUCH": "Send description touch events"
} }
} }

View File

@ -355,7 +355,7 @@
"ACTIONS": { "ACTIONS": {
"SEND-USER-TOUCH": "Send user touch events", "SEND-USER-TOUCH": "Send user touch events",
"SEND-TENANT-TOUCH": "Send tenant touch events", "SEND-TENANT-TOUCH": "Send tenant touch events",
"SEND-PLAN-TOUCH": "Send dmp touch events", "SEND-PLAN-TOUCH": "Send plan touch events",
"SEND-DESCRIPTION-TOUCH": "Send description touch events" "SEND-DESCRIPTION-TOUCH": "Send description touch events"
} }
} }

View File

@ -355,7 +355,7 @@
"ACTIONS": { "ACTIONS": {
"SEND-USER-TOUCH": "Send user touch events", "SEND-USER-TOUCH": "Send user touch events",
"SEND-TENANT-TOUCH": "Send tenant touch events", "SEND-TENANT-TOUCH": "Send tenant touch events",
"SEND-PLAN-TOUCH": "Send dmp touch events", "SEND-PLAN-TOUCH": "Send plan touch events",
"SEND-DESCRIPTION-TOUCH": "Send description touch events" "SEND-DESCRIPTION-TOUCH": "Send description touch events"
} }
} }

View File

@ -355,7 +355,7 @@
"ACTIONS": { "ACTIONS": {
"SEND-USER-TOUCH": "Send user touch events", "SEND-USER-TOUCH": "Send user touch events",
"SEND-TENANT-TOUCH": "Send tenant touch events", "SEND-TENANT-TOUCH": "Send tenant touch events",
"SEND-PLAN-TOUCH": "Send dmp touch events", "SEND-PLAN-TOUCH": "Send plan touch events",
"SEND-DESCRIPTION-TOUCH": "Send description touch events" "SEND-DESCRIPTION-TOUCH": "Send description touch events"
} }
} }

View File

@ -355,7 +355,7 @@
"ACTIONS": { "ACTIONS": {
"SEND-USER-TOUCH": "Send user touch events", "SEND-USER-TOUCH": "Send user touch events",
"SEND-TENANT-TOUCH": "Send tenant touch events", "SEND-TENANT-TOUCH": "Send tenant touch events",
"SEND-PLAN-TOUCH": "Send dmp touch events", "SEND-PLAN-TOUCH": "Send plan touch events",
"SEND-DESCRIPTION-TOUCH": "Send description touch events" "SEND-DESCRIPTION-TOUCH": "Send description touch events"
} }
} }

View File

@ -355,7 +355,7 @@
"ACTIONS": { "ACTIONS": {
"SEND-USER-TOUCH": "Send user touch events", "SEND-USER-TOUCH": "Send user touch events",
"SEND-TENANT-TOUCH": "Send tenant touch events", "SEND-TENANT-TOUCH": "Send tenant touch events",
"SEND-PLAN-TOUCH": "Send dmp touch events", "SEND-PLAN-TOUCH": "Send plan touch events",
"SEND-DESCRIPTION-TOUCH": "Send description touch events" "SEND-DESCRIPTION-TOUCH": "Send description touch events"
} }
} }

View File

@ -355,7 +355,7 @@
"ACTIONS": { "ACTIONS": {
"SEND-USER-TOUCH": "Send user touch events", "SEND-USER-TOUCH": "Send user touch events",
"SEND-TENANT-TOUCH": "Send tenant touch events", "SEND-TENANT-TOUCH": "Send tenant touch events",
"SEND-PLAN-TOUCH": "Send dmp touch events", "SEND-PLAN-TOUCH": "Send plan touch events",
"SEND-DESCRIPTION-TOUCH": "Send description touch events" "SEND-DESCRIPTION-TOUCH": "Send description touch events"
} }
} }

View File

@ -355,7 +355,7 @@
"ACTIONS": { "ACTIONS": {
"SEND-USER-TOUCH": "Send user touch events", "SEND-USER-TOUCH": "Send user touch events",
"SEND-TENANT-TOUCH": "Send tenant touch events", "SEND-TENANT-TOUCH": "Send tenant touch events",
"SEND-PLAN-TOUCH": "Send dmp touch events", "SEND-PLAN-TOUCH": "Send plan touch events",
"SEND-DESCRIPTION-TOUCH": "Send description touch events" "SEND-DESCRIPTION-TOUCH": "Send description touch events"
} }
} }

View File

@ -355,7 +355,7 @@
"ACTIONS": { "ACTIONS": {
"SEND-USER-TOUCH": "Send user touch events", "SEND-USER-TOUCH": "Send user touch events",
"SEND-TENANT-TOUCH": "Send tenant touch events", "SEND-TENANT-TOUCH": "Send tenant touch events",
"SEND-PLAN-TOUCH": "Send dmp touch events", "SEND-PLAN-TOUCH": "Send plan touch events",
"SEND-DESCRIPTION-TOUCH": "Send description touch events" "SEND-DESCRIPTION-TOUCH": "Send description touch events"
} }
} }