@intellias/menu 1.0.2 → 1.0.5
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.
- package/README.md +44 -9
- package/dist/css/main.css +155 -2
- package/dist/index.html +9 -0
- package/dist/js/{1.js → kudosForm.js} +24 -58
- package/dist/js/main.js +654 -689
- package/dist/js/rejectComponent.js +363 -0
- package/dist/js/{6.js → vendors~kudosForm.js} +5 -5
- package/dist/js/{0.js → vendors~kudosForm~rejectComponent.js} +27 -27
- package/dist/js/vue.js +2 -2
- package/package.json +100 -112
- package/Menu.ts +0 -625
- package/assets/icons/arrow-down.svg +0 -13
- package/assets/icons/arrow-left.svg +0 -3
- package/assets/icons/arrow-submenu.svg +0 -8
- package/assets/icons/close.svg +0 -3
- package/assets/icons/delete.svg +0 -13
- package/assets/icons/faq-new.svg +0 -4
- package/assets/icons/kudos.svg +0 -14
- package/assets/icons/loading-spinner.svg +0 -40
- package/assets/icons/notification.svg +0 -11
- package/assets/icons/notifications/assessment.svg +0 -10
- package/assets/icons/notifications/buddy_program.svg +0 -8
- package/assets/icons/notifications/compensation_packages.svg +0 -10
- package/assets/icons/notifications/dsat.svg +0 -8
- package/assets/icons/notifications/feedback.svg +0 -7
- package/assets/icons/notifications/kudos.svg +0 -4
- package/assets/icons/notifications/overtime_requests.svg +0 -15
- package/assets/icons/notifications/pdu_program.svg +0 -4
- package/assets/icons/notifications/profile_update.svg +0 -6
- package/assets/icons/notifications/recommendation_program.svg +0 -7
- package/assets/icons/notifications/reminders.svg +0 -4
- package/assets/icons/notifications/sick_leaves.svg +0 -5
- package/assets/icons/notifications/smarts.svg +0 -4
- package/assets/icons/notifications/survey.svg +0 -8
- package/assets/icons/notifications/unpaid_leave.svg +0 -4
- package/assets/icons/notifications/vacations.svg +0 -4
- package/assets/icons/pause.svg +0 -13
- package/assets/icons/play.svg +0 -13
- package/assets/icons/smart.svg +0 -14
- package/assets/icons/smarts-kudos.svg +0 -11
- package/assets/icons/spinner-solid.svg +0 -1
- package/assets/icons/vacation.svg +0 -14
- package/assets/icons/visibility.svg +0 -1
- package/assets/intems-logo.svg +0 -3
- package/babel.config.js +0 -6
- package/buses/eventBus.ts +0 -19
- package/buses/events/GiveKudosEvent.ts +0 -7
- package/components/buttons/action-button/ActionButton.scss +0 -133
- package/components/buttons/action-button/ActionButton.ts +0 -57
- package/components/buttons/action-button/ActionButton.vue +0 -50
- package/components/buttons/secondary-button/SecondaryButton.scss +0 -48
- package/components/buttons/secondary-button/SecondaryButton.ts +0 -28
- package/components/buttons/secondary-button/SecondaryButton.vue +0 -27
- package/components/confirm/Confirm.scss +0 -44
- package/components/confirm/Confirm.ts +0 -82
- package/components/confirm/Confirm.vue +0 -64
- package/components/give-kudos-form/GiveKudosForm.scss +0 -114
- package/components/give-kudos-form/GiveKudosForm.ts +0 -159
- package/components/give-kudos-form/GiveKudosForm.vue +0 -131
- package/components/give-kudos-form/mixins/UserSelectMixin.ts +0 -57
- package/components/give-kudos-form/models/KudosShareModel.ts +0 -6
- package/components/give-kudos-form/models/UserListModel.ts +0 -5
- package/components/give-kudos-form/validators/InEnglishValidatorRegex.ts +0 -17
- package/components/give-kudos-form/validators/KudosBalance.ts +0 -10
- package/components/modal/Modal.scss +0 -53
- package/components/modal/Modal.ts +0 -70
- package/components/modal/Modal.vue +0 -28
- package/components/notifications-sidebar/NotificationsSidebar.scss +0 -665
- package/components/notifications-sidebar/NotificationsSidebar.ts +0 -203
- package/components/notifications-sidebar/NotificationsSidebar.vue +0 -171
- package/components/notifications-sidebar/models/BroadcastNotificationPayload.ts +0 -8
- package/components/notifications-sidebar/models/TotalCounter.ts +0 -50
- package/components/notifications-sidebar/notification/Notification.ts +0 -17
- package/components/notifications-sidebar/notification/Notification.vue +0 -87
- package/components/play-pause/PlayPause.scss +0 -33
- package/components/play-pause/PlayPause.ts +0 -156
- package/components/play-pause/PlayPause.vue +0 -36
- package/components/play-pause/PlayPauseStatus.ts +0 -4
- package/components/play-pause/helpers/LatestTrackedTimeDurationHelper.ts +0 -55
- package/components/play-pause/helpers/PauseHelper.ts +0 -55
- package/components/play-pause/helpers/TrackedTimeHelper.ts +0 -80
- package/components/preloader/Preloader.vue +0 -34
- package/components/request-loader/RequestLoader.scss +0 -20
- package/components/request-loader/RequestLoader.ts +0 -80
- package/components/request-loader/RequestLoader.vue +0 -15
- package/components/sub-menu/SubMenu.scss +0 -33
- package/components/sub-menu/SubMenu.ts +0 -38
- package/components/sub-menu/SubMenu.vue +0 -21
- package/components/time-ago/TimeAgo.ts +0 -34
- package/components/time-ago/TimeAgo.vue +0 -9
- package/components/user-picture/UserPicture.scss +0 -62
- package/components/user-picture/UserPicture.ts +0 -105
- package/components/user-picture/UserPicture.vue +0 -23
- package/components/v-select-intems/VSelectIntems.ts +0 -112
- package/components/v-select-intems/VSelectIntems.vue +0 -68
- package/components/v-select-intems/open-indicator/OpenIndicator.vue +0 -3
- package/dist/css/1.css +0 -85
- package/dist/css/2.css +0 -34
- package/dist/css/3.css +0 -34
- package/dist/css/4.css +0 -34
- package/dist/css/5.css +0 -34
- package/dist/html/app.html +0 -19
- package/dist/html/styles.html +0 -1
- package/dist/js/2.js +0 -217
- package/dist/js/3.js +0 -181
- package/dist/js/4.js +0 -181
- package/dist/js/5.js +0 -181
- package/helpers/GeneralHelper.ts +0 -61
- package/helpers/PublisherSubscriber.ts +0 -34
- package/helpers/QueryFilter.ts +0 -204
- package/helpers/TimeHelper.ts +0 -54
- package/helpers/Validations.ts +0 -7
- package/helpers/model/ModelHelper.ts +0 -155
- package/helpers/model/decorators/AsCollection.ts +0 -26
- package/helpers/model/decorators/AsModel.ts +0 -25
- package/helpers/model/decorators/DateTime.ts +0 -26
- package/helpers/model/decorators/TimeDuration.ts +0 -33
- package/helpers/moment/Duration.ts +0 -64
- package/helpers/moment/Moment.ts +0 -17
- package/helpers/moment/index.d.ts +0 -20
- package/helpers/response/AxiosProxy.ts +0 -72
- package/helpers/response/ErrorsToToastHelper.ts +0 -42
- package/helpers/response/ResponseCode.ts +0 -16
- package/helpers/response/ResponseHelper.ts +0 -42
- package/helpers/response/ResponseInterface.ts +0 -34
- package/helpers/response/ResponseState.ts +0 -6
- package/jsconfig.json +0 -19
- package/mixins/IntemsMath.ts +0 -29
- package/mixins/notifications/ActionProcessing.ts +0 -134
- package/mixins/notifications/confirms/AssetRejectionConfirm.vue +0 -59
- package/mixins/notifications/confirms/SickLeaveRejectionConfirm.vue +0 -31
- package/mixins/notifications/confirms/UnpaidLeaveRejectionConfirm.vue +0 -31
- package/mixins/notifications/confirms/VacationRejectionConfirm.vue +0 -31
- package/models/AssetModel.ts +0 -80
- package/models/AssetRequestModel.ts +0 -25
- package/models/ConfigModel.ts +0 -20
- package/models/EmployeeStartEndDateModel.ts +0 -16
- package/models/EmploymentTypeModel.ts +0 -95
- package/models/LogoutModel.ts +0 -3
- package/models/Model.ts +0 -12
- package/models/ModuleOptions.ts +0 -24
- package/models/PublicInfoModel.ts +0 -38
- package/models/PublicLocationModel.ts +0 -36
- package/models/StatusModel.ts +0 -8
- package/models/TrackedTimeModel.ts +0 -32
- package/models/location/PublicLocationModel.ts +0 -36
- package/models/timezones/LocalTimezoneHistoryModel.ts +0 -8
- package/models/timezones/TimezoneModel.ts +0 -9
- package/models/user/ExtendedInfoModel.ts +0 -37
- package/models/user/NotificationActionModel.ts +0 -53
- package/models/user/NotificationModel.ts +0 -84
- package/models/user/PublicInfoModel.ts +0 -38
- package/models/user/WelcomeProgram.ts +0 -4
- package/repositories/BaseRepository.ts +0 -42
- package/repositories/BaseUrl.ts +0 -107
- package/repositories/Repository.ts +0 -291
- package/repositories/ResourceRepository.ts +0 -99
- package/repositories/TrackedTimeRepository.ts +0 -43
- package/repositories/UserRepository.ts +0 -75
- package/repositories/subscribers/CreateSubscribers.ts +0 -28
- package/repositories/subscribers/DefaultSubscribers.ts +0 -82
- package/repositories/subscribers/DeleteSubscribers.ts +0 -28
- package/repositories/subscribers/DownloadSubscribers.ts +0 -28
- package/repositories/subscribers/Subscribers.ts +0 -13
- package/repositories/subscribers/UpdateSubscribers.ts +0 -32
- package/scss/components/_global.scss +0 -66
- package/scss/components/_mixins.scss +0 -31
- package/scss/components/_tooltip.scss +0 -45
- package/scss/components/_utils.scss +0 -26
- package/scss/components/_variables.scss +0 -103
- package/scss/main.scss +0 -7
- package/shims-vue.d.ts +0 -9
- package/tsconfig.json +0 -31
- package/webpack.config.js +0 -126
- 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,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
|
-
}
|