admin-home.routable.ts 5.46 KB
Newer Older
1
2
3
4
import {
  ChangeDetectionStrategy,
  Component,
} from "@angular/core";
Alicia.DeDiosFuente's avatar
Alicia.DeDiosFuente committed
5
import {ApplicationRolePermissionEnum} from "@app/shared/enums/application-role-permission.enum";
Florent Poittevin's avatar
Florent Poittevin committed
6
import {RoutesEnum} from "@app/shared/enums/routes.enum";
Homada.Boumedane's avatar
Homada.Boumedane committed
7
import {TranslateService} from "@ngx-translate/core";
8
9
10
11
12
13
import {Store} from "@ngxs/store";
import {
  SharedAbstractHomeRoutable,
  SharedHomeTileModel,
} from "@shared/components/routables/shared-abstract-home/shared-abstract-home.routable";
import {TRANSLATE} from "solidify-frontend";
Florent Poittevin's avatar
Florent Poittevin committed
14
15
16
17
18
19
20

@Component({
  selector: "dlcm-admin-home-routable",
  templateUrl: "./admin-home.routable.html",
  styleUrls: ["./admin-home.routable.scss"],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
21
22
export class AdminHomeRoutable extends SharedAbstractHomeRoutable {
  _tiles: SharedHomeTileModel[] = [
Florent Poittevin's avatar
Florent Poittevin committed
23
    {
24
25
26
27
      avatarIcon: "building",
      titleToTranslate: TRANSLATE("admin.organizationalUnit.home.title"),
      subtitleToTranslate: TRANSLATE("admin.organizationalUnit.home.subtitle"),
      path: RoutesEnum.adminOrganizationalUnit,
Homada.Boumedane's avatar
Homada.Boumedane committed
28
      permission: ApplicationRolePermissionEnum.noPermission,
29
30
31
    },
    {
      avatarIcon: "user-check",
Florent Poittevin's avatar
Florent Poittevin committed
32
33
34
      titleToTranslate: TRANSLATE("admin.submissionPolicy.home.title"),
      subtitleToTranslate: TRANSLATE("admin.submissionPolicy.home.subtitle"),
      path: RoutesEnum.adminSubmissionPolicy,
Homada.Boumedane's avatar
Homada.Boumedane committed
35
      permission: ApplicationRolePermissionEnum.noPermission,
Florent Poittevin's avatar
Florent Poittevin committed
36
    },
37
    {
38
      avatarIcon: "history",
39
40
41
      titleToTranslate: TRANSLATE("admin.preservationPolicy.home.title"),
      subtitleToTranslate: TRANSLATE("admin.preservationPolicy.home.subtitle"),
      path: RoutesEnum.adminPreservationPolicy,
Homada.Boumedane's avatar
Homada.Boumedane committed
42
      permission: ApplicationRolePermissionEnum.noPermission,
43
    },
44
45
46
47
48
    {
      avatarIcon: "cart-arrow-down",
      titleToTranslate: TRANSLATE("admin.disseminationPolicy.home.title"),
      subtitleToTranslate: TRANSLATE("admin.disseminationPolicy.home.subtitle"),
      path: RoutesEnum.adminDisseminationPolicy,
Homada.Boumedane's avatar
Homada.Boumedane committed
49
      permission: ApplicationRolePermissionEnum.noPermission,
50
    },
51
52
53
54
55
    {
      avatarIcon: "copyright",
      titleToTranslate: TRANSLATE("admin.license.home.title"),
      subtitleToTranslate: TRANSLATE("admin.license.home.subtitle"),
      path: RoutesEnum.adminLicense,
Homada.Boumedane's avatar
Homada.Boumedane committed
56
      permission: ApplicationRolePermissionEnum.noPermission,
57
    },
Nicolas.Rod's avatar
Nicolas.Rod committed
58
    {
59
      avatarIcon: "university",
Nicolas.Rod's avatar
Nicolas.Rod committed
60
61
62
      titleToTranslate: TRANSLATE("admin.institution.home.title"),
      subtitleToTranslate: TRANSLATE("admin.institution.home.subtitle"),
      path: RoutesEnum.adminInstitution,
Homada.Boumedane's avatar
Homada.Boumedane committed
63
      permission: ApplicationRolePermissionEnum.noPermission,
Alicia.DeDiosFuente's avatar
Alicia.DeDiosFuente committed
64
    },
65
66
67
68
69
    {
      avatarIcon: "microscope",
      titleToTranslate: TRANSLATE("admin.researchDomain.home.title"),
      subtitleToTranslate: TRANSLATE("admin.researchDomain.home.subtitle"),
      path: RoutesEnum.adminResearchDomain,
Homada.Boumedane's avatar
Homada.Boumedane committed
70
      permission: ApplicationRolePermissionEnum.noPermission,
71
    },
Alicia.DeDiosFuente's avatar
Alicia.DeDiosFuente committed
72
    {
73
      avatarIcon: "user-circle",
Alicia.DeDiosFuente's avatar
Alicia.DeDiosFuente committed
74
75
76
      titleToTranslate: TRANSLATE("admin.user.home.title"),
      subtitleToTranslate: TRANSLATE("admin.user.home.subtitle"),
      path: RoutesEnum.adminUser,
Homada.Boumedane's avatar
Homada.Boumedane committed
77
      permission: ApplicationRolePermissionEnum.rootPermission,
Nicolas.Rod's avatar
Nicolas.Rod committed
78
    },
79
80
81
82
83
    {
      avatarIcon: "id-badge",
      titleToTranslate: TRANSLATE("admin.roles.home.title"),
      subtitleToTranslate: TRANSLATE("admin.roles.home.subtitle"),
      path: RoutesEnum.adminRole,
Homada.Boumedane's avatar
Homada.Boumedane committed
84
      permission: ApplicationRolePermissionEnum.rootPermission,
85
    },
David.Gold1's avatar
David.Gold1 committed
86
87
88
89
90
    {
      avatarIcon: "passport",
      titleToTranslate: TRANSLATE("admin.oai-set.home.title"),
      subtitleToTranslate: TRANSLATE("admin.oai-set.home.subtitle"),
      path: RoutesEnum.adminOaiSet,
Homada.Boumedane's avatar
Homada.Boumedane committed
91
      permission: ApplicationRolePermissionEnum.noPermission,
David.Gold1's avatar
David.Gold1 committed
92
    },
93
    {
94
95
96
97
      avatarIcon: "passport",
      titleToTranslate: TRANSLATE("admin.oauth2.home.title"),
      subtitleToTranslate: TRANSLATE("admin.oauth2.home.subtitle"),
      path: RoutesEnum.adminOAuth2client,
Homada.Boumedane's avatar
Homada.Boumedane committed
98
      permission: ApplicationRolePermissionEnum.rootPermission,
99
    },
100
101
102
103
104
    {
      avatarIcon: "user",
      titleToTranslate: TRANSLATE("admin.person.home.title"),
      subtitleToTranslate: TRANSLATE("admin.person.home.subtitle"),
      path: RoutesEnum.adminPerson,
Homada.Boumedane's avatar
Homada.Boumedane committed
105
      permission: ApplicationRolePermissionEnum.noPermission,
106
    },
107
108
109
110
111
    {
      avatarIcon: "hand-holding-usd",
      titleToTranslate: TRANSLATE("admin.funding-agencies.home.title"),
      subtitleToTranslate: TRANSLATE("admin.funding-agencies.home.subtitle"),
      path: RoutesEnum.adminFundingAgencies,
Homada.Boumedane's avatar
Homada.Boumedane committed
112
      permission: ApplicationRolePermissionEnum.rootPermission,
Florent Poittevin's avatar
Florent Poittevin committed
113
    },
114
115
116
117
118
    {
      avatarIcon: "language",
      titleToTranslate: TRANSLATE("admin.language.home.title"),
      subtitleToTranslate: TRANSLATE("admin.language.home.subtitle"),
      path: RoutesEnum.adminLanguage,
Homada.Boumedane's avatar
Homada.Boumedane committed
119
      permission: ApplicationRolePermissionEnum.rootPermission,
120
    },
121
122
123
124
125
    {
      avatarIcon: "table",
      titleToTranslate: TRANSLATE("admin.metadataType.home.title"),
      subtitleToTranslate: TRANSLATE("admin.metadataType.home.subtitle"),
      path: RoutesEnum.adminMetadataType,
Homada.Boumedane's avatar
Homada.Boumedane committed
126
      permission: ApplicationRolePermissionEnum.noPermission,
127
    },
128
    {
129
      avatarIcon: "envelope",
130
131
132
      titleToTranslate: TRANSLATE("admin.notifications.home.title"),
      subtitleToTranslate: TRANSLATE("admin.notifications.home.subtitle"),
      path: RoutesEnum.adminNotification,
Homada.Boumedane's avatar
Homada.Boumedane committed
133
      permission: ApplicationRolePermissionEnum.rootPermission,
134
    },
Florent Poittevin's avatar
Florent Poittevin committed
135
136
  ];

137
138
139
  constructor(protected readonly _store: Store,
              protected readonly _translate: TranslateService) {
    super(_store, _translate);
Florent Poittevin's avatar
Florent Poittevin committed
140
141
142
  }
}