@intellias/menu 1.0.2 → 1.0.4

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 (170) hide show
  1. package/README.md +38 -9
  2. package/dist/css/1.css +20 -5
  3. package/dist/css/main.css +20 -2
  4. package/dist/index.html +9 -0
  5. package/dist/js/0.js +27 -27
  6. package/dist/js/1.js +27 -27
  7. package/dist/js/2.js +19 -19
  8. package/dist/js/3.js +16 -16
  9. package/dist/js/4.js +16 -16
  10. package/dist/js/5.js +16 -16
  11. package/dist/js/6.js +5 -5
  12. package/dist/js/main.js +653 -642
  13. package/dist/js/vue.js +2 -2
  14. package/package.json +99 -112
  15. package/Menu.ts +0 -625
  16. package/assets/icons/arrow-down.svg +0 -13
  17. package/assets/icons/arrow-left.svg +0 -3
  18. package/assets/icons/arrow-submenu.svg +0 -8
  19. package/assets/icons/close.svg +0 -3
  20. package/assets/icons/delete.svg +0 -13
  21. package/assets/icons/faq-new.svg +0 -4
  22. package/assets/icons/kudos.svg +0 -14
  23. package/assets/icons/loading-spinner.svg +0 -40
  24. package/assets/icons/notification.svg +0 -11
  25. package/assets/icons/notifications/assessment.svg +0 -10
  26. package/assets/icons/notifications/buddy_program.svg +0 -8
  27. package/assets/icons/notifications/compensation_packages.svg +0 -10
  28. package/assets/icons/notifications/dsat.svg +0 -8
  29. package/assets/icons/notifications/feedback.svg +0 -7
  30. package/assets/icons/notifications/kudos.svg +0 -4
  31. package/assets/icons/notifications/overtime_requests.svg +0 -15
  32. package/assets/icons/notifications/pdu_program.svg +0 -4
  33. package/assets/icons/notifications/profile_update.svg +0 -6
  34. package/assets/icons/notifications/recommendation_program.svg +0 -7
  35. package/assets/icons/notifications/reminders.svg +0 -4
  36. package/assets/icons/notifications/sick_leaves.svg +0 -5
  37. package/assets/icons/notifications/smarts.svg +0 -4
  38. package/assets/icons/notifications/survey.svg +0 -8
  39. package/assets/icons/notifications/unpaid_leave.svg +0 -4
  40. package/assets/icons/notifications/vacations.svg +0 -4
  41. package/assets/icons/pause.svg +0 -13
  42. package/assets/icons/play.svg +0 -13
  43. package/assets/icons/smart.svg +0 -14
  44. package/assets/icons/smarts-kudos.svg +0 -11
  45. package/assets/icons/spinner-solid.svg +0 -1
  46. package/assets/icons/vacation.svg +0 -14
  47. package/assets/icons/visibility.svg +0 -1
  48. package/assets/intems-logo.svg +0 -3
  49. package/babel.config.js +0 -6
  50. package/buses/eventBus.ts +0 -19
  51. package/buses/events/GiveKudosEvent.ts +0 -7
  52. package/components/buttons/action-button/ActionButton.scss +0 -133
  53. package/components/buttons/action-button/ActionButton.ts +0 -57
  54. package/components/buttons/action-button/ActionButton.vue +0 -50
  55. package/components/buttons/secondary-button/SecondaryButton.scss +0 -48
  56. package/components/buttons/secondary-button/SecondaryButton.ts +0 -28
  57. package/components/buttons/secondary-button/SecondaryButton.vue +0 -27
  58. package/components/confirm/Confirm.scss +0 -44
  59. package/components/confirm/Confirm.ts +0 -82
  60. package/components/confirm/Confirm.vue +0 -64
  61. package/components/give-kudos-form/GiveKudosForm.scss +0 -114
  62. package/components/give-kudos-form/GiveKudosForm.ts +0 -159
  63. package/components/give-kudos-form/GiveKudosForm.vue +0 -131
  64. package/components/give-kudos-form/mixins/UserSelectMixin.ts +0 -57
  65. package/components/give-kudos-form/models/KudosShareModel.ts +0 -6
  66. package/components/give-kudos-form/models/UserListModel.ts +0 -5
  67. package/components/give-kudos-form/validators/InEnglishValidatorRegex.ts +0 -17
  68. package/components/give-kudos-form/validators/KudosBalance.ts +0 -10
  69. package/components/modal/Modal.scss +0 -53
  70. package/components/modal/Modal.ts +0 -70
  71. package/components/modal/Modal.vue +0 -28
  72. package/components/notifications-sidebar/NotificationsSidebar.scss +0 -665
  73. package/components/notifications-sidebar/NotificationsSidebar.ts +0 -203
  74. package/components/notifications-sidebar/NotificationsSidebar.vue +0 -171
  75. package/components/notifications-sidebar/models/BroadcastNotificationPayload.ts +0 -8
  76. package/components/notifications-sidebar/models/TotalCounter.ts +0 -50
  77. package/components/notifications-sidebar/notification/Notification.ts +0 -17
  78. package/components/notifications-sidebar/notification/Notification.vue +0 -87
  79. package/components/play-pause/PlayPause.scss +0 -33
  80. package/components/play-pause/PlayPause.ts +0 -156
  81. package/components/play-pause/PlayPause.vue +0 -36
  82. package/components/play-pause/PlayPauseStatus.ts +0 -4
  83. package/components/play-pause/helpers/LatestTrackedTimeDurationHelper.ts +0 -55
  84. package/components/play-pause/helpers/PauseHelper.ts +0 -55
  85. package/components/play-pause/helpers/TrackedTimeHelper.ts +0 -80
  86. package/components/preloader/Preloader.vue +0 -34
  87. package/components/request-loader/RequestLoader.scss +0 -20
  88. package/components/request-loader/RequestLoader.ts +0 -80
  89. package/components/request-loader/RequestLoader.vue +0 -15
  90. package/components/sub-menu/SubMenu.scss +0 -33
  91. package/components/sub-menu/SubMenu.ts +0 -38
  92. package/components/sub-menu/SubMenu.vue +0 -21
  93. package/components/time-ago/TimeAgo.ts +0 -34
  94. package/components/time-ago/TimeAgo.vue +0 -9
  95. package/components/user-picture/UserPicture.scss +0 -62
  96. package/components/user-picture/UserPicture.ts +0 -105
  97. package/components/user-picture/UserPicture.vue +0 -23
  98. package/components/v-select-intems/VSelectIntems.ts +0 -112
  99. package/components/v-select-intems/VSelectIntems.vue +0 -68
  100. package/components/v-select-intems/open-indicator/OpenIndicator.vue +0 -3
  101. package/dist/html/app.html +0 -19
  102. package/dist/html/styles.html +0 -1
  103. package/helpers/GeneralHelper.ts +0 -61
  104. package/helpers/PublisherSubscriber.ts +0 -34
  105. package/helpers/QueryFilter.ts +0 -204
  106. package/helpers/TimeHelper.ts +0 -54
  107. package/helpers/Validations.ts +0 -7
  108. package/helpers/model/ModelHelper.ts +0 -155
  109. package/helpers/model/decorators/AsCollection.ts +0 -26
  110. package/helpers/model/decorators/AsModel.ts +0 -25
  111. package/helpers/model/decorators/DateTime.ts +0 -26
  112. package/helpers/model/decorators/TimeDuration.ts +0 -33
  113. package/helpers/moment/Duration.ts +0 -64
  114. package/helpers/moment/Moment.ts +0 -17
  115. package/helpers/moment/index.d.ts +0 -20
  116. package/helpers/response/AxiosProxy.ts +0 -72
  117. package/helpers/response/ErrorsToToastHelper.ts +0 -42
  118. package/helpers/response/ResponseCode.ts +0 -16
  119. package/helpers/response/ResponseHelper.ts +0 -42
  120. package/helpers/response/ResponseInterface.ts +0 -34
  121. package/helpers/response/ResponseState.ts +0 -6
  122. package/jsconfig.json +0 -19
  123. package/mixins/IntemsMath.ts +0 -29
  124. package/mixins/notifications/ActionProcessing.ts +0 -134
  125. package/mixins/notifications/confirms/AssetRejectionConfirm.vue +0 -59
  126. package/mixins/notifications/confirms/SickLeaveRejectionConfirm.vue +0 -31
  127. package/mixins/notifications/confirms/UnpaidLeaveRejectionConfirm.vue +0 -31
  128. package/mixins/notifications/confirms/VacationRejectionConfirm.vue +0 -31
  129. package/models/AssetModel.ts +0 -80
  130. package/models/AssetRequestModel.ts +0 -25
  131. package/models/ConfigModel.ts +0 -20
  132. package/models/EmployeeStartEndDateModel.ts +0 -16
  133. package/models/EmploymentTypeModel.ts +0 -95
  134. package/models/LogoutModel.ts +0 -3
  135. package/models/Model.ts +0 -12
  136. package/models/ModuleOptions.ts +0 -24
  137. package/models/PublicInfoModel.ts +0 -38
  138. package/models/PublicLocationModel.ts +0 -36
  139. package/models/StatusModel.ts +0 -8
  140. package/models/TrackedTimeModel.ts +0 -32
  141. package/models/location/PublicLocationModel.ts +0 -36
  142. package/models/timezones/LocalTimezoneHistoryModel.ts +0 -8
  143. package/models/timezones/TimezoneModel.ts +0 -9
  144. package/models/user/ExtendedInfoModel.ts +0 -37
  145. package/models/user/NotificationActionModel.ts +0 -53
  146. package/models/user/NotificationModel.ts +0 -84
  147. package/models/user/PublicInfoModel.ts +0 -38
  148. package/models/user/WelcomeProgram.ts +0 -4
  149. package/repositories/BaseRepository.ts +0 -42
  150. package/repositories/BaseUrl.ts +0 -107
  151. package/repositories/Repository.ts +0 -291
  152. package/repositories/ResourceRepository.ts +0 -99
  153. package/repositories/TrackedTimeRepository.ts +0 -43
  154. package/repositories/UserRepository.ts +0 -75
  155. package/repositories/subscribers/CreateSubscribers.ts +0 -28
  156. package/repositories/subscribers/DefaultSubscribers.ts +0 -82
  157. package/repositories/subscribers/DeleteSubscribers.ts +0 -28
  158. package/repositories/subscribers/DownloadSubscribers.ts +0 -28
  159. package/repositories/subscribers/Subscribers.ts +0 -13
  160. package/repositories/subscribers/UpdateSubscribers.ts +0 -32
  161. package/scss/components/_global.scss +0 -66
  162. package/scss/components/_mixins.scss +0 -31
  163. package/scss/components/_tooltip.scss +0 -45
  164. package/scss/components/_utils.scss +0 -26
  165. package/scss/components/_variables.scss +0 -103
  166. package/scss/main.scss +0 -7
  167. package/shims-vue.d.ts +0 -9
  168. package/tsconfig.json +0 -31
  169. package/webpack.config.js +0 -126
  170. package/wrapper.ts +0 -51
@@ -1,203 +0,0 @@
1
- import { mapGetters, mapActions, mapMutations } from "vuex";
2
- import VueCustomScrollbar from "vue-custom-scrollbar";
3
- import QueryFilter from "../../helpers/QueryFilter";
4
- import {
5
- NotificationRejectionData,
6
- NotificationStatus,
7
- NotificationType,
8
- } from "../../models/user/NotificationModel";
9
- import Notification from "./notification/Notification.vue";
10
- import ActionButton from "../buttons/action-button/ActionButton.vue";
11
- import RequestLoader from "../request-loader/RequestLoader.vue";
12
- import Preloader from "../preloader/Preloader.vue";
13
- import { map } from "../../helpers/model/ModelHelper";
14
- import BroadcastNotificationPayload from "./models/BroadcastNotificationPayload";
15
- import ConfigModel from "../../models/ConfigModel";
16
- import DropdownMenu from "v-dropdown-menu/vue2";
17
- import "v-dropdown-menu/dist/vue2/v-dropdown-menu.css";
18
- import Tabs from "vue-tabs-with-active-line";
19
- import { ProjectName } from "../../wrapper";
20
-
21
- export default {
22
- components: {
23
- Preloader,
24
- RequestLoader,
25
- ActionButton,
26
- Notification,
27
- VueCustomScrollbar,
28
- DropdownMenu,
29
- Tabs,
30
- },
31
- inject: ["projectName", "storeAdapter"],
32
- mounted(): void {
33
- this.initListener();
34
- },
35
- methods: {
36
- ...mapActions("User/Notifications", [
37
- "readAll",
38
- "newNotification",
39
- "markAsProcessed",
40
- ]),
41
- ...mapActions("User/Notifications/SidebarModule", [
42
- "fetchSidebarNotifications",
43
- "dismissAll",
44
- ]),
45
- ...mapMutations("User/Notifications/SidebarModule", [
46
- "unsetNotifications",
47
- "changeStatus",
48
- ]),
49
- initListener(): void {
50
- this.$echo
51
- .private(`employee.${this.getUser.employee_id}`)
52
- .notification((payload) => {
53
- this.newNotification(map(BroadcastNotificationPayload, payload));
54
- if (localStorage.activeBrowserTab === "false") {
55
- localStorage.pendingAnimation = true;
56
- } else {
57
- this.bellAnimation();
58
- }
59
- });
60
- this.$echo
61
- .private(`employee.${this.getUser.employee_id}`)
62
- .listen("NotificationProcessed", (payload) => {
63
- const notification = this.find(payload.notification_id);
64
- if (
65
- notification &&
66
- notification.status !== NotificationStatus.processed
67
- ) {
68
- this.markAsProcessed(notification);
69
- }
70
- });
71
- localStorage.activeBrowserTab = true;
72
- document.addEventListener("visibilitychange", () => {
73
- localStorage.activeBrowserTab = !document.hidden;
74
- if (
75
- localStorage.activeBrowserTab === "true" &&
76
- localStorage.pendingAnimation === "true"
77
- ) {
78
- this.bellAnimation();
79
- }
80
- });
81
- },
82
- async initData(): void {
83
- Promise.all([
84
- this.unsetNotifications(),
85
- this.fetchSidebarNotifications(this.queryAll.unsetPagination()),
86
- this.fetchSidebarNotifications(this.queryPending.unsetPagination()),
87
- ]).then(() => {
88
- this.updateScrollbar();
89
- });
90
- },
91
- loadAllNotifications(): void {
92
- if (!this.dropDownOpen || this.currentTab !== "all") {
93
- return;
94
- }
95
- this.fetchSidebarNotifications(
96
- this.queryAll.offset(this.notices.count())
97
- );
98
- },
99
- loadPendingRequests(): void {
100
- if (!this.dropDownOpen || this.currentTab !== "pending_approval") {
101
- return;
102
- }
103
- this.fetchSidebarNotifications(
104
- this.queryPending.offset(this.pendingRequests.count())
105
- );
106
- },
107
- changeActiveTab(newTab): void {
108
- this.currentTab = newTab;
109
- },
110
- bellAnimation(): void {
111
- this.displayAnimation = true;
112
- setTimeout(() => {
113
- this.displayAnimation = false;
114
- }, 5600);
115
-
116
- localStorage.pendingAnimation = false;
117
- },
118
- closeSidebar(): void {
119
- this.dropDownOpen = false;
120
- },
121
- updateScrollbar(): void {
122
- this.$refs.scrollBar.update();
123
- },
124
- emitRejectionComponent(rejectionData: NotificationRejectionData): void {
125
- this.$emit("rejection-component", rejectionData);
126
- },
127
- },
128
- computed: {
129
- ...mapGetters("User", ["getUser"]),
130
- ...mapGetters("User/Notifications/SidebarModule", [
131
- "notices",
132
- "pendingRequests",
133
- "find",
134
- ]),
135
- ...mapGetters("User/Notifications", ["hasUnread", "totalUnread"]),
136
- hasUnreadNotifications(): boolean {
137
- return this.hasUnread !== undefined
138
- ? this.hasUnread
139
- : this.getUser.has_unread_notifications;
140
- },
141
- isLiteDomain(): boolean {
142
- return this.projectName === ProjectName.Lite;
143
- },
144
- intemsConfig(): ConfigModel {
145
- return this.storeAdapter.Config.state.data;
146
- },
147
- },
148
- watch: {
149
- "totalUnread.notice": {
150
- handler(notice: number): void {
151
- const tab = this.$refs.tabs.$el.children[0];
152
- if (this.totalUnread.notice) {
153
- tab.innerHTML = `All
154
- <span class="counter" >${notice}</span>`;
155
- } else {
156
- tab.innerHTML = "All";
157
- }
158
- },
159
- },
160
- "totalUnread.pending_request": {
161
- handler(request: number): void {
162
- const tab = this.$refs.tabs.$el.children[1];
163
- if (this.totalUnread.pending_request) {
164
- tab.innerHTML = `Pending approval
165
- <span class="counter" >${request}</span>`;
166
- } else {
167
- tab.innerHTML = "Pending approval";
168
- }
169
- },
170
- },
171
- },
172
- data(): Record<string, unknown> {
173
- return {
174
- queryAll: new QueryFilter()
175
- .notIn("status", [
176
- NotificationStatus.hidden,
177
- NotificationStatus.hidden_processed,
178
- ])
179
- .scope("type", NotificationType.notice),
180
- queryPending: new QueryFilter()
181
- .notIn("status", [
182
- NotificationStatus.hidden,
183
- NotificationStatus.hidden_processed,
184
- ])
185
- .scope("type", NotificationType.pending_request),
186
- dropDownOpen: false,
187
- tabs: [
188
- {
189
- title: "All",
190
- value: "all",
191
- },
192
- {
193
- title: "Pending approval",
194
- value: "pending_approval",
195
- },
196
- ],
197
- currentTab: "all",
198
- preloaderSize: "small",
199
- scrollBarSettings: { suppressScrollX: true, minScrollbarLength: 50 },
200
- displayAnimation: false,
201
- };
202
- },
203
- };
@@ -1,171 +0,0 @@
1
- <template>
2
- <div class="notifications-sidebar dropdown-menu">
3
- <dropdown-menu
4
- direction="center"
5
- :overlay="false"
6
- :isOpen="dropDownOpen"
7
- @opened="initData"
8
- >
9
- <template #trigger>
10
- <a class="notification-href pointer" ref="notifications_sidebar">
11
- <i
12
- class="icon notification"
13
- :class="{ 'bell-animation': displayAnimation }"
14
- ></i>
15
- <transition name="fade" :duration="{ enter: 4000, leave: 1 }">
16
- <span v-show="hasUnreadNotifications" class="has-unread"></span>
17
- </transition>
18
- </a>
19
- </template>
20
- <template #header>
21
- <div class="row note-title-row">
22
- <div class="col s10">
23
- <span class="primary-text">Notifications</span>
24
- </div>
25
- <div class="col s2">
26
- <dropdown-menu direction="left" :overlay="false">
27
- <template #trigger>
28
- <a
29
- class="pointer"
30
- ref="manage_dropdown"
31
- :data-target="`manage_dropdown_${_uid}`"
32
- >
33
- <div
34
- class="overflowed-menu-toggler notification-manage-toggler"
35
- >
36
- <span></span>
37
- <span></span>
38
- <span></span>
39
- </div>
40
- </a>
41
- </template>
42
- <template #body>
43
- <ul class="sub-menu">
44
- <li>
45
- <a
46
- @click="readAll"
47
- :class="{
48
- 'is-disabled':
49
- !totalUnread.notice && !totalUnread.pending_request,
50
- }"
51
- >
52
- Mark all as read
53
- </a>
54
- </li>
55
- <li>
56
- <a
57
- @click="dismissAll"
58
- :class="{
59
- 'is-disabled':
60
- !notices.count() && !pendingRequests.count(),
61
- }"
62
- >
63
- Dismiss all
64
- </a>
65
- </li>
66
- </ul>
67
- </template>
68
- </dropdown-menu>
69
- </div>
70
- </div>
71
- </template>
72
- <template #body>
73
- <div class="main-dropdown">
74
- <div class="row">
75
- <tabs
76
- :tabs="tabs"
77
- :currentTab="currentTab"
78
- :wrapper-class="'default-tabs'"
79
- :tab-class="'tab'"
80
- :tab-active-class="'active'"
81
- :line-class="'indicator'"
82
- @onClick="changeActiveTab"
83
- ref="tabs"
84
- />
85
- <div class="notification-content">
86
- <div class="row notifications-list" v-show="currentTab === 'all'">
87
- <vue-custom-scrollbar
88
- ref="scrollBar"
89
- class="col tab-content"
90
- :options="scrollBarSettings"
91
- @ps-y-reach-end="loadAllNotifications"
92
- >
93
- <notification
94
- v-for="notification in notices"
95
- @rejection-component="emitRejectionComponent"
96
- :key="notification.id"
97
- :notification="notification"
98
- ></notification>
99
- <preloader
100
- v-if="queryAll.loading"
101
- :size="preloaderSize"
102
- ></preloader>
103
- <div
104
- v-else-if="!notices.count()"
105
- class="main-text margin-top-50 align-center"
106
- >
107
- You have no new notifications
108
- </div>
109
- </vue-custom-scrollbar>
110
- </div>
111
- <div
112
- class="row notifications-list"
113
- v-show="currentTab === 'pending_approval'"
114
- >
115
- <vue-custom-scrollbar
116
- class="col tab-content"
117
- :options="scrollBarSettings"
118
- @ps-y-reach-end="loadPendingRequests"
119
- >
120
- <notification
121
- v-for="notification in pendingRequests"
122
- @rejection-component="emitRejectionComponent"
123
- :key="notification.id"
124
- :notification="notification"
125
- ></notification>
126
- <preloader
127
- v-if="queryAll.loading"
128
- :size="preloaderSize"
129
- ></preloader>
130
- <div
131
- v-else-if="!pendingRequests.count()"
132
- class="main-text margin-top-50 align-center"
133
- >
134
- You have no pending requests
135
- </div>
136
- </vue-custom-scrollbar>
137
- </div>
138
- </div>
139
- </div>
140
- <div class="row view-all-row align-center">
141
- <action-button
142
- v-if="isLiteDomain"
143
- :to="{ name: 'Employee Notifications' }"
144
- is-link
145
- @click.native="closeSidebar"
146
- >
147
- View all
148
- </action-button>
149
- <action-button
150
- v-else
151
- :href="`${intemsConfig.liteSiteUrl}`"
152
- is-link
153
- @click.native="closeSidebar"
154
- >
155
- View all
156
- </action-button>
157
- </div>
158
- </div>
159
- </template>
160
- </dropdown-menu>
161
- </div>
162
- </template>
163
-
164
- <script>
165
- import NotificationsSidebar from "./NotificationsSidebar";
166
-
167
- export default NotificationsSidebar;
168
- </script>
169
- <style lang="scss">
170
- @import "NotificationsSidebar";
171
- </style>
@@ -1,8 +0,0 @@
1
- import { NotificationType } from "../../../models/user/NotificationModel";
2
-
3
- export default class {
4
- comment = undefined as string;
5
- id = undefined as string;
6
- notification_type = undefined as NotificationType;
7
- type = undefined as string;
8
- }
@@ -1,50 +0,0 @@
1
- import { NotificationType } from "../../../models/user/NotificationModel";
2
-
3
- export type NotificationTotal = {
4
- notification: number;
5
- pending_request: number;
6
- };
7
- export default class {
8
- notice = 0 as number;
9
- pending_request = 0 as number;
10
- private has_unread = undefined;
11
-
12
- constructor(total?: NotificationTotal) {
13
- if (!total) {
14
- return;
15
- }
16
- this.notice = total.notification;
17
- this.pending_request = total.pending_request;
18
- this.checkHasUnread();
19
- }
20
-
21
- decrement(type: NotificationType): this {
22
- this[type.toString()] = this[type.toString()] - 1;
23
- this.checkHasUnread();
24
-
25
- return this;
26
- }
27
-
28
- increment(type: NotificationType | string): this {
29
- this[type.toString()] = this[type.toString()] + 1;
30
- this.checkHasUnread();
31
-
32
- return this;
33
- }
34
-
35
- private checkHasUnread(): void {
36
- this.has_unread = this.notice > 0 || this.pending_request > 0;
37
- }
38
-
39
- get hasUnread(): boolean {
40
- return this.has_unread;
41
- }
42
-
43
- readAll(): this {
44
- this.notice = 0;
45
- this.pending_request = 0;
46
- this.checkHasUnread();
47
-
48
- return this;
49
- }
50
- }
@@ -1,17 +0,0 @@
1
- import { mapActions } from "vuex";
2
- import ActionButton from "../../buttons/action-button/ActionButton.vue";
3
- import ActionProcessing from "../../../mixins/notifications/ActionProcessing";
4
- import TimeAgo from "../../time-ago/TimeAgo.vue";
5
- import NotificationModel from "../../../models/user/NotificationModel";
6
-
7
- export default {
8
- components: { TimeAgo, ActionButton },
9
- props: {
10
- notification: NotificationModel,
11
- },
12
- mixins: [ActionProcessing],
13
- methods: {
14
- ...mapActions("User/Notifications", ["read"]),
15
- ...mapActions("User/Notifications/SidebarModule", ["dismiss"]),
16
- },
17
- };
@@ -1,87 +0,0 @@
1
- <template>
2
- <div class="note" :class="{ read: !notification.isNew }">
3
- <div class="row">
4
- <div class="col s2 margin-top-5">
5
- <i class="icon category-icon" :class="notification.icon"></i>
6
- </div>
7
- <div class="col s8 note-title-col">
8
- <span class="primary-text" v-html="notification.title"></span><br />
9
- <span class="text-muted"
10
- ><time-ago :time="notification.created_at"></time-ago
11
- ></span>
12
- </div>
13
- <span class="manage-notification">
14
- <a
15
- v-if="notification.isNew && !actionProcessing"
16
- @click="read(notification)"
17
- class="pointer"
18
- title="Mark as read"
19
- >
20
- <i class="icon icon-small visibility"></i>
21
- </a>
22
- <a
23
- v-if="!actionProcessing"
24
- @click="dismiss(notification)"
25
- class="margin-left-10 pointer"
26
- >
27
- <i class="icon icon-small delete" title="Dismiss"></i>
28
- </a>
29
- </span>
30
- </div>
31
- <div class="row margin-top-15">
32
- <div
33
- class="col semi-primary-text"
34
- v-html="notification.description"
35
- ></div>
36
- </div>
37
- <div class="row margin-top-15" v-if="notification.actions.count()">
38
- <div class="col s10 action-buttons">
39
- <template v-for="(action, index) in notification.actions">
40
- <action-button
41
- v-if="
42
- !notification.isProcessed && !action.isLink && !actionProcessing
43
- "
44
- :key="index"
45
- class="margin-right-10"
46
- :class="{ 'reject-color': action.isReject }"
47
- btn-link
48
- @click.native="submitAction(action)"
49
- >
50
- {{ title(action) }}
51
- </action-button>
52
- <action-button
53
- v-else-if="action.isLink"
54
- :key="index"
55
- :is-disabled="isExpired(action)"
56
- btn-link
57
- class="margin-right-10"
58
- @click.native="proceedToView(action)"
59
- >
60
- {{ title(action) }}
61
- </action-button>
62
- <action-button
63
- v-else
64
- is-disabled
65
- btn-link
66
- class="margin-right-10"
67
- :key="index"
68
- >
69
- {{ title(action) }}
70
- </action-button>
71
- </template>
72
- </div>
73
- <div class="col s2 align-right">
74
- <i
75
- v-show="actionProcessing"
76
- class="icon icon-small2 loading-spinner loading"
77
- ></i>
78
- </div>
79
- </div>
80
- </div>
81
- </template>
82
-
83
- <script>
84
- import Notification from "./Notification";
85
-
86
- export default Notification;
87
- </script>
@@ -1,33 +0,0 @@
1
- @use "sass:map";
2
- @import "../../scss/components/variables";
3
-
4
- #modalTracked {
5
- color: map.get($intems-colors, "dark");
6
- .modal-content {
7
- #tracked-content {
8
- display: flex;
9
- align-items: center;
10
- p {
11
- margin: 0;
12
- line-height: initial;
13
- }
14
- }
15
- #span-clock {
16
- margin-right: 10px;
17
- i {
18
- font-size: 54px;
19
- }
20
- }
21
- }
22
- }
23
- .play-pause {
24
- display: flex;
25
- i.spinner-solid {
26
- animation: spin 1s linear infinite;
27
- }
28
- }
29
- @keyframes spin {
30
- 100% {
31
- transform: rotate(360deg);
32
- }
33
- }