Commit e6d91e1e authored by Florent POITTEVIN's avatar Florent POITTEVIN
Browse files

feat: 1518 add label enum for centralized translation

parent ab355942
......@@ -2,7 +2,6 @@ import {Enums} from "@src/app/enums";
import {DataTestEnum} from "@src/app/shared/enums/data-test.enum";
import {HttpVerbEnum} from "@src/app/shared/enums/http-verb.enum";
import {ModuleLoadedEnum} from "@src/app/shared/enums/module-loaded.enum";
import {RoleEnum} from "@src/app/shared/enums/role.enum";
import {Guid} from "@src/app/shared/models/guid.model";
import {
HttpStatus,
......@@ -14,7 +13,7 @@ export class OrgunitHelper {
static orgUnitBaseNamePermanent: string = "[Cypress Permanent Test Data] Org Unit";
static orgUnitBaseNameTemporary: string = "[Cypress Temporary Test Data] Org Unit";
private static _generateOrgUnitName(role: RoleEnum | undefined, forPrerequisiteTest: boolean): string {
private static _generateOrgUnitName(role: Enums.Role.RoleEnum | undefined, forPrerequisiteTest: boolean): string {
let orgUnitName = forPrerequisiteTest ? this.orgUnitBaseNamePermanent : this.orgUnitBaseNameTemporary;
let forRoleText = "";
if (isNotNullNorUndefined(role)) {
......@@ -29,7 +28,7 @@ export class OrgunitHelper {
return orgUnitName;
}
static createIfNotExistOrgUnitForPrerequisiteTest(role: RoleEnum | undefined): string {
static createIfNotExistOrgUnitForPrerequisiteTest(role: Enums.Role.RoleEnum | undefined): string {
const orgUnitName = this._generateOrgUnitName(role, true);
TestHelper.login(Enums.UserApplicationRole.UserApplicationRoleEnum.root);
......@@ -57,7 +56,7 @@ export class OrgunitHelper {
return orgUnitName;
}
static createOrgUnit(role: RoleEnum | undefined, forPrerequisiteTest: boolean = false): string {
static createOrgUnit(role: Enums.Role.RoleEnum | undefined, forPrerequisiteTest: boolean = false): string {
const orgUnitName = this._generateOrgUnitName(role, forPrerequisiteTest);
TestHelper.login(Enums.UserApplicationRole.UserApplicationRoleEnum.root);
......
import {NgModule} from "@angular/core";
import {RouterModule} from "@angular/router";
import {AppHelper} from "@app/app.helper";
import {PageNotFoundPresentational} from "@app/components/presentationals/page-not-found/page-not-found.presentational";
import {IconAppRoutable} from "@app/components/routables/icon-app/icon-app.routable";
import {ApplicationRolePermissionEnum} from "@app/shared/enums/application-role-permission.enum";
import {
AppRoutesEnum,
} from "@app/shared/enums/routes.enum";
import {AppRoutesEnum} from "@app/shared/enums/routes.enum";
import {ApplicationRoleGuardService} from "@app/shared/guards/application-role-guard.service";
import {DlcmRoutes} from "@app/shared/models/dlcm-route.model";
import {LabelTranslateEnum} from "@shared/enums/label-translate.enum";
import {ApplicationDevGuardService} from "@shared/guards/application-dev-guard.service";
import {UrlQueryParamHelper} from "@shared/helpers/url-query-param.helper";
......@@ -27,7 +25,7 @@ const routes: DlcmRoutes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./features/deposit/deposit.module").then(m => m.DepositModule),
data: {
breadcrumb: AppHelper.deposit,
breadcrumb: LabelTranslateEnum.deposit,
permission: ApplicationRolePermissionEnum.userPermission,
},
canActivate: [ApplicationRoleGuardService],
......@@ -37,7 +35,7 @@ const routes: DlcmRoutes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./features/preservation-space/preservation-space.module").then(m => m.PreservationSpaceModule),
data: {
breadcrumb: AppHelper.preservationSpace,
breadcrumb: LabelTranslateEnum.preservationSpace,
permission: ApplicationRolePermissionEnum.userPermission,
},
canActivate: [ApplicationRoleGuardService],
......@@ -47,7 +45,7 @@ const routes: DlcmRoutes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./features/admin/admin.module").then(m => m.AdminModule),
data: {
breadcrumb: AppHelper.admin,
breadcrumb: LabelTranslateEnum.administration,
permission: ApplicationRolePermissionEnum.adminPermission,
},
canActivate: [ApplicationRoleGuardService],
......@@ -57,7 +55,7 @@ const routes: DlcmRoutes = [
// @ts-ignore Dynamic import
loadChildren: () => import("@preservation-planning/preservation-planning.module").then(m => m.PreservationPlanningModule),
data: {
breadcrumb: AppHelper.preservationPlanning,
breadcrumb: LabelTranslateEnum.preservationPlanning,
permission: ApplicationRolePermissionEnum.adminPermission,
},
canActivate: [ApplicationRoleGuardService],
......@@ -67,7 +65,7 @@ const routes: DlcmRoutes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./features/order/order.module").then(m => m.OrderModule),
data: {
breadcrumb: AppHelper.order,
breadcrumb: LabelTranslateEnum.order,
},
canActivate: [ApplicationRoleGuardService],
},
......
import {MARK_AS_TRANSLATABLE} from "solidify-frontend";
export class AppHelper {
static home: string = MARK_AS_TRANSLATABLE("app.module.home");
static deposit: string = MARK_AS_TRANSLATABLE("app.module.deposit");
static order: string = MARK_AS_TRANSLATABLE("app.module.order");
static preservationSpace: string = MARK_AS_TRANSLATABLE("app.module.preservation-space");
static admin: string = MARK_AS_TRANSLATABLE("app.module.admin");
static preservationPlanning: string = MARK_AS_TRANSLATABLE("app.module.preservation");
static cart: string = MARK_AS_TRANSLATABLE("app.module.cart");
static languageSelector: string = MARK_AS_TRANSLATABLE("app.module.languageSelector");
static login: string = MARK_AS_TRANSLATABLE("app.module.login");
static logout: string = MARK_AS_TRANSLATABLE("app.module.logout");
static profileInfo: string = MARK_AS_TRANSLATABLE("app.module.profileInfo");
static themeSelector: string = MARK_AS_TRANSLATABLE("app.module.themeSelector");
static token: string = MARK_AS_TRANSLATABLE("app.module.token");
}
......@@ -44,7 +44,7 @@
<div mat-dialog-actions>
<button mat-button
[mat-dialog-close]=""
>{{'app.cart.button.close' | translate}}</button>
>{{labelTranslateEnum.close | translate}}</button>
<button mat-flat-button
color="primary"
[dlcmButtonSpinner]="(isLoadingCartObs | async)"
......@@ -52,6 +52,6 @@
solidifyShortCuts
(onEnter)="submit()"
(click)="submit()"
>{{'app.cart.button.submit' | translate}}</button>
>{{labelTranslateEnum.submit | translate}}</button>
</div>
</lib-empty-container>
<dlcm-shared-base-info-dialog [titleToTranslate]="'app.token.title' | translate">
<dlcm-shared-base-info-dialog [titleToTranslate]="labelTranslateEnum.title | translate">
<div class="info">
<h3>{{'app.token.access' | translate}}</h3>
<h3>{{labelTranslateEnum.accessToken | translate}}</h3>
<div *ngIf="token as value"
class="value"
>
......@@ -10,7 +10,7 @@
solidifyShortCuts
(onEnter)="copy()"
(click)="copy()"
[matTooltip]="'app.token.copyToClipboard' | translate"
[matTooltip]="labelTranslateEnum.copyToClipboard | translate"
[matTooltipPosition]="'above'"
>
<dlcm-shared-icon [iconName]="iconNameEnum.copyToClipboard"></dlcm-shared-icon>
......
<dlcm-shared-base-action-dialog [titleToTranslate]="'app.user.title' | translate">
<h2>{{'app.user.administrative.title' | translate}}</h2>
<dlcm-shared-base-action-dialog [titleToTranslate]="labelTranslateEnum.profile | translate">
<h2>{{labelTranslateEnum.administrativeInformation | translate}}</h2>
<dlcm-user-form [model]="user"
[readonly]="true"
class="user"
></dlcm-user-form>
<h2>{{'app.user.personal.title' | translate}}</h2>
<h2>{{labelTranslateEnum.personalInformation | translate}}</h2>
<div class="wrapper"
[dlcmSpinner]="isLoadingPersonObs | async"
>
......@@ -20,13 +20,13 @@
<div mat-dialog-actions>
<button mat-button
[mat-dialog-close]=""
>{{'app.user.button.close' | translate}}</button>
>{{labelTranslateEnum.close | translate}}</button>
<button mat-flat-button
color="primary"
solidifyShortCuts
(onEnter)="formPresentational?.onSubmit()"
(click)="formPresentational?.onSubmit()"
[disabled]="!formPresentational?.form.valid || !formPresentational?.form.dirty"
>{{'app.user.button.submit' | translate}}
>{{labelTranslateEnum.validate | translate}}
</button>
</div>
......@@ -20,7 +20,7 @@
(click)="profileInfo()"
>
<dlcm-shared-icon [iconName]="iconNameEnum.profile"></dlcm-shared-icon>
<span>{{'app.module.profileInfo' | translate}}</span>
<span>{{labelTranslateEnum.profile | translate}}</span>
</button>
<ng-container *ngFor="let menu of listMenuAdmin">
<button mat-menu-item
......@@ -43,7 +43,7 @@
(click)="openUserGuide()"
>
<dlcm-shared-icon [iconName]="iconNameEnum.docUser"></dlcm-shared-icon>
<span>{{'app.module.userGuide' | translate}}</span>
<span>{{labelTranslateEnum.userGuide | translate}}</span>
</button>
<button mat-menu-item
solidifyShortCuts
......@@ -51,14 +51,14 @@
(click)="displayToken()"
>
<dlcm-shared-icon [iconName]="iconNameEnum.token"></dlcm-shared-icon>
<span>{{'app.module.token' | translate}}</span>
<span>{{labelTranslateEnum.token | translate}}</span>
</button>
<button mat-menu-item
solidifyShortCuts
[matMenuTriggerFor]="themeSelector.menu"
>
<dlcm-shared-icon [iconName]="iconNameEnum.theme"></dlcm-shared-icon>
<span>{{'app.module.theme' | translate}}</span>
<span>{{labelTranslateEnum.themes | translate}}</span>
</button>
<button [disabled]="true"
mat-menu-item
......@@ -73,7 +73,7 @@
(click)="logout()"
>
<dlcm-shared-icon [iconName]="iconNameEnum.logout"></dlcm-shared-icon>
<span>{{'app.module.logout' | translate}}</span>
<span>{{labelTranslateEnum.logout | translate}}</span>
</button>
</mat-menu>
......
<img class="selected-language-img"
[matTooltip]="'app.module.languageSelector' | translate"
[matTooltip]="labelTranslateEnum.selectLanguage | translate"
[matTooltipPosition]="'left'"
[src]="getPathToImage(currentLanguage)"
(click)="matSelect.open()"
......
......@@ -3,7 +3,6 @@ import {
Input,
Output,
} from "@angular/core";
import {AppHelper} from "@app/app.helper";
import {SharedAbstractPresentational} from "@app/shared/components/presentationals/shared-abstract/shared-abstract.presentational";
import {ApplicationRolePermissionEnum} from "@app/shared/enums/application-role-permission.enum";
import {
......@@ -18,6 +17,7 @@ import {environment} from "@environments/environment";
import {User} from "@models";
import {DataTestEnum} from "@shared/enums/data-test.enum";
import {IconNameEnum} from "@shared/enums/icon-name.enum";
import {LabelTranslateEnum} from "@shared/enums/label-translate.enum";
import {
BehaviorSubject,
Observable,
......@@ -108,7 +108,7 @@ export abstract class AbstractMainToolbarPresentational extends SharedAbstractPr
click: (menu) => this.navigate(menu.path()),
path: () => RoutesEnum.homePage,
rootModulePath: RoutesEnum.homePage,
labelToTranslate: AppHelper.home,
labelToTranslate: LabelTranslateEnum.home,
isVisible: () => true,
icon: IconNameEnum.home,
dataTest: DataTestEnum.linkMenuHome,
......@@ -117,7 +117,7 @@ export abstract class AbstractMainToolbarPresentational extends SharedAbstractPr
click: (menu) => this.openOrder(),
path: () => RoutesEnum.order,
rootModulePath: RoutesEnum.order,
labelToTranslate: AppHelper.order,
labelToTranslate: LabelTranslateEnum.order,
isVisible: () => PermissionUtil.isUserHavePermission(this.logged, ApplicationRolePermissionEnum.userPermission, this.userRoles),
icon: IconNameEnum.order,
badgeCounter: () => "" + this.numberMyOrderReadyNew,
......@@ -129,7 +129,7 @@ export abstract class AbstractMainToolbarPresentational extends SharedAbstractPr
click: (menu) => this.navigate(menu.path()),
path: () => RoutesEnum.deposit,
rootModulePath: RoutesEnum.deposit,
labelToTranslate: AppHelper.deposit,
labelToTranslate: LabelTranslateEnum.deposit,
isVisible: () => PermissionUtil.isUserHavePermission(this.logged, ApplicationRolePermissionEnum.userPermission, this.userRoles),
icon: IconNameEnum.deposit,
dataTest: DataTestEnum.linkMenuDeposit,
......@@ -138,7 +138,7 @@ export abstract class AbstractMainToolbarPresentational extends SharedAbstractPr
click: (menu) => this.navigate(menu.path()),
path: () => this.numberPendingRequestNotificationInbox === 0 ? RoutesEnum.preservationSpace : RoutesEnum.preservationSpaceNotificationInbox,
rootModulePath: RoutesEnum.preservationSpace,
labelToTranslate: AppHelper.preservationSpace,
labelToTranslate: LabelTranslateEnum.preservationSpace,
isVisible: () => PermissionUtil.isUserHavePermission(this.logged, ApplicationRolePermissionEnum.userPermission, this.userRoles),
icon: IconNameEnum.preservationSpace,
badgeCounter: () => "" + this.numberPendingRequestNotificationInbox,
......@@ -153,7 +153,7 @@ export abstract class AbstractMainToolbarPresentational extends SharedAbstractPr
click: (menu) => this.navigate(menu.path()),
path: () => RoutesEnum.preservationPlanning,
rootModulePath: RoutesEnum.preservationPlanning,
labelToTranslate: AppHelper.preservationPlanning,
labelToTranslate: LabelTranslateEnum.preservationPlanning,
isVisible: () => PermissionUtil.isUserHavePermission(this.logged, ApplicationRolePermissionEnum.adminPermission, this.userRoles),
icon: IconNameEnum.preservationPlanning,
dataTest: DataTestEnum.linkMenuPreservationPlanning,
......@@ -162,7 +162,7 @@ export abstract class AbstractMainToolbarPresentational extends SharedAbstractPr
click: (menu) => this.navigate(menu.path()),
path: () => RoutesEnum.admin,
rootModulePath: RoutesEnum.admin,
labelToTranslate: AppHelper.admin,
labelToTranslate: LabelTranslateEnum.administration,
isVisible: () => PermissionUtil.isUserHavePermission(this.logged, ApplicationRolePermissionEnum.adminPermission, this.userRoles),
icon: IconNameEnum.administration,
dataTest: DataTestEnum.linkMenuAdmin,
......
......@@ -84,7 +84,7 @@
[ngIfElse]="loggedOut"
>
<div class="login"
[matTooltip]="'app.module.login' | translate"
[matTooltip]="labelTranslateEnum.login | translate"
(click)="login()"
>
<dlcm-shared-icon [iconName]="iconNameEnum.login"
......
......@@ -55,7 +55,7 @@
>
<li [dlcmDataTest]="dataTestEnum.loginVerticalInput"
class="login"
[matTooltip]="'app.module.login' | translate"
[matTooltip]="labelTranslateEnum.login | translate"
[matTooltipPosition]="'right'"
(click)="login()"
>
......
......@@ -51,7 +51,7 @@
<li class="login">
<a [dlcmDataTest]="dataTestEnum.loginMobileInput"
(click)="login()"
>{{'app.module.login' | translate }}</a>
>{{labelTranslateEnum.login | translate }}</a>
</li>
</ng-template>
......@@ -59,7 +59,7 @@
<li class="logout">
<a [dlcmDataTest]="dataTestEnum.logoutMobileInput"
(click)="logout()"
>{{'app.module.logout' | translate }}</a>
>{{labelTranslateEnum.logout | translate }}</a>
</li>
</ng-template>
......
......@@ -10,5 +10,5 @@
(click)="backToHome()"
>
<dlcm-shared-icon [iconName]="iconNameEnum.home"></dlcm-shared-icon>
{{'app.notFound.button.backToHome' | translate}}
{{labelTranslateEnum.backToHomePage | translate}}
</button>
<form [formGroup]="form">
<mat-form-field *ngIf="getFormControl(formDefinition.firstName) as fd">
<mat-label>{{'app.user.administrative.form.firstName' | translate }}</mat-label>
<mat-label>{{labelTranslateEnum.firstName | translate }}</mat-label>
<input matInput
[solidifyValidation]="errors"
[formControl]="fd"
......@@ -10,7 +10,7 @@
</mat-form-field>
<mat-form-field *ngIf="getFormControl(formDefinition.lastName) as fd">
<mat-label>{{'app.user.administrative.form.lastName' | translate }}</mat-label>
<mat-label>{{labelTranslateEnum.lastName | translate }}</mat-label>
<input matInput
[solidifyValidation]="errors"
[formControl]="fd"
......@@ -20,7 +20,7 @@
</mat-form-field>
<mat-form-field *ngIf="getFormControl(formDefinition.homeOrganization) as fd">
<mat-label>{{'app.user.administrative.form.homeOrganization' | translate }}</mat-label>
<mat-label>{{labelTranslateEnum.homeOrganization | translate }}</mat-label>
<input matInput
[solidifyValidation]="errors"
[formControl]="fd"
......@@ -30,7 +30,7 @@
</mat-form-field>
<mat-form-field *ngIf="getFormControl(formDefinition.email) as fd">
<mat-label>{{'app.user.administrative.form.email' | translate }}</mat-label>
<mat-label>{{labelTranslateEnum.email | translate }}</mat-label>
<input matInput
[solidifyValidation]="errors"
[formControl]="fd"
......@@ -40,7 +40,7 @@
</mat-form-field>
<mat-form-field *ngIf="getFormControl(formDefinition.applicationRole) as fd">
<mat-label>{{'app.user.administrative.form.role' | translate }}</mat-label>
<mat-label>{{labelTranslateEnum.role | translate }}</mat-label>
<mat-select [formControl]="fd"
[solidifyValidation]="errors"
[required]="formValidationHelper.hasRequiredField(fd)"
......
......@@ -10,7 +10,7 @@ import {
} from "@app/shared/enums/routes.enum";
import {ApplicationRoleGuardService} from "@app/shared/guards/application-role-guard.service";
import {ApplicationRolePermissionEnum} from "@shared/enums/application-role-permission.enum";
import {MARK_AS_TRANSLATABLE} from "solidify-frontend";
import {LabelTranslateEnum} from "@shared/enums/label-translate.enum";
const routes: Routes = [
{
......@@ -23,7 +23,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./license/admin-license.module").then(m => m.AdminLicenseModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.license.root"),
breadcrumb: LabelTranslateEnum.licenses,
},
canActivate: [ApplicationRoleGuardService],
},
......@@ -32,7 +32,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./institution/admin-institution.module").then(m => m.AdminInstitutionModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.institution.root"),
breadcrumb: LabelTranslateEnum.institutions,
},
canActivate: [ApplicationRoleGuardService],
},
......@@ -41,7 +41,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./research-domain/admin-research-domain.module").then(m => m.AdminResearchDomainModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.researchDomain.root"),
breadcrumb: LabelTranslateEnum.researchAreas,
},
canActivate: [ApplicationRoleGuardService],
},
......@@ -50,7 +50,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./funding-agencies/admin-funding-agencies.module").then(m => m.AdminFundingAgenciesModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.funding-agencies.root"),
breadcrumb: LabelTranslateEnum.fundingAgencies,
},
canActivate: [ApplicationRoleGuardService],
},
......@@ -59,7 +59,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./oai-set/admin-oai-set.module").then(m => m.AdminOaiSetModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.oai-set.root"),
breadcrumb: LabelTranslateEnum.oaiSets,
},
canActivate: [ApplicationRoleGuardService],
},
......@@ -68,7 +68,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./oauth2-client/admin-oauth2-client.module").then(m => m.AdminOauth2ClientModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.oauth2Client.root"),
breadcrumb: LabelTranslateEnum.oAuth2Clients,
permission: ApplicationRolePermissionEnum.rootPermission,
},
canActivate: [ApplicationRoleGuardService],
......@@ -78,7 +78,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./organizational-unit/admin-organizational-unit.module").then(m => m.AdminOrganizationalUnitModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.organizationalUnit.root"),
breadcrumb: LabelTranslateEnum.organizationalUnits,
},
canActivate: [ApplicationRoleGuardService],
},
......@@ -87,7 +87,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./submission-policy/admin-submission-policy.module").then(m => m.AdminSubmissionPolicyModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.submissionPolicy.root"),
breadcrumb: LabelTranslateEnum.submissionPolicies,
},
canActivate: [ApplicationRoleGuardService],
},
......@@ -96,7 +96,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./person/admin-person.module").then(m => m.AdminPersonModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.person.root"),
breadcrumb: LabelTranslateEnum.people,
},
canActivate: [ApplicationRoleGuardService],
},
......@@ -105,7 +105,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./preservation-policy/admin-preservation-policy.module").then(m => m.AdminPreservationPolicyModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.preservationPolicy.root"),
breadcrumb: LabelTranslateEnum.preservationPolicies,
},
canActivate: [ApplicationRoleGuardService],
},
......@@ -114,7 +114,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./dissemination-policy/admin-dissemination-policy.module").then(m => m.AdminDisseminationPolicyModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.disseminationPolicy.root"),
breadcrumb: LabelTranslateEnum.disseminationPolicies,
},
canActivate: [ApplicationRoleGuardService],
},
......@@ -123,7 +123,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./role/admin-role.module").then(m => m.AdminRoleModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.role.root"),
breadcrumb: LabelTranslateEnum.roles,
},
canActivate: [ApplicationRoleGuardService],
},
......@@ -132,7 +132,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./notification/admin-notification.module").then(m => m.AdminNotificationModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.notification.root"),
breadcrumb: LabelTranslateEnum.notifications,
},
canActivate: [ApplicationRoleGuardService],
},
......@@ -141,7 +141,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./user/admin-user.module").then(m => m.AdminUserModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.user.root"),
breadcrumb: LabelTranslateEnum.users,
permission: ApplicationRolePermissionEnum.rootPermission,
},
canActivate: [ApplicationRoleGuardService],
......@@ -151,7 +151,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./language/admin-language.module").then(m => m.AdminLanguageModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.language.root"),
breadcrumb: LabelTranslateEnum.languages,
permission: ApplicationRolePermissionEnum.rootPermission,
},
canActivate: [ApplicationRoleGuardService],
......@@ -161,7 +161,7 @@ const routes: Routes = [
// @ts-ignore Dynamic import
loadChildren: () => import("./metadata-type/admin-metadata-type.module").then(m => m.AdminMetadataTypeModule),
data: {
breadcrumb: MARK_AS_TRANSLATABLE("breadcrumb.admin.metadataType.root"),
breadcrumb: LabelTranslateEnum.metadataTypes,
},
canActivate: [ApplicationRoleGuardService],
},
......
<h1 id="admin-home-title">{{'app.module.admin' | translate}}</h1>
<h1 id="admin-home-title">{{labelTranslateEnum.administration | translate}}</h1>
<div class="toolbar"
cdkTrapFocus
[solidifyFocusFirstElement]="true"
......
......@@ -12,6 +12,7 @@ import {
} from "@shared/components/routables/shared-abstract-home/shared-abstract-home.routable";
import {DataTestEnum} from "@shared/enums/data-test.enum";
import {IconNameEnum} from "@shared/enums/icon-name.enum";
import {LabelTranslateEnum} from "@shared/enums/label-translate.enum";
import {MARK_AS_TRANSLATABLE} from "solidify-frontend";
@Component({
......@@ -24,7 +25,7 @@ export class AdminHomeRoutable extends SharedAbstractHomeRoutable {
_tiles: SharedHomeTileModel[] = [
{
avatarIcon: IconNameEnum.organizationalUnit,
titleToTranslate: MARK_AS_TRANSLATABLE("admin.organizationalUnit.home.title"),
titleToTranslate: LabelTranslateEnum.organizationalUnits,
subtitleToTranslate: MARK_AS_TRANSLATABLE("admin.organizationalUnit.home.subtitle"),
path: RoutesEnum.adminOrganizationalUnit,
permission: ApplicationRolePermissionEnum.noPermission,
......@@ -32,7 +33,7 @@ export class AdminHomeRoutable extends SharedAbstractHomeRoutable {
},
{
avatarIcon: IconNameEnum.submissionPolicies,
titleToTranslate: MARK_AS_TRANSLATABLE("admin.submissionPolicy.home.title"),
titleToTranslate: LabelTranslateEnum.submissionPolicies,
subtitleToTranslate: MARK_AS_TRANSLATABLE("admin.submissionPolicy.home.subtitle"),
path: RoutesEnum.adminSubmissionPolicy,
permission: ApplicationRolePermissionEnum.noPermission,
......@@ -40,42 +41,42 @@ export class AdminHomeRoutable extends SharedAbstractHomeRoutable {
},
{
avatarIcon: IconNameEnum.preservationPolicies,
titleToTranslate: MARK_AS_TRANSLATABLE("admin.preservationPolicy.home.title"),
titleToTranslate: LabelTranslateEnum.preservationPolicies,
subtitleToTranslate: MARK_AS_TRANSLATABLE("admin.preservationPolicy.home.subtitle"),
path: RoutesEnum.adminPreservationPolicy,
permission: ApplicationRolePermissionEnum.noPermission,
},
{
avatarIcon: IconNameEnum.disseminationPolicies,
titleToTranslate: MARK_AS_TRANSLATABLE("admin.disseminationPolicy.home.title"),
titleToTranslate: LabelTranslateEnum.disseminationPolicies,
subtitleToTranslate: MARK_AS_TRANSLATABLE("admin.disseminationPolicy.home.subtitle"),
path: RoutesEnum.adminDisseminationPolicy,