breadcrumb navigation refactor

This commit is contained in:
Sofia Papacharalampous 2024-06-03 17:29:27 +03:00
parent 05eb000ba3
commit 386aa5de05
31 changed files with 12 additions and 77 deletions

View File

@ -47,9 +47,6 @@ const routes: Routes = [
'entity': DescriptionTemplateEditorResolver
},
data: {
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.EDIT-DESCRIPTION-TEMPLATES'
}),
authContext: {
permissions: [AppPermission.EditDescriptionTemplate]
},
@ -67,9 +64,6 @@ const routes: Routes = [
'entity': DescriptionTemplateEditorResolver
},
data: {
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.EDIT-DESCRIPTION-TEMPLATES'
}),
authContext: {
permissions: [AppPermission.EditDescriptionTemplate]
},
@ -87,9 +81,6 @@ const routes: Routes = [
'entity': DescriptionTemplateEditorResolver
},
data: {
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.EDIT-DESCRIPTION-TEMPLATES'
}),
authContext: {
permissions: [AppPermission.EditDescriptionTemplate]
},

View File

@ -2,9 +2,8 @@
<div id="header-outer-wrapper" *ngIf="formGroup">
<div class="row">
<div class="col-12 d-flex" id="title-column">
<div style="padding-left: 2em;">
<h3 *ngIf="isNew == true && isClone == false && isNewVersion == false">{{'DESCRIPTION-TEMPLATE-EDITOR.TITLE.NEW-PROFILE' | translate}}</h3>
<!-- <h3 *ngIf="isNew == true && isClone == false && isNewVersion == false">{{'DESCRIPTION-TEMPLATE-EDITOR.TITLE.NEW-PROFILE' | translate}}</h3>
<h3 *ngIf="isNew == false && isClone == true && isNewVersion == false">
<span *ngIf="isClone">{{'DESCRIPTION-TEMPLATE-EDITOR.TITLE.NEW-PROFILE-CLONE' | translate}}</span>
{{formGroup.get('label').value}}
@ -12,9 +11,8 @@
<h3 *ngIf="isNew == false && isClone == false && isNewVersion == true">
<span *ngIf="isNewVersion">{{'DESCRIPTION-TEMPLATE-EDITOR.TITLE.NEW-PROFILE-VERSION' | translate}}</span>
{{formGroup.get('label').value}}
</h3>
<h3 *ngIf="!isNew">{{formGroup.get('label').value}}</h3>
</h3> -->
<!-- <h3 *ngIf="!isNew">{{formGroup.get('label').value}}</h3> -->
<app-navigation-breadcrumb />
</div>
<ng-container *ngTemplateOutlet="actions"></ng-container>

View File

@ -106,9 +106,9 @@ export class DescriptionTemplateEditorResolver extends BaseEditorResolver {
if (id != null) {
return this.descriptionTemplateService.getSingle(Guid.parse(id), fieldSets).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label)), takeUntil(this._destroyed));
} else if (cloneid != null) {
return this.descriptionTemplateService.clone(Guid.parse(cloneid), fieldSets).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label)), takeUntil(this._destroyed));
return this.descriptionTemplateService.clone(Guid.parse(cloneid), fieldSets).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(cloneid, x.label)), takeUntil(this._destroyed));
} else if (newversion != null) {
return this.descriptionTemplateService.getSingle(Guid.parse(newversion), fieldSets).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label)), takeUntil(this._destroyed));
return this.descriptionTemplateService.getSingle(Guid.parse(newversion), fieldSets).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(newversion, x.label)), takeUntil(this._destroyed));
}
}
}

View File

@ -3,9 +3,7 @@
<div class="col-md-10 offset-md-1">
<div class="row mb-4 mt-4">
<div class="col">
<h4>{{'DESCRIPTION-TEMPLATE-LISTING.TITLE' | translate}}</h4>
<app-navigation-breadcrumb />
</div>
<div class="col-auto">
<button mat-raised-button class="import-btn" (click)="import()">

View File

@ -39,9 +39,6 @@ const routes: Routes = [
'entity': DescriptionTemplateTypeEditorResolver
},
data: {
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.EDIT-DESCRIPTION-TEMPLATE-TYPE'
}),
getFromTitleService: true,
usePrefix: false,
authContext: {

View File

@ -4,8 +4,6 @@
<div class="row justify-content-between align-items-center mb-4 mt-4">
<div class="col">
<h3 *ngIf="isNew">{{'DESCRIPTION-TEMPLATE-TYPE-EDITOR.NEW' | translate}}</h3>
<h3 *ngIf="!isNew">{{formGroup?.get('name')?.value}}</h3>
<app-navigation-breadcrumb />
</div>

View File

@ -3,9 +3,7 @@
<div class="col-md-10 offset-md-1">
<div class="row mb-4 mt-4">
<div class="col">
<h4>{{'DESCRIPTION-TEMPLATE-TYPE-LISTING.TITLE' | translate}}</h4>
<app-navigation-breadcrumb />
</div>
<div class="col-auto">
<button mat-raised-button class="create-btn"

View File

@ -87,9 +87,6 @@ const routes: Routes = [
'entity': DmpBlueprintEditorResolver
},
data: {
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.EDIT-DMP-BLUEPRINT'
}),
authContext: {
permissions: [AppPermission.EditDmpBlueprint]
},

View File

@ -3,7 +3,7 @@
<div class="col-md-10 offset-md-1">
<div class="row align-items-center mt-4 mb-4" *ngIf="formGroup">
<div class="col-md col-12">
<h3 *ngIf="!isFinalized && !isNewVersion && isNew">{{'DMP-BLUEPRINT-EDITOR.TITLE.NEW' | translate}}</h3>
<!-- <h3 *ngIf="!isFinalized && !isNewVersion && isNew">{{'DMP-BLUEPRINT-EDITOR.TITLE.NEW' | translate}}</h3>
<h3 *ngIf="!isClone && !isNewVersion && !isNew">{{formGroup.get('label').value}}</h3>
<h3 *ngIf="isClone">
<span>{{'DMP-BLUEPRINT-EDITOR.TITLE.CLONE' | translate}}</span>
@ -12,7 +12,7 @@
<h3 *ngIf="isNewVersion">
<span>{{'DMP-BLUEPRINT-EDITOR.TITLE.NEW-VERSION' | translate}}</span>
{{formGroup.get('label').value}}
</h3>
</h3> -->
<app-navigation-breadcrumb />
</div>
<div class="col-md-auto mb-md-0 col-12 mb-2" *ngIf="!isNew && !isClone && !isNewVersion && this.editorModel.belongsToCurrentTenant != false">

View File

@ -69,9 +69,9 @@ export class DmpBlueprintEditorResolver extends BaseEditorResolver {
if (id != null) {
return this.dmpBlueprintService.getSingle(Guid.parse(id), fields).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label)), takeUntil(this._destroyed));
} else if (cloneid != null) {
return this.dmpBlueprintService.clone(Guid.parse(cloneid), fields).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label)), takeUntil(this._destroyed));
return this.dmpBlueprintService.clone(Guid.parse(cloneid), fields).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(cloneid, x.label)), takeUntil(this._destroyed));
} else if (newversion != null) {
return this.dmpBlueprintService.getSingle(Guid.parse(newversion), fields).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label)), takeUntil(this._destroyed));
return this.dmpBlueprintService.getSingle(Guid.parse(newversion), fields).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(newversion, x.label)), takeUntil(this._destroyed));
}
}
}

View File

@ -2,11 +2,8 @@
<div class="row dmp-blueprint-listing">
<div class="col-md-10 offset-md-1">
<div class="row mb-4 mt-4">
<div class="col">
<h4>{{'DMP-BLUEPRINT-LISTING.TITLE' | translate}}</h4>
<app-navigation-breadcrumb />
</div>
<div class="col-auto">
<button mat-raised-button class="import-btn" (click)="import()">

View File

@ -4,9 +4,7 @@
<div class="row mb-4 mt-4">
<div class="col">
<h4>{{'LOCK-LISTING.TITLE' | translate}}</h4>
<app-navigation-breadcrumb />
</div>
</div>

View File

@ -3,8 +3,6 @@
<div class="col-md-10 offset-md-1 colums-gapped">
<div class="row align-items-center mt-4 mb-4" *ngIf="formGroup">
<div class="col">
<h3 *ngIf="isNew && !isClone">{{'LANGUAGE-EDITOR.NEW' | translate}}</h3>
<h3 *ngIf="!isNew">{{ formGroup.get('code')?.value }}</h3>
<app-navigation-breadcrumb />
</div>
<div class="col-auto">

View File

@ -39,9 +39,6 @@ const routes: Routes = [
'entity': LanguageEditorResolver
},
data: {
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.EDIT-LANGUAGE'
}),
authContext: {
permissions: [AppPermission.EditLanguage]
},

View File

@ -3,9 +3,7 @@
<div class="col-md-10 offset-md-1">
<div class="row mb-4 mt-4">
<div class="col">
<h4>{{'LANGUAGE-LISTING.TITLE' | translate}}</h4>
<app-navigation-breadcrumb />
</div>
<div class="col-auto">
<button mat-raised-button class="create-btn"

View File

@ -4,8 +4,6 @@
<div class="row justify-content-between align-items-center mt-4 mb-4">
<div class="col">
<h3 *ngIf="isNew">{{'PREFILLING-SOURCE-EDITOR.NEW' | translate}}</h3>
<h3 *ngIf="!isNew">{{ formGroup.get('label')?.value }}</h3>
<app-navigation-breadcrumb />
</div>
<div class="col-auto">

View File

@ -4,9 +4,7 @@
<div class="row mb-4 mt-4">
<div class="col">
<h4>{{'PREFILLING-SOURCE-LISTING.TITLE' | translate}}</h4>
<app-navigation-breadcrumb />
</div>
<div class="col-auto">
<button mat-raised-button class="create-btn"

View File

@ -39,9 +39,6 @@ const routes: Routes = [
'entity': PrefillingSourceEditorResolver
},
data: {
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.EDIT-PREFILLING-SOURCE'
}),
authContext: {
permissions: [AppPermission.EditPrefillingSource]
},

View File

@ -3,8 +3,6 @@
<div class="col-md-10 offset-md-1 colums-gapped">
<div class="row align-items-center mt-4 mb-4">
<div class="col-md col-12">
<h3 *ngIf="isNew">{{'REFERENCE-TYPE-EDITOR.NEW' | translate}}</h3>
<h3 *ngIf="!isNew">{{ formGroup?.get('name')?.value }}</h3>
<app-navigation-breadcrumb />
</div>

View File

@ -4,9 +4,7 @@
<div class="row mb-4 mt-4">
<div class="col">
<h4>{{'REFERENCE-TYPE-LISTING.TITLE' | translate}}</h4>
<app-navigation-breadcrumb />
</div>
<div class="col-auto">
<button mat-raised-button class="create-btn"

View File

@ -40,9 +40,6 @@ const routes: Routes = [
'entity': ReferenceTypeEditorResolver
},
data: {
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.EDIT-REFERENCE-TYPE'
}),
authContext: {
permissions: [AppPermission.EditReferenceType]
},

View File

@ -3,8 +3,6 @@
<div class="col-md-10 offset-md-1 colums-gapped">
<div class="row align-items-center mt-4 mb-4" *ngIf="formGroup">
<div class="col-md col-12">
<h3 *ngIf="isNew && !isClone">{{'REFERENCE-EDITOR.NEW' | translate}}</h3>
<h3 *ngIf="!isNew">{{ formGroup.get('label').value }}</h3>
<app-navigation-breadcrumb />
</div>
<div class="col-auto">

View File

@ -4,9 +4,7 @@
<div class="col-md-10 offset-md-1">
<div class="row mb-4 mt-4">
<div class="col">
<h4>{{'REFERENCE-LISTING.TITLE' | translate}}</h4>
<app-navigation-breadcrumb />
</div>
<div class="col-auto">
<button mat-raised-button class="create-btn"

View File

@ -43,9 +43,6 @@ const routes: Routes = [
},
data: {
breadcrumb: true,
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.EDIT-REFERENCE'
}),
authContext: {
permissions: [AppPermission.EditReference]
},

View File

@ -3,7 +3,6 @@
<div class="col-md-10 offset-md-1">
<div class="row align-items-center mb-4 mt-4" >
<div class="col-md col-12">
<h3>{{'TENANT-CONFIGURATION-EDITOR.TITLE' | translate}}</h3>
<app-navigation-breadcrumb />
</div>
</div>

View File

@ -1,6 +1,6 @@
<div class="main-content listing-main-container h-100">
<div class="container-fluid">
<div class="d-flex flex-direction-row">
<div class="row">
<div *ngIf="hasListingItems && listingItems && listingItems.length === 0 && !hasLikeCriteria()" class="card mt-0">
<!-- <div class="card mt-0" [style.display]="isVisible ? 'block' : 'none'"> -->
<!-- <a class="col-auto d-flex" (click)="closeCard()"><span class="ml-auto pt-3 material-icons clear-icon">clear</span></a> -->

View File

@ -126,7 +126,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
this.dmpService.getSingle(itemId, this.lookupFields())
.pipe(takeUntil(this._destroyed))
.subscribe(data => {
this.breadcrumbService.addIdResolvedValue(data.id.toString(), data.label);
this.breadcrumbService.addIdResolvedValue(data.id?.toString(), data.label);
this.dmp = data;
this.dmp.dmpUsers = data.dmpUsers.filter(x => x.isActive === IsActive.Active);
@ -169,7 +169,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
this.dmpService.getPublicSingle(publicId, this.lookupFields())
.pipe(takeUntil(this._destroyed))
.subscribe(data => {
this.breadcrumbService.addIdResolvedValue(`${data.id}`, data.label);
this.breadcrumbService.addIdResolvedValue(data.id?.toString(), data.label);
this.dmp = data;
this.researchers = this.referenceService.getReferencesForTypes(this.dmp?.dmpReferences, [this.referenceTypeService.getResearcherReferenceType()]);

View File

@ -3,7 +3,6 @@
<div class="col-md-10 offset-md-1 colums-gapped">
<div class="row align-items-center mt-4 mb-4" *ngIf="formGroup">
<div class="col-md col-12">
<h3 *ngIf="isNew && !isClone">{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-EDITOR.NEW' | translate}}</h3>
<app-navigation-breadcrumb />
</div>
<div class="col-auto">

View File

@ -4,9 +4,7 @@
<div class="row mb-4 mt-4">
<div class="col">
<h4>{{'NOTIFICATION-SERVICE.NOTIFICATION-TEMPLATE-LISTING.TITLE' | translate}}</h4>
<app-navigation-breadcrumb />
</div>
<div class="col-auto">
<button mat-raised-button class="create-btn"

View File

@ -39,9 +39,6 @@ const routes: Routes = [
'entity': NotificationTemplateEditorResolver
},
data: {
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.EDIT-TENANT'
}),
authContext: {
permissions: [AppPermission.EditNotificationTemplate]
},

View File

@ -3,9 +3,7 @@
<div class="col-md-10 offset-md-1">
<div class="row mb-4 mt-4">
<div class="col">
<h4>{{'NOTIFICATION-SERVICE.NOTIFICATION-LISTING.TITLE' | translate}}</h4>
<app-navigation-breadcrumb />
</div>
</div>