changed tab name on plan-blueprint and description-template editors

This commit is contained in:
Sofia Papacharalampous 2024-05-08 14:38:40 +03:00
parent fc6e12fb70
commit 12c990de7f
6 changed files with 48 additions and 9 deletions

View File

@ -33,7 +33,9 @@ const routes: Routes = [
},
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.NEW-DESCRIPTION-TEMPLATES'
})
}),
getFromTitleService: true,
usePrefix: false
}
},
{
@ -51,6 +53,8 @@ const routes: Routes = [
authContext: {
permissions: [AppPermission.EditDescriptionTemplate]
},
getFromTitleService: true,
usePrefix: false,
action: 'clone'
}
},
@ -69,6 +73,8 @@ const routes: Routes = [
authContext: {
permissions: [AppPermission.EditDescriptionTemplate]
},
getFromTitleService: true,
usePrefix: false,
action: 'new-version'
}
},
@ -86,7 +92,9 @@ const routes: Routes = [
}),
authContext: {
permissions: [AppPermission.EditDescriptionTemplate]
}
},
getFromTitleService: true,
usePrefix: false
}
},

View File

@ -42,6 +42,7 @@ import { NewEntryType, ToCEntry, ToCEntryType } from './table-of-contents/descri
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { LockService } from '@app/core/services/lock/lock.service';
import { LockTargetType } from '@app/core/common/enum/lock-target-type';
import { Title } from '@angular/platform-browser';
@Component({
@ -121,8 +122,15 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
private fileUtils: FileUtils,
private matomoService: MatomoService,
private languageInfoService: LanguageInfoService,
public userService: UserService
public userService: UserService,
public titleService: Title
) {
const descriptionLabel:string = route.snapshot.data['entity']?.label;
if (descriptionLabel) {
titleService.setTitle(descriptionLabel);
} else {
titleService.setTitle('DESCRIPTION-TEMPLATE-EDITOR.TITLE-EDIT-DESCRIPTION-TEMPLATE');
}
super(dialog, language, formService, router, uiNotificationService, httpErrorHandlingService, filterService, datePipe, route, queryParamsService, lockService, authService, configurationService);
}

View File

@ -33,7 +33,9 @@ const routes: Routes = [
},
...BreadcrumbService.generateRouteDataConfiguration({
title: 'BREADCRUMBS.NEW-DMP-BLUEPRINT'
})
}),
getFromTitleService: true,
usePrefix: false
}
},
{
@ -51,6 +53,8 @@ const routes: Routes = [
authContext: {
permissions: [AppPermission.EditDmpBlueprint]
},
getFromTitleService: true,
usePrefix: false,
action: 'clone'
}
},
@ -69,6 +73,8 @@ const routes: Routes = [
authContext: {
permissions: [AppPermission.EditDmpBlueprint]
},
getFromTitleService: true,
usePrefix: false,
action: 'new-version'
}
},
@ -86,7 +92,9 @@ const routes: Routes = [
}),
authContext: {
permissions: [AppPermission.EditDmpBlueprint]
}
},
getFromTitleService: true,
usePrefix: false
}
},

View File

@ -46,6 +46,7 @@ import { DmpBlueprintEditorModel, FieldInSectionEditorModel } from './dmp-bluepr
import { DmpBlueprintEditorResolver } from './dmp-blueprint-editor.resolver';
import { DmpBlueprintEditorService } from './dmp-blueprint-editor.service';
import { DmpBlueprintVersionStatus } from '@app/core/common/enum/dmp-blueprint-version-status';
import { Title } from '@angular/platform-browser';
@Component({
@ -134,8 +135,15 @@ export class DmpBlueprintEditorComponent extends BaseEditor<DmpBlueprintEditorMo
public descriptionTemplateService: DescriptionTemplateService,
public referenceTypeService: ReferenceTypeService,
public semanticsService: SemanticsService,
public prefillingSourceService: PrefillingSourceService
public prefillingSourceService: PrefillingSourceService,
public titleService: Title
) {
const descriptionLabel:string = route.snapshot.data['entity']?.label;
if (descriptionLabel) {
titleService.setTitle(descriptionLabel);
} else {
titleService.setTitle('DMP-BLUEPRINT-EDITOR.TITLE-EDIT-BLUEPRINT');
}
super(dialog, language, formService, router, uiNotificationService, httpErrorHandlingService, filterService, datePipe, route, queryParamsService, lockService, authService, configurationService);
}

View File

@ -45,7 +45,7 @@ const routes: Routes = [
...BreadcrumbService.generateRouteDataConfiguration({
hideNavigationItem: true
}),
title: 'DESCRIPTION-EDITOR.TITLE-EDIT-DESCRIPTION'
title: 'DESCRIPTION-EDITOR.TITLE-EDIT-DESCRIPTION',
// ,
// authContext: {
// permissions: [AppPermission.EditDescription]
@ -65,7 +65,9 @@ const routes: Routes = [
...BreadcrumbService.generateRouteDataConfiguration({
hideNavigationItem: true
}),
title: 'DESCRIPTION-EDITOR.TITLE-NEW'
title: 'DESCRIPTION-EDITOR.TITLE-NEW',
getFromTitleService: true,
usePrefix: false
// ,
// authContext: {
// permissions: [AppPermission.EditDescription]
@ -85,7 +87,9 @@ const routes: Routes = [
...BreadcrumbService.generateRouteDataConfiguration({
hideNavigationItem: true
}),
title: 'DESCRIPTION-EDITOR.TITLE-NEW'
title: 'DESCRIPTION-EDITOR.TITLE-NEW',
getFromTitleService: true,
usePrefix: false
// ,
// authContext: {
// permissions: [AppPermission.EditDescription]

View File

@ -169,6 +169,7 @@
"EDIT-DESCRIPTION-TEMPLATE-TYPE": "Edit",
"DMP-BLUEPRINTS": "Plan Blueprints",
"NEW-DMP-BLUEPRINT": "New",
"EDIT-DMP": "Edit",
"EDIT-DMP-BLUEPRINT": "Edit",
"NEW-DESCRIPTION-TEMPLATES": "New",
"EDIT-DESCRIPTION-TEMPLATES": "Edit",
@ -367,6 +368,7 @@
"NEW-PROFILE-VERSION": "New Version Of ",
"NEW-PROFILE-CLONE": "New Clone Of "
},
"TITLE-EDIT-DESCRIPTION-TEMPLATE": "Edit Description Template",
"FIELDS": {
"DATASET-TITLE": "Description Template Name",
"DATASET-DESCRIPTION": "Description"
@ -1412,6 +1414,7 @@
"CLONE": "Clone Plan Blueprint",
"NEW-VERSION": "Create New Version of Plan Blueprint"
},
"TITLE-EDIT-BLUEPRINT": "Editing Blueprint",
"SECTIONS-REQUIRED": "Required",
"FIELDS-REQUIRED": "Required",
"SYSTEM-FIELDS-REQUIRED": "Title, Description, Language and Access are required",