@intellias/menu 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/Menu.ts +625 -0
  2. package/README.md +121 -0
  3. package/assets/icons/arrow-down.svg +13 -0
  4. package/assets/icons/arrow-left.svg +3 -0
  5. package/assets/icons/arrow-submenu.svg +8 -0
  6. package/assets/icons/close.svg +3 -0
  7. package/assets/icons/delete.svg +13 -0
  8. package/assets/icons/faq-new.svg +4 -0
  9. package/assets/icons/kudos.svg +14 -0
  10. package/assets/icons/loading-spinner.svg +40 -0
  11. package/assets/icons/notification.svg +11 -0
  12. package/assets/icons/notifications/assessment.svg +10 -0
  13. package/assets/icons/notifications/buddy_program.svg +8 -0
  14. package/assets/icons/notifications/compensation_packages.svg +10 -0
  15. package/assets/icons/notifications/dsat.svg +8 -0
  16. package/assets/icons/notifications/feedback.svg +7 -0
  17. package/assets/icons/notifications/kudos.svg +4 -0
  18. package/assets/icons/notifications/overtime_requests.svg +15 -0
  19. package/assets/icons/notifications/pdu_program.svg +4 -0
  20. package/assets/icons/notifications/profile_update.svg +6 -0
  21. package/assets/icons/notifications/recommendation_program.svg +7 -0
  22. package/assets/icons/notifications/reminders.svg +4 -0
  23. package/assets/icons/notifications/sick_leaves.svg +5 -0
  24. package/assets/icons/notifications/smarts.svg +4 -0
  25. package/assets/icons/notifications/survey.svg +8 -0
  26. package/assets/icons/notifications/unpaid_leave.svg +4 -0
  27. package/assets/icons/notifications/vacations.svg +4 -0
  28. package/assets/icons/pause.svg +13 -0
  29. package/assets/icons/play.svg +13 -0
  30. package/assets/icons/smart.svg +14 -0
  31. package/assets/icons/smarts-kudos.svg +11 -0
  32. package/assets/icons/spinner-solid.svg +1 -0
  33. package/assets/icons/vacation.svg +14 -0
  34. package/assets/icons/visibility.svg +1 -0
  35. package/assets/intems-logo.svg +3 -0
  36. package/babel.config.js +6 -0
  37. package/buses/eventBus.ts +19 -0
  38. package/buses/events/GiveKudosEvent.ts +7 -0
  39. package/components/buttons/action-button/ActionButton.scss +133 -0
  40. package/components/buttons/action-button/ActionButton.ts +57 -0
  41. package/components/buttons/action-button/ActionButton.vue +50 -0
  42. package/components/buttons/secondary-button/SecondaryButton.scss +48 -0
  43. package/components/buttons/secondary-button/SecondaryButton.ts +28 -0
  44. package/components/buttons/secondary-button/SecondaryButton.vue +27 -0
  45. package/components/confirm/Confirm.scss +44 -0
  46. package/components/confirm/Confirm.ts +82 -0
  47. package/components/confirm/Confirm.vue +64 -0
  48. package/components/give-kudos-form/GiveKudosForm.scss +114 -0
  49. package/components/give-kudos-form/GiveKudosForm.ts +159 -0
  50. package/components/give-kudos-form/GiveKudosForm.vue +131 -0
  51. package/components/give-kudos-form/mixins/UserSelectMixin.ts +57 -0
  52. package/components/give-kudos-form/models/KudosShareModel.ts +6 -0
  53. package/components/give-kudos-form/models/UserListModel.ts +5 -0
  54. package/components/give-kudos-form/validators/InEnglishValidatorRegex.ts +17 -0
  55. package/components/give-kudos-form/validators/KudosBalance.ts +10 -0
  56. package/components/modal/Modal.scss +53 -0
  57. package/components/modal/Modal.ts +70 -0
  58. package/components/modal/Modal.vue +28 -0
  59. package/components/notifications-sidebar/NotificationsSidebar.scss +665 -0
  60. package/components/notifications-sidebar/NotificationsSidebar.ts +203 -0
  61. package/components/notifications-sidebar/NotificationsSidebar.vue +171 -0
  62. package/components/notifications-sidebar/models/BroadcastNotificationPayload.ts +8 -0
  63. package/components/notifications-sidebar/models/TotalCounter.ts +50 -0
  64. package/components/notifications-sidebar/notification/Notification.ts +17 -0
  65. package/components/notifications-sidebar/notification/Notification.vue +87 -0
  66. package/components/play-pause/PlayPause.scss +33 -0
  67. package/components/play-pause/PlayPause.ts +156 -0
  68. package/components/play-pause/PlayPause.vue +36 -0
  69. package/components/play-pause/PlayPauseStatus.ts +4 -0
  70. package/components/play-pause/helpers/LatestTrackedTimeDurationHelper.ts +55 -0
  71. package/components/play-pause/helpers/PauseHelper.ts +55 -0
  72. package/components/play-pause/helpers/TrackedTimeHelper.ts +80 -0
  73. package/components/preloader/Preloader.vue +34 -0
  74. package/components/request-loader/RequestLoader.scss +20 -0
  75. package/components/request-loader/RequestLoader.ts +80 -0
  76. package/components/request-loader/RequestLoader.vue +15 -0
  77. package/components/sub-menu/SubMenu.scss +33 -0
  78. package/components/sub-menu/SubMenu.ts +38 -0
  79. package/components/sub-menu/SubMenu.vue +21 -0
  80. package/components/time-ago/TimeAgo.ts +34 -0
  81. package/components/time-ago/TimeAgo.vue +9 -0
  82. package/components/user-picture/UserPicture.scss +62 -0
  83. package/components/user-picture/UserPicture.ts +105 -0
  84. package/components/user-picture/UserPicture.vue +23 -0
  85. package/components/v-select-intems/VSelectIntems.ts +112 -0
  86. package/components/v-select-intems/VSelectIntems.vue +68 -0
  87. package/components/v-select-intems/open-indicator/OpenIndicator.vue +3 -0
  88. package/dist/css/1.css +85 -0
  89. package/dist/css/2.css +34 -0
  90. package/dist/css/3.css +34 -0
  91. package/dist/css/4.css +34 -0
  92. package/dist/css/5.css +34 -0
  93. package/dist/css/main.css +1564 -0
  94. package/dist/html/app.html +19 -0
  95. package/dist/html/styles.html +1 -0
  96. package/dist/images/intems-logo.svg +3 -0
  97. package/dist/js/0.js +315 -0
  98. package/dist/js/1.js +313 -0
  99. package/dist/js/2.js +217 -0
  100. package/dist/js/3.js +181 -0
  101. package/dist/js/4.js +181 -0
  102. package/dist/js/5.js +181 -0
  103. package/dist/js/6.js +47 -0
  104. package/dist/js/main.js +7465 -0
  105. package/dist/js/vue.js +15 -0
  106. package/helpers/GeneralHelper.ts +61 -0
  107. package/helpers/PublisherSubscriber.ts +34 -0
  108. package/helpers/QueryFilter.ts +204 -0
  109. package/helpers/TimeHelper.ts +54 -0
  110. package/helpers/Validations.ts +7 -0
  111. package/helpers/model/ModelHelper.ts +155 -0
  112. package/helpers/model/decorators/AsCollection.ts +26 -0
  113. package/helpers/model/decorators/AsModel.ts +25 -0
  114. package/helpers/model/decorators/DateTime.ts +26 -0
  115. package/helpers/model/decorators/TimeDuration.ts +33 -0
  116. package/helpers/moment/Duration.ts +64 -0
  117. package/helpers/moment/Moment.ts +17 -0
  118. package/helpers/moment/index.d.ts +20 -0
  119. package/helpers/response/AxiosProxy.ts +72 -0
  120. package/helpers/response/ErrorsToToastHelper.ts +42 -0
  121. package/helpers/response/ResponseCode.ts +16 -0
  122. package/helpers/response/ResponseHelper.ts +42 -0
  123. package/helpers/response/ResponseInterface.ts +34 -0
  124. package/helpers/response/ResponseState.ts +6 -0
  125. package/jsconfig.json +19 -0
  126. package/mixins/IntemsMath.ts +29 -0
  127. package/mixins/notifications/ActionProcessing.ts +134 -0
  128. package/mixins/notifications/confirms/AssetRejectionConfirm.vue +59 -0
  129. package/mixins/notifications/confirms/SickLeaveRejectionConfirm.vue +31 -0
  130. package/mixins/notifications/confirms/UnpaidLeaveRejectionConfirm.vue +31 -0
  131. package/mixins/notifications/confirms/VacationRejectionConfirm.vue +31 -0
  132. package/models/AssetModel.ts +80 -0
  133. package/models/AssetRequestModel.ts +25 -0
  134. package/models/ConfigModel.ts +20 -0
  135. package/models/EmployeeStartEndDateModel.ts +16 -0
  136. package/models/EmploymentTypeModel.ts +95 -0
  137. package/models/LogoutModel.ts +3 -0
  138. package/models/Model.ts +12 -0
  139. package/models/ModuleOptions.ts +24 -0
  140. package/models/PublicInfoModel.ts +38 -0
  141. package/models/PublicLocationModel.ts +36 -0
  142. package/models/StatusModel.ts +8 -0
  143. package/models/TrackedTimeModel.ts +32 -0
  144. package/models/location/PublicLocationModel.ts +36 -0
  145. package/models/timezones/LocalTimezoneHistoryModel.ts +8 -0
  146. package/models/timezones/TimezoneModel.ts +9 -0
  147. package/models/user/ExtendedInfoModel.ts +37 -0
  148. package/models/user/NotificationActionModel.ts +53 -0
  149. package/models/user/NotificationModel.ts +84 -0
  150. package/models/user/PublicInfoModel.ts +38 -0
  151. package/models/user/WelcomeProgram.ts +4 -0
  152. package/package.json +117 -0
  153. package/repositories/BaseRepository.ts +42 -0
  154. package/repositories/BaseUrl.ts +107 -0
  155. package/repositories/Repository.ts +291 -0
  156. package/repositories/ResourceRepository.ts +99 -0
  157. package/repositories/TrackedTimeRepository.ts +43 -0
  158. package/repositories/UserRepository.ts +75 -0
  159. package/repositories/subscribers/CreateSubscribers.ts +28 -0
  160. package/repositories/subscribers/DefaultSubscribers.ts +82 -0
  161. package/repositories/subscribers/DeleteSubscribers.ts +28 -0
  162. package/repositories/subscribers/DownloadSubscribers.ts +28 -0
  163. package/repositories/subscribers/Subscribers.ts +13 -0
  164. package/repositories/subscribers/UpdateSubscribers.ts +32 -0
  165. package/scss/components/_global.scss +66 -0
  166. package/scss/components/_mixins.scss +31 -0
  167. package/scss/components/_tooltip.scss +45 -0
  168. package/scss/components/_utils.scss +26 -0
  169. package/scss/components/_variables.scss +103 -0
  170. package/scss/main.scss +7 -0
  171. package/shims-vue.d.ts +9 -0
  172. package/tsconfig.json +31 -0
  173. package/webpack.config.js +126 -0
  174. package/wrapper.ts +51 -0
package/Menu.ts ADDED
@@ -0,0 +1,625 @@
1
+ import { mapGetters, mapMutations, mapActions } from "vuex";
2
+ import NotificationsSidebar from "./components/notifications-sidebar/NotificationsSidebar.vue";
3
+ import playPause from "./components/play-pause/PlayPause.vue";
4
+ import SubMenu from "./components/sub-menu/SubMenu.vue";
5
+ import { BaseUrl } from "./repositories/BaseUrl";
6
+ import UserPublicInfoModel from "./models/user/PublicInfoModel";
7
+ import UserExtendedInfoModel from "./models/user/ExtendedInfoModel";
8
+ import BaseRepository from "./repositories/BaseRepository";
9
+ import LogoutModel from "./models/LogoutModel";
10
+ import ConfigModel from "./models/ConfigModel";
11
+ import UserPicture from "./components/user-picture/UserPicture.vue";
12
+ import { MenuOptions, ProjectName } from "./wrapper";
13
+ import { isMobileOnly } from "mobile-device-detect";
14
+ import NotificationActionModel, {
15
+ ActionType,
16
+ RequestMethod,
17
+ } from "./models/user/NotificationActionModel";
18
+ import {
19
+ NotificationCategory,
20
+ NotificationRejectionData,
21
+ } from "./models/user/NotificationModel";
22
+
23
+ export default {
24
+ name: "MainMenu",
25
+ components: {
26
+ UserPicture,
27
+ NotificationsSidebar,
28
+ playPause,
29
+ SubMenu,
30
+ },
31
+ props: {
32
+ helperFunctions: {
33
+ type: Array,
34
+ },
35
+ storeAdapter: {
36
+ type: Object,
37
+ },
38
+ subMenus: {
39
+ type: Array,
40
+ },
41
+ projectName: {
42
+ type: ProjectName,
43
+ },
44
+ },
45
+ provide(): MenuOptions {
46
+ return {
47
+ projectName: this.projectName,
48
+ storeAdapter: this.storeAdapter,
49
+ subMenus: this.isLiteDomain ? this.subMenus : null,
50
+ helperFunctions: this.helperFunctions,
51
+ };
52
+ },
53
+ mounted(): void {
54
+ this.initializeItems();
55
+ this.initializeAdminItems();
56
+ this.initializeHereBoardItems();
57
+ this.attachOverflowItems();
58
+ this.$echo
59
+ .private(`employee.${this.getUser.employee_id}`)
60
+ .listen("SmartBalanceChanged", () =>
61
+ this.storeAdapter.User.actions.getData()
62
+ )
63
+ .listen("LiqPayDonationProcessed", (payload) => {
64
+ if (payload.status === "finished") {
65
+ this.storeAdapter.Toasts.mutations.addMessage(
66
+ `${payload.quantity} UAH was successfully donated.`
67
+ );
68
+ } else {
69
+ this.storeAdapter.Toasts.mutations.addWarning(
70
+ `Donation ${payload.quantity} UAH was failed.`
71
+ );
72
+ }
73
+ this.storeAdapter.Toasts.mutations.showAll();
74
+ });
75
+ },
76
+ updated(): void {
77
+ this.findOverflowedIndex();
78
+ if (this.overflowedItems.items.length) {
79
+ this.attachOverflowedMenus();
80
+ }
81
+ },
82
+ computed: {
83
+ ...mapGetters("User", [
84
+ "getUser",
85
+ "isSidebarFixed",
86
+ "isSidebarOpenOnMobile",
87
+ ]),
88
+ intemsConfig(): ConfigModel {
89
+ return this.storeAdapter.Config.state.data;
90
+ },
91
+ userInfo(): UserPublicInfoModel | UserExtendedInfoModel {
92
+ return this.storeAdapter.User.state.data;
93
+ },
94
+ uncheckedCounter(): number {
95
+ if (
96
+ this.storeAdapter.HomePage_OnBoardingPlan.getters?.notCheckedTasksLength
97
+ ) {
98
+ return this.storeAdapter.HomePage_OnBoardingPlan.getters
99
+ .notCheckedTasksLength;
100
+ }
101
+ return this.userInfo.welcomeProgram.unchecked_welcome_program_questions;
102
+ },
103
+ canSeeGitBranch(): boolean {
104
+ return this.$can("read", "feature_show_git_branch");
105
+ },
106
+ intelliHubIconsClassName(): string {
107
+ return this.isIntelliHub
108
+ ? "icons hide-on-med-and-down"
109
+ : "icons fixed-padding hide-on-med-and-down";
110
+ },
111
+ intelliHubAvatarClassName(): string {
112
+ return this.isIntelliHub
113
+ ? "intellihub-user-wrapper"
114
+ : "intellihub-user-wrapper fixed-padding";
115
+ },
116
+ intelliHubNotificationsClassName(): string {
117
+ return this.isIntelliHub
118
+ ? "notifications-bell"
119
+ : "notifications-bell fixed-padding";
120
+ },
121
+ isIntelliHub(): boolean {
122
+ return this.projectName === ProjectName.IntelliHub;
123
+ },
124
+ isLiteDomain(): boolean {
125
+ return this.projectName === ProjectName.Lite;
126
+ },
127
+ isManagersPortal(): boolean {
128
+ return this.projectName === ProjectName.ManagersPortal;
129
+ },
130
+ allowedToGiveKudos(): boolean {
131
+ return this.userInfo.kudos_balance > 0;
132
+ },
133
+ vacationBalance(): number | string {
134
+ return this.userInfo.vacation_balance;
135
+ },
136
+ overflowMenuItemHeight(): number {
137
+ return this.overflowedMenus[0].querySelector("li").getBoundingClientRect()
138
+ .height;
139
+ },
140
+ overflowMenuMaxItemCount(): number {
141
+ const itemCountPerMenu = [];
142
+
143
+ this.overflowedMenus.forEach((menu) => {
144
+ itemCountPerMenu.push(menu.querySelectorAll(":scope > li").length);
145
+ });
146
+
147
+ return Math.max(...itemCountPerMenu);
148
+ },
149
+ isMobileOnly(): boolean {
150
+ return isMobileOnly;
151
+ },
152
+ },
153
+ watch: {
154
+ // kostyl to close dropdown after back button press
155
+ $route(): void {
156
+ if (this.mobileMenu) {
157
+ this.mobileMenu.close();
158
+ }
159
+ },
160
+ "overflowedItems.startIndex": {
161
+ handler(index: number): void {
162
+ this.overflowedItems.items = this.items.slice(index);
163
+ },
164
+ },
165
+ },
166
+ methods: {
167
+ ...mapGetters("Config", ["config"]),
168
+ ...mapActions("User/Notifications", ["markAsRead"]),
169
+ ...mapMutations("User", ["toggleSidebarFixation", "toggleSidebarOnMobile"]),
170
+ handleSidebarTogglerClick(): void {
171
+ if (!this.isMobileOnly) {
172
+ this.toggleSidebarFixation();
173
+ } else {
174
+ this.toggleSidebarOnMobile();
175
+ }
176
+ },
177
+ goTo(routeName): void {
178
+ this.helperFunctions.router.push({ name: routeName });
179
+ },
180
+ modifyOpenedAdminItems(indexItem: number): void {
181
+ const collapsibleWrapper = document.getElementById("admin_collapsible");
182
+ const collaplsedAdminItem =
183
+ collapsibleWrapper.children[indexItem].children[1];
184
+ const animationSmoothness = 0.4;
185
+ const transitionDuration = `${
186
+ collaplsedAdminItem.children.length * animationSmoothness
187
+ }s`;
188
+ collaplsedAdminItem.style.transitionDuration = transitionDuration;
189
+ this.adminItems = this.adminItems.map((item, index) =>
190
+ item.children && index === indexItem
191
+ ? { ...item, opened: !item.opened }
192
+ : item
193
+ );
194
+ },
195
+ toggleSideNavVisibility(): void {
196
+ this.sideNavOpened = !this.sideNavOpened;
197
+ },
198
+ attachOverflowItems(): void {
199
+ this.markOverflowedItems();
200
+ window.addEventListener("resize", this.markOverflowedItems);
201
+ },
202
+ attachOverflowedMenus(): void {
203
+ this.overflowedMenus = this.$refs.overflowedMenu.querySelectorAll("ul");
204
+ },
205
+ findOverflowedIndex(): void {
206
+ const items: Array<HTMLElement> = [
207
+ ...this.$refs["menu-items"].childNodes,
208
+ ];
209
+ const { length } = items;
210
+ for (let i = 0; i < length; i++) {
211
+ if (items[i].offsetTop > items[i].clientTop) {
212
+ this.overflowedItems.startIndex = i;
213
+ break;
214
+ }
215
+ }
216
+ },
217
+ markOverflowedItems(): void {
218
+ this.findOverflowedIndex();
219
+ this.overflowedItems.items =
220
+ this.overflowedItems.startIndex > -1
221
+ ? this.items.slice(this.overflowedItems.startIndex)
222
+ : [];
223
+ },
224
+ async logOut(): Promise<void> {
225
+ const repository = new BaseRepository(BaseUrl.LogOut);
226
+ const data = await repository.post<{ data: LogoutModel }>();
227
+ if (data.data !== undefined) {
228
+ window.location.href = data.data.redirect_url;
229
+ }
230
+ },
231
+ openModalGiveKudos(): void {
232
+ if (this.allowedToGiveKudos) {
233
+ this.giveKudosComponent = this.giveKudosModalComponent();
234
+ }
235
+ },
236
+ closeModalGiveKudos(): void {
237
+ this.giveKudosComponent = undefined;
238
+ },
239
+ giveKudosModalComponent() {
240
+ return () => import("./components/give-kudos-form/GiveKudosForm.vue");
241
+ },
242
+ setOverflowedMenuHeight(): void {
243
+ this.overflowedMenus.forEach((menu) => {
244
+ menu.style.height = `${
245
+ this.overflowMenuMaxItemCount * this.overflowMenuItemHeight
246
+ }px`;
247
+ });
248
+ },
249
+ moveOverflowedMenu(): void {
250
+ this.isOveflowedMenuMoved = true;
251
+ this.setOverflowedMenuHeight();
252
+ },
253
+ resetOverflowedMenu(): void {
254
+ this.isOveflowedMenuMoved = false;
255
+ this.overflowedMenus.forEach((menu) => {
256
+ menu.style.height = "auto";
257
+ });
258
+ },
259
+ initializeRejectionComponent(
260
+ rejectionData: NotificationRejectionData
261
+ ): void {
262
+ this.rejectConfirm = rejectionData.rejectionComponent;
263
+ this.rejectedNotification = rejectionData.notification;
264
+ },
265
+ confirmedReject(payload): void {
266
+ const action = this.rejectedNotification.actions
267
+ .first((item) => item.type === ActionType.reject)
268
+ .clone();
269
+ if (
270
+ [
271
+ NotificationCategory.vacations,
272
+ NotificationCategory.sick_leaves,
273
+ NotificationCategory.unpaid_leave,
274
+ ].includes(this.rejectedNotification.category)
275
+ ) {
276
+ action.body.rejection_reason = payload.comment;
277
+ } else {
278
+ action.body.reject_reason = payload;
279
+ }
280
+
281
+ this.requestNotification(action);
282
+
283
+ this.unsetRejection();
284
+ },
285
+ unsetRejection(): void {
286
+ this.rejectConfirm = null;
287
+ },
288
+ async requestNotification(action: NotificationActionModel): Promise<void> {
289
+ this.markAsRead(this.rejectedNotification);
290
+ await this.baseRepository.request(
291
+ action.action,
292
+ action.method ? action.method : RequestMethod.put,
293
+ action.body
294
+ );
295
+ },
296
+ initializeItems(): void {
297
+ this.items = [
298
+ {
299
+ name: "Time",
300
+ link: "Time",
301
+ toMainDomain: false,
302
+ toLite: !this.isLiteDomain,
303
+ menuCheck: "menu_time",
304
+ },
305
+ {
306
+ name: "Leaves and Absences",
307
+ link: this.isLiteDomain
308
+ ? "Leaves and Absences"
309
+ : "leaves-and-absences/balance",
310
+ toLite: !this.isLiteDomain,
311
+ menuCheck: "menu_leaves_and_absences",
312
+ },
313
+ {
314
+ name: "Stats",
315
+ link: "stats",
316
+ toLite: !this.isLiteDomain,
317
+ toMainDomain: false,
318
+ menuCheck: "menu_stats",
319
+ },
320
+ {
321
+ name: "IntelliShare",
322
+ link: this.isLiteDomain ? "Donation Portal" : "donations",
323
+ toLite: !this.isLiteDomain,
324
+ toMainDomain: false,
325
+ menuCheck: "menu_donation_campaigns",
326
+ },
327
+ {
328
+ name: "Welcome Program",
329
+ link: this.isLiteDomain
330
+ ? "On boarding page check list"
331
+ : "admin/welcome-program",
332
+ toLite: !this.isLiteDomain,
333
+ toMainDomain: false,
334
+ menuCheck: "menu_welcome_program",
335
+ },
336
+ {
337
+ name: "Operations",
338
+ link: this.isLiteDomain ? "Reporting Branches" : "projects",
339
+ toLite: !this.isLiteDomain,
340
+ toMainDomain: false,
341
+ menuCheck: "menu_projects",
342
+ },
343
+ {
344
+ name: "Reports",
345
+ link: "report/generate-excel",
346
+ toMainDomain: true,
347
+ menuCheck: "reports_tab",
348
+ },
349
+ {
350
+ name: "Team",
351
+ link: "view-employees",
352
+ toLite: !this.isLiteDomain,
353
+ toMainDomain: false,
354
+ menuCheck: "menu_team",
355
+ },
356
+ {
357
+ name: "News",
358
+ link: "news",
359
+ toLite: !this.isLiteDomain,
360
+ toMainDomain: false,
361
+ menuCheck: "menu_news",
362
+ },
363
+ {
364
+ name: "Career Hub",
365
+ link: this.config().careerSiteUrl,
366
+ isDirectLink: true,
367
+ menuCheck: "menu_career_hub",
368
+ },
369
+ {
370
+ name: "Service desk",
371
+ link: "https://jira.intellias.com/servicedesk/customer/portals",
372
+ toMainDomain: true,
373
+ menuCheck: "menu_service_desk",
374
+ blank: true,
375
+ },
376
+ {
377
+ name: "Knowledge base",
378
+ link: "https://confluence.intellias.com/pages/viewpage.action?pageId=110035843",
379
+ toMainDomain: true,
380
+ menuCheck: "menu_knowledge_base",
381
+ blank: true,
382
+ },
383
+ {
384
+ name: "IntelliVacancies",
385
+ link: this.isLiteDomain ? "IntelliVacancies" : "intelli-vacancies",
386
+ toLite: !this.isLiteDomain,
387
+ toMainDomain: false,
388
+ menuCheck: "menu_rotation_portal",
389
+ },
390
+ {
391
+ name: "Book a desk",
392
+ link: "https://intellias.officespacesoftware.com/visual-directory",
393
+ toMainDomain: true,
394
+ menuCheck: "menu_office_space",
395
+ blank: true,
396
+ },
397
+ {
398
+ name: "Company EA Model",
399
+ link: this.isLiteDomain ? "Company EA Model" : "ea",
400
+ toLite: !this.isLiteDomain,
401
+ toMainDomain: false,
402
+ menuCheck: "menu_ea_model",
403
+ },
404
+ {
405
+ name: "Admin",
406
+ menuCheck: "menu_admin",
407
+ adminMenu: true,
408
+ },
409
+ {
410
+ name: "Time Imports",
411
+ menuCheck: "menu_here_board_page",
412
+ hereBoardMenu: true,
413
+ },
414
+ ];
415
+ },
416
+ initializeAdminItems(): void {
417
+ this.adminItems = [
418
+ {
419
+ name: "IT support",
420
+ menuCheck: "menu_admin_it_support",
421
+ opened: false,
422
+ children: [
423
+ {
424
+ name: "Access roles",
425
+ menuCheck: "setup_roles",
426
+ link: this.isLiteDomain ? "Access Roles" : "access-roles",
427
+ toLite: !this.isLiteDomain,
428
+ toMainDomain: false,
429
+ },
430
+ {
431
+ name: "Work areas",
432
+ menuCheck: "menu_work_areas",
433
+ link: "work-areas",
434
+ toMainDomain: true,
435
+ },
436
+ {
437
+ name: "Technical work",
438
+ menuCheck: "menu_admin_it_support_technical_work",
439
+ link: "technical-work",
440
+ toLite: !this.isLiteDomain,
441
+ toMainDomain: false,
442
+ },
443
+ {
444
+ name: "Access cards",
445
+ menuCheck: "menu_admin_it_support_access_cards",
446
+ link: "access-cards",
447
+ toLite: !this.isLiteDomain,
448
+ toMainDomain: false,
449
+ },
450
+ {
451
+ name: "Client IPs",
452
+ menuCheck: "menu_admin_it_support_client_ips",
453
+ link: "clients/index.php",
454
+ toMainDomain: true,
455
+ },
456
+ {
457
+ name: "View logs",
458
+ menuCheck: "menu_admin_it_support_view_logs",
459
+ link: this.isLiteDomain ? "view_logs" : "view-logs",
460
+ toLite: !this.isLiteDomain,
461
+ toMainDomain: false,
462
+ },
463
+ {
464
+ name: "Service page",
465
+ menuCheck: "menu_service_page",
466
+ link: this.isLiteDomain ? "Service" : "service-page",
467
+ toLite: !this.isLiteDomain,
468
+ toMainDomain: false,
469
+ },
470
+ ],
471
+ },
472
+ {
473
+ name: "HR",
474
+ menuCheck: "menu_admin_hr",
475
+ opened: false,
476
+ children: [
477
+ {
478
+ name: "Manage IntelliStore",
479
+ menuCheck: "menu_intelli_store_manage",
480
+ link: this.isLiteDomain
481
+ ? "catalog-admin-products-list"
482
+ : "total-rewards-portal/smart-catalog/admin'",
483
+ toLite: !this.isLiteDomain,
484
+ toMainDomain: false,
485
+ },
486
+ {
487
+ name: "Trainings (OLD)",
488
+ menuCheck: "menu_admin_hr_trainings",
489
+ link: "eval/index.php",
490
+ toMainDomain: true,
491
+ },
492
+ {
493
+ name: "Trainings (OLD)",
494
+ menuCheck: "menu_admin_employee_trainings",
495
+ link: "employees-trainings",
496
+ toMainDomain: true,
497
+ },
498
+ {
499
+ name: "Events",
500
+ menuCheck: "event_and_training",
501
+ link: this.isLiteDomain ? "Manage trainings" : "trainings",
502
+ toLite: !this.isLiteDomain,
503
+ toMainDomain: false,
504
+ },
505
+ {
506
+ name: "Calendars",
507
+ menuCheck: "menu_admin_holiday_calendar",
508
+ link: "calendars",
509
+ toLite: !this.isLiteDomain,
510
+ toMainDomain: false,
511
+ },
512
+ {
513
+ name: "Manage smarts",
514
+ menuCheck: "menu_admin_hr_manage_smarts",
515
+ link: "virtual-money/index.php",
516
+ toMainDomain: true,
517
+ },
518
+ {
519
+ name: "Manage news",
520
+ menuCheck: "menu_admin_hr_news",
521
+ link: "admin/news",
522
+ toMainDomain: true,
523
+ },
524
+ {
525
+ name: "Compensation packages",
526
+ menuCheck: "menu_admin_non_comp_list",
527
+ link: this.isLiteDomain
528
+ ? "compensation-package"
529
+ : "admin/compensation-package",
530
+ toLite: !this.isLiteDomain,
531
+ toMainDomain: false,
532
+ },
533
+ {
534
+ name: "Banners",
535
+ menuCheck: "menu_admin_banners",
536
+ link: this.isLiteDomain ? "Banners List" : "banners",
537
+ toLite: !this.isLiteDomain,
538
+ toMainDomain: false,
539
+ },
540
+ {
541
+ name: "Manage Welcome Program",
542
+ link: this.isLiteDomain
543
+ ? "Manage Welcome Program"
544
+ : "admin/welcome-program",
545
+ toMainDomain: false,
546
+ toLite: !this.isLiteDomain,
547
+ menuCheck: "menu_manage_welcome_program",
548
+ },
549
+ {
550
+ name: "Jira Satisfaction Survey",
551
+ menuCheck: "menu_enps_survey_admin",
552
+ link: this.isLiteDomain
553
+ ? "Jira Satisfaction Survey List"
554
+ : "jira-satisfaction-survey",
555
+ toMainDomain: false,
556
+ toLite: !this.isLiteDomain,
557
+ },
558
+ ],
559
+ },
560
+ {
561
+ name: "Accountancy",
562
+ menuCheck: "menu_admin_accountancy",
563
+ link: "accountancy/detailedReporting",
564
+ toMainDomain: true,
565
+ },
566
+ {
567
+ name: "Countries",
568
+ menuCheck: "menu_admin_dictionary",
569
+ link: this.isLiteDomain ? "dictionary" : "countries",
570
+ toLite: !this.isLiteDomain,
571
+ toMainDomain: false,
572
+ },
573
+ ];
574
+ },
575
+ initializeHereBoardItems(): void {
576
+ this.hereBoardItems = [
577
+ {
578
+ name: "Employee Dashboard",
579
+ menuCheck: "menu_here_board_page_user",
580
+ link: this.isLiteDomain ? "Here Board Page" : "here-board-page",
581
+ toLite: !this.isLiteDomain,
582
+ toMainDomain: false,
583
+ },
584
+ {
585
+ name: "Manager Dashboard",
586
+ menuCheck: "menu_here_board_page_manager",
587
+ link: this.isLiteDomain
588
+ ? "Here Board Page Admin"
589
+ : "here-board-page-admin",
590
+ toLite: !this.isLiteDomain,
591
+ toMainDomain: false,
592
+ },
593
+ {
594
+ name: "Admin Dashboard",
595
+ menuCheck: "menu_here_board_page_owner",
596
+ link: this.isLiteDomain
597
+ ? "Here Board Page Admin"
598
+ : "here-board-page-admin",
599
+ toLite: !this.isLiteDomain,
600
+ toMainDomain: false,
601
+ },
602
+ ];
603
+ },
604
+ },
605
+ data(): Record<string, unknown> {
606
+ return {
607
+ flagShowSignOutLinks: false,
608
+ sideNavOpened: false,
609
+ baseRepository: new BaseRepository(),
610
+ rejectConfirm: undefined,
611
+ rejectedNotification: undefined,
612
+ giveKudosComponent: undefined,
613
+ items: [],
614
+ adminItems: [],
615
+ hereBoardItems: [],
616
+ overflowedItems: {
617
+ items: [],
618
+ startIndex: -1,
619
+ },
620
+ mobileMenu: null,
621
+ overflowedMenus: undefined as Array<HTMLElement>,
622
+ isOveflowedMenuMoved: false,
623
+ };
624
+ },
625
+ };